diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 8872ff8..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,24 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "npm" - directory: "/" - labels: - - "dependencies" - - "npm" - schedule: - interval: "weekly" - day: "sunday" - ignore: - # the major version for Node should match the runtime configured in action.yml - - dependency-name: "@types/node" - update-types: [ "version-update:semver-major" ] - - package-ecosystem: "github-actions" - directory: "/" - commit-message: - prefix: "chore" - labels: - - "dependencies" - - "github-actions" - schedule: - interval: "weekly" - day: "sunday" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 0cb532c..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Build - -on: - push: - branches: - - main - pull_request: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.11.0 - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: 16 - - - name: Install dependencies - run: yarn ci - - - name: Execute build - run: | - yarn format-check - yarn test - yarn package diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index eeb803a..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Publish - -on: - release: - types: - - published - - edited - -jobs: - publish: - runs-on: ubuntu-latest - steps: - # Release with semantic tag like v1.0.3 - - name: Checkout - uses: actions/checkout@v3 - with: - ref: ${{ github.event.release.tag_name }} - - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: 16 - - - name: Build - run: | - yarn ci - yarn format-check - yarn test - yarn package - - # Create a commit with dist/index.js and action.yml - # Force push major and minor tags, e.g. v1, v1.0 - # See documentation: https://github.com/JasonEtco/build-and-tag-action - - uses: JasonEtco/build-and-tag-action@v2 - env: - GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/run-enterprise-action.yml b/.github/workflows/run-enterprise-action.yml deleted file mode 100644 index e1e71f3..0000000 --- a/.github/workflows/run-enterprise-action.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Run Gatling Enterprise Action - -on: - workflow_dispatch: - inputs: - simulation_id: - type: string - required: true - extra_system_properties: - type: string - required: false - extra_environment_variables: - type: string - required: false - override_load_generators: - type: string - required: false - fail_action_on_run_failure: - type: boolean - default: 'true' - wait_for_run_end: - type: boolean - default: 'true' - -jobs: - run-gatling-simulation: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Build - run: | - yarn ci - yarn package - - - name: Gatling Enterprise Action - id: enterprise-action - uses: ./ - with: - api_token: ${{ secrets.TEST_CLOUD_PROD_GATLING_CORP_START_API_TOKEN }} - simulation_id: ${{ inputs.simulation_id }} - extra_system_properties: ${{ inputs.extra_system_properties }} - extra_environment_variables: ${{ inputs.extra_environment_variables }} - override_load_generators: ${{ inputs.override_load_generators }} - fail_action_on_run_failure: ${{ inputs.fail_action_on_run_failure }} - wait_for_run_end: ${{ inputs.wait_for_run_end }} - - - name: Print output - run: | - echo "run_id=${{ steps.enterprise-action.outputs.run_id }}" - echo "reports_url=${{ steps.enterprise-action.outputs.reports_url }}" - echo "runs_url=${{ steps.enterprise-action.outputs.runs_url }}" - echo "runs_status_code=${{ steps.enterprise-action.outputs.runs_status_code }}" - echo "runs_status_name=${{ steps.enterprise-action.outputs.runs_status_name }}" - echo "run_assertions=${{ steps.enterprise-action.outputs.run_assertions }}" diff --git a/.gitignore b/.gitignore deleted file mode 100644 index cc4aa6d..0000000 --- a/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -# MacOS -.DS_Store -.AppleDouble -.LSOverride -._* - -# Windows -Thumbs.db -Thumbs.db:encryptable -ehthumbs.db -ehthumbs_vista.db - -# Linux -*~ - -# Jetbrains IDEs -.idea -*.iml -*.ipr -*.iws - -# Visual Studio Code -.vscode/ -.history/ - -# Dependencies -node_modules/ - -# Compiled project files -dist/ - -# Yarn error logs (and any others) -*.log diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 1eae0cf..0000000 --- a/.prettierignore +++ /dev/null @@ -1,2 +0,0 @@ -dist/ -node_modules/ diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index e05c3cf..0000000 --- a/.prettierrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "printWidth": 120, - "tabWidth": 2, - "useTabs": false, - "semi": true, - "singleQuote": false, - "quoteProps": "as-needed", - "jsxSingleQuote": false, - "trailingComma": "none", - "bracketSpacing": true, - "bracketSameLine": false, - "arrowParens": "always", - "requirePragma": false, - "endOfLine": "lf", - "embeddedLanguageFormatting": "auto" -} diff --git a/DEV-README.md b/DEV-README.md deleted file mode 100644 index ec8a899..0000000 --- a/DEV-README.md +++ /dev/null @@ -1,44 +0,0 @@ -# Working on the Gatling Enterprise GitHub Action - -## Development - -Install dependencies: - -```shell -yarn ci -``` - -Build the project: - -```shell -yarn package -``` - -Run locally (input can be passed with environment variables, e.g. use `INPUT_FOO` for the input named `foo`): - -```shell -yarn start -``` - -Run tests: - -```shell -yarn test -``` - -Format code: - -```shell -yarn format -``` - -## Run locally with `act` - -`act` allows to run workflows locally in an environment similar to a real GitHub Actions environment. See [the act README](https://github.com/nektos/act) for installation instructions. - -For instance, we can use `act` to test the [run-enterprise-action.yml](.github/workflows/run-enterprise-action.yml) workflow: -- Create a JSON file for the workflow's input parameters [as explained here](https://github.com/nektos/act#pass-inputs-to-manually-triggered-workflows), e.g. called `payload.json` -- Create a secrets file [as explained here](https://github.com/nektos/act#secrets), e.g. called `secrets`, to define the `TEST_CLOUD_PROD_GATLING_CORP_START_API_TOKEN` secret containing your test API token -- Run the workflow with `act workflow_dispatch --eventpath payload.json --secret-file secrets`. - -See the `act` README for other ideas on how to test workflows locally. diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index d645695..0000000 --- a/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/README.md b/README.md deleted file mode 100644 index 37f1fc5..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Gatling Enterprise GitHub Action - -This project provides a GitHub Action to easily run a Gatling simulation on [Gatling Enterprise](https://gatling.io/enterprise/) from your [GitHub Actions](https://github.com/features/actions) CI/CD workflows. - -The full documentation is available [in the official Gatling Enterprise documentation](https://gatling.io/docs/enterprise/cloud/reference/plugins/github_actions/). diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..6dc4181 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,28873 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 7351: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.issue = exports.issueCommand = void 0; +const os = __importStar(__nccwpck_require__(2037)); +const utils_1 = __nccwpck_require__(5278); +/** + * Commands + * + * Command Format: + * ::name key=value,key=value::message + * + * Examples: + * ::warning::This is the message + * ::set-env name=MY_VAR::some value + */ +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); +} +exports.issueCommand = issueCommand; +function issue(name, message = '') { + issueCommand(name, {}, message); +} +exports.issue = issue; +const CMD_STRING = '::'; +class Command { + constructor(command, properties, message) { + if (!command) { + command = 'missing.command'; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += ' '; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } + else { + cmdStr += ','; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +} +function escapeData(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A'); +} +function escapeProperty(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A') + .replace(/:/g, '%3A') + .replace(/,/g, '%2C'); +} +//# sourceMappingURL=command.js.map + +/***/ }), + +/***/ 2186: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; +const command_1 = __nccwpck_require__(7351); +const file_command_1 = __nccwpck_require__(717); +const utils_1 = __nccwpck_require__(5278); +const os = __importStar(__nccwpck_require__(2037)); +const path = __importStar(__nccwpck_require__(1017)); +const oidc_utils_1 = __nccwpck_require__(8041); +/** + * The code to exit an action + */ +var ExitCode; +(function (ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); +//----------------------------------------------------------------------- +// Variables +//----------------------------------------------------------------------- +/** + * Sets env variable for this action and future actions in the job + * @param name the name of the variable to set + * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function exportVariable(name, val) { + const convertedVal = utils_1.toCommandValue(val); + process.env[name] = convertedVal; + const filePath = process.env['GITHUB_ENV'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val)); + } + command_1.issueCommand('set-env', { name }, convertedVal); +} +exports.exportVariable = exportVariable; +/** + * Registers a secret which will get masked from logs + * @param secret value of the secret + */ +function setSecret(secret) { + command_1.issueCommand('add-mask', {}, secret); +} +exports.setSecret = setSecret; +/** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ +function addPath(inputPath) { + const filePath = process.env['GITHUB_PATH'] || ''; + if (filePath) { + file_command_1.issueFileCommand('PATH', inputPath); + } + else { + command_1.issueCommand('add-path', {}, inputPath); + } + process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; +} +exports.addPath = addPath; +/** + * Gets the value of an input. + * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. + * Returns an empty string if the value is not defined. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string + */ +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); +} +exports.getInput = getInput; +/** + * Gets the values of an multiline input. Each value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string[] + * + */ +function getMultilineInput(name, options) { + const inputs = getInput(name, options) + .split('\n') + .filter(x => x !== ''); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map(input => input.trim()); +} +exports.getMultilineInput = getMultilineInput; +/** + * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. + * Support boolean input list: `true | True | TRUE | false | False | FALSE` . + * The return value is also in boolean type. + * ref: https://yaml.org/spec/1.2/spec.html#id2804923 + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns boolean + */ +function getBooleanInput(name, options) { + const trueValue = ['true', 'True', 'TRUE']; + const falseValue = ['false', 'False', 'FALSE']; + const val = getInput(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + + `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); +} +exports.getBooleanInput = getBooleanInput; +/** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function setOutput(name, value) { + const filePath = process.env['GITHUB_OUTPUT'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value)); + } + process.stdout.write(os.EOL); + command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value)); +} +exports.setOutput = setOutput; +/** + * Enables or disables the echoing of commands into stdout for the rest of the step. + * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. + * + */ +function setCommandEcho(enabled) { + command_1.issue('echo', enabled ? 'on' : 'off'); +} +exports.setCommandEcho = setCommandEcho; +//----------------------------------------------------------------------- +// Results +//----------------------------------------------------------------------- +/** + * Sets the action status to failed. + * When the action exits it will be with an exit code of 1 + * @param message add error issue message + */ +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +exports.setFailed = setFailed; +//----------------------------------------------------------------------- +// Logging Commands +//----------------------------------------------------------------------- +/** + * Gets whether Actions Step Debug is on or not + */ +function isDebug() { + return process.env['RUNNER_DEBUG'] === '1'; +} +exports.isDebug = isDebug; +/** + * Writes debug message to user log + * @param message debug message + */ +function debug(message) { + command_1.issueCommand('debug', {}, message); +} +exports.debug = debug; +/** + * Adds an error issue + * @param message error issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function error(message, properties = {}) { + command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.error = error; +/** + * Adds a warning issue + * @param message warning issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function warning(message, properties = {}) { + command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.warning = warning; +/** + * Adds a notice issue + * @param message notice issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function notice(message, properties = {}) { + command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.notice = notice; +/** + * Writes info to log with console.log. + * @param message info message + */ +function info(message) { + process.stdout.write(message + os.EOL); +} +exports.info = info; +/** + * Begin an output group. + * + * Output until the next `groupEnd` will be foldable in this group + * + * @param name The name of the output group + */ +function startGroup(name) { + command_1.issue('group', name); +} +exports.startGroup = startGroup; +/** + * End an output group. + */ +function endGroup() { + command_1.issue('endgroup'); +} +exports.endGroup = endGroup; +/** + * Wrap an asynchronous function call in a group. + * + * Returns the same type as the function itself. + * + * @param name The name of the group + * @param fn The function to wrap in the group + */ +function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } + finally { + endGroup(); + } + return result; + }); +} +exports.group = group; +//----------------------------------------------------------------------- +// Wrapper action state +//----------------------------------------------------------------------- +/** + * Saves state for current action, the state can only be retrieved by this action's post job execution. + * + * @param name name of the state to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function saveState(name, value) { + const filePath = process.env['GITHUB_STATE'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value)); + } + command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value)); +} +exports.saveState = saveState; +/** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string + */ +function getState(name) { + return process.env[`STATE_${name}`] || ''; +} +exports.getState = getState; +function getIDToken(aud) { + return __awaiter(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); +} +exports.getIDToken = getIDToken; +/** + * Summary exports + */ +var summary_1 = __nccwpck_require__(1327); +Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); +/** + * @deprecated use core.summary + */ +var summary_2 = __nccwpck_require__(1327); +Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); +/** + * Path exports + */ +var path_utils_1 = __nccwpck_require__(2981); +Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); +Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); +Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); +//# sourceMappingURL=core.js.map + +/***/ }), + +/***/ 717: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// For internal use, subject to change. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +const fs = __importStar(__nccwpck_require__(7147)); +const os = __importStar(__nccwpck_require__(2037)); +const uuid_1 = __nccwpck_require__(5840); +const utils_1 = __nccwpck_require__(5278); +function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { + encoding: 'utf8' + }); +} +exports.issueFileCommand = issueFileCommand; +function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${uuid_1.v4()}`; + const convertedValue = utils_1.toCommandValue(value); + // These should realistically never happen, but just in case someone finds a + // way to exploit uuid generation let's not allow keys or values that contain + // the delimiter. + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; +} +exports.prepareKeyValueMessage = prepareKeyValueMessage; +//# sourceMappingURL=file-command.js.map + +/***/ }), + +/***/ 8041: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OidcClient = void 0; +const http_client_1 = __nccwpck_require__(6255); +const auth_1 = __nccwpck_require__(5526); +const core_1 = __nccwpck_require__(2186); +class OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; + if (!token) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; + if (!runtimeUrl) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const httpclient = OidcClient.createHttpClient(); + const res = yield httpclient + .getJson(id_token_url) + .catch(error => { + throw new Error(`Failed to get ID Token. \n + Error Code : ${error.statusCode}\n + Error Message: ${error.result.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error('Response json body do not have ID Token field'); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter(this, void 0, void 0, function* () { + try { + // New ID Token is requested from action service + let id_token_url = OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + core_1.debug(`ID token url is ${id_token_url}`); + const id_token = yield OidcClient.getCall(id_token_url); + core_1.setSecret(id_token); + return id_token; + } + catch (error) { + throw new Error(`Error message: ${error.message}`); + } + }); + } +} +exports.OidcClient = OidcClient; +//# sourceMappingURL=oidc-utils.js.map + +/***/ }), + +/***/ 2981: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; +const path = __importStar(__nccwpck_require__(1017)); +/** + * toPosixPath converts the given path to the posix form. On Windows, \\ will be + * replaced with /. + * + * @param pth. Path to transform. + * @return string Posix path. + */ +function toPosixPath(pth) { + return pth.replace(/[\\]/g, '/'); +} +exports.toPosixPath = toPosixPath; +/** + * toWin32Path converts the given path to the win32 form. On Linux, / will be + * replaced with \\. + * + * @param pth. Path to transform. + * @return string Win32 path. + */ +function toWin32Path(pth) { + return pth.replace(/[/]/g, '\\'); +} +exports.toWin32Path = toWin32Path; +/** + * toPlatformPath converts the given path to a platform-specific path. It does + * this by replacing instances of / and \ with the platform-specific path + * separator. + * + * @param pth The path to platformize. + * @return string The platform-specific path. + */ +function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path.sep); +} +exports.toPlatformPath = toPlatformPath; +//# sourceMappingURL=path-utils.js.map + +/***/ }), + +/***/ 1327: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; +const os_1 = __nccwpck_require__(2037); +const fs_1 = __nccwpck_require__(7147); +const { access, appendFile, writeFile } = fs_1.promises; +exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; +exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; +class Summary { + constructor() { + this._buffer = ''; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } + catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs) + .map(([key, value]) => ` ${key}="${value}"`) + .join(''); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ''; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, (lang && { lang })); + const element = this.wrap('pre', this.wrap('code', code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? 'ol' : 'ul'; + const listItems = items.map(item => this.wrap('li', item)).join(''); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows + .map(row => { + const cells = row + .map(cell => { + if (typeof cell === 'string') { + return this.wrap('td', cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? 'th' : 'td'; + const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); + return this.wrap(tag, data, attrs); + }) + .join(''); + return this.wrap('tr', cells); + }) + .join(''); + const element = this.wrap('table', tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap('details', this.wrap('summary', label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); + const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) + ? tag + : 'h1'; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap('hr', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap('br', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, (cite && { cite })); + const element = this.wrap('blockquote', text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap('a', text, { href }); + return this.addRaw(element).addEOL(); + } +} +const _summary = new Summary(); +/** + * @deprecated use `core.summary` + */ +exports.markdownSummary = _summary; +exports.summary = _summary; +//# sourceMappingURL=summary.js.map + +/***/ }), + +/***/ 5278: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toCommandProperties = exports.toCommandValue = void 0; +/** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ +function toCommandValue(input) { + if (input === null || input === undefined) { + return ''; + } + else if (typeof input === 'string' || input instanceof String) { + return input; + } + return JSON.stringify(input); +} +exports.toCommandValue = toCommandValue; +/** + * + * @param annotationProperties + * @returns The command properties to send with the actual annotation command + * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 + */ +function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; +} +exports.toCommandProperties = toCommandProperties; +//# sourceMappingURL=utils.js.map + +/***/ }), + +/***/ 5526: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; +class BasicCredentialHandler { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BasicCredentialHandler = BasicCredentialHandler; +class BearerCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BearerCredentialHandler = BearerCredentialHandler; +class PersonalAccessTokenCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; +//# sourceMappingURL=auth.js.map + +/***/ }), + +/***/ 6255: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* eslint-disable @typescript-eslint/no-explicit-any */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; +const http = __importStar(__nccwpck_require__(3685)); +const https = __importStar(__nccwpck_require__(5687)); +const pm = __importStar(__nccwpck_require__(9835)); +const tunnel = __importStar(__nccwpck_require__(4294)); +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +var Headers; +(function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers = exports.Headers || (exports.Headers = {})); +var MediaTypes; +(function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ''; +} +exports.getProxyUrl = getProxyUrl; +const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = 'HttpClientError'; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } +} +exports.HttpClientError = HttpClientError; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on('end', () => { + resolve(output.toString()); + }); + })); + }); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error('Client has already been disposed.'); + } + const parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) + ? this._maxRetries + 1 + : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info, data); + // Check if it's an authentication challenge + if (response && + response.message && + response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && + HttpRedirectCodes.includes(response.message.statusCode) && + this._allowRedirects && + redirectsRemaining > 0) { + const redirectUrl = response.message.headers['location']; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === 'https:' && + parsedUrl.protocol !== parsedRedirectUrl.protocol && + !this._allowRedirectDowngrade) { + throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + yield response.readBody(); + // strip authorization header if redirected to a different hostname + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + // header names are case insensitive + if (header.toLowerCase() === 'authorization') { + delete headers[header]; + } + } + } + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; + } + if (!response.message.statusCode || + !HttpResponseRetryCodes.includes(response.message.statusCode)) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } + else if (!res) { + // If `err` is not passed, then `res` must be passed. + reject(new Error('Unknown error')); + } + else { + resolve(res); + } + } + this.requestRawWithCallback(info, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + if (typeof data === 'string') { + if (!info.options.headers) { + info.options.headers = {}; + } + info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info.httpModule.request(info.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(undefined, res); + }); + let socket; + req.on('socket', sock => { + socket = sock; + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info.options.path}`)); + }); + req.on('error', function (err) { + // err has statusCode property + // res should have headers + handleResult(err); + }); + if (data && typeof data === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof data !== 'string') { + data.on('close', function () { + req.end(); + }); + data.pipe(req); + } + else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port + ? parseInt(info.parsedUrl.port) + : defaultPort; + info.options.path = + (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers['user-agent'] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info.options); + } + } + return info; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (this._keepAlive && !useProxy) { + agent = this._agent; + } + // if agent is already assigned use that agent. + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + })), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === 'https:'; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + // if reusing agent across request and tunneling agent isn't assigned create a new agent + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + // not found leads to null obj returned + if (statusCode === HttpCodes.NotFound) { + resolve(response); + } + // get the result from the body + function dateTimeDeserializer(key, value) { + if (typeof value === 'string') { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null + } + // note that 3xx redirects are handled by the http layer. + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; + } + else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } + else { + resolve(response); + } + })); + }); + } +} +exports.HttpClient = HttpClient; +const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 9835: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.checkBypass = exports.getProxyUrl = void 0; +function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === 'https:'; + if (checkBypass(reqUrl)) { + return undefined; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env['https_proxy'] || process.env['HTTPS_PROXY']; + } + else { + return process.env['http_proxy'] || process.env['HTTP_PROXY']; + } + })(); + if (proxyVar) { + return new URL(proxyVar); + } + else { + return undefined; + } +} +exports.getProxyUrl = getProxyUrl; +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + if (!noProxy) { + return false; + } + // Determine the request port + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } + else if (reqUrl.protocol === 'http:') { + reqPort = 80; + } + else if (reqUrl.protocol === 'https:') { + reqPort = 443; + } + // Format the request hostname and hostname with port + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === 'number') { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (const upperNoProxyItem of noProxy + .split(',') + .map(x => x.trim().toUpperCase()) + .filter(x => x)) { + if (upperNoProxyItem === '*' || + upperReqHosts.some(x => x === upperNoProxyItem || + x.endsWith(`.${upperNoProxyItem}`) || + (upperNoProxyItem.startsWith('.') && + x.endsWith(`${upperNoProxyItem}`)))) { + return true; + } + } + return false; +} +exports.checkBypass = checkBypass; +function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + return (hostLower === 'localhost' || + hostLower.startsWith('127.') || + hostLower.startsWith('[::1]') || + hostLower.startsWith('[0:0:0:0:0:0:0:1]')); +} +//# sourceMappingURL=proxy.js.map + +/***/ }), + +/***/ 8794: +/***/ ((module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = addLeadingZeros; + +function addLeadingZeros(number, targetLength) { + var sign = number < 0 ? '-' : ''; + var output = Math.abs(number).toString(); + + while (output.length < targetLength) { + output = '0' + output; + } + + return sign + output; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2631: +/***/ ((module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = assign; + +function assign(target, object) { + if (target == null) { + throw new TypeError('assign requires that input parameter not be null or undefined'); + } + + for (var property in object) { + if (Object.prototype.hasOwnProperty.call(object, property)) { + ; + target[property] = object[property]; + } + } + + return target; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7934: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = cloneObject; + +var _index = _interopRequireDefault(__nccwpck_require__(2631)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function cloneObject(object) { + return (0, _index.default)({}, object); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 618: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _index = _interopRequireDefault(__nccwpck_require__(1773)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _default = _index.default; +exports["default"] = _default; +module.exports = exports.default; + +/***/ }), + +/***/ 9307: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.getDefaultOptions = getDefaultOptions; +exports.setDefaultOptions = setDefaultOptions; +var defaultOptions = {}; + +function getDefaultOptions() { + return defaultOptions; +} + +function setDefaultOptions(newOptions) { + defaultOptions = newOptions; +} + +/***/ }), + +/***/ 9257: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _index = _interopRequireDefault(__nccwpck_require__(2966)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(8493)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(7170)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(8761)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(8050)); + +var _index6 = _interopRequireDefault(__nccwpck_require__(8794)); + +var _index7 = _interopRequireDefault(__nccwpck_require__(289)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var dayPeriodEnum = { + am: 'am', + pm: 'pm', + midnight: 'midnight', + noon: 'noon', + morning: 'morning', + afternoon: 'afternoon', + evening: 'evening', + night: 'night' +}; + +/* + * | | Unit | | Unit | + * |-----|--------------------------------|-----|--------------------------------| + * | a | AM, PM | A* | Milliseconds in day | + * | b | AM, PM, noon, midnight | B | Flexible day period | + * | c | Stand-alone local day of week | C* | Localized hour w/ day period | + * | d | Day of month | D | Day of year | + * | e | Local day of week | E | Day of week | + * | f | | F* | Day of week in month | + * | g* | Modified Julian day | G | Era | + * | h | Hour [1-12] | H | Hour [0-23] | + * | i! | ISO day of week | I! | ISO week of year | + * | j* | Localized hour w/ day period | J* | Localized hour w/o day period | + * | k | Hour [1-24] | K | Hour [0-11] | + * | l* | (deprecated) | L | Stand-alone month | + * | m | Minute | M | Month | + * | n | | N | | + * | o! | Ordinal number modifier | O | Timezone (GMT) | + * | p! | Long localized time | P! | Long localized date | + * | q | Stand-alone quarter | Q | Quarter | + * | r* | Related Gregorian year | R! | ISO week-numbering year | + * | s | Second | S | Fraction of second | + * | t! | Seconds timestamp | T! | Milliseconds timestamp | + * | u | Extended year | U* | Cyclic year | + * | v* | Timezone (generic non-locat.) | V* | Timezone (location) | + * | w | Local week of year | W* | Week of month | + * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) | + * | y | Year (abs) | Y | Local week-numbering year | + * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) | + * + * Letters marked by * are not implemented but reserved by Unicode standard. + * + * Letters marked by ! are non-standard, but implemented by date-fns: + * - `o` modifies the previous token to turn it into an ordinal (see `format` docs) + * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days, + * i.e. 7 for Sunday, 1 for Monday, etc. + * - `I` is ISO week of year, as opposed to `w` which is local week of year. + * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year. + * `R` is supposed to be used in conjunction with `I` and `i` + * for universal ISO week-numbering date, whereas + * `Y` is supposed to be used in conjunction with `w` and `e` + * for week-numbering date specific to the locale. + * - `P` is long localized date format + * - `p` is long localized time format + */ +var formatters = { + // Era + G: function G(date, token, localize) { + var era = date.getUTCFullYear() > 0 ? 1 : 0; + + switch (token) { + // AD, BC + case 'G': + case 'GG': + case 'GGG': + return localize.era(era, { + width: 'abbreviated' + }); + // A, B + + case 'GGGGG': + return localize.era(era, { + width: 'narrow' + }); + // Anno Domini, Before Christ + + case 'GGGG': + default: + return localize.era(era, { + width: 'wide' + }); + } + }, + // Year + y: function y(date, token, localize) { + // Ordinal number + if (token === 'yo') { + var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript) + + var year = signedYear > 0 ? signedYear : 1 - signedYear; + return localize.ordinalNumber(year, { + unit: 'year' + }); + } + + return _index7.default.y(date, token); + }, + // Local week-numbering year + Y: function Y(date, token, localize, options) { + var signedWeekYear = (0, _index5.default)(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript) + + var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year + + if (token === 'YY') { + var twoDigitYear = weekYear % 100; + return (0, _index6.default)(twoDigitYear, 2); + } // Ordinal number + + + if (token === 'Yo') { + return localize.ordinalNumber(weekYear, { + unit: 'year' + }); + } // Padding + + + return (0, _index6.default)(weekYear, token.length); + }, + // ISO week-numbering year + R: function R(date, token) { + var isoWeekYear = (0, _index3.default)(date); // Padding + + return (0, _index6.default)(isoWeekYear, token.length); + }, + // Extended year. This is a single number designating the year of this calendar system. + // The main difference between `y` and `u` localizers are B.C. years: + // | Year | `y` | `u` | + // |------|-----|-----| + // | AC 1 | 1 | 1 | + // | BC 1 | 1 | 0 | + // | BC 2 | 2 | -1 | + // Also `yy` always returns the last two digits of a year, + // while `uu` pads single digit years to 2 characters and returns other years unchanged. + u: function u(date, token) { + var year = date.getUTCFullYear(); + return (0, _index6.default)(year, token.length); + }, + // Quarter + Q: function Q(date, token, localize) { + var quarter = Math.ceil((date.getUTCMonth() + 1) / 3); + + switch (token) { + // 1, 2, 3, 4 + case 'Q': + return String(quarter); + // 01, 02, 03, 04 + + case 'QQ': + return (0, _index6.default)(quarter, 2); + // 1st, 2nd, 3rd, 4th + + case 'Qo': + return localize.ordinalNumber(quarter, { + unit: 'quarter' + }); + // Q1, Q2, Q3, Q4 + + case 'QQQ': + return localize.quarter(quarter, { + width: 'abbreviated', + context: 'formatting' + }); + // 1, 2, 3, 4 (narrow quarter; could be not numerical) + + case 'QQQQQ': + return localize.quarter(quarter, { + width: 'narrow', + context: 'formatting' + }); + // 1st quarter, 2nd quarter, ... + + case 'QQQQ': + default: + return localize.quarter(quarter, { + width: 'wide', + context: 'formatting' + }); + } + }, + // Stand-alone quarter + q: function q(date, token, localize) { + var quarter = Math.ceil((date.getUTCMonth() + 1) / 3); + + switch (token) { + // 1, 2, 3, 4 + case 'q': + return String(quarter); + // 01, 02, 03, 04 + + case 'qq': + return (0, _index6.default)(quarter, 2); + // 1st, 2nd, 3rd, 4th + + case 'qo': + return localize.ordinalNumber(quarter, { + unit: 'quarter' + }); + // Q1, Q2, Q3, Q4 + + case 'qqq': + return localize.quarter(quarter, { + width: 'abbreviated', + context: 'standalone' + }); + // 1, 2, 3, 4 (narrow quarter; could be not numerical) + + case 'qqqqq': + return localize.quarter(quarter, { + width: 'narrow', + context: 'standalone' + }); + // 1st quarter, 2nd quarter, ... + + case 'qqqq': + default: + return localize.quarter(quarter, { + width: 'wide', + context: 'standalone' + }); + } + }, + // Month + M: function M(date, token, localize) { + var month = date.getUTCMonth(); + + switch (token) { + case 'M': + case 'MM': + return _index7.default.M(date, token); + // 1st, 2nd, ..., 12th + + case 'Mo': + return localize.ordinalNumber(month + 1, { + unit: 'month' + }); + // Jan, Feb, ..., Dec + + case 'MMM': + return localize.month(month, { + width: 'abbreviated', + context: 'formatting' + }); + // J, F, ..., D + + case 'MMMMM': + return localize.month(month, { + width: 'narrow', + context: 'formatting' + }); + // January, February, ..., December + + case 'MMMM': + default: + return localize.month(month, { + width: 'wide', + context: 'formatting' + }); + } + }, + // Stand-alone month + L: function L(date, token, localize) { + var month = date.getUTCMonth(); + + switch (token) { + // 1, 2, ..., 12 + case 'L': + return String(month + 1); + // 01, 02, ..., 12 + + case 'LL': + return (0, _index6.default)(month + 1, 2); + // 1st, 2nd, ..., 12th + + case 'Lo': + return localize.ordinalNumber(month + 1, { + unit: 'month' + }); + // Jan, Feb, ..., Dec + + case 'LLL': + return localize.month(month, { + width: 'abbreviated', + context: 'standalone' + }); + // J, F, ..., D + + case 'LLLLL': + return localize.month(month, { + width: 'narrow', + context: 'standalone' + }); + // January, February, ..., December + + case 'LLLL': + default: + return localize.month(month, { + width: 'wide', + context: 'standalone' + }); + } + }, + // Local week of year + w: function w(date, token, localize, options) { + var week = (0, _index4.default)(date, options); + + if (token === 'wo') { + return localize.ordinalNumber(week, { + unit: 'week' + }); + } + + return (0, _index6.default)(week, token.length); + }, + // ISO week of year + I: function I(date, token, localize) { + var isoWeek = (0, _index2.default)(date); + + if (token === 'Io') { + return localize.ordinalNumber(isoWeek, { + unit: 'week' + }); + } + + return (0, _index6.default)(isoWeek, token.length); + }, + // Day of the month + d: function d(date, token, localize) { + if (token === 'do') { + return localize.ordinalNumber(date.getUTCDate(), { + unit: 'date' + }); + } + + return _index7.default.d(date, token); + }, + // Day of year + D: function D(date, token, localize) { + var dayOfYear = (0, _index.default)(date); + + if (token === 'Do') { + return localize.ordinalNumber(dayOfYear, { + unit: 'dayOfYear' + }); + } + + return (0, _index6.default)(dayOfYear, token.length); + }, + // Day of week + E: function E(date, token, localize) { + var dayOfWeek = date.getUTCDay(); + + switch (token) { + // Tue + case 'E': + case 'EE': + case 'EEE': + return localize.day(dayOfWeek, { + width: 'abbreviated', + context: 'formatting' + }); + // T + + case 'EEEEE': + return localize.day(dayOfWeek, { + width: 'narrow', + context: 'formatting' + }); + // Tu + + case 'EEEEEE': + return localize.day(dayOfWeek, { + width: 'short', + context: 'formatting' + }); + // Tuesday + + case 'EEEE': + default: + return localize.day(dayOfWeek, { + width: 'wide', + context: 'formatting' + }); + } + }, + // Local day of week + e: function e(date, token, localize, options) { + var dayOfWeek = date.getUTCDay(); + var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7; + + switch (token) { + // Numerical value (Nth day of week with current locale or weekStartsOn) + case 'e': + return String(localDayOfWeek); + // Padded numerical value + + case 'ee': + return (0, _index6.default)(localDayOfWeek, 2); + // 1st, 2nd, ..., 7th + + case 'eo': + return localize.ordinalNumber(localDayOfWeek, { + unit: 'day' + }); + + case 'eee': + return localize.day(dayOfWeek, { + width: 'abbreviated', + context: 'formatting' + }); + // T + + case 'eeeee': + return localize.day(dayOfWeek, { + width: 'narrow', + context: 'formatting' + }); + // Tu + + case 'eeeeee': + return localize.day(dayOfWeek, { + width: 'short', + context: 'formatting' + }); + // Tuesday + + case 'eeee': + default: + return localize.day(dayOfWeek, { + width: 'wide', + context: 'formatting' + }); + } + }, + // Stand-alone local day of week + c: function c(date, token, localize, options) { + var dayOfWeek = date.getUTCDay(); + var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7; + + switch (token) { + // Numerical value (same as in `e`) + case 'c': + return String(localDayOfWeek); + // Padded numerical value + + case 'cc': + return (0, _index6.default)(localDayOfWeek, token.length); + // 1st, 2nd, ..., 7th + + case 'co': + return localize.ordinalNumber(localDayOfWeek, { + unit: 'day' + }); + + case 'ccc': + return localize.day(dayOfWeek, { + width: 'abbreviated', + context: 'standalone' + }); + // T + + case 'ccccc': + return localize.day(dayOfWeek, { + width: 'narrow', + context: 'standalone' + }); + // Tu + + case 'cccccc': + return localize.day(dayOfWeek, { + width: 'short', + context: 'standalone' + }); + // Tuesday + + case 'cccc': + default: + return localize.day(dayOfWeek, { + width: 'wide', + context: 'standalone' + }); + } + }, + // ISO day of week + i: function i(date, token, localize) { + var dayOfWeek = date.getUTCDay(); + var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek; + + switch (token) { + // 2 + case 'i': + return String(isoDayOfWeek); + // 02 + + case 'ii': + return (0, _index6.default)(isoDayOfWeek, token.length); + // 2nd + + case 'io': + return localize.ordinalNumber(isoDayOfWeek, { + unit: 'day' + }); + // Tue + + case 'iii': + return localize.day(dayOfWeek, { + width: 'abbreviated', + context: 'formatting' + }); + // T + + case 'iiiii': + return localize.day(dayOfWeek, { + width: 'narrow', + context: 'formatting' + }); + // Tu + + case 'iiiiii': + return localize.day(dayOfWeek, { + width: 'short', + context: 'formatting' + }); + // Tuesday + + case 'iiii': + default: + return localize.day(dayOfWeek, { + width: 'wide', + context: 'formatting' + }); + } + }, + // AM or PM + a: function a(date, token, localize) { + var hours = date.getUTCHours(); + var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am'; + + switch (token) { + case 'a': + case 'aa': + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'abbreviated', + context: 'formatting' + }); + + case 'aaa': + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'abbreviated', + context: 'formatting' + }).toLowerCase(); + + case 'aaaaa': + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'narrow', + context: 'formatting' + }); + + case 'aaaa': + default: + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'wide', + context: 'formatting' + }); + } + }, + // AM, PM, midnight, noon + b: function b(date, token, localize) { + var hours = date.getUTCHours(); + var dayPeriodEnumValue; + + if (hours === 12) { + dayPeriodEnumValue = dayPeriodEnum.noon; + } else if (hours === 0) { + dayPeriodEnumValue = dayPeriodEnum.midnight; + } else { + dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am'; + } + + switch (token) { + case 'b': + case 'bb': + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'abbreviated', + context: 'formatting' + }); + + case 'bbb': + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'abbreviated', + context: 'formatting' + }).toLowerCase(); + + case 'bbbbb': + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'narrow', + context: 'formatting' + }); + + case 'bbbb': + default: + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'wide', + context: 'formatting' + }); + } + }, + // in the morning, in the afternoon, in the evening, at night + B: function B(date, token, localize) { + var hours = date.getUTCHours(); + var dayPeriodEnumValue; + + if (hours >= 17) { + dayPeriodEnumValue = dayPeriodEnum.evening; + } else if (hours >= 12) { + dayPeriodEnumValue = dayPeriodEnum.afternoon; + } else if (hours >= 4) { + dayPeriodEnumValue = dayPeriodEnum.morning; + } else { + dayPeriodEnumValue = dayPeriodEnum.night; + } + + switch (token) { + case 'B': + case 'BB': + case 'BBB': + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'abbreviated', + context: 'formatting' + }); + + case 'BBBBB': + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'narrow', + context: 'formatting' + }); + + case 'BBBB': + default: + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'wide', + context: 'formatting' + }); + } + }, + // Hour [1-12] + h: function h(date, token, localize) { + if (token === 'ho') { + var hours = date.getUTCHours() % 12; + if (hours === 0) hours = 12; + return localize.ordinalNumber(hours, { + unit: 'hour' + }); + } + + return _index7.default.h(date, token); + }, + // Hour [0-23] + H: function H(date, token, localize) { + if (token === 'Ho') { + return localize.ordinalNumber(date.getUTCHours(), { + unit: 'hour' + }); + } + + return _index7.default.H(date, token); + }, + // Hour [0-11] + K: function K(date, token, localize) { + var hours = date.getUTCHours() % 12; + + if (token === 'Ko') { + return localize.ordinalNumber(hours, { + unit: 'hour' + }); + } + + return (0, _index6.default)(hours, token.length); + }, + // Hour [1-24] + k: function k(date, token, localize) { + var hours = date.getUTCHours(); + if (hours === 0) hours = 24; + + if (token === 'ko') { + return localize.ordinalNumber(hours, { + unit: 'hour' + }); + } + + return (0, _index6.default)(hours, token.length); + }, + // Minute + m: function m(date, token, localize) { + if (token === 'mo') { + return localize.ordinalNumber(date.getUTCMinutes(), { + unit: 'minute' + }); + } + + return _index7.default.m(date, token); + }, + // Second + s: function s(date, token, localize) { + if (token === 'so') { + return localize.ordinalNumber(date.getUTCSeconds(), { + unit: 'second' + }); + } + + return _index7.default.s(date, token); + }, + // Fraction of second + S: function S(date, token) { + return _index7.default.S(date, token); + }, + // Timezone (ISO-8601. If offset is 0, output is always `'Z'`) + X: function X(date, token, _localize, options) { + var originalDate = options._originalDate || date; + var timezoneOffset = originalDate.getTimezoneOffset(); + + if (timezoneOffset === 0) { + return 'Z'; + } + + switch (token) { + // Hours and optional minutes + case 'X': + return formatTimezoneWithOptionalMinutes(timezoneOffset); + // Hours, minutes and optional seconds without `:` delimiter + // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets + // so this token always has the same output as `XX` + + case 'XXXX': + case 'XX': + // Hours and minutes without `:` delimiter + return formatTimezone(timezoneOffset); + // Hours, minutes and optional seconds with `:` delimiter + // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets + // so this token always has the same output as `XXX` + + case 'XXXXX': + case 'XXX': // Hours and minutes with `:` delimiter + + default: + return formatTimezone(timezoneOffset, ':'); + } + }, + // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent) + x: function x(date, token, _localize, options) { + var originalDate = options._originalDate || date; + var timezoneOffset = originalDate.getTimezoneOffset(); + + switch (token) { + // Hours and optional minutes + case 'x': + return formatTimezoneWithOptionalMinutes(timezoneOffset); + // Hours, minutes and optional seconds without `:` delimiter + // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets + // so this token always has the same output as `xx` + + case 'xxxx': + case 'xx': + // Hours and minutes without `:` delimiter + return formatTimezone(timezoneOffset); + // Hours, minutes and optional seconds with `:` delimiter + // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets + // so this token always has the same output as `xxx` + + case 'xxxxx': + case 'xxx': // Hours and minutes with `:` delimiter + + default: + return formatTimezone(timezoneOffset, ':'); + } + }, + // Timezone (GMT) + O: function O(date, token, _localize, options) { + var originalDate = options._originalDate || date; + var timezoneOffset = originalDate.getTimezoneOffset(); + + switch (token) { + // Short + case 'O': + case 'OO': + case 'OOO': + return 'GMT' + formatTimezoneShort(timezoneOffset, ':'); + // Long + + case 'OOOO': + default: + return 'GMT' + formatTimezone(timezoneOffset, ':'); + } + }, + // Timezone (specific non-location) + z: function z(date, token, _localize, options) { + var originalDate = options._originalDate || date; + var timezoneOffset = originalDate.getTimezoneOffset(); + + switch (token) { + // Short + case 'z': + case 'zz': + case 'zzz': + return 'GMT' + formatTimezoneShort(timezoneOffset, ':'); + // Long + + case 'zzzz': + default: + return 'GMT' + formatTimezone(timezoneOffset, ':'); + } + }, + // Seconds timestamp + t: function t(date, token, _localize, options) { + var originalDate = options._originalDate || date; + var timestamp = Math.floor(originalDate.getTime() / 1000); + return (0, _index6.default)(timestamp, token.length); + }, + // Milliseconds timestamp + T: function T(date, token, _localize, options) { + var originalDate = options._originalDate || date; + var timestamp = originalDate.getTime(); + return (0, _index6.default)(timestamp, token.length); + } +}; + +function formatTimezoneShort(offset, dirtyDelimiter) { + var sign = offset > 0 ? '-' : '+'; + var absOffset = Math.abs(offset); + var hours = Math.floor(absOffset / 60); + var minutes = absOffset % 60; + + if (minutes === 0) { + return sign + String(hours); + } + + var delimiter = dirtyDelimiter || ''; + return sign + String(hours) + delimiter + (0, _index6.default)(minutes, 2); +} + +function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) { + if (offset % 60 === 0) { + var sign = offset > 0 ? '-' : '+'; + return sign + (0, _index6.default)(Math.abs(offset) / 60, 2); + } + + return formatTimezone(offset, dirtyDelimiter); +} + +function formatTimezone(offset, dirtyDelimiter) { + var delimiter = dirtyDelimiter || ''; + var sign = offset > 0 ? '-' : '+'; + var absOffset = Math.abs(offset); + var hours = (0, _index6.default)(Math.floor(absOffset / 60), 2); + var minutes = (0, _index6.default)(absOffset % 60, 2); + return sign + hours + delimiter + minutes; +} + +var _default = formatters; +exports["default"] = _default; +module.exports = exports.default; + +/***/ }), + +/***/ 289: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _index = _interopRequireDefault(__nccwpck_require__(8794)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* + * | | Unit | | Unit | + * |-----|--------------------------------|-----|--------------------------------| + * | a | AM, PM | A* | | + * | d | Day of month | D | | + * | h | Hour [1-12] | H | Hour [0-23] | + * | m | Minute | M | Month | + * | s | Second | S | Fraction of second | + * | y | Year (abs) | Y | | + * + * Letters marked by * are not implemented but reserved by Unicode standard. + */ +var formatters = { + // Year + y: function y(date, token) { + // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens + // | Year | y | yy | yyy | yyyy | yyyyy | + // |----------|-------|----|-------|-------|-------| + // | AD 1 | 1 | 01 | 001 | 0001 | 00001 | + // | AD 12 | 12 | 12 | 012 | 0012 | 00012 | + // | AD 123 | 123 | 23 | 123 | 0123 | 00123 | + // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 | + // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 | + var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript) + + var year = signedYear > 0 ? signedYear : 1 - signedYear; + return (0, _index.default)(token === 'yy' ? year % 100 : year, token.length); + }, + // Month + M: function M(date, token) { + var month = date.getUTCMonth(); + return token === 'M' ? String(month + 1) : (0, _index.default)(month + 1, 2); + }, + // Day of the month + d: function d(date, token) { + return (0, _index.default)(date.getUTCDate(), token.length); + }, + // AM or PM + a: function a(date, token) { + var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am'; + + switch (token) { + case 'a': + case 'aa': + return dayPeriodEnumValue.toUpperCase(); + + case 'aaa': + return dayPeriodEnumValue; + + case 'aaaaa': + return dayPeriodEnumValue[0]; + + case 'aaaa': + default: + return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.'; + } + }, + // Hour [1-12] + h: function h(date, token) { + return (0, _index.default)(date.getUTCHours() % 12 || 12, token.length); + }, + // Hour [0-23] + H: function H(date, token) { + return (0, _index.default)(date.getUTCHours(), token.length); + }, + // Minute + m: function m(date, token) { + return (0, _index.default)(date.getUTCMinutes(), token.length); + }, + // Second + s: function s(date, token) { + return (0, _index.default)(date.getUTCSeconds(), token.length); + }, + // Fraction of second + S: function S(date, token) { + var numberOfDigits = token.length; + var milliseconds = date.getUTCMilliseconds(); + var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3)); + return (0, _index.default)(fractionalSeconds, token.length); + } +}; +var _default = formatters; +exports["default"] = _default; +module.exports = exports.default; + +/***/ }), + +/***/ 8387: +/***/ ((module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var dateLongFormatter = function dateLongFormatter(pattern, formatLong) { + switch (pattern) { + case 'P': + return formatLong.date({ + width: 'short' + }); + + case 'PP': + return formatLong.date({ + width: 'medium' + }); + + case 'PPP': + return formatLong.date({ + width: 'long' + }); + + case 'PPPP': + default: + return formatLong.date({ + width: 'full' + }); + } +}; + +var timeLongFormatter = function timeLongFormatter(pattern, formatLong) { + switch (pattern) { + case 'p': + return formatLong.time({ + width: 'short' + }); + + case 'pp': + return formatLong.time({ + width: 'medium' + }); + + case 'ppp': + return formatLong.time({ + width: 'long' + }); + + case 'pppp': + default: + return formatLong.time({ + width: 'full' + }); + } +}; + +var dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) { + var matchResult = pattern.match(/(P+)(p+)?/) || []; + var datePattern = matchResult[1]; + var timePattern = matchResult[2]; + + if (!timePattern) { + return dateLongFormatter(pattern, formatLong); + } + + var dateTimeFormat; + + switch (datePattern) { + case 'P': + dateTimeFormat = formatLong.dateTime({ + width: 'short' + }); + break; + + case 'PP': + dateTimeFormat = formatLong.dateTime({ + width: 'medium' + }); + break; + + case 'PPP': + dateTimeFormat = formatLong.dateTime({ + width: 'long' + }); + break; + + case 'PPPP': + default: + dateTimeFormat = formatLong.dateTime({ + width: 'full' + }); + break; + } + + return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong)); +}; + +var longFormatters = { + p: timeLongFormatter, + P: dateTimeLongFormatter +}; +var _default = longFormatters; +exports["default"] = _default; +module.exports = exports.default; + +/***/ }), + +/***/ 7032: +/***/ ((module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getTimezoneOffsetInMilliseconds; + +/** + * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds. + * They usually appear for dates that denote time before the timezones were introduced + * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891 + * and GMT+01:00:00 after that date) + * + * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above, + * which would lead to incorrect calculations. + * + * This function returns the timezone offset in milliseconds that takes seconds in account. + */ +function getTimezoneOffsetInMilliseconds(date) { + var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds())); + utcDate.setUTCFullYear(date.getFullYear()); + return date.getTime() - utcDate.getTime(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2966: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getUTCDayOfYear; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MILLISECONDS_IN_DAY = 86400000; + +function getUTCDayOfYear(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var timestamp = date.getTime(); + date.setUTCMonth(0, 1); + date.setUTCHours(0, 0, 0, 0); + var startOfYearTimestamp = date.getTime(); + var difference = timestamp - startOfYearTimestamp; + return Math.floor(difference / MILLISECONDS_IN_DAY) + 1; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8493: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getUTCISOWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(3061)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(1478)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MILLISECONDS_IN_WEEK = 604800000; + +function getUTCISOWeek(dirtyDate) { + (0, _index4.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var diff = (0, _index2.default)(date).getTime() - (0, _index3.default)(date).getTime(); // Round the number of days to the nearest integer + // because the number of milliseconds in a week is not constant + // (e.g. it's different in the week of the daylight saving time clock shift) + + return Math.round(diff / MILLISECONDS_IN_WEEK) + 1; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7170: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getUTCISOWeekYear; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(3061)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getUTCISOWeekYear(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var year = date.getUTCFullYear(); + var fourthOfJanuaryOfNextYear = new Date(0); + fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4); + fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0); + var startOfNextYear = (0, _index3.default)(fourthOfJanuaryOfNextYear); + var fourthOfJanuaryOfThisYear = new Date(0); + fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4); + fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0); + var startOfThisYear = (0, _index3.default)(fourthOfJanuaryOfThisYear); + + if (date.getTime() >= startOfNextYear.getTime()) { + return year + 1; + } else if (date.getTime() >= startOfThisYear.getTime()) { + return year; + } else { + return year - 1; + } +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8761: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getUTCWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2258)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2629)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MILLISECONDS_IN_WEEK = 604800000; + +function getUTCWeek(dirtyDate, options) { + (0, _index4.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var diff = (0, _index2.default)(date, options).getTime() - (0, _index3.default)(date, options).getTime(); // Round the number of days to the nearest integer + // because the number of milliseconds in a week is not constant + // (e.g. it's different in the week of the daylight saving time clock shift) + + return Math.round(diff / MILLISECONDS_IN_WEEK) + 1; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8050: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getUTCWeekYear; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2258)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index5 = __nccwpck_require__(9307); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getUTCWeekYear(dirtyDate, options) { + var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2; + + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var year = date.getUTCFullYear(); + var defaultOptions = (0, _index5.getDefaultOptions)(); + var firstWeekContainsDate = (0, _index4.default)((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN + + if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) { + throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively'); + } + + var firstWeekOfNextYear = new Date(0); + firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate); + firstWeekOfNextYear.setUTCHours(0, 0, 0, 0); + var startOfNextYear = (0, _index3.default)(firstWeekOfNextYear, options); + var firstWeekOfThisYear = new Date(0); + firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate); + firstWeekOfThisYear.setUTCHours(0, 0, 0, 0); + var startOfThisYear = (0, _index3.default)(firstWeekOfThisYear, options); + + if (date.getTime() >= startOfNextYear.getTime()) { + return year + 1; + } else if (date.getTime() >= startOfThisYear.getTime()) { + return year; + } else { + return year - 1; + } +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2509: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.isProtectedDayOfYearToken = isProtectedDayOfYearToken; +exports.isProtectedWeekYearToken = isProtectedWeekYearToken; +exports.throwProtectedError = throwProtectedError; +var protectedDayOfYearTokens = ['D', 'DD']; +var protectedWeekYearTokens = ['YY', 'YYYY']; + +function isProtectedDayOfYearToken(token) { + return protectedDayOfYearTokens.indexOf(token) !== -1; +} + +function isProtectedWeekYearToken(token) { + return protectedWeekYearTokens.indexOf(token) !== -1; +} + +function throwProtectedError(token, format, input) { + if (token === 'YYYY') { + throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")); + } else if (token === 'YY') { + throw new RangeError("Use `yy` instead of `YY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")); + } else if (token === 'D') { + throw new RangeError("Use `d` instead of `D` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")); + } else if (token === 'DD') { + throw new RangeError("Use `dd` instead of `DD` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")); + } +} + +/***/ }), + +/***/ 2063: +/***/ ((module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = requiredArgs; + +function requiredArgs(required, args) { + if (args.length < required) { + throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present'); + } +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8016: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.getRoundingMethod = getRoundingMethod; +var roundingMap = { + ceil: Math.ceil, + round: Math.round, + floor: Math.floor, + trunc: function trunc(value) { + return value < 0 ? Math.ceil(value) : Math.floor(value); + } // Math.trunc is not supported by IE + +}; +var defaultRoundingMethod = 'trunc'; + +function getRoundingMethod(method) { + return method ? roundingMap[method] : roundingMap[defaultRoundingMethod]; +} + +/***/ }), + +/***/ 2694: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setUTCDay; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index4 = __nccwpck_require__(9307); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function setUTCDay(dirtyDate, dirtyDay, options) { + var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2; + + (0, _index2.default)(2, arguments); + var defaultOptions = (0, _index4.getDefaultOptions)(); + var weekStartsOn = (0, _index3.default)((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN + + if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) { + throw new RangeError('weekStartsOn must be between 0 and 6 inclusively'); + } + + var date = (0, _index.default)(dirtyDate); + var day = (0, _index3.default)(dirtyDay); + var currentDay = date.getUTCDay(); + var remainder = day % 7; + var dayIndex = (remainder + 7) % 7; + var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay; + date.setUTCDate(date.getUTCDate() + diff); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7985: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setUTCISODay; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(1985)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function setUTCISODay(dirtyDate, dirtyDay) { + (0, _index2.default)(2, arguments); + var day = (0, _index3.default)(dirtyDay); + + if (day % 7 === 0) { + day = day - 7; + } + + var weekStartsOn = 1; + var date = (0, _index.default)(dirtyDate); + var currentDay = date.getUTCDay(); + var remainder = day % 7; + var dayIndex = (remainder + 7) % 7; + var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay; + date.setUTCDate(date.getUTCDate() + diff); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8921: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setUTCISOWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(8493)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function setUTCISOWeek(dirtyDate, dirtyISOWeek) { + (0, _index4.default)(2, arguments); + var date = (0, _index2.default)(dirtyDate); + var isoWeek = (0, _index.default)(dirtyISOWeek); + var diff = (0, _index3.default)(date) - isoWeek; + date.setUTCDate(date.getUTCDate() - diff * 7); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3285: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setUTCWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(8761)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function setUTCWeek(dirtyDate, dirtyWeek, options) { + (0, _index4.default)(2, arguments); + var date = (0, _index2.default)(dirtyDate); + var week = (0, _index.default)(dirtyWeek); + var diff = (0, _index3.default)(date, options) - week; + date.setUTCDate(date.getUTCDate() - diff * 7); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3061: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfUTCISOWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function startOfUTCISOWeek(dirtyDate) { + (0, _index2.default)(1, arguments); + var weekStartsOn = 1; + var date = (0, _index.default)(dirtyDate); + var day = date.getUTCDay(); + var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn; + date.setUTCDate(date.getUTCDate() - diff); + date.setUTCHours(0, 0, 0, 0); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1478: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfUTCISOWeekYear; + +var _index = _interopRequireDefault(__nccwpck_require__(7170)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(3061)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function startOfUTCISOWeekYear(dirtyDate) { + (0, _index3.default)(1, arguments); + var year = (0, _index.default)(dirtyDate); + var fourthOfJanuary = new Date(0); + fourthOfJanuary.setUTCFullYear(year, 0, 4); + fourthOfJanuary.setUTCHours(0, 0, 0, 0); + var date = (0, _index2.default)(fourthOfJanuary); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2258: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfUTCWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index4 = __nccwpck_require__(9307); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function startOfUTCWeek(dirtyDate, options) { + var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2; + + (0, _index2.default)(1, arguments); + var defaultOptions = (0, _index4.getDefaultOptions)(); + var weekStartsOn = (0, _index3.default)((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN + + if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) { + throw new RangeError('weekStartsOn must be between 0 and 6 inclusively'); + } + + var date = (0, _index.default)(dirtyDate); + var day = date.getUTCDay(); + var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn; + date.setUTCDate(date.getUTCDate() - diff); + date.setUTCHours(0, 0, 0, 0); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2629: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfUTCWeekYear; + +var _index = _interopRequireDefault(__nccwpck_require__(8050)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2258)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index5 = __nccwpck_require__(9307); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function startOfUTCWeekYear(dirtyDate, options) { + var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2; + + (0, _index2.default)(1, arguments); + var defaultOptions = (0, _index5.getDefaultOptions)(); + var firstWeekContainsDate = (0, _index4.default)((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1); + var year = (0, _index.default)(dirtyDate, options); + var firstWeek = new Date(0); + firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate); + firstWeek.setUTCHours(0, 0, 0, 0); + var date = (0, _index3.default)(firstWeek, options); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1985: +/***/ ((module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = toInteger; + +function toInteger(dirtyNumber) { + if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) { + return NaN; + } + + var number = Number(dirtyNumber); + + if (isNaN(number)) { + return number; + } + + return number < 0 ? Math.ceil(number) : Math.floor(number); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6211: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = add; + +var _index = _interopRequireDefault(__nccwpck_require__(6227)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2995)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(1985)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +/** + * @name add + * @category Common Helpers + * @summary Add the specified years, months, weeks, days, hours, minutes and seconds to the given date. + * + * @description + * Add the specified years, months, weeks, days, hours, minutes and seconds to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Duration} duration - the object with years, months, weeks, days, hours, minutes and seconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * + * | Key | Description | + * |----------------|------------------------------------| + * | years | Amount of years to be added | + * | months | Amount of months to be added | + * | weeks | Amount of weeks to be added | + * | days | Amount of days to be added | + * | hours | Amount of hours to be added | + * | minutes | Amount of minutes to be added | + * | seconds | Amount of seconds to be added | + * + * All values default to 0 + * + * @returns {Date} the new date with the seconds added + * @throws {TypeError} 2 arguments required + * + * @example + * // Add the following duration to 1 September 2014, 10:19:50 + * const result = add(new Date(2014, 8, 1, 10, 19, 50), { + * years: 2, + * months: 9, + * weeks: 1, + * days: 7, + * hours: 5, + * minutes: 9, + * seconds: 30, + * }) + * //=> Thu Jun 15 2017 15:29:20 + */ +function add(dirtyDate, duration) { + (0, _index4.default)(2, arguments); + if (!duration || _typeof(duration) !== 'object') return new Date(NaN); + var years = duration.years ? (0, _index5.default)(duration.years) : 0; + var months = duration.months ? (0, _index5.default)(duration.months) : 0; + var weeks = duration.weeks ? (0, _index5.default)(duration.weeks) : 0; + var days = duration.days ? (0, _index5.default)(duration.days) : 0; + var hours = duration.hours ? (0, _index5.default)(duration.hours) : 0; + var minutes = duration.minutes ? (0, _index5.default)(duration.minutes) : 0; + var seconds = duration.seconds ? (0, _index5.default)(duration.seconds) : 0; // Add years and months + + var date = (0, _index3.default)(dirtyDate); + var dateWithMonths = months || years ? (0, _index2.default)(date, months + years * 12) : date; // Add weeks and days + + var dateWithDays = days || weeks ? (0, _index.default)(dateWithMonths, days + weeks * 7) : dateWithMonths; // Add days, hours, minutes and seconds + + var minutesToAdd = minutes + hours * 60; + var secondsToAdd = seconds + minutesToAdd * 60; + var msToAdd = secondsToAdd * 1000; + var finalDate = new Date(dateWithDays.getTime() + msToAdd); + return finalDate; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1727: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = addBusinessDays; + +var _index = _interopRequireDefault(__nccwpck_require__(403)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(5852)); + +var _index6 = _interopRequireDefault(__nccwpck_require__(6308)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name addBusinessDays + * @category Day Helpers + * @summary Add the specified number of business days (mon - fri) to the given date. + * + * @description + * Add the specified number of business days (mon - fri) to the given date, ignoring weekends. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of business days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the business days added + * @throws {TypeError} 2 arguments required + * + * @example + * // Add 10 business days to 1 September 2014: + * const result = addBusinessDays(new Date(2014, 8, 1), 10) + * //=> Mon Sep 15 2014 00:00:00 (skipped weekend days) + */ +function addBusinessDays(dirtyDate, dirtyAmount) { + (0, _index4.default)(2, arguments); + var date = (0, _index2.default)(dirtyDate); + var startedOnWeekend = (0, _index.default)(date); + var amount = (0, _index3.default)(dirtyAmount); + if (isNaN(amount)) return new Date(NaN); + var hours = date.getHours(); + var sign = amount < 0 ? -1 : 1; + var fullWeeks = (0, _index3.default)(amount / 5); + date.setDate(date.getDate() + fullWeeks * 7); // Get remaining days not part of a full week + + var restDays = Math.abs(amount % 5); // Loops over remaining days + + while (restDays > 0) { + date.setDate(date.getDate() + sign); + if (!(0, _index.default)(date)) restDays -= 1; + } // If the date is a weekend day and we reduce a dividable of + // 5 from it, we land on a weekend date. + // To counter this, we add days accordingly to land on the next business day + + + if (startedOnWeekend && (0, _index.default)(date) && amount !== 0) { + // If we're reducing days, we want to add days until we land on a weekday + // If we're adding days we want to reduce days until we land on a weekday + if ((0, _index6.default)(date)) date.setDate(date.getDate() + (sign < 0 ? 2 : -1)); + if ((0, _index5.default)(date)) date.setDate(date.getDate() + (sign < 0 ? 1 : -2)); + } // Restore hours to avoid DST lag + + + date.setHours(hours); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6227: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = addDays; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name addDays + * @category Day Helpers + * @summary Add the specified number of days to the given date. + * + * @description + * Add the specified number of days to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} - the new date with the days added + * @throws {TypeError} - 2 arguments required + * + * @example + * // Add 10 days to 1 September 2014: + * const result = addDays(new Date(2014, 8, 1), 10) + * //=> Thu Sep 11 2014 00:00:00 + */ +function addDays(dirtyDate, dirtyAmount) { + (0, _index3.default)(2, arguments); + var date = (0, _index2.default)(dirtyDate); + var amount = (0, _index.default)(dirtyAmount); + + if (isNaN(amount)) { + return new Date(NaN); + } + + if (!amount) { + // If 0 days, no-op to avoid changing times in the hour before end of DST + return date; + } + + date.setDate(date.getDate() + amount); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9956: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = addHours; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(524)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MILLISECONDS_IN_HOUR = 3600000; +/** + * @name addHours + * @category Hour Helpers + * @summary Add the specified number of hours to the given date. + * + * @description + * Add the specified number of hours to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of hours to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the hours added + * @throws {TypeError} 2 arguments required + * + * @example + * // Add 2 hours to 10 July 2014 23:00:00: + * const result = addHours(new Date(2014, 6, 10, 23, 0), 2) + * //=> Fri Jul 11 2014 01:00:00 + */ + +function addHours(dirtyDate, dirtyAmount) { + (0, _index3.default)(2, arguments); + var amount = (0, _index.default)(dirtyAmount); + return (0, _index2.default)(dirtyDate, amount * MILLISECONDS_IN_HOUR); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5318: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = addISOWeekYears; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6991)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(822)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name addISOWeekYears + * @category ISO Week-Numbering Year Helpers + * @summary Add the specified number of ISO week-numbering years to the given date. + * + * @description + * Add the specified number of ISO week-numbering years to the given date. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of ISO week-numbering years to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the ISO week-numbering years added + * @throws {TypeError} 2 arguments required + * + * @example + * // Add 5 ISO week-numbering years to 2 July 2010: + * const result = addISOWeekYears(new Date(2010, 6, 2), 5) + * //=> Fri Jun 26 2015 00:00:00 + */ +function addISOWeekYears(dirtyDate, dirtyAmount) { + (0, _index4.default)(2, arguments); + var amount = (0, _index.default)(dirtyAmount); + return (0, _index3.default)(dirtyDate, (0, _index2.default)(dirtyDate) + amount); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 524: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = addMilliseconds; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name addMilliseconds + * @category Millisecond Helpers + * @summary Add the specified number of milliseconds to the given date. + * + * @description + * Add the specified number of milliseconds to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the milliseconds added + * @throws {TypeError} 2 arguments required + * + * @example + * // Add 750 milliseconds to 10 July 2014 12:45:30.000: + * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750) + * //=> Thu Jul 10 2014 12:45:30.750 + */ +function addMilliseconds(dirtyDate, dirtyAmount) { + (0, _index3.default)(2, arguments); + var timestamp = (0, _index2.default)(dirtyDate).getTime(); + var amount = (0, _index.default)(dirtyAmount); + return new Date(timestamp + amount); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5268: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = addMinutes; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(524)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MILLISECONDS_IN_MINUTE = 60000; +/** + * @name addMinutes + * @category Minute Helpers + * @summary Add the specified number of minutes to the given date. + * + * @description + * Add the specified number of minutes to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of minutes to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the minutes added + * @throws {TypeError} 2 arguments required + * + * @example + * // Add 30 minutes to 10 July 2014 12:00:00: + * const result = addMinutes(new Date(2014, 6, 10, 12, 0), 30) + * //=> Thu Jul 10 2014 12:30:00 + */ + +function addMinutes(dirtyDate, dirtyAmount) { + (0, _index3.default)(2, arguments); + var amount = (0, _index.default)(dirtyAmount); + return (0, _index2.default)(dirtyDate, amount * MILLISECONDS_IN_MINUTE); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2995: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = addMonths; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name addMonths + * @category Month Helpers + * @summary Add the specified number of months to the given date. + * + * @description + * Add the specified number of months to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the months added + * @throws {TypeError} 2 arguments required + * + * @example + * // Add 5 months to 1 September 2014: + * const result = addMonths(new Date(2014, 8, 1), 5) + * //=> Sun Feb 01 2015 00:00:00 + */ +function addMonths(dirtyDate, dirtyAmount) { + (0, _index3.default)(2, arguments); + var date = (0, _index2.default)(dirtyDate); + var amount = (0, _index.default)(dirtyAmount); + + if (isNaN(amount)) { + return new Date(NaN); + } + + if (!amount) { + // If 0 months, no-op to avoid changing times in the hour before end of DST + return date; + } + + var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for + // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and + // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we + // want except that dates will wrap around the end of a month, meaning that + // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So + // we'll default to the end of the desired month by adding 1 to the desired + // month and using a date of 0 to back up one day to the end of the desired + // month. + + var endOfDesiredMonth = new Date(date.getTime()); + endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0); + var daysInMonth = endOfDesiredMonth.getDate(); + + if (dayOfMonth >= daysInMonth) { + // If we're already at the end of the month, then this is the correct date + // and we're done. + return endOfDesiredMonth; + } else { + // Otherwise, we now know that setting the original day-of-month value won't + // cause an overflow, so set the desired day-of-month. Note that we can't + // just set the date of `endOfDesiredMonth` because that object may have had + // its time changed in the unusual case where where a DST transition was on + // the last day of the month and its local time was in the hour skipped or + // repeated next to a DST transition. So we use `date` instead which is + // guaranteed to still have the original time. + date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth); + return date; + } +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5149: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = addQuarters; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2995)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name addQuarters + * @category Quarter Helpers + * @summary Add the specified number of year quarters to the given date. + * + * @description + * Add the specified number of year quarters to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of quarters to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the quarters added + * @throws {TypeError} 2 arguments required + * + * @example + * // Add 1 quarter to 1 September 2014: + * const result = addQuarters(new Date(2014, 8, 1), 1) + * //=> Mon Dec 01 2014 00:00:00 + */ +function addQuarters(dirtyDate, dirtyAmount) { + (0, _index3.default)(2, arguments); + var amount = (0, _index.default)(dirtyAmount); + var months = amount * 3; + return (0, _index2.default)(dirtyDate, months); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 4112: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = addSeconds; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(524)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name addSeconds + * @category Second Helpers + * @summary Add the specified number of seconds to the given date. + * + * @description + * Add the specified number of seconds to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of seconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the seconds added + * @throws {TypeError} 2 arguments required + * + * @example + * // Add 30 seconds to 10 July 2014 12:45:00: + * const result = addSeconds(new Date(2014, 6, 10, 12, 45, 0), 30) + * //=> Thu Jul 10 2014 12:45:30 + */ +function addSeconds(dirtyDate, dirtyAmount) { + (0, _index3.default)(2, arguments); + var amount = (0, _index.default)(dirtyAmount); + return (0, _index2.default)(dirtyDate, amount * 1000); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7195: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = addWeeks; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6227)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name addWeeks + * @category Week Helpers + * @summary Add the specified number of weeks to the given date. + * + * @description + * Add the specified number of week to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of weeks to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the weeks added + * @throws {TypeError} 2 arguments required + * + * @example + * // Add 4 weeks to 1 September 2014: + * const result = addWeeks(new Date(2014, 8, 1), 4) + * //=> Mon Sep 29 2014 00:00:00 + */ +function addWeeks(dirtyDate, dirtyAmount) { + (0, _index3.default)(2, arguments); + var amount = (0, _index.default)(dirtyAmount); + var days = amount * 7; + return (0, _index2.default)(dirtyDate, days); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3367: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = addYears; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2995)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name addYears + * @category Year Helpers + * @summary Add the specified number of years to the given date. + * + * @description + * Add the specified number of years to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of years to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the years added + * @throws {TypeError} 2 arguments required + * + * @example + * // Add 5 years to 1 September 2014: + * const result = addYears(new Date(2014, 8, 1), 5) + * //=> Sun Sep 01 2019 00:00:00 + */ +function addYears(dirtyDate, dirtyAmount) { + (0, _index3.default)(2, arguments); + var amount = (0, _index.default)(dirtyAmount); + return (0, _index2.default)(dirtyDate, amount * 12); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2282: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = areIntervalsOverlapping; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name areIntervalsOverlapping + * @category Interval Helpers + * @summary Is the given time interval overlapping with another time interval? + * + * @description + * Is the given time interval overlapping with another time interval? Adjacent intervals do not count as overlapping. + * + * @param {Interval} intervalLeft - the first interval to compare. See [Interval]{@link https://date-fns.org/docs/Interval} + * @param {Interval} intervalRight - the second interval to compare. See [Interval]{@link https://date-fns.org/docs/Interval} + * @param {Object} [options] - the object with options + * @param {Boolean} [options.inclusive=false] - whether the comparison is inclusive or not + * @returns {Boolean} whether the time intervals are overlapping + * @throws {TypeError} 2 arguments required + * @throws {RangeError} The start of an interval cannot be after its end + * @throws {RangeError} Date in interval cannot be `Invalid Date` + * + * @example + * // For overlapping time intervals: + * areIntervalsOverlapping( + * { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) }, + * { start: new Date(2014, 0, 17), end: new Date(2014, 0, 21) } + * ) + * //=> true + * + * @example + * // For non-overlapping time intervals: + * areIntervalsOverlapping( + * { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) }, + * { start: new Date(2014, 0, 21), end: new Date(2014, 0, 22) } + * ) + * //=> false + * + * @example + * // For adjacent time intervals: + * areIntervalsOverlapping( + * { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) }, + * { start: new Date(2014, 0, 20), end: new Date(2014, 0, 30) } + * ) + * //=> false + * + * @example + * // Using the inclusive option: + * areIntervalsOverlapping( + * { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) }, + * { start: new Date(2014, 0, 20), end: new Date(2014, 0, 24) } + * ) + * //=> false + * areIntervalsOverlapping( + * { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) }, + * { start: new Date(2014, 0, 20), end: new Date(2014, 0, 24) }, + * { inclusive: true } + * ) + * //=> true + */ +function areIntervalsOverlapping(intervalLeft, intervalRight, options) { + (0, _index2.default)(2, arguments); + var leftStartTime = (0, _index.default)(intervalLeft === null || intervalLeft === void 0 ? void 0 : intervalLeft.start).getTime(); + var leftEndTime = (0, _index.default)(intervalLeft === null || intervalLeft === void 0 ? void 0 : intervalLeft.end).getTime(); + var rightStartTime = (0, _index.default)(intervalRight === null || intervalRight === void 0 ? void 0 : intervalRight.start).getTime(); + var rightEndTime = (0, _index.default)(intervalRight === null || intervalRight === void 0 ? void 0 : intervalRight.end).getTime(); // Throw an exception if start date is after end date or if any date is `Invalid Date` + + if (!(leftStartTime <= leftEndTime && rightStartTime <= rightEndTime)) { + throw new RangeError('Invalid interval'); + } + + if (options !== null && options !== void 0 && options.inclusive) { + return leftStartTime <= rightEndTime && rightStartTime <= leftEndTime; + } + + return leftStartTime < rightEndTime && rightStartTime < leftEndTime; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9660: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = clamp; + +var _index = _interopRequireDefault(__nccwpck_require__(5815)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(5310)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name clamp + * @category Interval Helpers + * @summary Return a date bounded by the start and the end of the given interval + * + * @description + * Clamps a date to the lower bound with the start of the interval and the upper + * bound with the end of the interval. + * + * - When the date is less than the start of the interval, the start is returned. + * - When the date is greater than the end of the interval, the end is returned. + * - Otherwise the date is returned. + * + * @example + * // What is Mar, 21, 2021 bounded to an interval starting at Mar, 22, 2021 and ending at Apr, 01, 2021 + * const result = clamp(new Date(2021, 2, 21), { + * start: new Date(2021, 2, 22), + * end: new Date(2021, 3, 1), + * }) + * //=> Mon Mar 22 2021 00:00:00 + * + * @param {Date | Number} date - the date to be bounded + * @param {Interval} interval - the interval to bound to + * @returns {Date} the date bounded by the start and the end of the interval + * @throws {TypeError} 2 arguments required + */ +function clamp(date, _ref) { + var start = _ref.start, + end = _ref.end; + (0, _index3.default)(2, arguments); + return (0, _index2.default)([(0, _index.default)([date, start]), end]); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2264: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = closestIndexTo; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name closestIndexTo + * @category Common Helpers + * @summary Return an index of the closest date from the array comparing to the given date. + * + * @description + * Return an index of the closest date from the array comparing to the given date. + * + * @param {Date | Number} dateToCompare - the date to compare with + * @param {Array | Array} datesArray - the array to search + * @returns {Number | undefined} an index of the date closest to the given date or undefined if no valid value is given + * @throws {TypeError} 2 arguments required + * + * @example + * // Which date is closer to 6 September 2015? + * const dateToCompare = new Date(2015, 8, 6) + * const datesArray = [ + * new Date(2015, 0, 1), + * new Date(2016, 0, 1), + * new Date(2017, 0, 1) + * ] + * const result = closestIndexTo(dateToCompare, datesArray) + * //=> 1 + */ +function closestIndexTo(dirtyDateToCompare, dirtyDatesArray) { + (0, _index2.default)(2, arguments); + var dateToCompare = (0, _index.default)(dirtyDateToCompare); + if (isNaN(Number(dateToCompare))) return NaN; + var timeToCompare = dateToCompare.getTime(); + var datesArray; // `dirtyDatesArray` is undefined or null + + if (dirtyDatesArray == null) { + datesArray = []; // `dirtyDatesArray` is Array, Set or Map, or object with custom `forEach` method + } else if (typeof dirtyDatesArray.forEach === 'function') { + datesArray = dirtyDatesArray; // If `dirtyDatesArray` is Array-like Object, convert to Array. Otherwise, make it empty Array + } else { + datesArray = Array.prototype.slice.call(dirtyDatesArray); + } + + var result; + var minDistance; + datesArray.forEach(function (dirtyDate, index) { + var currentDate = (0, _index.default)(dirtyDate); + + if (isNaN(Number(currentDate))) { + result = NaN; + minDistance = NaN; + return; + } + + var distance = Math.abs(timeToCompare - currentDate.getTime()); + + if (result == null || distance < Number(minDistance)) { + result = index; + minDistance = distance; + } + }); + return result; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2013: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = closestTo; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name closestTo + * @category Common Helpers + * @summary Return a date from the array closest to the given date. + * + * @description + * Return a date from the array closest to the given date. + * + * @param {Date | Number} dateToCompare - the date to compare with + * @param {Array | Array} datesArray - the array to search + * @returns {Date | undefined} the date from the array closest to the given date or undefined if no valid value is given + * @throws {TypeError} 2 arguments required + * + * @example + * // Which date is closer to 6 September 2015: 1 January 2000 or 1 January 2030? + * const dateToCompare = new Date(2015, 8, 6) + * const result = closestTo(dateToCompare, [ + * new Date(2000, 0, 1), + * new Date(2030, 0, 1) + * ]) + * //=> Tue Jan 01 2030 00:00:00 + */ +function closestTo(dirtyDateToCompare, dirtyDatesArray) { + (0, _index2.default)(2, arguments); + var dateToCompare = (0, _index.default)(dirtyDateToCompare); + if (isNaN(Number(dateToCompare))) return new Date(NaN); + var timeToCompare = dateToCompare.getTime(); + var datesArray; // `dirtyDatesArray` is undefined or null + + if (dirtyDatesArray == null) { + datesArray = []; // `dirtyDatesArray` is Array, Set or Map, or object with custom `forEach` method + } else if (typeof dirtyDatesArray.forEach === 'function') { + datesArray = dirtyDatesArray; // If `dirtyDatesArray` is Array-like Object, convert to Array. Otherwise, make it empty Array + } else { + datesArray = Array.prototype.slice.call(dirtyDatesArray); + } + + var result; + var minDistance; + datesArray.forEach(function (dirtyDate) { + var currentDate = (0, _index.default)(dirtyDate); + + if (isNaN(Number(currentDate))) { + result = new Date(NaN); + minDistance = NaN; + return; + } + + var distance = Math.abs(timeToCompare - currentDate.getTime()); + + if (result == null || distance < Number(minDistance)) { + result = currentDate; + minDistance = distance; + } + }); + return result; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9818: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = compareAsc; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name compareAsc + * @category Common Helpers + * @summary Compare the two dates and return -1, 0 or 1. + * + * @description + * Compare the two dates and return 1 if the first date is after the second, + * -1 if the first date is before the second or 0 if dates are equal. + * + * @param {Date|Number} dateLeft - the first date to compare + * @param {Date|Number} dateRight - the second date to compare + * @returns {Number} the result of the comparison + * @throws {TypeError} 2 arguments required + * + * @example + * // Compare 11 February 1987 and 10 July 1989: + * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10)) + * //=> -1 + * + * @example + * // Sort the array of dates: + * const result = [ + * new Date(1995, 6, 2), + * new Date(1987, 1, 11), + * new Date(1989, 6, 10) + * ].sort(compareAsc) + * //=> [ + * // Wed Feb 11 1987 00:00:00, + * // Mon Jul 10 1989 00:00:00, + * // Sun Jul 02 1995 00:00:00 + * // ] + */ +function compareAsc(dirtyDateLeft, dirtyDateRight) { + (0, _index2.default)(2, arguments); + var dateLeft = (0, _index.default)(dirtyDateLeft); + var dateRight = (0, _index.default)(dirtyDateRight); + var diff = dateLeft.getTime() - dateRight.getTime(); + + if (diff < 0) { + return -1; + } else if (diff > 0) { + return 1; // Return 0 if diff is 0; return NaN if diff is NaN + } else { + return diff; + } +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7783: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = compareDesc; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name compareDesc + * @category Common Helpers + * @summary Compare the two dates reverse chronologically and return -1, 0 or 1. + * + * @description + * Compare the two dates and return -1 if the first date is after the second, + * 1 if the first date is before the second or 0 if dates are equal. + * + * @param {Date|Number} dateLeft - the first date to compare + * @param {Date|Number} dateRight - the second date to compare + * @returns {Number} the result of the comparison + * @throws {TypeError} 2 arguments required + * + * @example + * // Compare 11 February 1987 and 10 July 1989 reverse chronologically: + * const result = compareDesc(new Date(1987, 1, 11), new Date(1989, 6, 10)) + * //=> 1 + * + * @example + * // Sort the array of dates in reverse chronological order: + * const result = [ + * new Date(1995, 6, 2), + * new Date(1987, 1, 11), + * new Date(1989, 6, 10) + * ].sort(compareDesc) + * //=> [ + * // Sun Jul 02 1995 00:00:00, + * // Mon Jul 10 1989 00:00:00, + * // Wed Feb 11 1987 00:00:00 + * // ] + */ +function compareDesc(dirtyDateLeft, dirtyDateRight) { + (0, _index2.default)(2, arguments); + var dateLeft = (0, _index.default)(dirtyDateLeft); + var dateRight = (0, _index.default)(dirtyDateRight); + var diff = dateLeft.getTime() - dateRight.getTime(); + + if (diff > 0) { + return -1; + } else if (diff < 0) { + return 1; // Return 0 if diff is 0; return NaN if diff is NaN + } else { + return diff; + } +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5756: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.secondsInYear = exports.secondsInWeek = exports.secondsInQuarter = exports.secondsInMonth = exports.secondsInMinute = exports.secondsInHour = exports.secondsInDay = exports.quartersInYear = exports.monthsInYear = exports.monthsInQuarter = exports.minutesInHour = exports.minTime = exports.millisecondsInSecond = exports.millisecondsInMinute = exports.millisecondsInHour = exports.maxTime = exports.daysInYear = exports.daysInWeek = void 0; + +/** + * Days in 1 week. + * + * @name daysInWeek + * @constant + * @type {number} + * @default + */ +var daysInWeek = 7; +/** + * Days in 1 year + * One years equals 365.2425 days according to the formula: + * + * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400. + * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days + * + * @name daysInYear + * @constant + * @type {number} + * @default + */ + +exports.daysInWeek = daysInWeek; +var daysInYear = 365.2425; +/** + * Maximum allowed time. + * + * @name maxTime + * @constant + * @type {number} + * @default + */ + +exports.daysInYear = daysInYear; +var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000; +/** + * Milliseconds in 1 minute + * + * @name millisecondsInMinute + * @constant + * @type {number} + * @default + */ + +exports.maxTime = maxTime; +var millisecondsInMinute = 60000; +/** + * Milliseconds in 1 hour + * + * @name millisecondsInHour + * @constant + * @type {number} + * @default + */ + +exports.millisecondsInMinute = millisecondsInMinute; +var millisecondsInHour = 3600000; +/** + * Milliseconds in 1 second + * + * @name millisecondsInSecond + * @constant + * @type {number} + * @default + */ + +exports.millisecondsInHour = millisecondsInHour; +var millisecondsInSecond = 1000; +/** + * Minimum allowed time. + * + * @name minTime + * @constant + * @type {number} + * @default + */ + +exports.millisecondsInSecond = millisecondsInSecond; +var minTime = -maxTime; +/** + * Minutes in 1 hour + * + * @name minutesInHour + * @constant + * @type {number} + * @default + */ + +exports.minTime = minTime; +var minutesInHour = 60; +/** + * Months in 1 quarter + * + * @name monthsInQuarter + * @constant + * @type {number} + * @default + */ + +exports.minutesInHour = minutesInHour; +var monthsInQuarter = 3; +/** + * Months in 1 year + * + * @name monthsInYear + * @constant + * @type {number} + * @default + */ + +exports.monthsInQuarter = monthsInQuarter; +var monthsInYear = 12; +/** + * Quarters in 1 year + * + * @name quartersInYear + * @constant + * @type {number} + * @default + */ + +exports.monthsInYear = monthsInYear; +var quartersInYear = 4; +/** + * Seconds in 1 hour + * + * @name secondsInHour + * @constant + * @type {number} + * @default + */ + +exports.quartersInYear = quartersInYear; +var secondsInHour = 3600; +/** + * Seconds in 1 minute + * + * @name secondsInMinute + * @constant + * @type {number} + * @default + */ + +exports.secondsInHour = secondsInHour; +var secondsInMinute = 60; +/** + * Seconds in 1 day + * + * @name secondsInDay + * @constant + * @type {number} + * @default + */ + +exports.secondsInMinute = secondsInMinute; +var secondsInDay = secondsInHour * 24; +/** + * Seconds in 1 week + * + * @name secondsInWeek + * @constant + * @type {number} + * @default + */ + +exports.secondsInDay = secondsInDay; +var secondsInWeek = secondsInDay * 7; +/** + * Seconds in 1 year + * + * @name secondsInYear + * @constant + * @type {number} + * @default + */ + +exports.secondsInWeek = secondsInWeek; +var secondsInYear = secondsInDay * daysInYear; +/** + * Seconds in 1 month + * + * @name secondsInMonth + * @constant + * @type {number} + * @default + */ + +exports.secondsInYear = secondsInYear; +var secondsInMonth = secondsInYear / 12; +/** + * Seconds in 1 quarter + * + * @name secondsInQuarter + * @constant + * @type {number} + * @default + */ + +exports.secondsInMonth = secondsInMonth; +var secondsInQuarter = secondsInMonth * 3; +exports.secondsInQuarter = secondsInQuarter; + +/***/ }), + +/***/ 6237: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = daysToWeeks; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name daysToWeeks + * @category Conversion Helpers + * @summary Convert days to weeks. + * + * @description + * Convert a number of days to a full number of weeks. + * + * @param {number} days - number of days to be converted + * + * @returns {number} the number of days converted in weeks + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 14 days to weeks: + * const result = daysToWeeks(14) + * //=> 2 + * + * @example + * // It uses floor rounding: + * const result = daysToWeeks(13) + * //=> 1 + */ +function daysToWeeks(days) { + (0, _index.default)(1, arguments); + var weeks = days / _index2.daysInWeek; + return Math.floor(weeks); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 4734: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = differenceInBusinessDays; + +var _index = _interopRequireDefault(__nccwpck_require__(6227)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(3086)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2154)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(9920)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(403)); + +var _index6 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index7 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index8 = _interopRequireDefault(__nccwpck_require__(1985)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name differenceInBusinessDays + * @category Day Helpers + * @summary Get the number of business days between the given dates. + * + * @description + * Get the number of business day periods between the given dates. + * Business days being days that arent in the weekend. + * Like `differenceInCalendarDays`, the function removes the times from + * the dates before calculating the difference. + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @returns {Number} the number of business days + * @throws {TypeError} 2 arguments required + * + * @example + * // How many business days are between + * // 10 January 2014 and 20 July 2014? + * const result = differenceInBusinessDays( + * new Date(2014, 6, 20), + * new Date(2014, 0, 10) + * ) + * //=> 136 + * + * // How many business days are between + * // 30 November 2021 and 1 November 2021? + * const result = differenceInBusinessDays( + * new Date(2021, 10, 30), + * new Date(2021, 10, 1) + * ) + * //=> 21 + * + * // How many business days are between + * // 1 November 2021 and 1 December 2021? + * const result = differenceInBusinessDays( + * new Date(2021, 10, 1), + * new Date(2021, 11, 1) + * ) + * //=> -22 + * + * // How many business days are between + * // 1 November 2021 and 1 November 2021 ? + * const result = differenceInBusinessDays( + * new Date(2021, 10, 1), + * new Date(2021, 10, 1) + * ) + * //=> 0 + */ +function differenceInBusinessDays(dirtyDateLeft, dirtyDateRight) { + (0, _index7.default)(2, arguments); + var dateLeft = (0, _index6.default)(dirtyDateLeft); + var dateRight = (0, _index6.default)(dirtyDateRight); + if (!(0, _index4.default)(dateLeft) || !(0, _index4.default)(dateRight)) return NaN; + var calendarDifference = (0, _index2.default)(dateLeft, dateRight); + var sign = calendarDifference < 0 ? -1 : 1; + var weeks = (0, _index8.default)(calendarDifference / 7); + var result = weeks * 5; + dateRight = (0, _index.default)(dateRight, weeks * 7); // the loop below will run at most 6 times to account for the remaining days that don't makeup a full week + + while (!(0, _index3.default)(dateLeft, dateRight)) { + // sign is used to account for both negative and positive differences + result += (0, _index5.default)(dateRight) ? 0 : sign; + dateRight = (0, _index.default)(dateRight, sign); + } + + return result === 0 ? 0 : result; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3086: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = differenceInCalendarDays; + +var _index = _interopRequireDefault(__nccwpck_require__(7032)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(1868)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MILLISECONDS_IN_DAY = 86400000; +/** + * @name differenceInCalendarDays + * @category Day Helpers + * @summary Get the number of calendar days between the given dates. + * + * @description + * Get the number of calendar days between the given dates. This means that the times are removed + * from the dates and then the difference in days is calculated. + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @returns {Number} the number of calendar days + * @throws {TypeError} 2 arguments required + * + * @example + * // How many calendar days are between + * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00? + * const result = differenceInCalendarDays( + * new Date(2012, 6, 2, 0, 0), + * new Date(2011, 6, 2, 23, 0) + * ) + * //=> 366 + * // How many calendar days are between + * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00? + * const result = differenceInCalendarDays( + * new Date(2011, 6, 3, 0, 1), + * new Date(2011, 6, 2, 23, 59) + * ) + * //=> 1 + */ + +function differenceInCalendarDays(dirtyDateLeft, dirtyDateRight) { + (0, _index3.default)(2, arguments); + var startOfDayLeft = (0, _index2.default)(dirtyDateLeft); + var startOfDayRight = (0, _index2.default)(dirtyDateRight); + var timestampLeft = startOfDayLeft.getTime() - (0, _index.default)(startOfDayLeft); + var timestampRight = startOfDayRight.getTime() - (0, _index.default)(startOfDayRight); // Round the number of days to the nearest integer + // because the number of milliseconds in a day is not constant + // (e.g. it's different in the day of the daylight saving time clock shift) + + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6778: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = differenceInCalendarISOWeekYears; + +var _index = _interopRequireDefault(__nccwpck_require__(6991)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name differenceInCalendarISOWeekYears + * @category ISO Week-Numbering Year Helpers + * @summary Get the number of calendar ISO week-numbering years between the given dates. + * + * @description + * Get the number of calendar ISO week-numbering years between the given dates. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @returns {Number} the number of calendar ISO week-numbering years + * @throws {TypeError} 2 arguments required + * + * @example + * // How many calendar ISO week-numbering years are 1 January 2010 and 1 January 2012? + * const result = differenceInCalendarISOWeekYears( + * new Date(2012, 0, 1), + * new Date(2010, 0, 1) + * ) + * //=> 2 + */ +function differenceInCalendarISOWeekYears(dirtyDateLeft, dirtyDateRight) { + (0, _index2.default)(2, arguments); + return (0, _index.default)(dirtyDateLeft) - (0, _index.default)(dirtyDateRight); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1656: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = differenceInCalendarISOWeeks; + +var _index = _interopRequireDefault(__nccwpck_require__(7032)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6307)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MILLISECONDS_IN_WEEK = 604800000; +/** + * @name differenceInCalendarISOWeeks + * @category ISO Week Helpers + * @summary Get the number of calendar ISO weeks between the given dates. + * + * @description + * Get the number of calendar ISO weeks between the given dates. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @returns {Number} the number of calendar ISO weeks + * @throws {TypeError} 2 arguments required + * + * @example + * // How many calendar ISO weeks are between 6 July 2014 and 21 July 2014? + * const result = differenceInCalendarISOWeeks( + * new Date(2014, 6, 21), + * new Date(2014, 6, 6) + * ) + * //=> 3 + */ + +function differenceInCalendarISOWeeks(dirtyDateLeft, dirtyDateRight) { + (0, _index3.default)(2, arguments); + var startOfISOWeekLeft = (0, _index2.default)(dirtyDateLeft); + var startOfISOWeekRight = (0, _index2.default)(dirtyDateRight); + var timestampLeft = startOfISOWeekLeft.getTime() - (0, _index.default)(startOfISOWeekLeft); + var timestampRight = startOfISOWeekRight.getTime() - (0, _index.default)(startOfISOWeekRight); // Round the number of days to the nearest integer + // because the number of milliseconds in a week is not constant + // (e.g. it's different in the week of the daylight saving time clock shift) + + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5536: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = differenceInCalendarMonths; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name differenceInCalendarMonths + * @category Month Helpers + * @summary Get the number of calendar months between the given dates. + * + * @description + * Get the number of calendar months between the given dates. + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @returns {Number} the number of calendar months + * @throws {TypeError} 2 arguments required + * + * @example + * // How many calendar months are between 31 January 2014 and 1 September 2014? + * const result = differenceInCalendarMonths( + * new Date(2014, 8, 1), + * new Date(2014, 0, 31) + * ) + * //=> 8 + */ +function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) { + (0, _index2.default)(2, arguments); + var dateLeft = (0, _index.default)(dirtyDateLeft); + var dateRight = (0, _index.default)(dirtyDateRight); + var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear(); + var monthDiff = dateLeft.getMonth() - dateRight.getMonth(); + return yearDiff * 12 + monthDiff; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2342: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = differenceInCalendarQuarters; + +var _index = _interopRequireDefault(__nccwpck_require__(4523)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name differenceInCalendarQuarters + * @category Quarter Helpers + * @summary Get the number of calendar quarters between the given dates. + * + * @description + * Get the number of calendar quarters between the given dates. + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @returns {Number} the number of calendar quarters + * @throws {TypeError} 2 arguments required + * + * @example + * // How many calendar quarters are between 31 December 2013 and 2 July 2014? + * const result = differenceInCalendarQuarters( + * new Date(2014, 6, 2), + * new Date(2013, 11, 31) + * ) + * //=> 3 + */ +function differenceInCalendarQuarters(dirtyDateLeft, dirtyDateRight) { + (0, _index3.default)(2, arguments); + var dateLeft = (0, _index2.default)(dirtyDateLeft); + var dateRight = (0, _index2.default)(dirtyDateRight); + var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear(); + var quarterDiff = (0, _index.default)(dateLeft) - (0, _index.default)(dateRight); + return yearDiff * 4 + quarterDiff; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8620: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = differenceInCalendarWeeks; + +var _index = _interopRequireDefault(__nccwpck_require__(9813)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(7032)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MILLISECONDS_IN_WEEK = 604800000; +/** + * @name differenceInCalendarWeeks + * @category Week Helpers + * @summary Get the number of calendar weeks between the given dates. + * + * @description + * Get the number of calendar weeks between the given dates. + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @returns {Number} the number of calendar weeks + * @throws {TypeError} 2 arguments required + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 + * + * @example + * // How many calendar weeks are between 5 July 2014 and 20 July 2014? + * const result = differenceInCalendarWeeks( + * new Date(2014, 6, 20), + * new Date(2014, 6, 5) + * ) + * //=> 3 + * + * @example + * // If the week starts on Monday, + * // how many calendar weeks are between 5 July 2014 and 20 July 2014? + * const result = differenceInCalendarWeeks( + * new Date(2014, 6, 20), + * new Date(2014, 6, 5), + * { weekStartsOn: 1 } + * ) + * //=> 2 + */ + +function differenceInCalendarWeeks(dirtyDateLeft, dirtyDateRight, options) { + (0, _index3.default)(2, arguments); + var startOfWeekLeft = (0, _index.default)(dirtyDateLeft, options); + var startOfWeekRight = (0, _index.default)(dirtyDateRight, options); + var timestampLeft = startOfWeekLeft.getTime() - (0, _index2.default)(startOfWeekLeft); + var timestampRight = startOfWeekRight.getTime() - (0, _index2.default)(startOfWeekRight); // Round the number of days to the nearest integer + // because the number of milliseconds in a week is not constant + // (e.g. it's different in the week of the daylight saving time clock shift) + + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5237: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = differenceInCalendarYears; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name differenceInCalendarYears + * @category Year Helpers + * @summary Get the number of calendar years between the given dates. + * + * @description + * Get the number of calendar years between the given dates. + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @returns {Number} the number of calendar years + * @throws {TypeError} 2 arguments required + * + * @example + * // How many calendar years are between 31 December 2013 and 11 February 2015? + * const result = differenceInCalendarYears( + * new Date(2015, 1, 11), + * new Date(2013, 11, 31) + * ) + * //=> 2 + */ +function differenceInCalendarYears(dirtyDateLeft, dirtyDateRight) { + (0, _index2.default)(2, arguments); + var dateLeft = (0, _index.default)(dirtyDateLeft); + var dateRight = (0, _index.default)(dirtyDateRight); + return dateLeft.getFullYear() - dateRight.getFullYear(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6311: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = differenceInDays; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(3086)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// Like `compareAsc` but uses local time not UTC, which is needed +// for accurate equality comparisons of UTC timestamps that end up +// having the same representation in local time, e.g. one hour before +// DST ends vs. the instant that DST ends. +function compareLocalAsc(dateLeft, dateRight) { + var diff = dateLeft.getFullYear() - dateRight.getFullYear() || dateLeft.getMonth() - dateRight.getMonth() || dateLeft.getDate() - dateRight.getDate() || dateLeft.getHours() - dateRight.getHours() || dateLeft.getMinutes() - dateRight.getMinutes() || dateLeft.getSeconds() - dateRight.getSeconds() || dateLeft.getMilliseconds() - dateRight.getMilliseconds(); + + if (diff < 0) { + return -1; + } else if (diff > 0) { + return 1; // Return 0 if diff is 0; return NaN if diff is NaN + } else { + return diff; + } +} +/** + * @name differenceInDays + * @category Day Helpers + * @summary Get the number of full days between the given dates. + * + * @description + * Get the number of full day periods between two dates. Fractional days are + * truncated towards zero. + * + * One "full day" is the distance between a local time in one day to the same + * local time on the next or previous day. A full day can sometimes be less than + * or more than 24 hours if a daylight savings change happens between two dates. + * + * To ignore DST and only measure exact 24-hour periods, use this instead: + * `Math.floor(differenceInHours(dateLeft, dateRight)/24)|0`. + * + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @returns {Number} the number of full days according to the local timezone + * @throws {TypeError} 2 arguments required + * + * @example + * // How many full days are between + * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00? + * const result = differenceInDays( + * new Date(2012, 6, 2, 0, 0), + * new Date(2011, 6, 2, 23, 0) + * ) + * //=> 365 + * // How many full days are between + * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00? + * const result = differenceInDays( + * new Date(2011, 6, 3, 0, 1), + * new Date(2011, 6, 2, 23, 59) + * ) + * //=> 0 + * // How many full days are between + * // 1 March 2020 0:00 and 1 June 2020 0:00 ? + * // Note: because local time is used, the + * // result will always be 92 days, even in + * // time zones where DST starts and the + * // period has only 92*24-1 hours. + * const result = differenceInDays( + * new Date(2020, 5, 1), + * new Date(2020, 2, 1) + * ) +//=> 92 + */ + + +function differenceInDays(dirtyDateLeft, dirtyDateRight) { + (0, _index3.default)(2, arguments); + var dateLeft = (0, _index.default)(dirtyDateLeft); + var dateRight = (0, _index.default)(dirtyDateRight); + var sign = compareLocalAsc(dateLeft, dateRight); + var difference = Math.abs((0, _index2.default)(dateLeft, dateRight)); + dateLeft.setDate(dateLeft.getDate() - sign * difference); // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full + // If so, result must be decreased by 1 in absolute value + + var isLastDayNotFull = Number(compareLocalAsc(dateLeft, dateRight) === -sign); + var result = sign * (difference - isLastDayNotFull); // Prevent negative zero + + return result === 0 ? 0 : result; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8740: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = differenceInHours; + +var _index = __nccwpck_require__(5756); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2288)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index4 = __nccwpck_require__(8016); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name differenceInHours + * @category Hour Helpers + * @summary Get the number of hours between the given dates. + * + * @description + * Get the number of hours between the given dates. + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @param {Object} [options] - an object with options. + * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`) + * @returns {Number} the number of hours + * @throws {TypeError} 2 arguments required + * + * @example + * // How many hours are between 2 July 2014 06:50:00 and 2 July 2014 19:00:00? + * const result = differenceInHours( + * new Date(2014, 6, 2, 19, 0), + * new Date(2014, 6, 2, 6, 50) + * ) + * //=> 12 + */ +function differenceInHours(dateLeft, dateRight, options) { + (0, _index3.default)(2, arguments); + + var diff = (0, _index2.default)(dateLeft, dateRight) / _index.millisecondsInHour; + + return (0, _index4.getRoundingMethod)(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8815: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = differenceInISOWeekYears; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6778)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(9818)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(3925)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name differenceInISOWeekYears + * @category ISO Week-Numbering Year Helpers + * @summary Get the number of full ISO week-numbering years between the given dates. + * + * @description + * Get the number of full ISO week-numbering years between the given dates. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @returns {Number} the number of full ISO week-numbering years + * @throws {TypeError} 2 arguments required + * + * @example + * // How many full ISO week-numbering years are between 1 January 2010 and 1 January 2012? + * const result = differenceInISOWeekYears( + * new Date(2012, 0, 1), + * new Date(2010, 0, 1) + * ) + * //=> 1 + */ +function differenceInISOWeekYears(dirtyDateLeft, dirtyDateRight) { + (0, _index5.default)(2, arguments); + var dateLeft = (0, _index.default)(dirtyDateLeft); + var dateRight = (0, _index.default)(dirtyDateRight); + var sign = (0, _index3.default)(dateLeft, dateRight); + var difference = Math.abs((0, _index2.default)(dateLeft, dateRight)); + dateLeft = (0, _index4.default)(dateLeft, sign * difference); // Math.abs(diff in full ISO years - diff in calendar ISO years) === 1 + // if last calendar ISO year is not full + // If so, result must be decreased by 1 in absolute value + + var isLastISOWeekYearNotFull = Number((0, _index3.default)(dateLeft, dateRight) === -sign); + var result = sign * (difference - isLastISOWeekYearNotFull); // Prevent negative zero + + return result === 0 ? 0 : result; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2288: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = differenceInMilliseconds; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name differenceInMilliseconds + * @category Millisecond Helpers + * @summary Get the number of milliseconds between the given dates. + * + * @description + * Get the number of milliseconds between the given dates. + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @returns {Number} the number of milliseconds + * @throws {TypeError} 2 arguments required + * + * @example + * // How many milliseconds are between + * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700? + * const result = differenceInMilliseconds( + * new Date(2014, 6, 2, 12, 30, 21, 700), + * new Date(2014, 6, 2, 12, 30, 20, 600) + * ) + * //=> 1100 + */ +function differenceInMilliseconds(dateLeft, dateRight) { + (0, _index2.default)(2, arguments); + return (0, _index.default)(dateLeft).getTime() - (0, _index.default)(dateRight).getTime(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3842: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = differenceInMinutes; + +var _index = __nccwpck_require__(5756); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2288)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index4 = __nccwpck_require__(8016); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name differenceInMinutes + * @category Minute Helpers + * @summary Get the number of minutes between the given dates. + * + * @description + * Get the signed number of full (rounded towards 0) minutes between the given dates. + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @param {Object} [options] - an object with options. + * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`) + * @returns {Number} the number of minutes + * @throws {TypeError} 2 arguments required + * + * @example + * // How many minutes are between 2 July 2014 12:07:59 and 2 July 2014 12:20:00? + * const result = differenceInMinutes( + * new Date(2014, 6, 2, 12, 20, 0), + * new Date(2014, 6, 2, 12, 7, 59) + * ) + * //=> 12 + * + * @example + * // How many minutes are between 10:01:59 and 10:00:00 + * const result = differenceInMinutes( + * new Date(2000, 0, 1, 10, 0, 0), + * new Date(2000, 0, 1, 10, 1, 59) + * ) + * //=> -1 + */ +function differenceInMinutes(dateLeft, dateRight, options) { + (0, _index3.default)(2, arguments); + + var diff = (0, _index2.default)(dateLeft, dateRight) / _index.millisecondsInMinute; + + return (0, _index4.getRoundingMethod)(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2713: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = differenceInMonths; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(5536)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(9818)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(8506)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name differenceInMonths + * @category Month Helpers + * @summary Get the number of full months between the given dates. + * + * @description + * Get the number of full months between the given dates using trunc as a default rounding method. + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @returns {Number} the number of full months + * @throws {TypeError} 2 arguments required + * + * @example + * // How many full months are between 31 January 2014 and 1 September 2014? + * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31)) + * //=> 7 + */ +function differenceInMonths(dirtyDateLeft, dirtyDateRight) { + (0, _index4.default)(2, arguments); + var dateLeft = (0, _index.default)(dirtyDateLeft); + var dateRight = (0, _index.default)(dirtyDateRight); + var sign = (0, _index3.default)(dateLeft, dateRight); + var difference = Math.abs((0, _index2.default)(dateLeft, dateRight)); + var result; // Check for the difference of less than month + + if (difference < 1) { + result = 0; + } else { + if (dateLeft.getMonth() === 1 && dateLeft.getDate() > 27) { + // This will check if the date is end of Feb and assign a higher end of month date + // to compare it with Jan + dateLeft.setDate(30); + } + + dateLeft.setMonth(dateLeft.getMonth() - sign * difference); // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full + // If so, result must be decreased by 1 in absolute value + + var isLastMonthNotFull = (0, _index3.default)(dateLeft, dateRight) === -sign; // Check for cases of one full calendar month + + if ((0, _index5.default)((0, _index.default)(dirtyDateLeft)) && difference === 1 && (0, _index3.default)(dirtyDateLeft, dateRight) === 1) { + isLastMonthNotFull = false; + } + + result = sign * (difference - Number(isLastMonthNotFull)); + } // Prevent negative zero + + + return result === 0 ? 0 : result; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7074: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = differenceInQuarters; + +var _index = _interopRequireDefault(__nccwpck_require__(2713)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index3 = __nccwpck_require__(8016); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name differenceInQuarters + * @category Quarter Helpers + * @summary Get the number of quarters between the given dates. + * + * @description + * Get the number of quarters between the given dates. + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @param {Object} [options] - an object with options. + * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`) + * @returns {Number} the number of full quarters + * @throws {TypeError} 2 arguments required + * + * @example + * // How many full quarters are between 31 December 2013 and 2 July 2014? + * const result = differenceInQuarters(new Date(2014, 6, 2), new Date(2013, 11, 31)) + * //=> 2 + */ +function differenceInQuarters(dateLeft, dateRight, options) { + (0, _index2.default)(2, arguments); + var diff = (0, _index.default)(dateLeft, dateRight) / 3; + return (0, _index3.getRoundingMethod)(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9448: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = differenceInSeconds; + +var _index = _interopRequireDefault(__nccwpck_require__(2288)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index3 = __nccwpck_require__(8016); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name differenceInSeconds + * @category Second Helpers + * @summary Get the number of seconds between the given dates. + * + * @description + * Get the number of seconds between the given dates. + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @param {Object} [options] - an object with options. + * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`) + * @returns {Number} the number of seconds + * @throws {TypeError} 2 arguments required + * + * @example + * // How many seconds are between + * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000? + * const result = differenceInSeconds( + * new Date(2014, 6, 2, 12, 30, 20, 0), + * new Date(2014, 6, 2, 12, 30, 7, 999) + * ) + * //=> 12 + */ +function differenceInSeconds(dateLeft, dateRight, options) { + (0, _index2.default)(2, arguments); + var diff = (0, _index.default)(dateLeft, dateRight) / 1000; + return (0, _index3.getRoundingMethod)(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2701: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = differenceInWeeks; + +var _index = _interopRequireDefault(__nccwpck_require__(6311)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index3 = __nccwpck_require__(8016); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name differenceInWeeks + * @category Week Helpers + * @summary Get the number of full weeks between the given dates. + * + * @description + * Get the number of full weeks between two dates. Fractional weeks are + * truncated towards zero by default. + * + * One "full week" is the distance between a local time in one day to the same + * local time 7 days earlier or later. A full week can sometimes be less than + * or more than 7*24 hours if a daylight savings change happens between two dates. + * + * To ignore DST and only measure exact 7*24-hour periods, use this instead: + * `Math.floor(differenceInHours(dateLeft, dateRight)/(7*24))|0`. + * + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @param {Object} [options] - an object with options. + * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`) + * @returns {Number} the number of full weeks + * @throws {TypeError} 2 arguments required + * + * @example + * // How many full weeks are between 5 July 2014 and 20 July 2014? + * const result = differenceInWeeks(new Date(2014, 6, 20), new Date(2014, 6, 5)) + * //=> 2 + * + * // How many full weeks are between + * // 1 March 2020 0:00 and 6 June 2020 0:00 ? + * // Note: because local time is used, the + * // result will always be 8 weeks (54 days), + * // even if DST starts and the period has + * // only 54*24-1 hours. + * const result = differenceInWeeks( + * new Date(2020, 5, 1), + * new Date(2020, 2, 6) + * ) + * //=> 8 + */ +function differenceInWeeks(dateLeft, dateRight, options) { + (0, _index2.default)(2, arguments); + var diff = (0, _index.default)(dateLeft, dateRight) / 7; + return (0, _index3.getRoundingMethod)(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3959: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = differenceInYears; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(5237)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(9818)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name differenceInYears + * @category Year Helpers + * @summary Get the number of full years between the given dates. + * + * @description + * Get the number of full years between the given dates. + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @returns {Number} the number of full years + * @throws {TypeError} 2 arguments required + * + * @example + * // How many full years are between 31 December 2013 and 11 February 2015? + * const result = differenceInYears(new Date(2015, 1, 11), new Date(2013, 11, 31)) + * //=> 1 + */ +function differenceInYears(dirtyDateLeft, dirtyDateRight) { + (0, _index4.default)(2, arguments); + var dateLeft = (0, _index.default)(dirtyDateLeft); + var dateRight = (0, _index.default)(dirtyDateRight); + var sign = (0, _index3.default)(dateLeft, dateRight); + var difference = Math.abs((0, _index2.default)(dateLeft, dateRight)); // Set both dates to a valid leap year for accurate comparison when dealing + // with leap days + + dateLeft.setFullYear(1584); + dateRight.setFullYear(1584); // Math.abs(diff in full years - diff in calendar years) === 1 if last calendar year is not full + // If so, result must be decreased by 1 in absolute value + + var isLastYearNotFull = (0, _index3.default)(dateLeft, dateRight) === -sign; + var result = sign * (difference - Number(isLastYearNotFull)); // Prevent negative zero + + return result === 0 ? 0 : result; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6545: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = eachDayOfInterval; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name eachDayOfInterval + * @category Interval Helpers + * @summary Return the array of dates within the specified time interval. + * + * @description + * Return the array of dates within the specified time interval. + * + * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval} + * @param {Object} [options] - an object with options. + * @param {Number} [options.step=1] - the step to increment by. The value should be more than 1. + * @returns {Date[]} the array with starts of days from the day of the interval start to the day of the interval end + * @throws {TypeError} 1 argument required + * @throws {RangeError} `options.step` must be a number greater than 1 + * @throws {RangeError} The start of an interval cannot be after its end + * @throws {RangeError} Date in interval cannot be `Invalid Date` + * + * @example + * // Each day between 6 October 2014 and 10 October 2014: + * const result = eachDayOfInterval({ + * start: new Date(2014, 9, 6), + * end: new Date(2014, 9, 10) + * }) + * //=> [ + * // Mon Oct 06 2014 00:00:00, + * // Tue Oct 07 2014 00:00:00, + * // Wed Oct 08 2014 00:00:00, + * // Thu Oct 09 2014 00:00:00, + * // Fri Oct 10 2014 00:00:00 + * // ] + */ +function eachDayOfInterval(dirtyInterval, options) { + var _options$step; + + (0, _index2.default)(1, arguments); + var interval = dirtyInterval || {}; + var startDate = (0, _index.default)(interval.start); + var endDate = (0, _index.default)(interval.end); + var endTime = endDate.getTime(); // Throw an exception if start date is after end date or if any date is `Invalid Date` + + if (!(startDate.getTime() <= endTime)) { + throw new RangeError('Invalid interval'); + } + + var dates = []; + var currentDate = startDate; + currentDate.setHours(0, 0, 0, 0); + var step = Number((_options$step = options === null || options === void 0 ? void 0 : options.step) !== null && _options$step !== void 0 ? _options$step : 1); + if (step < 1 || isNaN(step)) throw new RangeError('`options.step` must be a number greater than 1'); + + while (currentDate.getTime() <= endTime) { + dates.push((0, _index.default)(currentDate)); + currentDate.setDate(currentDate.getDate() + step); + currentDate.setHours(0, 0, 0, 0); + } + + return dates; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6802: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = eachHourOfInterval; + +var _index = _interopRequireDefault(__nccwpck_require__(9956)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name eachHourOfInterval + * @category Interval Helpers + * @summary Return the array of hours within the specified time interval. + * + * @description + * Return the array of hours within the specified time interval. + * + * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval} + * @param {Object} [options] - an object with options. + * @param {Number} [options.step=1] - the step to increment by. The value should be more than 1. + * @returns {Date[]} the array with starts of hours from the hour of the interval start to the hour of the interval end + * @throws {TypeError} 1 argument required + * @throws {RangeError} `options.step` must be a number greater than 1 + * @throws {RangeError} The start of an interval cannot be after its end + * @throws {RangeError} Date in interval cannot be `Invalid Date` + * + * @example + * // Each hour between 6 October 2014, 12:00 and 6 October 2014, 15:00 + * const result = eachHourOfInterval({ + * start: new Date(2014, 9, 6, 12), + * end: new Date(2014, 9, 6, 15) + * }) + * //=> [ + * // Mon Oct 06 2014 12:00:00, + * // Mon Oct 06 2014 13:00:00, + * // Mon Oct 06 2014 14:00:00, + * // Mon Oct 06 2014 15:00:00 + * // ] + */ +function eachHourOfInterval(dirtyInterval, options) { + var _options$step; + + (0, _index3.default)(1, arguments); + var interval = dirtyInterval || {}; + var startDate = (0, _index2.default)(interval.start); + var endDate = (0, _index2.default)(interval.end); + var startTime = startDate.getTime(); + var endTime = endDate.getTime(); // Throw an exception if start date is after end date or if any date is `Invalid Date` + + if (!(startTime <= endTime)) { + throw new RangeError('Invalid interval'); + } + + var dates = []; + var currentDate = startDate; + currentDate.setMinutes(0, 0, 0); + var step = Number((_options$step = options === null || options === void 0 ? void 0 : options.step) !== null && _options$step !== void 0 ? _options$step : 1); + if (step < 1 || isNaN(step)) throw new RangeError('`options.step` must be a number greater than 1'); + + while (currentDate.getTime() <= endTime) { + dates.push((0, _index2.default)(currentDate)); + currentDate = (0, _index.default)(currentDate, step); + } + + return dates; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2029: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = eachMinuteOfInterval; + +var _index = _interopRequireDefault(__nccwpck_require__(5268)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(8567)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name eachMinuteOfInterval + * @category Interval Helpers + * @summary Return the array of minutes within the specified time interval. + * + * @description + * Returns the array of minutes within the specified time interval. + * + * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval} + * @param {Object} [options] - an object with options. + * @param {Number} [options.step=1] - the step to increment by. The step must be equal to or greater than 1 + * @throws {TypeError} 1 argument required + * @returns {Date[]} the array with starts of minutes from the minute of the interval start to the minute of the interval end + * @throws {RangeError} `options.step` must be a number equal to or greater than 1 + * @throws {RangeError} The start of an interval cannot be after its end + * @throws {RangeError} Date in interval cannot be `Invalid Date` + * + * @example + * // Each minute between 14 October 2020, 13:00 and 14 October 2020, 13:03 + * const result = eachMinuteOfInterval({ + * start: new Date(2014, 9, 14, 13), + * end: new Date(2014, 9, 14, 13, 3) + * }) + * //=> [ + * // Wed Oct 14 2014 13:00:00, + * // Wed Oct 14 2014 13:01:00, + * // Wed Oct 14 2014 13:02:00, + * // Wed Oct 14 2014 13:03:00 + * // ] + */ +function eachMinuteOfInterval(interval, options) { + var _options$step; + + (0, _index4.default)(1, arguments); + var startDate = (0, _index3.default)((0, _index2.default)(interval.start)); + var endDate = (0, _index2.default)(interval.end); + var startTime = startDate.getTime(); + var endTime = endDate.getTime(); + + if (startTime >= endTime) { + throw new RangeError('Invalid interval'); + } + + var dates = []; + var currentDate = startDate; + var step = Number((_options$step = options === null || options === void 0 ? void 0 : options.step) !== null && _options$step !== void 0 ? _options$step : 1); + if (step < 1 || isNaN(step)) throw new RangeError('`options.step` must be a number equal to or greater than 1'); + + while (currentDate.getTime() <= endTime) { + dates.push((0, _index2.default)(currentDate)); + currentDate = (0, _index.default)(currentDate, step); + } + + return dates; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5879: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = eachMonthOfInterval; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name eachMonthOfInterval + * @category Interval Helpers + * @summary Return the array of months within the specified time interval. + * + * @description + * Return the array of months within the specified time interval. + * + * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval} + * @returns {Date[]} the array with starts of months from the month of the interval start to the month of the interval end + * @throws {TypeError} 1 argument required + * @throws {RangeError} The start of an interval cannot be after its end + * @throws {RangeError} Date in interval cannot be `Invalid Date` + * + * @example + * // Each month between 6 February 2014 and 10 August 2014: + * const result = eachMonthOfInterval({ + * start: new Date(2014, 1, 6), + * end: new Date(2014, 7, 10) + * }) + * //=> [ + * // Sat Feb 01 2014 00:00:00, + * // Sat Mar 01 2014 00:00:00, + * // Tue Apr 01 2014 00:00:00, + * // Thu May 01 2014 00:00:00, + * // Sun Jun 01 2014 00:00:00, + * // Tue Jul 01 2014 00:00:00, + * // Fri Aug 01 2014 00:00:00 + * // ] + */ +function eachMonthOfInterval(dirtyInterval) { + (0, _index2.default)(1, arguments); + var interval = dirtyInterval || {}; + var startDate = (0, _index.default)(interval.start); + var endDate = (0, _index.default)(interval.end); + var endTime = endDate.getTime(); + var dates = []; // Throw an exception if start date is after end date or if any date is `Invalid Date` + + if (!(startDate.getTime() <= endTime)) { + throw new RangeError('Invalid interval'); + } + + var currentDate = startDate; + currentDate.setHours(0, 0, 0, 0); + currentDate.setDate(1); + + while (currentDate.getTime() <= endTime) { + dates.push((0, _index.default)(currentDate)); + currentDate.setMonth(currentDate.getMonth() + 1); + } + + return dates; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6516: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = eachQuarterOfInterval; + +var _index = _interopRequireDefault(__nccwpck_require__(5149)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2932)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name eachQuarterOfInterval + * @category Interval Helpers + * @summary Return the array of quarters within the specified time interval. + * + * @description + * Return the array of quarters within the specified time interval. + * + * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval} + * @returns {Date[]} the array with starts of quarters from the quarter of the interval start to the quarter of the interval end + * @throws {TypeError} 1 argument required + * @throws {RangeError} The start of an interval cannot be after its end + * @throws {RangeError} Date in interval cannot be `Invalid Date` + * + * @example + * // Each quarter within interval 6 February 2014 - 10 August 2014: + * const result = eachQuarterOfInterval({ + * start: new Date(2014, 1, 6), + * end: new Date(2014, 7, 10) + * }) + * //=> [ + * // Wed Jan 01 2014 00:00:00, + * // Tue Apr 01 2014 00:00:00, + * // Tue Jul 01 2014 00:00:00, + * // ] + */ +function eachQuarterOfInterval(dirtyInterval) { + (0, _index4.default)(1, arguments); + var interval = dirtyInterval || {}; + var startDate = (0, _index3.default)(interval.start); + var endDate = (0, _index3.default)(interval.end); + var endTime = endDate.getTime(); // Throw an exception if start date is after end date or if any date is `Invalid Date` + + if (!(startDate.getTime() <= endTime)) { + throw new RangeError('Invalid interval'); + } + + var startDateQuarter = (0, _index2.default)(startDate); + var endDateQuarter = (0, _index2.default)(endDate); + endTime = endDateQuarter.getTime(); + var quarters = []; + var currentQuarter = startDateQuarter; + + while (currentQuarter.getTime() <= endTime) { + quarters.push((0, _index3.default)(currentQuarter)); + currentQuarter = (0, _index.default)(currentQuarter, 1); + } + + return quarters; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5994: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = eachWeekOfInterval; + +var _index = _interopRequireDefault(__nccwpck_require__(7195)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(9813)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name eachWeekOfInterval + * @category Interval Helpers + * @summary Return the array of weeks within the specified time interval. + * + * @description + * Return the array of weeks within the specified time interval. + * + * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval} + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @returns {Date[]} the array with starts of weeks from the week of the interval start to the week of the interval end + * @throws {TypeError} 1 argument required + * @throws {RangeError} `options.weekStartsOn` must be 0, 1, ..., 6 + * @throws {RangeError} The start of an interval cannot be after its end + * @throws {RangeError} Date in interval cannot be `Invalid Date` + * + * @example + * // Each week within interval 6 October 2014 - 23 November 2014: + * const result = eachWeekOfInterval({ + * start: new Date(2014, 9, 6), + * end: new Date(2014, 10, 23) + * }) + * //=> [ + * // Sun Oct 05 2014 00:00:00, + * // Sun Oct 12 2014 00:00:00, + * // Sun Oct 19 2014 00:00:00, + * // Sun Oct 26 2014 00:00:00, + * // Sun Nov 02 2014 00:00:00, + * // Sun Nov 09 2014 00:00:00, + * // Sun Nov 16 2014 00:00:00, + * // Sun Nov 23 2014 00:00:00 + * // ] + */ +function eachWeekOfInterval(dirtyInterval, options) { + (0, _index4.default)(1, arguments); + var interval = dirtyInterval || {}; + var startDate = (0, _index3.default)(interval.start); + var endDate = (0, _index3.default)(interval.end); + var endTime = endDate.getTime(); // Throw an exception if start date is after end date or if any date is `Invalid Date` + + if (!(startDate.getTime() <= endTime)) { + throw new RangeError('Invalid interval'); + } + + var startDateWeek = (0, _index2.default)(startDate, options); + var endDateWeek = (0, _index2.default)(endDate, options); // Some timezones switch DST at midnight, making start of day unreliable in these timezones, 3pm is a safe bet + + startDateWeek.setHours(15); + endDateWeek.setHours(15); + endTime = endDateWeek.getTime(); + var weeks = []; + var currentWeek = startDateWeek; + + while (currentWeek.getTime() <= endTime) { + currentWeek.setHours(0); + weeks.push((0, _index3.default)(currentWeek)); + currentWeek = (0, _index.default)(currentWeek, 1); + currentWeek.setHours(15); + } + + return weeks; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1944: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = eachWeekendOfInterval; + +var _index = _interopRequireDefault(__nccwpck_require__(6545)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(5852)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(403)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name eachWeekendOfInterval + * @category Interval Helpers + * @summary List all the Saturdays and Sundays in the given date interval. + * + * @description + * Get all the Saturdays and Sundays in the given date interval. + * + * @param {Interval} interval - the given interval. See [Interval]{@link https://date-fns.org/docs/Interval} + * @returns {Date[]} an array containing all the Saturdays and Sundays + * @throws {TypeError} 1 argument required + * @throws {RangeError} The start of an interval cannot be after its end + * @throws {RangeError} Date in interval cannot be `Invalid Date` + * + * @example + * // Lists all Saturdays and Sundays in the given date interval + * const result = eachWeekendOfInterval({ + * start: new Date(2018, 8, 17), + * end: new Date(2018, 8, 30) + * }) + * //=> [ + * // Sat Sep 22 2018 00:00:00, + * // Sun Sep 23 2018 00:00:00, + * // Sat Sep 29 2018 00:00:00, + * // Sun Sep 30 2018 00:00:00 + * // ] + */ +function eachWeekendOfInterval(interval) { + (0, _index4.default)(1, arguments); + var dateInterval = (0, _index.default)(interval); + var weekends = []; + var index = 0; + + while (index < dateInterval.length) { + var date = dateInterval[index++]; + + if ((0, _index3.default)(date)) { + weekends.push(date); + if ((0, _index2.default)(date)) index = index + 5; + } + } + + return weekends; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3973: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = eachWeekendOfMonth; + +var _index = _interopRequireDefault(__nccwpck_require__(1944)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(7182)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2621)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name eachWeekendOfMonth + * @category Month Helpers + * @summary List all the Saturdays and Sundays in the given month. + * + * @description + * Get all the Saturdays and Sundays in the given month. + * + * @param {Date|Number} date - the given month + * @returns {Date[]} an array containing all the Saturdays and Sundays + * @throws {TypeError} 1 argument required + * @throws {RangeError} The passed date is invalid + * + * @example + * // Lists all Saturdays and Sundays in the given month + * const result = eachWeekendOfMonth(new Date(2022, 1, 1)) + * //=> [ + * // Sat Feb 05 2022 00:00:00, + * // Sun Feb 06 2022 00:00:00, + * // Sat Feb 12 2022 00:00:00, + * // Sun Feb 13 2022 00:00:00, + * // Sat Feb 19 2022 00:00:00, + * // Sun Feb 20 2022 00:00:00, + * // Sat Feb 26 2022 00:00:00, + * // Sun Feb 27 2022 00:00:00 + * // ] + */ +function eachWeekendOfMonth(dirtyDate) { + (0, _index4.default)(1, arguments); + var startDate = (0, _index2.default)(dirtyDate); + if (isNaN(startDate.getTime())) throw new RangeError('The passed date is invalid'); + var endDate = (0, _index3.default)(dirtyDate); + return (0, _index.default)({ + start: startDate, + end: endDate + }); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7961: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = eachWeekendOfYear; + +var _index = _interopRequireDefault(__nccwpck_require__(1944)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(7079)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(8225)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name eachWeekendOfYear + * @category Year Helpers + * @summary List all the Saturdays and Sundays in the year. + * + * @description + * Get all the Saturdays and Sundays in the year. + * + * @param {Date|Number} date - the given year + * @returns {Date[]} an array containing all the Saturdays and Sundays + * @throws {TypeError} 1 argument required + * @throws {RangeError} The passed date is invalid + * + * @example + * // Lists all Saturdays and Sundays in the year + * const result = eachWeekendOfYear(new Date(2020, 1, 1)) + * //=> [ + * // Sat Jan 03 2020 00:00:00, + * // Sun Jan 04 2020 00:00:00, + * // ... + * // Sun Dec 27 2020 00:00:00 + * // ] + * ] + */ +function eachWeekendOfYear(dirtyDate) { + (0, _index4.default)(1, arguments); + var startDate = (0, _index3.default)(dirtyDate); + var endDate = (0, _index2.default)(dirtyDate); + return (0, _index.default)({ + start: startDate, + end: endDate + }); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6525: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = eachYearOfInterval; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name eachYearOfInterval + * @category Interval Helpers + * @summary Return the array of yearly timestamps within the specified time interval. + * + * @description + * Return the array of yearly timestamps within the specified time interval. + * + * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval} + * @returns {Date[]} the array with starts of yearly timestamps from the month of the interval start to the month of the interval end + * @throws {TypeError} 1 argument required + * @throws {RangeError} The start of an interval cannot be after its end + * @throws {RangeError} Date in interval cannot be `Invalid Date` + * + * @example + * // Each year between 6 February 2014 and 10 August 2017: + * const result = eachYearOfInterval({ + * start: new Date(2014, 1, 6), + * end: new Date(2017, 7, 10) + * }) + * //=> [ + * // Wed Jan 01 2014 00:00:00, + * // Thu Jan 01 2015 00:00:00, + * // Fri Jan 01 2016 00:00:00, + * // Sun Jan 01 2017 00:00:00 + * // ] + */ +function eachYearOfInterval(dirtyInterval) { + (0, _index2.default)(1, arguments); + var interval = dirtyInterval || {}; + var startDate = (0, _index.default)(interval.start); + var endDate = (0, _index.default)(interval.end); + var endTime = endDate.getTime(); // Throw an exception if start date is after end date or if any date is `Invalid Date` + + if (!(startDate.getTime() <= endTime)) { + throw new RangeError('Invalid interval'); + } + + var dates = []; + var currentDate = startDate; + currentDate.setHours(0, 0, 0, 0); + currentDate.setMonth(0, 1); + + while (currentDate.getTime() <= endTime) { + dates.push((0, _index.default)(currentDate)); + currentDate.setFullYear(currentDate.getFullYear() + 1); + } + + return dates; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8569: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = endOfDay; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name endOfDay + * @category Day Helpers + * @summary Return the end of a day for the given date. + * + * @description + * Return the end of a day for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @returns {Date} the end of a day + * @throws {TypeError} 1 argument required + * + * @example + * // The end of a day for 2 September 2014 11:55:00: + * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Tue Sep 02 2014 23:59:59.999 + */ +function endOfDay(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + date.setHours(23, 59, 59, 999); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1517: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = endOfDecade; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name endOfDecade + * @category Decade Helpers + * @summary Return the end of a decade for the given date. + * + * @description + * Return the end of a decade for the given date. + * + * @param {Date|Number} date - the original date + * @returns {Date} the end of a decade + * @param {Object} [options] - an object with options. + * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate} + * @throws {TypeError} 1 argument required + * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2 + * + * @example + * // The end of a decade for 12 May 1984 00:00:00: + * const result = endOfDecade(new Date(1984, 4, 12, 00, 00, 00)) + * //=> Dec 31 1989 23:59:59.999 + */ +function endOfDecade(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var year = date.getFullYear(); + var decade = 9 + Math.floor(year / 10) * 10; + date.setFullYear(decade, 11, 31); + date.setHours(23, 59, 59, 999); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1894: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = endOfHour; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name endOfHour + * @category Hour Helpers + * @summary Return the end of an hour for the given date. + * + * @description + * Return the end of an hour for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @returns {Date} the end of an hour + * @throws {TypeError} 1 argument required + * + * @example + * // The end of an hour for 2 September 2014 11:55:00: + * const result = endOfHour(new Date(2014, 8, 2, 11, 55)) + * //=> Tue Sep 02 2014 11:59:59.999 + */ +function endOfHour(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + date.setMinutes(59, 59, 999); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1920: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = endOfISOWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(5218)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name endOfISOWeek + * @category ISO Week Helpers + * @summary Return the end of an ISO week for the given date. + * + * @description + * Return the end of an ISO week for the given date. + * The result will be in the local timezone. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} date - the original date + * @returns {Date} the end of an ISO week + * @throws {TypeError} 1 argument required + * + * @example + * // The end of an ISO week for 2 September 2014 11:55:00: + * const result = endOfISOWeek(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Sun Sep 07 2014 23:59:59.999 + */ +function endOfISOWeek(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate, { + weekStartsOn: 1 + }); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9731: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = endOfISOWeekYear; + +var _index = _interopRequireDefault(__nccwpck_require__(6991)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6307)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name endOfISOWeekYear + * @category ISO Week-Numbering Year Helpers + * @summary Return the end of an ISO week-numbering year for the given date. + * + * @description + * Return the end of an ISO week-numbering year, + * which always starts 3 days before the year's first Thursday. + * The result will be in the local timezone. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} date - the original date + * @returns {Date} the end of an ISO week-numbering year + * @throws {TypeError} 1 argument required + * + * @example + * // The end of an ISO week-numbering year for 2 July 2005: + * const result = endOfISOWeekYear(new Date(2005, 6, 2)) + * //=> Sun Jan 01 2006 23:59:59.999 + */ +function endOfISOWeekYear(dirtyDate) { + (0, _index3.default)(1, arguments); + var year = (0, _index.default)(dirtyDate); + var fourthOfJanuaryOfNextYear = new Date(0); + fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4); + fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0); + var date = (0, _index2.default)(fourthOfJanuaryOfNextYear); + date.setMilliseconds(date.getMilliseconds() - 1); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1389: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = endOfMinute; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name endOfMinute + * @category Minute Helpers + * @summary Return the end of a minute for the given date. + * + * @description + * Return the end of a minute for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @returns {Date} the end of a minute + * @throws {TypeError} 1 argument required + * + * @example + * // The end of a minute for 1 December 2014 22:15:45.400: + * const result = endOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400)) + * //=> Mon Dec 01 2014 22:15:59.999 + */ +function endOfMinute(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + date.setSeconds(59, 999); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2621: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = endOfMonth; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name endOfMonth + * @category Month Helpers + * @summary Return the end of a month for the given date. + * + * @description + * Return the end of a month for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @returns {Date} the end of a month + * @throws {TypeError} 1 argument required + * + * @example + * // The end of a month for 2 September 2014 11:55:00: + * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Tue Sep 30 2014 23:59:59.999 + */ +function endOfMonth(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var month = date.getMonth(); + date.setFullYear(date.getFullYear(), month + 1, 0); + date.setHours(23, 59, 59, 999); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5596: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = endOfQuarter; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name endOfQuarter + * @category Quarter Helpers + * @summary Return the end of a year quarter for the given date. + * + * @description + * Return the end of a year quarter for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @returns {Date} the end of a quarter + * @throws {TypeError} 1 argument required + * + * @example + * // The end of a quarter for 2 September 2014 11:55:00: + * const result = endOfQuarter(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Tue Sep 30 2014 23:59:59.999 + */ +function endOfQuarter(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var currentMonth = date.getMonth(); + var month = currentMonth - currentMonth % 3 + 3; + date.setMonth(month, 0); + date.setHours(23, 59, 59, 999); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6121: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = endOfSecond; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name endOfSecond + * @category Second Helpers + * @summary Return the end of a second for the given date. + * + * @description + * Return the end of a second for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @returns {Date} the end of a second + * @throws {TypeError} 1 argument required + * + * @example + * // The end of a second for 1 December 2014 22:15:45.400: + * const result = endOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400)) + * //=> Mon Dec 01 2014 22:15:45.999 + */ +function endOfSecond(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + date.setMilliseconds(999); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5700: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = endOfToday; + +var _index = _interopRequireDefault(__nccwpck_require__(8569)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name endOfToday + * @category Day Helpers + * @summary Return the end of today. + * @pure false + * + * @description + * Return the end of today. + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `Date.now()` internally hence impure and can't be safely curried. + * + * @returns {Date} the end of today + * + * @example + * // If today is 6 October 2014: + * const result = endOfToday() + * //=> Mon Oct 6 2014 23:59:59.999 + */ +function endOfToday() { + return (0, _index.default)(Date.now()); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6935: +/***/ ((module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = endOfTomorrow; + +/** + * @name endOfTomorrow + * @category Day Helpers + * @summary Return the end of tomorrow. + * @pure false + * + * @description + * Return the end of tomorrow. + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `new Date()` internally hence impure and can't be safely curried. + * + * @returns {Date} the end of tomorrow + * + * @example + * // If today is 6 October 2014: + * const result = endOfTomorrow() + * //=> Tue Oct 7 2014 23:59:59.999 + */ +function endOfTomorrow() { + var now = new Date(); + var year = now.getFullYear(); + var month = now.getMonth(); + var day = now.getDate(); + var date = new Date(0); + date.setFullYear(year, month, day + 1); + date.setHours(23, 59, 59, 999); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5218: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = endOfWeek; + +var _index = __nccwpck_require__(9307); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name endOfWeek + * @category Week Helpers + * @summary Return the end of a week for the given date. + * + * @description + * Return the end of a week for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @returns {Date} the end of a week + * @throws {TypeError} 1 argument required + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 + * + * @example + * // The end of a week for 2 September 2014 11:55:00: + * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Sat Sep 06 2014 23:59:59.999 + * + * @example + * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00: + * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 }) + * //=> Sun Sep 07 2014 23:59:59.999 + */ +function endOfWeek(dirtyDate, options) { + var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2; + + (0, _index4.default)(1, arguments); + var defaultOptions = (0, _index.getDefaultOptions)(); + var weekStartsOn = (0, _index3.default)((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN + + if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) { + throw new RangeError('weekStartsOn must be between 0 and 6 inclusively'); + } + + var date = (0, _index2.default)(dirtyDate); + var day = date.getDay(); + var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn); + date.setDate(date.getDate() + diff); + date.setHours(23, 59, 59, 999); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7079: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = endOfYear; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name endOfYear + * @category Year Helpers + * @summary Return the end of a year for the given date. + * + * @description + * Return the end of a year for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @returns {Date} the end of a year + * @throws {TypeError} 1 argument required + * + * @example + * // The end of a year for 2 September 2014 11:55:00: + * const result = endOfYear(new Date(2014, 8, 2, 11, 55, 00)) + * //=> Wed Dec 31 2014 23:59:59.999 + */ +function endOfYear(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var year = date.getFullYear(); + date.setFullYear(year + 1, 0, 0); + date.setHours(23, 59, 59, 999); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 66: +/***/ ((module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = endOfYesterday; + +/** + * @name endOfYesterday + * @category Day Helpers + * @summary Return the end of yesterday. + * @pure false + * + * @description + * Return the end of yesterday. + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `new Date()` internally hence impure and can't be safely curried. + * + * @returns {Date} the end of yesterday + * + * @example + * // If today is 6 October 2014: + * const result = endOfYesterday() + * //=> Sun Oct 5 2014 23:59:59.999 + */ +function endOfYesterday() { + var now = new Date(); + var year = now.getFullYear(); + var month = now.getMonth(); + var day = now.getDate(); + var date = new Date(0); + date.setFullYear(year, month, day - 1); + date.setHours(23, 59, 59, 999); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2168: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = format; + +var _index = _interopRequireDefault(__nccwpck_require__(9920)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(7923)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(9257)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(8387)); + +var _index6 = _interopRequireDefault(__nccwpck_require__(7032)); + +var _index7 = __nccwpck_require__(2509); + +var _index8 = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index9 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index10 = __nccwpck_require__(9307); + +var _index11 = _interopRequireDefault(__nccwpck_require__(618)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// This RegExp consists of three parts separated by `|`: +// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token +// (one of the certain letters followed by `o`) +// - (\w)\1* matches any sequences of the same letter +// - '' matches two quote characters in a row +// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('), +// except a single quote symbol, which ends the sequence. +// Two quote characters do not end the sequence. +// If there is no matching single quote +// then the sequence will continue until the end of the string. +// - . matches any single character unmatched by previous parts of the RegExps +var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also +// sequences of symbols P, p, and the combinations like `PPPPPPPppppp` + +var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g; +var escapedStringRegExp = /^'([^]*?)'?$/; +var doubleQuoteRegExp = /''/g; +var unescapedLatinCharacterRegExp = /[a-zA-Z]/; +/** + * @name format + * @category Common Helpers + * @summary Format the date. + * + * @description + * Return the formatted date string in the given format. The result may vary by locale. + * + * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries. + * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * + * The characters wrapped between two single quotes characters (') are escaped. + * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote. + * (see the last example) + * + * Format of the string is based on Unicode Technical Standard #35: + * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table + * with a few additions (see note 7 below the table). + * + * Accepted patterns: + * | Unit | Pattern | Result examples | Notes | + * |---------------------------------|---------|-----------------------------------|-------| + * | Era | G..GGG | AD, BC | | + * | | GGGG | Anno Domini, Before Christ | 2 | + * | | GGGGG | A, B | | + * | Calendar year | y | 44, 1, 1900, 2017 | 5 | + * | | yo | 44th, 1st, 0th, 17th | 5,7 | + * | | yy | 44, 01, 00, 17 | 5 | + * | | yyy | 044, 001, 1900, 2017 | 5 | + * | | yyyy | 0044, 0001, 1900, 2017 | 5 | + * | | yyyyy | ... | 3,5 | + * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 | + * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 | + * | | YY | 44, 01, 00, 17 | 5,8 | + * | | YYY | 044, 001, 1900, 2017 | 5 | + * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 | + * | | YYYYY | ... | 3,5 | + * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 | + * | | RR | -43, 00, 01, 1900, 2017 | 5,7 | + * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 | + * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 | + * | | RRRRR | ... | 3,5,7 | + * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 | + * | | uu | -43, 01, 1900, 2017 | 5 | + * | | uuu | -043, 001, 1900, 2017 | 5 | + * | | uuuu | -0043, 0001, 1900, 2017 | 5 | + * | | uuuuu | ... | 3,5 | + * | Quarter (formatting) | Q | 1, 2, 3, 4 | | + * | | Qo | 1st, 2nd, 3rd, 4th | 7 | + * | | QQ | 01, 02, 03, 04 | | + * | | QQQ | Q1, Q2, Q3, Q4 | | + * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 | + * | | QQQQQ | 1, 2, 3, 4 | 4 | + * | Quarter (stand-alone) | q | 1, 2, 3, 4 | | + * | | qo | 1st, 2nd, 3rd, 4th | 7 | + * | | qq | 01, 02, 03, 04 | | + * | | qqq | Q1, Q2, Q3, Q4 | | + * | | qqqq | 1st quarter, 2nd quarter, ... | 2 | + * | | qqqqq | 1, 2, 3, 4 | 4 | + * | Month (formatting) | M | 1, 2, ..., 12 | | + * | | Mo | 1st, 2nd, ..., 12th | 7 | + * | | MM | 01, 02, ..., 12 | | + * | | MMM | Jan, Feb, ..., Dec | | + * | | MMMM | January, February, ..., December | 2 | + * | | MMMMM | J, F, ..., D | | + * | Month (stand-alone) | L | 1, 2, ..., 12 | | + * | | Lo | 1st, 2nd, ..., 12th | 7 | + * | | LL | 01, 02, ..., 12 | | + * | | LLL | Jan, Feb, ..., Dec | | + * | | LLLL | January, February, ..., December | 2 | + * | | LLLLL | J, F, ..., D | | + * | Local week of year | w | 1, 2, ..., 53 | | + * | | wo | 1st, 2nd, ..., 53th | 7 | + * | | ww | 01, 02, ..., 53 | | + * | ISO week of year | I | 1, 2, ..., 53 | 7 | + * | | Io | 1st, 2nd, ..., 53th | 7 | + * | | II | 01, 02, ..., 53 | 7 | + * | Day of month | d | 1, 2, ..., 31 | | + * | | do | 1st, 2nd, ..., 31st | 7 | + * | | dd | 01, 02, ..., 31 | | + * | Day of year | D | 1, 2, ..., 365, 366 | 9 | + * | | Do | 1st, 2nd, ..., 365th, 366th | 7 | + * | | DD | 01, 02, ..., 365, 366 | 9 | + * | | DDD | 001, 002, ..., 365, 366 | | + * | | DDDD | ... | 3 | + * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | | + * | | EEEE | Monday, Tuesday, ..., Sunday | 2 | + * | | EEEEE | M, T, W, T, F, S, S | | + * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | | + * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 | + * | | io | 1st, 2nd, ..., 7th | 7 | + * | | ii | 01, 02, ..., 07 | 7 | + * | | iii | Mon, Tue, Wed, ..., Sun | 7 | + * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 | + * | | iiiii | M, T, W, T, F, S, S | 7 | + * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 | + * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | | + * | | eo | 2nd, 3rd, ..., 1st | 7 | + * | | ee | 02, 03, ..., 01 | | + * | | eee | Mon, Tue, Wed, ..., Sun | | + * | | eeee | Monday, Tuesday, ..., Sunday | 2 | + * | | eeeee | M, T, W, T, F, S, S | | + * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | | + * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | | + * | | co | 2nd, 3rd, ..., 1st | 7 | + * | | cc | 02, 03, ..., 01 | | + * | | ccc | Mon, Tue, Wed, ..., Sun | | + * | | cccc | Monday, Tuesday, ..., Sunday | 2 | + * | | ccccc | M, T, W, T, F, S, S | | + * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | | + * | AM, PM | a..aa | AM, PM | | + * | | aaa | am, pm | | + * | | aaaa | a.m., p.m. | 2 | + * | | aaaaa | a, p | | + * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | | + * | | bbb | am, pm, noon, midnight | | + * | | bbbb | a.m., p.m., noon, midnight | 2 | + * | | bbbbb | a, p, n, mi | | + * | Flexible day period | B..BBB | at night, in the morning, ... | | + * | | BBBB | at night, in the morning, ... | 2 | + * | | BBBBB | at night, in the morning, ... | | + * | Hour [1-12] | h | 1, 2, ..., 11, 12 | | + * | | ho | 1st, 2nd, ..., 11th, 12th | 7 | + * | | hh | 01, 02, ..., 11, 12 | | + * | Hour [0-23] | H | 0, 1, 2, ..., 23 | | + * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 | + * | | HH | 00, 01, 02, ..., 23 | | + * | Hour [0-11] | K | 1, 2, ..., 11, 0 | | + * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 | + * | | KK | 01, 02, ..., 11, 00 | | + * | Hour [1-24] | k | 24, 1, 2, ..., 23 | | + * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 | + * | | kk | 24, 01, 02, ..., 23 | | + * | Minute | m | 0, 1, ..., 59 | | + * | | mo | 0th, 1st, ..., 59th | 7 | + * | | mm | 00, 01, ..., 59 | | + * | Second | s | 0, 1, ..., 59 | | + * | | so | 0th, 1st, ..., 59th | 7 | + * | | ss | 00, 01, ..., 59 | | + * | Fraction of second | S | 0, 1, ..., 9 | | + * | | SS | 00, 01, ..., 99 | | + * | | SSS | 000, 001, ..., 999 | | + * | | SSSS | ... | 3 | + * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | | + * | | XX | -0800, +0530, Z | | + * | | XXX | -08:00, +05:30, Z | | + * | | XXXX | -0800, +0530, Z, +123456 | 2 | + * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | | + * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | | + * | | xx | -0800, +0530, +0000 | | + * | | xxx | -08:00, +05:30, +00:00 | 2 | + * | | xxxx | -0800, +0530, +0000, +123456 | | + * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | | + * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | | + * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 | + * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 | + * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 | + * | Seconds timestamp | t | 512969520 | 7 | + * | | tt | ... | 3,7 | + * | Milliseconds timestamp | T | 512969520900 | 7 | + * | | TT | ... | 3,7 | + * | Long localized date | P | 04/29/1453 | 7 | + * | | PP | Apr 29, 1453 | 7 | + * | | PPP | April 29th, 1453 | 7 | + * | | PPPP | Friday, April 29th, 1453 | 2,7 | + * | Long localized time | p | 12:00 AM | 7 | + * | | pp | 12:00:00 AM | 7 | + * | | ppp | 12:00:00 AM GMT+2 | 7 | + * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 | + * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 | + * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 | + * | | PPPppp | April 29th, 1453 at ... | 7 | + * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 | + * Notes: + * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale + * are the same as "stand-alone" units, but are different in some languages. + * "Formatting" units are declined according to the rules of the language + * in the context of a date. "Stand-alone" units are always nominative singular: + * + * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'` + * + * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'` + * + * 2. Any sequence of the identical letters is a pattern, unless it is escaped by + * the single quote characters (see below). + * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`) + * the output will be the same as default pattern for this unit, usually + * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units + * are marked with "2" in the last column of the table. + * + * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'` + * + * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'` + * + * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'` + * + * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'` + * + * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'` + * + * 3. Some patterns could be unlimited length (such as `yyyyyyyy`). + * The output will be padded with zeros to match the length of the pattern. + * + * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'` + * + * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales. + * These tokens represent the shortest form of the quarter. + * + * 5. The main difference between `y` and `u` patterns are B.C. years: + * + * | Year | `y` | `u` | + * |------|-----|-----| + * | AC 1 | 1 | 1 | + * | BC 1 | 1 | 0 | + * | BC 2 | 2 | -1 | + * + * Also `yy` always returns the last two digits of a year, + * while `uu` pads single digit years to 2 characters and returns other years unchanged: + * + * | Year | `yy` | `uu` | + * |------|------|------| + * | 1 | 01 | 01 | + * | 14 | 14 | 14 | + * | 376 | 76 | 376 | + * | 1453 | 53 | 1453 | + * + * The same difference is true for local and ISO week-numbering years (`Y` and `R`), + * except local week-numbering years are dependent on `options.weekStartsOn` + * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear} + * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}). + * + * 6. Specific non-location timezones are currently unavailable in `date-fns`, + * so right now these tokens fall back to GMT timezones. + * + * 7. These patterns are not in the Unicode Technical Standard #35: + * - `i`: ISO day of week + * - `I`: ISO week of year + * - `R`: ISO week-numbering year + * - `t`: seconds timestamp + * - `T`: milliseconds timestamp + * - `o`: ordinal number modifier + * - `P`: long localized date + * - `p`: long localized time + * + * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years. + * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * + * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month. + * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * + * @param {Date|Number} date - the original date + * @param {String} format - the string of tokens + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is + * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`; + * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`; + * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * @returns {String} the formatted date string + * @throws {TypeError} 2 arguments required + * @throws {RangeError} `date` must not be Invalid Date + * @throws {RangeError} `options.locale` must contain `localize` property + * @throws {RangeError} `options.locale` must contain `formatLong` property + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 + * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7 + * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * @throws {RangeError} format string contains an unescaped latin alphabet character + * + * @example + * // Represent 11 February 2014 in middle-endian format: + * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy') + * //=> '02/11/2014' + * + * @example + * // Represent 2 July 2014 in Esperanto: + * import { eoLocale } from 'date-fns/locale/eo' + * const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", { + * locale: eoLocale + * }) + * //=> '2-a de julio 2014' + * + * @example + * // Escape string by single quote characters: + * const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'") + * //=> "3 o'clock" + */ + +function format(dirtyDate, dirtyFormatStr, options) { + var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4; + + (0, _index9.default)(2, arguments); + var formatStr = String(dirtyFormatStr); + var defaultOptions = (0, _index10.getDefaultOptions)(); + var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : _index11.default; + var firstWeekContainsDate = (0, _index8.default)((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN + + if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) { + throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively'); + } + + var weekStartsOn = (0, _index8.default)((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN + + if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) { + throw new RangeError('weekStartsOn must be between 0 and 6 inclusively'); + } + + if (!locale.localize) { + throw new RangeError('locale must contain localize property'); + } + + if (!locale.formatLong) { + throw new RangeError('locale must contain formatLong property'); + } + + var originalDate = (0, _index3.default)(dirtyDate); + + if (!(0, _index.default)(originalDate)) { + throw new RangeError('Invalid time value'); + } // Convert the date in system timezone to the same date in UTC+00:00 timezone. + // This ensures that when UTC functions will be implemented, locales will be compatible with them. + // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376 + + + var timezoneOffset = (0, _index6.default)(originalDate); + var utcDate = (0, _index2.default)(originalDate, timezoneOffset); + var formatterOptions = { + firstWeekContainsDate: firstWeekContainsDate, + weekStartsOn: weekStartsOn, + locale: locale, + _originalDate: originalDate + }; + var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) { + var firstCharacter = substring[0]; + + if (firstCharacter === 'p' || firstCharacter === 'P') { + var longFormatter = _index5.default[firstCharacter]; + return longFormatter(substring, locale.formatLong); + } + + return substring; + }).join('').match(formattingTokensRegExp).map(function (substring) { + // Replace two single quote characters with one single quote character + if (substring === "''") { + return "'"; + } + + var firstCharacter = substring[0]; + + if (firstCharacter === "'") { + return cleanEscapedString(substring); + } + + var formatter = _index4.default[firstCharacter]; + + if (formatter) { + if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && (0, _index7.isProtectedWeekYearToken)(substring)) { + (0, _index7.throwProtectedError)(substring, dirtyFormatStr, String(dirtyDate)); + } + + if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && (0, _index7.isProtectedDayOfYearToken)(substring)) { + (0, _index7.throwProtectedError)(substring, dirtyFormatStr, String(dirtyDate)); + } + + return formatter(utcDate, substring, locale.localize, formatterOptions); + } + + if (firstCharacter.match(unescapedLatinCharacterRegExp)) { + throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`'); + } + + return substring; + }).join(''); + return result; +} + +function cleanEscapedString(input) { + var matched = input.match(escapedStringRegExp); + + if (!matched) { + return input; + } + + return matched[1].replace(doubleQuoteRegExp, "'"); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8149: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = formatDistance; + +var _index = __nccwpck_require__(9307); + +var _index2 = _interopRequireDefault(__nccwpck_require__(9818)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2713)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(9448)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(618)); + +var _index6 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index7 = _interopRequireDefault(__nccwpck_require__(7934)); + +var _index8 = _interopRequireDefault(__nccwpck_require__(2631)); + +var _index9 = _interopRequireDefault(__nccwpck_require__(7032)); + +var _index10 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MINUTES_IN_DAY = 1440; +var MINUTES_IN_ALMOST_TWO_DAYS = 2520; +var MINUTES_IN_MONTH = 43200; +var MINUTES_IN_TWO_MONTHS = 86400; +/** + * @name formatDistance + * @category Common Helpers + * @summary Return the distance between the given dates in words. + * + * @description + * Return the distance between the given dates in words. + * + * | Distance between dates | Result | + * |-------------------------------------------------------------------|---------------------| + * | 0 ... 30 secs | less than a minute | + * | 30 secs ... 1 min 30 secs | 1 minute | + * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes | + * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour | + * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours | + * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day | + * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days | + * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month | + * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months | + * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months | + * | 1 yr ... 1 yr 3 months | about 1 year | + * | 1 yr 3 months ... 1 yr 9 month s | over 1 year | + * | 1 yr 9 months ... 2 yrs | almost 2 years | + * | N yrs ... N yrs 3 months | about N years | + * | N yrs 3 months ... N yrs 9 months | over N years | + * | N yrs 9 months ... N+1 yrs | almost N+1 years | + * + * With `options.includeSeconds == true`: + * | Distance between dates | Result | + * |------------------------|----------------------| + * | 0 secs ... 5 secs | less than 5 seconds | + * | 5 secs ... 10 secs | less than 10 seconds | + * | 10 secs ... 20 secs | less than 20 seconds | + * | 20 secs ... 40 secs | half a minute | + * | 40 secs ... 60 secs | less than a minute | + * | 60 secs ... 90 secs | 1 minute | + * + * @param {Date|Number} date - the date + * @param {Date|Number} baseDate - the date to compare with + * @param {Object} [options] - an object with options. + * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed + * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @returns {String} the distance in words + * @throws {TypeError} 2 arguments required + * @throws {RangeError} `date` must not be Invalid Date + * @throws {RangeError} `baseDate` must not be Invalid Date + * @throws {RangeError} `options.locale` must contain `formatDistance` property + * + * @example + * // What is the distance between 2 July 2014 and 1 January 2015? + * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1)) + * //=> '6 months' + * + * @example + * // What is the distance between 1 January 2015 00:00:15 + * // and 1 January 2015 00:00:00, including seconds? + * const result = formatDistance( + * new Date(2015, 0, 1, 0, 0, 15), + * new Date(2015, 0, 1, 0, 0, 0), + * { includeSeconds: true } + * ) + * //=> 'less than 20 seconds' + * + * @example + * // What is the distance from 1 January 2016 + * // to 1 January 2015, with a suffix? + * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), { + * addSuffix: true + * }) + * //=> 'about 1 year ago' + * + * @example + * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto? + * import { eoLocale } from 'date-fns/locale/eo' + * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), { + * locale: eoLocale + * }) + * //=> 'pli ol 1 jaro' + */ + +function formatDistance(dirtyDate, dirtyBaseDate, options) { + var _ref, _options$locale; + + (0, _index10.default)(2, arguments); + var defaultOptions = (0, _index.getDefaultOptions)(); + var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : _index5.default; + + if (!locale.formatDistance) { + throw new RangeError('locale must contain formatDistance property'); + } + + var comparison = (0, _index2.default)(dirtyDate, dirtyBaseDate); + + if (isNaN(comparison)) { + throw new RangeError('Invalid time value'); + } + + var localizeOptions = (0, _index8.default)((0, _index7.default)(options), { + addSuffix: Boolean(options === null || options === void 0 ? void 0 : options.addSuffix), + comparison: comparison + }); + var dateLeft; + var dateRight; + + if (comparison > 0) { + dateLeft = (0, _index6.default)(dirtyBaseDate); + dateRight = (0, _index6.default)(dirtyDate); + } else { + dateLeft = (0, _index6.default)(dirtyDate); + dateRight = (0, _index6.default)(dirtyBaseDate); + } + + var seconds = (0, _index4.default)(dateRight, dateLeft); + var offsetInSeconds = ((0, _index9.default)(dateRight) - (0, _index9.default)(dateLeft)) / 1000; + var minutes = Math.round((seconds - offsetInSeconds) / 60); + var months; // 0 up to 2 mins + + if (minutes < 2) { + if (options !== null && options !== void 0 && options.includeSeconds) { + if (seconds < 5) { + return locale.formatDistance('lessThanXSeconds', 5, localizeOptions); + } else if (seconds < 10) { + return locale.formatDistance('lessThanXSeconds', 10, localizeOptions); + } else if (seconds < 20) { + return locale.formatDistance('lessThanXSeconds', 20, localizeOptions); + } else if (seconds < 40) { + return locale.formatDistance('halfAMinute', 0, localizeOptions); + } else if (seconds < 60) { + return locale.formatDistance('lessThanXMinutes', 1, localizeOptions); + } else { + return locale.formatDistance('xMinutes', 1, localizeOptions); + } + } else { + if (minutes === 0) { + return locale.formatDistance('lessThanXMinutes', 1, localizeOptions); + } else { + return locale.formatDistance('xMinutes', minutes, localizeOptions); + } + } // 2 mins up to 0.75 hrs + + } else if (minutes < 45) { + return locale.formatDistance('xMinutes', minutes, localizeOptions); // 0.75 hrs up to 1.5 hrs + } else if (minutes < 90) { + return locale.formatDistance('aboutXHours', 1, localizeOptions); // 1.5 hrs up to 24 hrs + } else if (minutes < MINUTES_IN_DAY) { + var hours = Math.round(minutes / 60); + return locale.formatDistance('aboutXHours', hours, localizeOptions); // 1 day up to 1.75 days + } else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) { + return locale.formatDistance('xDays', 1, localizeOptions); // 1.75 days up to 30 days + } else if (minutes < MINUTES_IN_MONTH) { + var days = Math.round(minutes / MINUTES_IN_DAY); + return locale.formatDistance('xDays', days, localizeOptions); // 1 month up to 2 months + } else if (minutes < MINUTES_IN_TWO_MONTHS) { + months = Math.round(minutes / MINUTES_IN_MONTH); + return locale.formatDistance('aboutXMonths', months, localizeOptions); + } + + months = (0, _index3.default)(dateRight, dateLeft); // 2 months up to 12 months + + if (months < 12) { + var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH); + return locale.formatDistance('xMonths', nearestMonth, localizeOptions); // 1 year up to max Date + } else { + var monthsSinceStartOfYear = months % 12; + var years = Math.floor(months / 12); // N years up to 1 years 3 months + + if (monthsSinceStartOfYear < 3) { + return locale.formatDistance('aboutXYears', years, localizeOptions); // N years 3 months up to N years 9 months + } else if (monthsSinceStartOfYear < 9) { + return locale.formatDistance('overXYears', years, localizeOptions); // N years 9 months up to N year 12 months + } else { + return locale.formatDistance('almostXYears', years + 1, localizeOptions); + } + } +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7128: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = formatDistanceStrict; + +var _index = __nccwpck_require__(9307); + +var _index2 = _interopRequireDefault(__nccwpck_require__(7032)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(9818)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(7934)); + +var _index6 = _interopRequireDefault(__nccwpck_require__(2631)); + +var _index7 = _interopRequireDefault(__nccwpck_require__(618)); + +var _index8 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MILLISECONDS_IN_MINUTE = 1000 * 60; +var MINUTES_IN_DAY = 60 * 24; +var MINUTES_IN_MONTH = MINUTES_IN_DAY * 30; +var MINUTES_IN_YEAR = MINUTES_IN_DAY * 365; +/** + * @name formatDistanceStrict + * @category Common Helpers + * @summary Return the distance between the given dates in words. + * + * @description + * Return the distance between the given dates in words, using strict units. + * This is like `formatDistance`, but does not use helpers like 'almost', 'over', + * 'less than' and the like. + * + * | Distance between dates | Result | + * |------------------------|---------------------| + * | 0 ... 59 secs | [0..59] seconds | + * | 1 ... 59 mins | [1..59] minutes | + * | 1 ... 23 hrs | [1..23] hours | + * | 1 ... 29 days | [1..29] days | + * | 1 ... 11 months | [1..11] months | + * | 1 ... N years | [1..N] years | + * + * @param {Date|Number} date - the date + * @param {Date|Number} baseDate - the date to compare with + * @param {Object} [options] - an object with options. + * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first + * @param {'second'|'minute'|'hour'|'day'|'month'|'year'} [options.unit] - if specified, will force a unit + * @param {'floor'|'ceil'|'round'} [options.roundingMethod='round'] - which way to round partial units + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @returns {String} the distance in words + * @throws {TypeError} 2 arguments required + * @throws {RangeError} `date` must not be Invalid Date + * @throws {RangeError} `baseDate` must not be Invalid Date + * @throws {RangeError} `options.roundingMethod` must be 'floor', 'ceil' or 'round' + * @throws {RangeError} `options.unit` must be 'second', 'minute', 'hour', 'day', 'month' or 'year' + * @throws {RangeError} `options.locale` must contain `formatDistance` property + * + * @example + * // What is the distance between 2 July 2014 and 1 January 2015? + * const result = formatDistanceStrict(new Date(2014, 6, 2), new Date(2015, 0, 2)) + * //=> '6 months' + * + * @example + * // What is the distance between 1 January 2015 00:00:15 + * // and 1 January 2015 00:00:00? + * const result = formatDistanceStrict( + * new Date(2015, 0, 1, 0, 0, 15), + * new Date(2015, 0, 1, 0, 0, 0) + * ) + * //=> '15 seconds' + * + * @example + * // What is the distance from 1 January 2016 + * // to 1 January 2015, with a suffix? + * const result = formatDistanceStrict(new Date(2015, 0, 1), new Date(2016, 0, 1), { + * addSuffix: true + * }) + * //=> '1 year ago' + * + * @example + * // What is the distance from 1 January 2016 + * // to 1 January 2015, in minutes? + * const result = formatDistanceStrict(new Date(2016, 0, 1), new Date(2015, 0, 1), { + * unit: 'minute' + * }) + * //=> '525600 minutes' + * + * @example + * // What is the distance from 1 January 2015 + * // to 28 January 2015, in months, rounded up? + * const result = formatDistanceStrict(new Date(2015, 0, 28), new Date(2015, 0, 1), { + * unit: 'month', + * roundingMethod: 'ceil' + * }) + * //=> '1 month' + * + * @example + * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto? + * import { eoLocale } from 'date-fns/locale/eo' + * const result = formatDistanceStrict(new Date(2016, 7, 1), new Date(2015, 0, 1), { + * locale: eoLocale + * }) + * //=> '1 jaro' + */ + +function formatDistanceStrict(dirtyDate, dirtyBaseDate, options) { + var _ref, _options$locale, _options$roundingMeth; + + (0, _index8.default)(2, arguments); + var defaultOptions = (0, _index.getDefaultOptions)(); + var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : _index7.default; + + if (!locale.formatDistance) { + throw new RangeError('locale must contain localize.formatDistance property'); + } + + var comparison = (0, _index3.default)(dirtyDate, dirtyBaseDate); + + if (isNaN(comparison)) { + throw new RangeError('Invalid time value'); + } + + var localizeOptions = (0, _index6.default)((0, _index5.default)(options), { + addSuffix: Boolean(options === null || options === void 0 ? void 0 : options.addSuffix), + comparison: comparison + }); + var dateLeft; + var dateRight; + + if (comparison > 0) { + dateLeft = (0, _index4.default)(dirtyBaseDate); + dateRight = (0, _index4.default)(dirtyDate); + } else { + dateLeft = (0, _index4.default)(dirtyDate); + dateRight = (0, _index4.default)(dirtyBaseDate); + } + + var roundingMethod = String((_options$roundingMeth = options === null || options === void 0 ? void 0 : options.roundingMethod) !== null && _options$roundingMeth !== void 0 ? _options$roundingMeth : 'round'); + var roundingMethodFn; + + if (roundingMethod === 'floor') { + roundingMethodFn = Math.floor; + } else if (roundingMethod === 'ceil') { + roundingMethodFn = Math.ceil; + } else if (roundingMethod === 'round') { + roundingMethodFn = Math.round; + } else { + throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'"); + } + + var milliseconds = dateRight.getTime() - dateLeft.getTime(); + var minutes = milliseconds / MILLISECONDS_IN_MINUTE; + var timezoneOffset = (0, _index2.default)(dateRight) - (0, _index2.default)(dateLeft); // Use DST-normalized difference in minutes for years, months and days; + // use regular difference in minutes for hours, minutes and seconds. + + var dstNormalizedMinutes = (milliseconds - timezoneOffset) / MILLISECONDS_IN_MINUTE; + var defaultUnit = options === null || options === void 0 ? void 0 : options.unit; + var unit; + + if (!defaultUnit) { + if (minutes < 1) { + unit = 'second'; + } else if (minutes < 60) { + unit = 'minute'; + } else if (minutes < MINUTES_IN_DAY) { + unit = 'hour'; + } else if (dstNormalizedMinutes < MINUTES_IN_MONTH) { + unit = 'day'; + } else if (dstNormalizedMinutes < MINUTES_IN_YEAR) { + unit = 'month'; + } else { + unit = 'year'; + } + } else { + unit = String(defaultUnit); + } // 0 up to 60 seconds + + + if (unit === 'second') { + var seconds = roundingMethodFn(milliseconds / 1000); + return locale.formatDistance('xSeconds', seconds, localizeOptions); // 1 up to 60 mins + } else if (unit === 'minute') { + var roundedMinutes = roundingMethodFn(minutes); + return locale.formatDistance('xMinutes', roundedMinutes, localizeOptions); // 1 up to 24 hours + } else if (unit === 'hour') { + var hours = roundingMethodFn(minutes / 60); + return locale.formatDistance('xHours', hours, localizeOptions); // 1 up to 30 days + } else if (unit === 'day') { + var days = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_DAY); + return locale.formatDistance('xDays', days, localizeOptions); // 1 up to 12 months + } else if (unit === 'month') { + var months = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_MONTH); + return months === 12 && defaultUnit !== 'month' ? locale.formatDistance('xYears', 1, localizeOptions) : locale.formatDistance('xMonths', months, localizeOptions); // 1 year up to max Date + } else if (unit === 'year') { + var years = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_YEAR); + return locale.formatDistance('xYears', years, localizeOptions); + } + + throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'"); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1163: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = formatDistanceToNow; + +var _index = _interopRequireDefault(__nccwpck_require__(8149)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name formatDistanceToNow + * @category Common Helpers + * @summary Return the distance between the given date and now in words. + * @pure false + * + * @description + * Return the distance between the given date and now in words. + * + * | Distance to now | Result | + * |-------------------------------------------------------------------|---------------------| + * | 0 ... 30 secs | less than a minute | + * | 30 secs ... 1 min 30 secs | 1 minute | + * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes | + * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour | + * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours | + * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day | + * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days | + * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month | + * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months | + * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months | + * | 1 yr ... 1 yr 3 months | about 1 year | + * | 1 yr 3 months ... 1 yr 9 month s | over 1 year | + * | 1 yr 9 months ... 2 yrs | almost 2 years | + * | N yrs ... N yrs 3 months | about N years | + * | N yrs 3 months ... N yrs 9 months | over N years | + * | N yrs 9 months ... N+1 yrs | almost N+1 years | + * + * With `options.includeSeconds == true`: + * | Distance to now | Result | + * |---------------------|----------------------| + * | 0 secs ... 5 secs | less than 5 seconds | + * | 5 secs ... 10 secs | less than 10 seconds | + * | 10 secs ... 20 secs | less than 20 seconds | + * | 20 secs ... 40 secs | half a minute | + * | 40 secs ... 60 secs | less than a minute | + * | 60 secs ... 90 secs | 1 minute | + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `Date.now()` internally hence impure and can't be safely curried. + * + * @param {Date|Number} date - the given date + * @param {Object} [options] - the object with options + * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed + * @param {Boolean} [options.addSuffix=false] - result specifies if now is earlier or later than the passed date + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @returns {String} the distance in words + * @throws {TypeError} 1 argument required + * @throws {RangeError} `date` must not be Invalid Date + * @throws {RangeError} `options.locale` must contain `formatDistance` property + * + * @example + * // If today is 1 January 2015, what is the distance to 2 July 2014? + * const result = formatDistanceToNow( + * new Date(2014, 6, 2) + * ) + * //=> '6 months' + * + * @example + * // If now is 1 January 2015 00:00:00, + * // what is the distance to 1 January 2015 00:00:15, including seconds? + * const result = formatDistanceToNow( + * new Date(2015, 0, 1, 0, 0, 15), + * {includeSeconds: true} + * ) + * //=> 'less than 20 seconds' + * + * @example + * // If today is 1 January 2015, + * // what is the distance to 1 January 2016, with a suffix? + * const result = formatDistanceToNow( + * new Date(2016, 0, 1), + * {addSuffix: true} + * ) + * //=> 'in about 1 year' + * + * @example + * // If today is 1 January 2015, + * // what is the distance to 1 August 2016 in Esperanto? + * const eoLocale = require('date-fns/locale/eo') + * const result = formatDistanceToNow( + * new Date(2016, 7, 1), + * {locale: eoLocale} + * ) + * //=> 'pli ol 1 jaro' + */ +function formatDistanceToNow(dirtyDate, options) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate, Date.now(), options); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 4741: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = formatDistanceToNowStrict; + +var _index = _interopRequireDefault(__nccwpck_require__(7128)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name formatDistanceToNowStrict + * @category Common Helpers + * @summary Return the distance between the given date and now in words. + * @pure false + * + * @description + * Return the distance between the given dates in words, using strict units. + * This is like `formatDistance`, but does not use helpers like 'almost', 'over', + * 'less than' and the like. + * + * | Distance between dates | Result | + * |------------------------|---------------------| + * | 0 ... 59 secs | [0..59] seconds | + * | 1 ... 59 mins | [1..59] minutes | + * | 1 ... 23 hrs | [1..23] hours | + * | 1 ... 29 days | [1..29] days | + * | 1 ... 11 months | [1..11] months | + * | 1 ... N years | [1..N] years | + * + * @param {Date|Number} date - the given date + * @param {Object} [options] - an object with options. + * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first + * @param {'second'|'minute'|'hour'|'day'|'month'|'year'} [options.unit] - if specified, will force a unit + * @param {'floor'|'ceil'|'round'} [options.roundingMethod='round'] - which way to round partial units + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @returns {String} the distance in words + * @throws {TypeError} 1 argument required + * @throws {RangeError} `date` must not be Invalid Date + * @throws {RangeError} `options.locale` must contain `formatDistance` property + * + * @example + * // If today is 1 January 2015, what is the distance to 2 July 2014? + * const result = formatDistanceToNowStrict( + * new Date(2014, 6, 2) + * ) + * //=> '6 months' + * + * @example + * // If now is 1 January 2015 00:00:00, + * // what is the distance to 1 January 2015 00:00:15, including seconds? + * const result = formatDistanceToNowStrict( + * new Date(2015, 0, 1, 0, 0, 15) + * ) + * //=> '15 seconds' + * + * @example + * // If today is 1 January 2015, + * // what is the distance to 1 January 2016, with a suffix? + * const result = formatDistanceToNowStrict( + * new Date(2016, 0, 1), + * {addSuffix: true} + * ) + * //=> 'in 1 year' + * + * @example + * // If today is 28 January 2015, + * // what is the distance to 1 January 2015, in months, rounded up?? + * const result = formatDistanceToNowStrict(new Date(2015, 0, 1), { + * unit: 'month', + * roundingMethod: 'ceil' + * }) + * //=> '1 month' + * + * @example + * // If today is 1 January 2015, + * // what is the distance to 1 January 2016 in Esperanto? + * const eoLocale = require('date-fns/locale/eo') + * const result = formatDistanceToNowStrict( + * new Date(2016, 0, 1), + * {locale: eoLocale} + * ) + * //=> '1 jaro' + */ +function formatDistanceToNowStrict(dirtyDate, options) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate, Date.now(), options); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8917: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = formatDuration; + +var _index = __nccwpck_require__(9307); + +var _index2 = _interopRequireDefault(__nccwpck_require__(618)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var defaultFormat = ['years', 'months', 'weeks', 'days', 'hours', 'minutes', 'seconds']; +/** + * @name formatDuration + * @category Common Helpers + * @summary Formats a duration in human-readable format + * + * @description + * Return human-readable duration string i.e. "9 months 2 days" + * + * @param {Duration} duration - the duration to format + * @param {Object} [options] - an object with options. + * @param {string[]} [options.format=['years', 'months', 'weeks', 'days', 'hours', 'minutes', 'seconds']] - the array of units to format + * @param {boolean} [options.zero=false] - should zeros be included in the output? + * @param {string} [options.delimiter=' '] - delimiter string + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @returns {string} the formatted date string + * @throws {TypeError} 1 argument required + * + * @example + * // Format full duration + * formatDuration({ + * years: 2, + * months: 9, + * weeks: 1, + * days: 7, + * hours: 5, + * minutes: 9, + * seconds: 30 + * }) + * //=> '2 years 9 months 1 week 7 days 5 hours 9 minutes 30 seconds' + * + * @example + * // Format partial duration + * formatDuration({ months: 9, days: 2 }) + * //=> '9 months 2 days' + * + * @example + * // Customize the format + * formatDuration( + * { + * years: 2, + * months: 9, + * weeks: 1, + * days: 7, + * hours: 5, + * minutes: 9, + * seconds: 30 + * }, + * { format: ['months', 'weeks'] } + * ) === '9 months 1 week' + * + * @example + * // Customize the zeros presence + * formatDuration({ years: 0, months: 9 }) + * //=> '9 months' + * formatDuration({ years: 0, months: 9 }, { zero: true }) + * //=> '0 years 9 months' + * + * @example + * // Customize the delimiter + * formatDuration({ years: 2, months: 9, weeks: 3 }, { delimiter: ', ' }) + * //=> '2 years, 9 months, 3 weeks' + */ + +function formatDuration(duration, options) { + var _ref, _options$locale, _options$format, _options$zero, _options$delimiter; + + if (arguments.length < 1) { + throw new TypeError("1 argument required, but only ".concat(arguments.length, " present")); + } + + var defaultOptions = (0, _index.getDefaultOptions)(); + var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : _index2.default; + var format = (_options$format = options === null || options === void 0 ? void 0 : options.format) !== null && _options$format !== void 0 ? _options$format : defaultFormat; + var zero = (_options$zero = options === null || options === void 0 ? void 0 : options.zero) !== null && _options$zero !== void 0 ? _options$zero : false; + var delimiter = (_options$delimiter = options === null || options === void 0 ? void 0 : options.delimiter) !== null && _options$delimiter !== void 0 ? _options$delimiter : ' '; + + if (!locale.formatDistance) { + return ''; + } + + var result = format.reduce(function (acc, unit) { + var token = "x".concat(unit.replace(/(^.)/, function (m) { + return m.toUpperCase(); + })); + var value = duration[unit]; + + if (typeof value === 'number' && (zero || duration[unit])) { + return acc.concat(locale.formatDistance(token, value)); + } + + return acc; + }, []).join(delimiter); + return result; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3385: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = formatISO; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(8794)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name formatISO + * @category Common Helpers + * @summary Format the date according to the ISO 8601 standard (https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003169814.htm). + * + * @description + * Return the formatted date string in ISO 8601 format. Options may be passed to control the parts and notations of the date. + * + * @param {Date|Number} date - the original date + * @param {Object} [options] - an object with options. + * @param {'extended'|'basic'} [options.format='extended'] - if 'basic', hide delimiters between date and time values. + * @param {'complete'|'date'|'time'} [options.representation='complete'] - format date, time with local time zone, or both. + * @returns {String} the formatted date string (in local time zone) + * @throws {TypeError} 1 argument required + * @throws {RangeError} `date` must not be Invalid Date + * @throws {RangeError} `options.format` must be 'extended' or 'basic' + * @throws {RangeError} `options.representation` must be 'date', 'time' or 'complete' + * + * @example + * // Represent 18 September 2019 in ISO 8601 format (local time zone is UTC): + * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52)) + * //=> '2019-09-18T19:00:52Z' + * + * @example + * // Represent 18 September 2019 in ISO 8601, short format (local time zone is UTC): + * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { format: 'basic' }) + * //=> '20190918T190052' + * + * @example + * // Represent 18 September 2019 in ISO 8601 format, date only: + * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { representation: 'date' }) + * //=> '2019-09-18' + * + * @example + * // Represent 18 September 2019 in ISO 8601 format, time only (local time zone is UTC): + * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { representation: 'time' }) + * //=> '19:00:52Z' + */ +function formatISO(date, options) { + var _options$format, _options$representati; + + (0, _index3.default)(1, arguments); + var originalDate = (0, _index.default)(date); + + if (isNaN(originalDate.getTime())) { + throw new RangeError('Invalid time value'); + } + + var format = String((_options$format = options === null || options === void 0 ? void 0 : options.format) !== null && _options$format !== void 0 ? _options$format : 'extended'); + var representation = String((_options$representati = options === null || options === void 0 ? void 0 : options.representation) !== null && _options$representati !== void 0 ? _options$representati : 'complete'); + + if (format !== 'extended' && format !== 'basic') { + throw new RangeError("format must be 'extended' or 'basic'"); + } + + if (representation !== 'date' && representation !== 'time' && representation !== 'complete') { + throw new RangeError("representation must be 'date', 'time', or 'complete'"); + } + + var result = ''; + var tzOffset = ''; + var dateDelimiter = format === 'extended' ? '-' : ''; + var timeDelimiter = format === 'extended' ? ':' : ''; // Representation is either 'date' or 'complete' + + if (representation !== 'time') { + var day = (0, _index2.default)(originalDate.getDate(), 2); + var month = (0, _index2.default)(originalDate.getMonth() + 1, 2); + var year = (0, _index2.default)(originalDate.getFullYear(), 4); // yyyyMMdd or yyyy-MM-dd. + + result = "".concat(year).concat(dateDelimiter).concat(month).concat(dateDelimiter).concat(day); + } // Representation is either 'time' or 'complete' + + + if (representation !== 'date') { + // Add the timezone. + var offset = originalDate.getTimezoneOffset(); + + if (offset !== 0) { + var absoluteOffset = Math.abs(offset); + var hourOffset = (0, _index2.default)(Math.floor(absoluteOffset / 60), 2); + var minuteOffset = (0, _index2.default)(absoluteOffset % 60, 2); // If less than 0, the sign is +, because it is ahead of time. + + var sign = offset < 0 ? '+' : '-'; + tzOffset = "".concat(sign).concat(hourOffset, ":").concat(minuteOffset); + } else { + tzOffset = 'Z'; + } + + var hour = (0, _index2.default)(originalDate.getHours(), 2); + var minute = (0, _index2.default)(originalDate.getMinutes(), 2); + var second = (0, _index2.default)(originalDate.getSeconds(), 2); // If there's also date, separate it with time with 'T' + + var separator = result === '' ? '' : 'T'; // Creates a time string consisting of hour, minute, and second, separated by delimiters, if defined. + + var time = [hour, minute, second].join(timeDelimiter); // HHmmss or HH:mm:ss. + + result = "".concat(result).concat(separator).concat(time).concat(tzOffset); + } + + return result; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5296: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = formatISO9075; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(9920)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(8794)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name formatISO9075 + * @category Common Helpers + * @summary Format the date according to the ISO 9075 standard (https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_get-format). + * + * @description + * Return the formatted date string in ISO 9075 format. Options may be passed to control the parts and notations of the date. + * + * @param {Date|Number} date - the original date + * @param {Object} [options] - an object with options. + * @param {'extended'|'basic'} [options.format='extended'] - if 'basic', hide delimiters between date and time values. + * @param {'complete'|'date'|'time'} [options.representation='complete'] - format date, time, or both. + * @returns {String} the formatted date string + * @throws {TypeError} 1 argument required + * @throws {RangeError} `date` must not be Invalid Date + * @throws {RangeError} `options.format` must be 'extended' or 'basic' + * @throws {RangeError} `options.representation` must be 'date', 'time' or 'complete' + * + * @example + * // Represent 18 September 2019 in ISO 9075 format: + * const result = formatISO9075(new Date(2019, 8, 18, 19, 0, 52)) + * //=> '2019-09-18 19:00:52' + * + * @example + * // Represent 18 September 2019 in ISO 9075, short format: + * const result = formatISO9075(new Date(2019, 8, 18, 19, 0, 52), { format: 'basic' }) + * //=> '20190918 190052' + * + * @example + * // Represent 18 September 2019 in ISO 9075 format, date only: + * const result = formatISO9075(new Date(2019, 8, 18, 19, 0, 52), { representation: 'date' }) + * //=> '2019-09-18' + * + * @example + * // Represent 18 September 2019 in ISO 9075 format, time only: + * const result = formatISO9075(new Date(2019, 8, 18, 19, 0, 52), { representation: 'time' }) + * //=> '19:00:52' + */ +function formatISO9075(dirtyDate, options) { + var _options$format, _options$representati; + + if (arguments.length < 1) { + throw new TypeError("1 argument required, but only ".concat(arguments.length, " present")); + } + + var originalDate = (0, _index.default)(dirtyDate); + + if (!(0, _index2.default)(originalDate)) { + throw new RangeError('Invalid time value'); + } + + var format = String((_options$format = options === null || options === void 0 ? void 0 : options.format) !== null && _options$format !== void 0 ? _options$format : 'extended'); + var representation = String((_options$representati = options === null || options === void 0 ? void 0 : options.representation) !== null && _options$representati !== void 0 ? _options$representati : 'complete'); + + if (format !== 'extended' && format !== 'basic') { + throw new RangeError("format must be 'extended' or 'basic'"); + } + + if (representation !== 'date' && representation !== 'time' && representation !== 'complete') { + throw new RangeError("representation must be 'date', 'time', or 'complete'"); + } + + var result = ''; + var dateDelimiter = format === 'extended' ? '-' : ''; + var timeDelimiter = format === 'extended' ? ':' : ''; // Representation is either 'date' or 'complete' + + if (representation !== 'time') { + var day = (0, _index3.default)(originalDate.getDate(), 2); + var month = (0, _index3.default)(originalDate.getMonth() + 1, 2); + var year = (0, _index3.default)(originalDate.getFullYear(), 4); // yyyyMMdd or yyyy-MM-dd. + + result = "".concat(year).concat(dateDelimiter).concat(month).concat(dateDelimiter).concat(day); + } // Representation is either 'time' or 'complete' + + + if (representation !== 'date') { + var hour = (0, _index3.default)(originalDate.getHours(), 2); + var minute = (0, _index3.default)(originalDate.getMinutes(), 2); + var second = (0, _index3.default)(originalDate.getSeconds(), 2); // If there's also date, separate it with time with a space + + var separator = result === '' ? '' : ' '; // HHmmss or HH:mm:ss. + + result = "".concat(result).concat(separator).concat(hour).concat(timeDelimiter).concat(minute).concat(timeDelimiter).concat(second); + } + + return result; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2448: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = formatISODuration; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +/** + * @name formatISODuration + * @category Common Helpers + * @summary Format a duration object according as ISO 8601 duration string + * + * @description + * Format a duration object according to the ISO 8601 duration standard (https://www.digi.com/resources/documentation/digidocs/90001437-13/reference/r_iso_8601_duration_format.htm) + * + * @param {Duration} duration - the duration to format + * + * @returns {String} The ISO 8601 duration string + * @throws {TypeError} Requires 1 argument + * @throws {Error} Argument must be an object + * + * @example + * // Format the given duration as ISO 8601 string + * const result = formatISODuration({ + * years: 39, + * months: 2, + * days: 20, + * hours: 7, + * minutes: 5, + * seconds: 0 + * }) + * //=> 'P39Y2M20DT0H0M0S' + */ +function formatISODuration(duration) { + (0, _index.default)(1, arguments); + if (_typeof(duration) !== 'object') throw new Error('Duration must be an object'); + var _duration$years = duration.years, + years = _duration$years === void 0 ? 0 : _duration$years, + _duration$months = duration.months, + months = _duration$months === void 0 ? 0 : _duration$months, + _duration$days = duration.days, + days = _duration$days === void 0 ? 0 : _duration$days, + _duration$hours = duration.hours, + hours = _duration$hours === void 0 ? 0 : _duration$hours, + _duration$minutes = duration.minutes, + minutes = _duration$minutes === void 0 ? 0 : _duration$minutes, + _duration$seconds = duration.seconds, + seconds = _duration$seconds === void 0 ? 0 : _duration$seconds; + return "P".concat(years, "Y").concat(months, "M").concat(days, "DT").concat(hours, "H").concat(minutes, "M").concat(seconds, "S"); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 4182: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = formatRFC3339; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(9920)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(8794)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(1985)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name formatRFC3339 + * @category Common Helpers + * @summary Format the date according to the RFC 3339 standard (https://tools.ietf.org/html/rfc3339#section-5.6). + * + * @description + * Return the formatted date string in RFC 3339 format. Options may be passed to control the parts and notations of the date. + * + * @param {Date|Number} date - the original date + * @param {Object} [options] - an object with options. + * @param {0|1|2|3} [options.fractionDigits=0] - number of digits after the decimal point after seconds + * @returns {String} the formatted date string + * @throws {TypeError} 1 argument required + * @throws {RangeError} `date` must not be Invalid Date + * @throws {RangeError} `options.fractionDigits` must be between 0 and 3 + * + * @example + * // Represent 18 September 2019 in RFC 3339 format: + * const result = formatRFC3339(new Date(2019, 8, 18, 19, 0, 52)) + * //=> '2019-09-18T19:00:52Z' + * + * @example + * // Represent 18 September 2019 in RFC 3339 format, 2 digits of second fraction: + * const result = formatRFC3339(new Date(2019, 8, 18, 19, 0, 52, 234), { fractionDigits: 2 }) + * //=> '2019-09-18T19:00:52.23Z' + * + * @example + * // Represent 18 September 2019 in RFC 3339 format, 3 digits of second fraction + * const result = formatRFC3339(new Date(2019, 8, 18, 19, 0, 52, 234), { fractionDigits: 3 }) + * //=> '2019-09-18T19:00:52.234Z' + */ +function formatRFC3339(dirtyDate, options) { + var _options$fractionDigi; + + if (arguments.length < 1) { + throw new TypeError("1 arguments required, but only ".concat(arguments.length, " present")); + } + + var originalDate = (0, _index.default)(dirtyDate); + + if (!(0, _index2.default)(originalDate)) { + throw new RangeError('Invalid time value'); + } + + var fractionDigits = Number((_options$fractionDigi = options === null || options === void 0 ? void 0 : options.fractionDigits) !== null && _options$fractionDigi !== void 0 ? _options$fractionDigi : 0); // Test if fractionDigits is between 0 and 3 _and_ is not NaN + + if (!(fractionDigits >= 0 && fractionDigits <= 3)) { + throw new RangeError('fractionDigits must be between 0 and 3 inclusively'); + } + + var day = (0, _index3.default)(originalDate.getDate(), 2); + var month = (0, _index3.default)(originalDate.getMonth() + 1, 2); + var year = originalDate.getFullYear(); + var hour = (0, _index3.default)(originalDate.getHours(), 2); + var minute = (0, _index3.default)(originalDate.getMinutes(), 2); + var second = (0, _index3.default)(originalDate.getSeconds(), 2); + var fractionalSecond = ''; + + if (fractionDigits > 0) { + var milliseconds = originalDate.getMilliseconds(); + var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, fractionDigits - 3)); + fractionalSecond = '.' + (0, _index3.default)(fractionalSeconds, fractionDigits); + } + + var offset = ''; + var tzOffset = originalDate.getTimezoneOffset(); + + if (tzOffset !== 0) { + var absoluteOffset = Math.abs(tzOffset); + var hourOffset = (0, _index3.default)((0, _index4.default)(absoluteOffset / 60), 2); + var minuteOffset = (0, _index3.default)(absoluteOffset % 60, 2); // If less than 0, the sign is +, because it is ahead of time. + + var sign = tzOffset < 0 ? '+' : '-'; + offset = "".concat(sign).concat(hourOffset, ":").concat(minuteOffset); + } else { + offset = 'Z'; + } + + return "".concat(year, "-").concat(month, "-").concat(day, "T").concat(hour, ":").concat(minute, ":").concat(second).concat(fractionalSecond).concat(offset); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 402: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = formatRFC7231; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(9920)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(8794)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; +/** + * @name formatRFC7231 + * @category Common Helpers + * @summary Format the date according to the RFC 7231 standard (https://tools.ietf.org/html/rfc7231#section-7.1.1.1). + * + * @description + * Return the formatted date string in RFC 7231 format. + * The result will always be in UTC timezone. + * + * @param {Date|Number} date - the original date + * @returns {String} the formatted date string + * @throws {TypeError} 1 argument required + * @throws {RangeError} `date` must not be Invalid Date + * + * @example + * // Represent 18 September 2019 in RFC 7231 format: + * const result = formatRFC7231(new Date(2019, 8, 18, 19, 0, 52)) + * //=> 'Wed, 18 Sep 2019 19:00:52 GMT' + */ + +function formatRFC7231(dirtyDate) { + if (arguments.length < 1) { + throw new TypeError("1 arguments required, but only ".concat(arguments.length, " present")); + } + + var originalDate = (0, _index.default)(dirtyDate); + + if (!(0, _index2.default)(originalDate)) { + throw new RangeError('Invalid time value'); + } + + var dayName = days[originalDate.getUTCDay()]; + var dayOfMonth = (0, _index3.default)(originalDate.getUTCDate(), 2); + var monthName = months[originalDate.getUTCMonth()]; + var year = originalDate.getUTCFullYear(); + var hour = (0, _index3.default)(originalDate.getUTCHours(), 2); + var minute = (0, _index3.default)(originalDate.getUTCMinutes(), 2); + var second = (0, _index3.default)(originalDate.getUTCSeconds(), 2); // Result variables. + + return "".concat(dayName, ", ").concat(dayOfMonth, " ").concat(monthName, " ").concat(year, " ").concat(hour, ":").concat(minute, ":").concat(second, " GMT"); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 675: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = formatRelative; + +var _index = __nccwpck_require__(9307); + +var _index2 = _interopRequireDefault(__nccwpck_require__(3086)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2168)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(618)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(7923)); + +var _index6 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index7 = _interopRequireDefault(__nccwpck_require__(7032)); + +var _index8 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index9 = _interopRequireDefault(__nccwpck_require__(1985)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name formatRelative + * @category Common Helpers + * @summary Represent the date in words relative to the given base date. + * + * @description + * Represent the date in words relative to the given base date. + * + * | Distance to the base date | Result | + * |---------------------------|---------------------------| + * | Previous 6 days | last Sunday at 04:30 AM | + * | Last day | yesterday at 04:30 AM | + * | Same day | today at 04:30 AM | + * | Next day | tomorrow at 04:30 AM | + * | Next 6 days | Sunday at 04:30 AM | + * | Other | 12/31/2017 | + * + * @param {Date|Number} date - the date to format + * @param {Date|Number} baseDate - the date to compare with + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @returns {String} the date in words + * @throws {TypeError} 2 arguments required + * @throws {RangeError} `date` must not be Invalid Date + * @throws {RangeError} `baseDate` must not be Invalid Date + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 + * @throws {RangeError} `options.locale` must contain `localize` property + * @throws {RangeError} `options.locale` must contain `formatLong` property + * @throws {RangeError} `options.locale` must contain `formatRelative` property + * + * @example + * // Represent the date of 6 days ago in words relative to the given base date. In this example, today is Wednesday + * const result = formatRelative(addDays(new Date(), -6), new Date()) + * //=> "last Thursday at 12:45 AM" + */ +function formatRelative(dirtyDate, dirtyBaseDate, options) { + var _ref, _options$locale, _ref2, _ref3, _ref4, _options$weekStartsOn, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2; + + (0, _index8.default)(2, arguments); + var date = (0, _index6.default)(dirtyDate); + var baseDate = (0, _index6.default)(dirtyBaseDate); + var defaultOptions = (0, _index.getDefaultOptions)(); + var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : _index4.default; + var weekStartsOn = (0, _index9.default)((_ref2 = (_ref3 = (_ref4 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.weekStartsOn) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : 0); + + if (!locale.localize) { + throw new RangeError('locale must contain localize property'); + } + + if (!locale.formatLong) { + throw new RangeError('locale must contain formatLong property'); + } + + if (!locale.formatRelative) { + throw new RangeError('locale must contain formatRelative property'); + } + + var diff = (0, _index2.default)(date, baseDate); + + if (isNaN(diff)) { + throw new RangeError('Invalid time value'); + } + + var token; + + if (diff < -6) { + token = 'other'; + } else if (diff < -1) { + token = 'lastWeek'; + } else if (diff < 0) { + token = 'yesterday'; + } else if (diff < 1) { + token = 'today'; + } else if (diff < 2) { + token = 'tomorrow'; + } else if (diff < 7) { + token = 'nextWeek'; + } else { + token = 'other'; + } + + var utcDate = (0, _index5.default)(date, (0, _index7.default)(date)); + var utcBaseDate = (0, _index5.default)(baseDate, (0, _index7.default)(baseDate)); + var formatStr = locale.formatRelative(token, utcDate, utcBaseDate, { + locale: locale, + weekStartsOn: weekStartsOn + }); + return (0, _index3.default)(date, formatStr, { + locale: locale, + weekStartsOn: weekStartsOn + }); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 4897: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = fromUnixTime; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name fromUnixTime + * @category Timestamp Helpers + * @summary Create a date from a Unix timestamp. + * + * @description + * Create a date from a Unix timestamp (in seconds). Decimal values will be discarded. + * + * @param {Number} unixTime - the given Unix timestamp (in seconds) + * @returns {Date} the date + * @throws {TypeError} 1 argument required + * + * @example + * // Create the date 29 February 2012 11:45:05: + * const result = fromUnixTime(1330515905) + * //=> Wed Feb 29 2012 11:45:05 + */ +function fromUnixTime(dirtyUnixTime) { + (0, _index3.default)(1, arguments); + var unixTime = (0, _index2.default)(dirtyUnixTime); + return (0, _index.default)(unixTime * 1000); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7626: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getDate; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getDate + * @category Day Helpers + * @summary Get the day of the month of the given date. + * + * @description + * Get the day of the month of the given date. + * + * @param {Date|Number} date - the given date + * @returns {Number} the day of month + * @throws {TypeError} 1 argument required + * + * @example + * // Which day of the month is 29 February 2012? + * const result = getDate(new Date(2012, 1, 29)) + * //=> 29 + */ +function getDate(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var dayOfMonth = date.getDate(); + return dayOfMonth; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9361: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getDay; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getDay + * @category Weekday Helpers + * @summary Get the day of the week of the given date. + * + * @description + * Get the day of the week of the given date. + * + * @param {Date|Number} date - the given date + * @returns {0|1|2|3|4|5|6} the day of week, 0 represents Sunday + * @throws {TypeError} 1 argument required + * + * @example + * // Which day of the week is 29 February 2012? + * const result = getDay(new Date(2012, 1, 29)) + * //=> 3 + */ +function getDay(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var day = date.getDay(); + return day; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7468: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getDayOfYear; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(8225)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(3086)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getDayOfYear + * @category Day Helpers + * @summary Get the day of the year of the given date. + * + * @description + * Get the day of the year of the given date. + * + * @param {Date|Number} date - the given date + * @returns {Number} the day of year + * @throws {TypeError} 1 argument required + * + * @example + * // Which day of the year is 2 July 2014? + * const result = getDayOfYear(new Date(2014, 6, 2)) + * //=> 183 + */ +function getDayOfYear(dirtyDate) { + (0, _index4.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var diff = (0, _index3.default)(date, (0, _index2.default)(date)); + var dayOfYear = diff + 1; + return dayOfYear; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7573: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getDaysInMonth; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getDaysInMonth + * @category Month Helpers + * @summary Get the number of days in a month of the given date. + * + * @description + * Get the number of days in a month of the given date. + * + * @param {Date|Number} date - the given date + * @returns {Number} the number of days in a month + * @throws {TypeError} 1 argument required + * + * @example + * // How many days are in February 2000? + * const result = getDaysInMonth(new Date(2000, 1)) + * //=> 29 + */ +function getDaysInMonth(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var year = date.getFullYear(); + var monthIndex = date.getMonth(); + var lastDayOfMonth = new Date(0); + lastDayOfMonth.setFullYear(year, monthIndex + 1, 0); + lastDayOfMonth.setHours(0, 0, 0, 0); + return lastDayOfMonth.getDate(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2784: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getDaysInYear; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(74)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getDaysInYear + * @category Year Helpers + * @summary Get the number of days in a year of the given date. + * + * @description + * Get the number of days in a year of the given date. + * + * @param {Date|Number} date - the given date + * @returns {Number} the number of days in a year + * @throws {TypeError} 1 argument required + * + * @example + * // How many days are in 2012? + * const result = getDaysInYear(new Date(2012, 0, 1)) + * //=> 366 + */ +function getDaysInYear(dirtyDate) { + (0, _index3.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + + if (String(new Date(date)) === 'Invalid Date') { + return NaN; + } + + return (0, _index2.default)(date) ? 366 : 365; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9322: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getDecade; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getDecade + * @category Decade Helpers + * @summary Get the decade of the given date. + * + * @description + * Get the decade of the given date. + * + * @param {Date|Number} date - the given date + * @returns {Number} the year of decade + * @throws {TypeError} 1 argument required + * + * @example + * // Which decade belongs 27 November 1942? + * const result = getDecade(new Date(1942, 10, 27)) + * //=> 1940 + */ +function getDecade(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var year = date.getFullYear(); + var decade = Math.floor(year / 10) * 10; + return decade; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5795: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getDefaultOptions; + +var _index = __nccwpck_require__(9307); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2631)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getDefaultOptions + * @category Common Helpers + * @summary Get default options. + * @pure false + * + * @description + * Returns an object that contains defaults for + * `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate` + * arguments for all functions. + * + * You can change these with [setDefaultOptions]{@link https://date-fns.org/docs/setDefaultOptions}. + * + * @returns {Object} default options + * + * @example + * const result = getDefaultOptions() + * //=> {} + * + * @example + * setDefaultOptions({ weekStarsOn: 1, firstWeekContainsDate: 4 }) + * const result = getDefaultOptions() + * //=> { weekStarsOn: 1, firstWeekContainsDate: 4 } + */ +function getDefaultOptions() { + return (0, _index2.default)({}, (0, _index.getDefaultOptions)()); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7941: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getHours; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getHours + * @category Hour Helpers + * @summary Get the hours of the given date. + * + * @description + * Get the hours of the given date. + * + * @param {Date|Number} date - the given date + * @returns {Number} the hours + * @throws {TypeError} 1 argument required + * + * @example + * // Get the hours of 29 February 2012 11:45:00: + * const result = getHours(new Date(2012, 1, 29, 11, 45)) + * //=> 11 + */ +function getHours(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var hours = date.getHours(); + return hours; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8313: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getISODay; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getISODay + * @category Weekday Helpers + * @summary Get the day of the ISO week of the given date. + * + * @description + * Get the day of the ISO week of the given date, + * which is 7 for Sunday, 1 for Monday etc. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} date - the given date + * @returns {Number} the day of ISO week + * @throws {TypeError} 1 argument required + * + * @example + * // Which day of the ISO week is 26 February 2012? + * const result = getISODay(new Date(2012, 1, 26)) + * //=> 7 + */ +function getISODay(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var day = date.getDay(); + + if (day === 0) { + day = 7; + } + + return day; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9894: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getISOWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6307)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(776)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MILLISECONDS_IN_WEEK = 604800000; +/** + * @name getISOWeek + * @category ISO Week Helpers + * @summary Get the ISO week of the given date. + * + * @description + * Get the ISO week of the given date. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} date - the given date + * @returns {Number} the ISO week + * @throws {TypeError} 1 argument required + * + * @example + * // Which week of the ISO-week numbering year is 2 January 2005? + * const result = getISOWeek(new Date(2005, 0, 2)) + * //=> 53 + */ + +function getISOWeek(dirtyDate) { + (0, _index4.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var diff = (0, _index2.default)(date).getTime() - (0, _index3.default)(date).getTime(); // Round the number of days to the nearest integer + // because the number of milliseconds in a week is not constant + // (e.g. it's different in the week of the daylight saving time clock shift) + + return Math.round(diff / MILLISECONDS_IN_WEEK) + 1; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6991: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getISOWeekYear; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6307)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getISOWeekYear + * @category ISO Week-Numbering Year Helpers + * @summary Get the ISO week-numbering year of the given date. + * + * @description + * Get the ISO week-numbering year of the given date, + * which always starts 3 days before the year's first Thursday. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} date - the given date + * @returns {Number} the ISO week-numbering year + * @throws {TypeError} 1 argument required + * + * @example + * // Which ISO-week numbering year is 2 January 2005? + * const result = getISOWeekYear(new Date(2005, 0, 2)) + * //=> 2004 + */ +function getISOWeekYear(dirtyDate) { + (0, _index3.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var year = date.getFullYear(); + var fourthOfJanuaryOfNextYear = new Date(0); + fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4); + fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0); + var startOfNextYear = (0, _index2.default)(fourthOfJanuaryOfNextYear); + var fourthOfJanuaryOfThisYear = new Date(0); + fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4); + fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0); + var startOfThisYear = (0, _index2.default)(fourthOfJanuaryOfThisYear); + + if (date.getTime() >= startOfNextYear.getTime()) { + return year + 1; + } else if (date.getTime() >= startOfThisYear.getTime()) { + return year; + } else { + return year - 1; + } +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5438: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getISOWeeksInYear; + +var _index = _interopRequireDefault(__nccwpck_require__(776)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(7195)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MILLISECONDS_IN_WEEK = 604800000; +/** + * @name getISOWeeksInYear + * @category ISO Week-Numbering Year Helpers + * @summary Get the number of weeks in an ISO week-numbering year of the given date. + * + * @description + * Get the number of weeks in an ISO week-numbering year of the given date. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} date - the given date + * @returns {Number} the number of ISO weeks in a year + * @throws {TypeError} 1 argument required + * + * @example + * // How many weeks are in ISO week-numbering year 2015? + * const result = getISOWeeksInYear(new Date(2015, 1, 11)) + * //=> 53 + */ + +function getISOWeeksInYear(dirtyDate) { + (0, _index3.default)(1, arguments); + var thisYear = (0, _index.default)(dirtyDate); + var nextYear = (0, _index.default)((0, _index2.default)(thisYear, 60)); + var diff = nextYear.valueOf() - thisYear.valueOf(); // Round the number of weeks to the nearest integer + // because the number of milliseconds in a week is not constant + // (e.g. it's different in the week of the daylight saving time clock shift) + + return Math.round(diff / MILLISECONDS_IN_WEEK); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7560: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getMilliseconds; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getMilliseconds + * @category Millisecond Helpers + * @summary Get the milliseconds of the given date. + * + * @description + * Get the milliseconds of the given date. + * + * @param {Date|Number} date - the given date + * @returns {Number} the milliseconds + * @throws {TypeError} 1 argument required + * + * @example + * // Get the milliseconds of 29 February 2012 11:45:05.123: + * const result = getMilliseconds(new Date(2012, 1, 29, 11, 45, 5, 123)) + * //=> 123 + */ +function getMilliseconds(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var milliseconds = date.getMilliseconds(); + return milliseconds; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7030: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getMinutes; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getMinutes + * @category Minute Helpers + * @summary Get the minutes of the given date. + * + * @description + * Get the minutes of the given date. + * + * @param {Date|Number} date - the given date + * @returns {Number} the minutes + * @throws {TypeError} 1 argument required + * + * @example + * // Get the minutes of 29 February 2012 11:45:05: + * const result = getMinutes(new Date(2012, 1, 29, 11, 45, 5)) + * //=> 45 + */ +function getMinutes(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var minutes = date.getMinutes(); + return minutes; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2194: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getMonth; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getMonth + * @category Month Helpers + * @summary Get the month of the given date. + * + * @description + * Get the month of the given date. + * + * @param {Date|Number} date - the given date + * @returns {Number} the month + * @throws {TypeError} 1 argument required + * + * @example + * // Which month is 29 February 2012? + * const result = getMonth(new Date(2012, 1, 29)) + * //=> 1 + */ +function getMonth(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var month = date.getMonth(); + return month; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7647: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getOverlappingDaysInIntervals; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MILLISECONDS_IN_DAY = 24 * 60 * 60 * 1000; +/** + * @name getOverlappingDaysInIntervals + * @category Interval Helpers + * @summary Get the number of days that overlap in two time intervals + * + * @description + * Get the number of days that overlap in two time intervals + * + * @param {Interval} intervalLeft - the first interval to compare. See [Interval]{@link docs/Interval} + * @param {Interval} intervalRight - the second interval to compare. See [Interval]{@link docs/Interval} + * @returns {Number} the number of days that overlap in two time intervals + * @throws {TypeError} 2 arguments required + * @throws {RangeError} The start of an interval cannot be after its end + * @throws {RangeError} Date in interval cannot be `Invalid Date` + * + * @example + * // For overlapping time intervals adds 1 for each started overlapping day: + * getOverlappingDaysInIntervals( + * { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) }, + * { start: new Date(2014, 0, 17), end: new Date(2014, 0, 21) } + * ) + * //=> 3 + * + * @example + * // For non-overlapping time intervals returns 0: + * getOverlappingDaysInIntervals( + * { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) }, + * { start: new Date(2014, 0, 21), end: new Date(2014, 0, 22) } + * ) + * //=> 0 + */ + +function getOverlappingDaysInIntervals(dirtyIntervalLeft, dirtyIntervalRight) { + (0, _index2.default)(2, arguments); + var intervalLeft = dirtyIntervalLeft || {}; + var intervalRight = dirtyIntervalRight || {}; + var leftStartTime = (0, _index.default)(intervalLeft.start).getTime(); + var leftEndTime = (0, _index.default)(intervalLeft.end).getTime(); + var rightStartTime = (0, _index.default)(intervalRight.start).getTime(); + var rightEndTime = (0, _index.default)(intervalRight.end).getTime(); // Throw an exception if start date is after end date or if any date is `Invalid Date` + + if (!(leftStartTime <= leftEndTime && rightStartTime <= rightEndTime)) { + throw new RangeError('Invalid interval'); + } + + var isOverlapping = leftStartTime < rightEndTime && rightStartTime < leftEndTime; + + if (!isOverlapping) { + return 0; + } + + var overlapStartDate = rightStartTime < leftStartTime ? leftStartTime : rightStartTime; + var overlapEndDate = rightEndTime > leftEndTime ? leftEndTime : rightEndTime; + var differenceInMs = overlapEndDate - overlapStartDate; + return Math.ceil(differenceInMs / MILLISECONDS_IN_DAY); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 4523: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getQuarter; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getQuarter + * @category Quarter Helpers + * @summary Get the year quarter of the given date. + * + * @description + * Get the year quarter of the given date. + * + * @param {Date|Number} date - the given date + * @returns {Number} the quarter + * @throws {TypeError} 1 argument required + * + * @example + * // Which quarter is 2 July 2014? + * const result = getQuarter(new Date(2014, 6, 2)) + * //=> 3 + */ +function getQuarter(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var quarter = Math.floor(date.getMonth() / 3) + 1; + return quarter; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8755: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getSeconds; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getSeconds + * @category Second Helpers + * @summary Get the seconds of the given date. + * + * @description + * Get the seconds of the given date. + * + * @param {Date|Number} date - the given date + * @returns {Number} the seconds + * @throws {TypeError} 1 argument required + * + * @example + * // Get the seconds of 29 February 2012 11:45:05.123: + * const result = getSeconds(new Date(2012, 1, 29, 11, 45, 5, 123)) + * //=> 5 + */ +function getSeconds(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var seconds = date.getSeconds(); + return seconds; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5052: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getTime; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getTime + * @category Timestamp Helpers + * @summary Get the milliseconds timestamp of the given date. + * + * @description + * Get the milliseconds timestamp of the given date. + * + * @param {Date|Number} date - the given date + * @returns {Number} the timestamp + * @throws {TypeError} 1 argument required + * + * @example + * // Get the timestamp of 29 February 2012 11:45:05.123: + * const result = getTime(new Date(2012, 1, 29, 11, 45, 5, 123)) + * //=> 1330515905123 + */ +function getTime(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var timestamp = date.getTime(); + return timestamp; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6476: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getUnixTime; + +var _index = _interopRequireDefault(__nccwpck_require__(5052)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getUnixTime + * @category Timestamp Helpers + * @summary Get the seconds timestamp of the given date. + * + * @description + * Get the seconds timestamp of the given date. + * + * @param {Date|Number} date - the given date + * @returns {Number} the timestamp + * @throws {TypeError} 1 argument required + * + * @example + * // Get the timestamp of 29 February 2012 11:45:05 CET: + * const result = getUnixTime(new Date(2012, 1, 29, 11, 45, 5)) + * //=> 1330512305 + */ +function getUnixTime(dirtyDate) { + (0, _index2.default)(1, arguments); + return Math.floor((0, _index.default)(dirtyDate) / 1000); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 81: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(9813)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(8014)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MILLISECONDS_IN_WEEK = 604800000; +/** + * @name getWeek + * @category Week Helpers + * @summary Get the local week index of the given date. + * + * @description + * Get the local week index of the given date. + * The exact calculation depends on the values of + * `options.weekStartsOn` (which is the index of the first day of the week) + * and `options.firstWeekContainsDate` (which is the day of January, which is always in + * the first week of the week-numbering year) + * + * Week numbering: https://en.wikipedia.org/wiki/Week#Week_numbering + * + * @param {Date|Number} date - the given date + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year + * @returns {Number} the week + * @throws {TypeError} 1 argument required + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 + * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7 + * + * @example + * // Which week of the local week numbering year is 2 January 2005 with default options? + * const result = getWeek(new Date(2005, 0, 2)) + * //=> 2 + * + * // Which week of the local week numbering year is 2 January 2005, + * // if Monday is the first day of the week, + * // and the first week of the year always contains 4 January? + * const result = getWeek(new Date(2005, 0, 2), { + * weekStartsOn: 1, + * firstWeekContainsDate: 4 + * }) + * //=> 53 + */ + +function getWeek(dirtyDate, options) { + (0, _index4.default)(1, arguments); + var date = (0, _index3.default)(dirtyDate); + var diff = (0, _index.default)(date, options).getTime() - (0, _index2.default)(date, options).getTime(); // Round the number of days to the nearest integer + // because the number of milliseconds in a week is not constant + // (e.g. it's different in the week of the daylight saving time clock shift) + + return Math.round(diff / MILLISECONDS_IN_WEEK) + 1; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9229: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getWeekOfMonth; + +var _index = __nccwpck_require__(9307); + +var _index2 = _interopRequireDefault(__nccwpck_require__(7626)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(9361)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(7182)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index6 = _interopRequireDefault(__nccwpck_require__(1985)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getWeekOfMonth + * @category Week Helpers + * @summary Get the week of the month of the given date. + * + * @description + * Get the week of the month of the given date. + * + * @param {Date|Number} date - the given date + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @returns {Number} the week of month + * @throws {TypeError} 1 argument required + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 inclusively + * + * @example + * // Which week of the month is 9 November 2017? + * const result = getWeekOfMonth(new Date(2017, 10, 9)) + * //=> 2 + */ +function getWeekOfMonth(date, options) { + var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2; + + (0, _index5.default)(1, arguments); + var defaultOptions = (0, _index.getDefaultOptions)(); + var weekStartsOn = (0, _index6.default)((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); + + if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) { + throw new RangeError('weekStartsOn must be between 0 and 6 inclusively'); + } + + var currentDayOfMonth = (0, _index2.default)(date); + if (isNaN(currentDayOfMonth)) return NaN; + var startWeekDay = (0, _index3.default)((0, _index4.default)(date)); + var lastDayOfFirstWeek = weekStartsOn - startWeekDay; + if (lastDayOfFirstWeek <= 0) lastDayOfFirstWeek += 7; + var remainingDaysAfterFirstWeek = currentDayOfMonth - lastDayOfFirstWeek; + return Math.ceil(remainingDaysAfterFirstWeek / 7) + 1; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3494: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getWeekYear; + +var _index = _interopRequireDefault(__nccwpck_require__(9813)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index5 = __nccwpck_require__(9307); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getWeekYear + * @category Week-Numbering Year Helpers + * @summary Get the local week-numbering year of the given date. + * + * @description + * Get the local week-numbering year of the given date. + * The exact calculation depends on the values of + * `options.weekStartsOn` (which is the index of the first day of the week) + * and `options.firstWeekContainsDate` (which is the day of January, which is always in + * the first week of the week-numbering year) + * + * Week numbering: https://en.wikipedia.org/wiki/Week#Week_numbering + * + * @param {Date|Number} date - the given date + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year + * @returns {Number} the local week-numbering year + * @throws {TypeError} 1 argument required + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 + * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7 + * + * @example + * // Which week numbering year is 26 December 2004 with the default settings? + * const result = getWeekYear(new Date(2004, 11, 26)) + * //=> 2005 + * + * @example + * // Which week numbering year is 26 December 2004 if week starts on Saturday? + * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 }) + * //=> 2004 + * + * @example + * // Which week numbering year is 26 December 2004 if the first week contains 4 January? + * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 }) + * //=> 2004 + */ +function getWeekYear(dirtyDate, options) { + var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2; + + (0, _index4.default)(1, arguments); + var date = (0, _index2.default)(dirtyDate); + var year = date.getFullYear(); + var defaultOptions = (0, _index5.getDefaultOptions)(); + var firstWeekContainsDate = (0, _index3.default)((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN + + if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) { + throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively'); + } + + var firstWeekOfNextYear = new Date(0); + firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate); + firstWeekOfNextYear.setHours(0, 0, 0, 0); + var startOfNextYear = (0, _index.default)(firstWeekOfNextYear, options); + var firstWeekOfThisYear = new Date(0); + firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate); + firstWeekOfThisYear.setHours(0, 0, 0, 0); + var startOfThisYear = (0, _index.default)(firstWeekOfThisYear, options); + + if (date.getTime() >= startOfNextYear.getTime()) { + return year + 1; + } else if (date.getTime() >= startOfThisYear.getTime()) { + return year; + } else { + return year - 1; + } +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9482: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getWeeksInMonth; + +var _index = _interopRequireDefault(__nccwpck_require__(8620)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(3346)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(7182)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getWeeksInMonth + * @category Week Helpers + * @summary Get the number of calendar weeks a month spans. + * + * @description + * Get the number of calendar weeks the month in the given date spans. + * + * @param {Date|Number} date - the given date + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @returns {Number} the number of calendar weeks + * @throws {TypeError} 2 arguments required + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 + * + * @example + * // How many calendar weeks does February 2015 span? + * const result = getWeeksInMonth(new Date(2015, 1, 8)) + * //=> 4 + * + * @example + * // If the week starts on Monday, + * // how many calendar weeks does July 2017 span? + * const result = getWeeksInMonth(new Date(2017, 6, 5), { weekStartsOn: 1 }) + * //=> 6 + */ +function getWeeksInMonth(date, options) { + (0, _index4.default)(1, arguments); + return (0, _index.default)((0, _index2.default)(date), (0, _index3.default)(date), options) + 1; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5714: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getYear; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name getYear + * @category Year Helpers + * @summary Get the year of the given date. + * + * @description + * Get the year of the given date. + * + * @param {Date|Number} date - the given date + * @returns {Number} the year + * @throws {TypeError} 1 argument required + * + * @example + * // Which year is 2 July 2014? + * const result = getYear(new Date(2014, 6, 2)) + * //=> 2014 + */ +function getYear(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate).getFullYear(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3895: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = hoursToMilliseconds; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name hoursToMilliseconds + * @category Conversion Helpers + * @summary Convert hours to milliseconds. + * + * @description + * Convert a number of hours to a full number of milliseconds. + * + * @param {number} hours - number of hours to be converted + * + * @returns {number} the number of hours converted to milliseconds + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 2 hours to milliseconds: + * const result = hoursToMilliseconds(2) + * //=> 7200000 + */ +function hoursToMilliseconds(hours) { + (0, _index.default)(1, arguments); + return Math.floor(hours * _index2.millisecondsInHour); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2449: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = hoursToMinutes; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name hoursToMinutes + * @category Conversion Helpers + * @summary Convert hours to minutes. + * + * @description + * Convert a number of hours to a full number of minutes. + * + * @param {number} hours - number of hours to be converted + * + * @returns {number} the number of hours converted in minutes + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 2 hours to minutes: + * const result = hoursToMinutes(2) + * //=> 120 + */ +function hoursToMinutes(hours) { + (0, _index.default)(1, arguments); + return Math.floor(hours * _index2.minutesInHour); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 775: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = hoursToSeconds; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name hoursToSeconds + * @category Conversion Helpers + * @summary Convert hours to seconds. + * + * @description + * Convert a number of hours to a full number of seconds. + * + * @param {number} hours - number of hours to be converted + * + * @returns {number} the number of hours converted in seconds + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 2 hours to seconds: + * const result = hoursToSeconds(2) + * //=> 7200 + */ +function hoursToSeconds(hours) { + (0, _index.default)(1, arguments); + return Math.floor(hours * _index2.secondsInHour); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3314: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +var _exportNames = { + add: true, + addBusinessDays: true, + addDays: true, + addHours: true, + addISOWeekYears: true, + addMilliseconds: true, + addMinutes: true, + addMonths: true, + addQuarters: true, + addSeconds: true, + addWeeks: true, + addYears: true, + areIntervalsOverlapping: true, + clamp: true, + closestIndexTo: true, + closestTo: true, + compareAsc: true, + compareDesc: true, + daysToWeeks: true, + differenceInBusinessDays: true, + differenceInCalendarDays: true, + differenceInCalendarISOWeekYears: true, + differenceInCalendarISOWeeks: true, + differenceInCalendarMonths: true, + differenceInCalendarQuarters: true, + differenceInCalendarWeeks: true, + differenceInCalendarYears: true, + differenceInDays: true, + differenceInHours: true, + differenceInISOWeekYears: true, + differenceInMilliseconds: true, + differenceInMinutes: true, + differenceInMonths: true, + differenceInQuarters: true, + differenceInSeconds: true, + differenceInWeeks: true, + differenceInYears: true, + eachDayOfInterval: true, + eachHourOfInterval: true, + eachMinuteOfInterval: true, + eachMonthOfInterval: true, + eachQuarterOfInterval: true, + eachWeekOfInterval: true, + eachWeekendOfInterval: true, + eachWeekendOfMonth: true, + eachWeekendOfYear: true, + eachYearOfInterval: true, + endOfDay: true, + endOfDecade: true, + endOfHour: true, + endOfISOWeek: true, + endOfISOWeekYear: true, + endOfMinute: true, + endOfMonth: true, + endOfQuarter: true, + endOfSecond: true, + endOfToday: true, + endOfTomorrow: true, + endOfWeek: true, + endOfYear: true, + endOfYesterday: true, + format: true, + formatDistance: true, + formatDistanceStrict: true, + formatDistanceToNow: true, + formatDistanceToNowStrict: true, + formatDuration: true, + formatISO: true, + formatISO9075: true, + formatISODuration: true, + formatRFC3339: true, + formatRFC7231: true, + formatRelative: true, + fromUnixTime: true, + getDate: true, + getDay: true, + getDayOfYear: true, + getDaysInMonth: true, + getDaysInYear: true, + getDecade: true, + getDefaultOptions: true, + getHours: true, + getISODay: true, + getISOWeek: true, + getISOWeekYear: true, + getISOWeeksInYear: true, + getMilliseconds: true, + getMinutes: true, + getMonth: true, + getOverlappingDaysInIntervals: true, + getQuarter: true, + getSeconds: true, + getTime: true, + getUnixTime: true, + getWeek: true, + getWeekOfMonth: true, + getWeekYear: true, + getWeeksInMonth: true, + getYear: true, + hoursToMilliseconds: true, + hoursToMinutes: true, + hoursToSeconds: true, + intervalToDuration: true, + intlFormat: true, + intlFormatDistance: true, + isAfter: true, + isBefore: true, + isDate: true, + isEqual: true, + isExists: true, + isFirstDayOfMonth: true, + isFriday: true, + isFuture: true, + isLastDayOfMonth: true, + isLeapYear: true, + isMatch: true, + isMonday: true, + isPast: true, + isSameDay: true, + isSameHour: true, + isSameISOWeek: true, + isSameISOWeekYear: true, + isSameMinute: true, + isSameMonth: true, + isSameQuarter: true, + isSameSecond: true, + isSameWeek: true, + isSameYear: true, + isSaturday: true, + isSunday: true, + isThisHour: true, + isThisISOWeek: true, + isThisMinute: true, + isThisMonth: true, + isThisQuarter: true, + isThisSecond: true, + isThisWeek: true, + isThisYear: true, + isThursday: true, + isToday: true, + isTomorrow: true, + isTuesday: true, + isValid: true, + isWednesday: true, + isWeekend: true, + isWithinInterval: true, + isYesterday: true, + lastDayOfDecade: true, + lastDayOfISOWeek: true, + lastDayOfISOWeekYear: true, + lastDayOfMonth: true, + lastDayOfQuarter: true, + lastDayOfWeek: true, + lastDayOfYear: true, + lightFormat: true, + max: true, + milliseconds: true, + millisecondsToHours: true, + millisecondsToMinutes: true, + millisecondsToSeconds: true, + min: true, + minutesToHours: true, + minutesToMilliseconds: true, + minutesToSeconds: true, + monthsToQuarters: true, + monthsToYears: true, + nextDay: true, + nextFriday: true, + nextMonday: true, + nextSaturday: true, + nextSunday: true, + nextThursday: true, + nextTuesday: true, + nextWednesday: true, + parse: true, + parseISO: true, + parseJSON: true, + previousDay: true, + previousFriday: true, + previousMonday: true, + previousSaturday: true, + previousSunday: true, + previousThursday: true, + previousTuesday: true, + previousWednesday: true, + quartersToMonths: true, + quartersToYears: true, + roundToNearestMinutes: true, + secondsToHours: true, + secondsToMilliseconds: true, + secondsToMinutes: true, + set: true, + setDate: true, + setDay: true, + setDayOfYear: true, + setDefaultOptions: true, + setHours: true, + setISODay: true, + setISOWeek: true, + setISOWeekYear: true, + setMilliseconds: true, + setMinutes: true, + setMonth: true, + setQuarter: true, + setSeconds: true, + setWeek: true, + setWeekYear: true, + setYear: true, + startOfDay: true, + startOfDecade: true, + startOfHour: true, + startOfISOWeek: true, + startOfISOWeekYear: true, + startOfMinute: true, + startOfMonth: true, + startOfQuarter: true, + startOfSecond: true, + startOfToday: true, + startOfTomorrow: true, + startOfWeek: true, + startOfWeekYear: true, + startOfYear: true, + startOfYesterday: true, + sub: true, + subBusinessDays: true, + subDays: true, + subHours: true, + subISOWeekYears: true, + subMilliseconds: true, + subMinutes: true, + subMonths: true, + subQuarters: true, + subSeconds: true, + subWeeks: true, + subYears: true, + toDate: true, + weeksToDays: true, + yearsToMonths: true, + yearsToQuarters: true +}; +Object.defineProperty(exports, "add", ({ + enumerable: true, + get: function get() { + return _index.default; + } +})); +Object.defineProperty(exports, "addBusinessDays", ({ + enumerable: true, + get: function get() { + return _index2.default; + } +})); +Object.defineProperty(exports, "addDays", ({ + enumerable: true, + get: function get() { + return _index3.default; + } +})); +Object.defineProperty(exports, "addHours", ({ + enumerable: true, + get: function get() { + return _index4.default; + } +})); +Object.defineProperty(exports, "addISOWeekYears", ({ + enumerable: true, + get: function get() { + return _index5.default; + } +})); +Object.defineProperty(exports, "addMilliseconds", ({ + enumerable: true, + get: function get() { + return _index6.default; + } +})); +Object.defineProperty(exports, "addMinutes", ({ + enumerable: true, + get: function get() { + return _index7.default; + } +})); +Object.defineProperty(exports, "addMonths", ({ + enumerable: true, + get: function get() { + return _index8.default; + } +})); +Object.defineProperty(exports, "addQuarters", ({ + enumerable: true, + get: function get() { + return _index9.default; + } +})); +Object.defineProperty(exports, "addSeconds", ({ + enumerable: true, + get: function get() { + return _index10.default; + } +})); +Object.defineProperty(exports, "addWeeks", ({ + enumerable: true, + get: function get() { + return _index11.default; + } +})); +Object.defineProperty(exports, "addYears", ({ + enumerable: true, + get: function get() { + return _index12.default; + } +})); +Object.defineProperty(exports, "areIntervalsOverlapping", ({ + enumerable: true, + get: function get() { + return _index13.default; + } +})); +Object.defineProperty(exports, "clamp", ({ + enumerable: true, + get: function get() { + return _index14.default; + } +})); +Object.defineProperty(exports, "closestIndexTo", ({ + enumerable: true, + get: function get() { + return _index15.default; + } +})); +Object.defineProperty(exports, "closestTo", ({ + enumerable: true, + get: function get() { + return _index16.default; + } +})); +Object.defineProperty(exports, "compareAsc", ({ + enumerable: true, + get: function get() { + return _index17.default; + } +})); +Object.defineProperty(exports, "compareDesc", ({ + enumerable: true, + get: function get() { + return _index18.default; + } +})); +Object.defineProperty(exports, "daysToWeeks", ({ + enumerable: true, + get: function get() { + return _index19.default; + } +})); +Object.defineProperty(exports, "differenceInBusinessDays", ({ + enumerable: true, + get: function get() { + return _index20.default; + } +})); +Object.defineProperty(exports, "differenceInCalendarDays", ({ + enumerable: true, + get: function get() { + return _index21.default; + } +})); +Object.defineProperty(exports, "differenceInCalendarISOWeekYears", ({ + enumerable: true, + get: function get() { + return _index22.default; + } +})); +Object.defineProperty(exports, "differenceInCalendarISOWeeks", ({ + enumerable: true, + get: function get() { + return _index23.default; + } +})); +Object.defineProperty(exports, "differenceInCalendarMonths", ({ + enumerable: true, + get: function get() { + return _index24.default; + } +})); +Object.defineProperty(exports, "differenceInCalendarQuarters", ({ + enumerable: true, + get: function get() { + return _index25.default; + } +})); +Object.defineProperty(exports, "differenceInCalendarWeeks", ({ + enumerable: true, + get: function get() { + return _index26.default; + } +})); +Object.defineProperty(exports, "differenceInCalendarYears", ({ + enumerable: true, + get: function get() { + return _index27.default; + } +})); +Object.defineProperty(exports, "differenceInDays", ({ + enumerable: true, + get: function get() { + return _index28.default; + } +})); +Object.defineProperty(exports, "differenceInHours", ({ + enumerable: true, + get: function get() { + return _index29.default; + } +})); +Object.defineProperty(exports, "differenceInISOWeekYears", ({ + enumerable: true, + get: function get() { + return _index30.default; + } +})); +Object.defineProperty(exports, "differenceInMilliseconds", ({ + enumerable: true, + get: function get() { + return _index31.default; + } +})); +Object.defineProperty(exports, "differenceInMinutes", ({ + enumerable: true, + get: function get() { + return _index32.default; + } +})); +Object.defineProperty(exports, "differenceInMonths", ({ + enumerable: true, + get: function get() { + return _index33.default; + } +})); +Object.defineProperty(exports, "differenceInQuarters", ({ + enumerable: true, + get: function get() { + return _index34.default; + } +})); +Object.defineProperty(exports, "differenceInSeconds", ({ + enumerable: true, + get: function get() { + return _index35.default; + } +})); +Object.defineProperty(exports, "differenceInWeeks", ({ + enumerable: true, + get: function get() { + return _index36.default; + } +})); +Object.defineProperty(exports, "differenceInYears", ({ + enumerable: true, + get: function get() { + return _index37.default; + } +})); +Object.defineProperty(exports, "eachDayOfInterval", ({ + enumerable: true, + get: function get() { + return _index38.default; + } +})); +Object.defineProperty(exports, "eachHourOfInterval", ({ + enumerable: true, + get: function get() { + return _index39.default; + } +})); +Object.defineProperty(exports, "eachMinuteOfInterval", ({ + enumerable: true, + get: function get() { + return _index40.default; + } +})); +Object.defineProperty(exports, "eachMonthOfInterval", ({ + enumerable: true, + get: function get() { + return _index41.default; + } +})); +Object.defineProperty(exports, "eachQuarterOfInterval", ({ + enumerable: true, + get: function get() { + return _index42.default; + } +})); +Object.defineProperty(exports, "eachWeekOfInterval", ({ + enumerable: true, + get: function get() { + return _index43.default; + } +})); +Object.defineProperty(exports, "eachWeekendOfInterval", ({ + enumerable: true, + get: function get() { + return _index44.default; + } +})); +Object.defineProperty(exports, "eachWeekendOfMonth", ({ + enumerable: true, + get: function get() { + return _index45.default; + } +})); +Object.defineProperty(exports, "eachWeekendOfYear", ({ + enumerable: true, + get: function get() { + return _index46.default; + } +})); +Object.defineProperty(exports, "eachYearOfInterval", ({ + enumerable: true, + get: function get() { + return _index47.default; + } +})); +Object.defineProperty(exports, "endOfDay", ({ + enumerable: true, + get: function get() { + return _index48.default; + } +})); +Object.defineProperty(exports, "endOfDecade", ({ + enumerable: true, + get: function get() { + return _index49.default; + } +})); +Object.defineProperty(exports, "endOfHour", ({ + enumerable: true, + get: function get() { + return _index50.default; + } +})); +Object.defineProperty(exports, "endOfISOWeek", ({ + enumerable: true, + get: function get() { + return _index51.default; + } +})); +Object.defineProperty(exports, "endOfISOWeekYear", ({ + enumerable: true, + get: function get() { + return _index52.default; + } +})); +Object.defineProperty(exports, "endOfMinute", ({ + enumerable: true, + get: function get() { + return _index53.default; + } +})); +Object.defineProperty(exports, "endOfMonth", ({ + enumerable: true, + get: function get() { + return _index54.default; + } +})); +Object.defineProperty(exports, "endOfQuarter", ({ + enumerable: true, + get: function get() { + return _index55.default; + } +})); +Object.defineProperty(exports, "endOfSecond", ({ + enumerable: true, + get: function get() { + return _index56.default; + } +})); +Object.defineProperty(exports, "endOfToday", ({ + enumerable: true, + get: function get() { + return _index57.default; + } +})); +Object.defineProperty(exports, "endOfTomorrow", ({ + enumerable: true, + get: function get() { + return _index58.default; + } +})); +Object.defineProperty(exports, "endOfWeek", ({ + enumerable: true, + get: function get() { + return _index59.default; + } +})); +Object.defineProperty(exports, "endOfYear", ({ + enumerable: true, + get: function get() { + return _index60.default; + } +})); +Object.defineProperty(exports, "endOfYesterday", ({ + enumerable: true, + get: function get() { + return _index61.default; + } +})); +Object.defineProperty(exports, "format", ({ + enumerable: true, + get: function get() { + return _index62.default; + } +})); +Object.defineProperty(exports, "formatDistance", ({ + enumerable: true, + get: function get() { + return _index63.default; + } +})); +Object.defineProperty(exports, "formatDistanceStrict", ({ + enumerable: true, + get: function get() { + return _index64.default; + } +})); +Object.defineProperty(exports, "formatDistanceToNow", ({ + enumerable: true, + get: function get() { + return _index65.default; + } +})); +Object.defineProperty(exports, "formatDistanceToNowStrict", ({ + enumerable: true, + get: function get() { + return _index66.default; + } +})); +Object.defineProperty(exports, "formatDuration", ({ + enumerable: true, + get: function get() { + return _index67.default; + } +})); +Object.defineProperty(exports, "formatISO", ({ + enumerable: true, + get: function get() { + return _index68.default; + } +})); +Object.defineProperty(exports, "formatISO9075", ({ + enumerable: true, + get: function get() { + return _index69.default; + } +})); +Object.defineProperty(exports, "formatISODuration", ({ + enumerable: true, + get: function get() { + return _index70.default; + } +})); +Object.defineProperty(exports, "formatRFC3339", ({ + enumerable: true, + get: function get() { + return _index71.default; + } +})); +Object.defineProperty(exports, "formatRFC7231", ({ + enumerable: true, + get: function get() { + return _index72.default; + } +})); +Object.defineProperty(exports, "formatRelative", ({ + enumerable: true, + get: function get() { + return _index73.default; + } +})); +Object.defineProperty(exports, "fromUnixTime", ({ + enumerable: true, + get: function get() { + return _index74.default; + } +})); +Object.defineProperty(exports, "getDate", ({ + enumerable: true, + get: function get() { + return _index75.default; + } +})); +Object.defineProperty(exports, "getDay", ({ + enumerable: true, + get: function get() { + return _index76.default; + } +})); +Object.defineProperty(exports, "getDayOfYear", ({ + enumerable: true, + get: function get() { + return _index77.default; + } +})); +Object.defineProperty(exports, "getDaysInMonth", ({ + enumerable: true, + get: function get() { + return _index78.default; + } +})); +Object.defineProperty(exports, "getDaysInYear", ({ + enumerable: true, + get: function get() { + return _index79.default; + } +})); +Object.defineProperty(exports, "getDecade", ({ + enumerable: true, + get: function get() { + return _index80.default; + } +})); +Object.defineProperty(exports, "getDefaultOptions", ({ + enumerable: true, + get: function get() { + return _index81.default; + } +})); +Object.defineProperty(exports, "getHours", ({ + enumerable: true, + get: function get() { + return _index82.default; + } +})); +Object.defineProperty(exports, "getISODay", ({ + enumerable: true, + get: function get() { + return _index83.default; + } +})); +Object.defineProperty(exports, "getISOWeek", ({ + enumerable: true, + get: function get() { + return _index84.default; + } +})); +Object.defineProperty(exports, "getISOWeekYear", ({ + enumerable: true, + get: function get() { + return _index85.default; + } +})); +Object.defineProperty(exports, "getISOWeeksInYear", ({ + enumerable: true, + get: function get() { + return _index86.default; + } +})); +Object.defineProperty(exports, "getMilliseconds", ({ + enumerable: true, + get: function get() { + return _index87.default; + } +})); +Object.defineProperty(exports, "getMinutes", ({ + enumerable: true, + get: function get() { + return _index88.default; + } +})); +Object.defineProperty(exports, "getMonth", ({ + enumerable: true, + get: function get() { + return _index89.default; + } +})); +Object.defineProperty(exports, "getOverlappingDaysInIntervals", ({ + enumerable: true, + get: function get() { + return _index90.default; + } +})); +Object.defineProperty(exports, "getQuarter", ({ + enumerable: true, + get: function get() { + return _index91.default; + } +})); +Object.defineProperty(exports, "getSeconds", ({ + enumerable: true, + get: function get() { + return _index92.default; + } +})); +Object.defineProperty(exports, "getTime", ({ + enumerable: true, + get: function get() { + return _index93.default; + } +})); +Object.defineProperty(exports, "getUnixTime", ({ + enumerable: true, + get: function get() { + return _index94.default; + } +})); +Object.defineProperty(exports, "getWeek", ({ + enumerable: true, + get: function get() { + return _index95.default; + } +})); +Object.defineProperty(exports, "getWeekOfMonth", ({ + enumerable: true, + get: function get() { + return _index96.default; + } +})); +Object.defineProperty(exports, "getWeekYear", ({ + enumerable: true, + get: function get() { + return _index97.default; + } +})); +Object.defineProperty(exports, "getWeeksInMonth", ({ + enumerable: true, + get: function get() { + return _index98.default; + } +})); +Object.defineProperty(exports, "getYear", ({ + enumerable: true, + get: function get() { + return _index99.default; + } +})); +Object.defineProperty(exports, "hoursToMilliseconds", ({ + enumerable: true, + get: function get() { + return _index100.default; + } +})); +Object.defineProperty(exports, "hoursToMinutes", ({ + enumerable: true, + get: function get() { + return _index101.default; + } +})); +Object.defineProperty(exports, "hoursToSeconds", ({ + enumerable: true, + get: function get() { + return _index102.default; + } +})); +Object.defineProperty(exports, "intervalToDuration", ({ + enumerable: true, + get: function get() { + return _index103.default; + } +})); +Object.defineProperty(exports, "intlFormat", ({ + enumerable: true, + get: function get() { + return _index104.default; + } +})); +Object.defineProperty(exports, "intlFormatDistance", ({ + enumerable: true, + get: function get() { + return _index105.default; + } +})); +Object.defineProperty(exports, "isAfter", ({ + enumerable: true, + get: function get() { + return _index106.default; + } +})); +Object.defineProperty(exports, "isBefore", ({ + enumerable: true, + get: function get() { + return _index107.default; + } +})); +Object.defineProperty(exports, "isDate", ({ + enumerable: true, + get: function get() { + return _index108.default; + } +})); +Object.defineProperty(exports, "isEqual", ({ + enumerable: true, + get: function get() { + return _index109.default; + } +})); +Object.defineProperty(exports, "isExists", ({ + enumerable: true, + get: function get() { + return _index110.default; + } +})); +Object.defineProperty(exports, "isFirstDayOfMonth", ({ + enumerable: true, + get: function get() { + return _index111.default; + } +})); +Object.defineProperty(exports, "isFriday", ({ + enumerable: true, + get: function get() { + return _index112.default; + } +})); +Object.defineProperty(exports, "isFuture", ({ + enumerable: true, + get: function get() { + return _index113.default; + } +})); +Object.defineProperty(exports, "isLastDayOfMonth", ({ + enumerable: true, + get: function get() { + return _index114.default; + } +})); +Object.defineProperty(exports, "isLeapYear", ({ + enumerable: true, + get: function get() { + return _index115.default; + } +})); +Object.defineProperty(exports, "isMatch", ({ + enumerable: true, + get: function get() { + return _index116.default; + } +})); +Object.defineProperty(exports, "isMonday", ({ + enumerable: true, + get: function get() { + return _index117.default; + } +})); +Object.defineProperty(exports, "isPast", ({ + enumerable: true, + get: function get() { + return _index118.default; + } +})); +Object.defineProperty(exports, "isSameDay", ({ + enumerable: true, + get: function get() { + return _index119.default; + } +})); +Object.defineProperty(exports, "isSameHour", ({ + enumerable: true, + get: function get() { + return _index120.default; + } +})); +Object.defineProperty(exports, "isSameISOWeek", ({ + enumerable: true, + get: function get() { + return _index121.default; + } +})); +Object.defineProperty(exports, "isSameISOWeekYear", ({ + enumerable: true, + get: function get() { + return _index122.default; + } +})); +Object.defineProperty(exports, "isSameMinute", ({ + enumerable: true, + get: function get() { + return _index123.default; + } +})); +Object.defineProperty(exports, "isSameMonth", ({ + enumerable: true, + get: function get() { + return _index124.default; + } +})); +Object.defineProperty(exports, "isSameQuarter", ({ + enumerable: true, + get: function get() { + return _index125.default; + } +})); +Object.defineProperty(exports, "isSameSecond", ({ + enumerable: true, + get: function get() { + return _index126.default; + } +})); +Object.defineProperty(exports, "isSameWeek", ({ + enumerable: true, + get: function get() { + return _index127.default; + } +})); +Object.defineProperty(exports, "isSameYear", ({ + enumerable: true, + get: function get() { + return _index128.default; + } +})); +Object.defineProperty(exports, "isSaturday", ({ + enumerable: true, + get: function get() { + return _index129.default; + } +})); +Object.defineProperty(exports, "isSunday", ({ + enumerable: true, + get: function get() { + return _index130.default; + } +})); +Object.defineProperty(exports, "isThisHour", ({ + enumerable: true, + get: function get() { + return _index131.default; + } +})); +Object.defineProperty(exports, "isThisISOWeek", ({ + enumerable: true, + get: function get() { + return _index132.default; + } +})); +Object.defineProperty(exports, "isThisMinute", ({ + enumerable: true, + get: function get() { + return _index133.default; + } +})); +Object.defineProperty(exports, "isThisMonth", ({ + enumerable: true, + get: function get() { + return _index134.default; + } +})); +Object.defineProperty(exports, "isThisQuarter", ({ + enumerable: true, + get: function get() { + return _index135.default; + } +})); +Object.defineProperty(exports, "isThisSecond", ({ + enumerable: true, + get: function get() { + return _index136.default; + } +})); +Object.defineProperty(exports, "isThisWeek", ({ + enumerable: true, + get: function get() { + return _index137.default; + } +})); +Object.defineProperty(exports, "isThisYear", ({ + enumerable: true, + get: function get() { + return _index138.default; + } +})); +Object.defineProperty(exports, "isThursday", ({ + enumerable: true, + get: function get() { + return _index139.default; + } +})); +Object.defineProperty(exports, "isToday", ({ + enumerable: true, + get: function get() { + return _index140.default; + } +})); +Object.defineProperty(exports, "isTomorrow", ({ + enumerable: true, + get: function get() { + return _index141.default; + } +})); +Object.defineProperty(exports, "isTuesday", ({ + enumerable: true, + get: function get() { + return _index142.default; + } +})); +Object.defineProperty(exports, "isValid", ({ + enumerable: true, + get: function get() { + return _index143.default; + } +})); +Object.defineProperty(exports, "isWednesday", ({ + enumerable: true, + get: function get() { + return _index144.default; + } +})); +Object.defineProperty(exports, "isWeekend", ({ + enumerable: true, + get: function get() { + return _index145.default; + } +})); +Object.defineProperty(exports, "isWithinInterval", ({ + enumerable: true, + get: function get() { + return _index146.default; + } +})); +Object.defineProperty(exports, "isYesterday", ({ + enumerable: true, + get: function get() { + return _index147.default; + } +})); +Object.defineProperty(exports, "lastDayOfDecade", ({ + enumerable: true, + get: function get() { + return _index148.default; + } +})); +Object.defineProperty(exports, "lastDayOfISOWeek", ({ + enumerable: true, + get: function get() { + return _index149.default; + } +})); +Object.defineProperty(exports, "lastDayOfISOWeekYear", ({ + enumerable: true, + get: function get() { + return _index150.default; + } +})); +Object.defineProperty(exports, "lastDayOfMonth", ({ + enumerable: true, + get: function get() { + return _index151.default; + } +})); +Object.defineProperty(exports, "lastDayOfQuarter", ({ + enumerable: true, + get: function get() { + return _index152.default; + } +})); +Object.defineProperty(exports, "lastDayOfWeek", ({ + enumerable: true, + get: function get() { + return _index153.default; + } +})); +Object.defineProperty(exports, "lastDayOfYear", ({ + enumerable: true, + get: function get() { + return _index154.default; + } +})); +Object.defineProperty(exports, "lightFormat", ({ + enumerable: true, + get: function get() { + return _index155.default; + } +})); +Object.defineProperty(exports, "max", ({ + enumerable: true, + get: function get() { + return _index156.default; + } +})); +Object.defineProperty(exports, "milliseconds", ({ + enumerable: true, + get: function get() { + return _index157.default; + } +})); +Object.defineProperty(exports, "millisecondsToHours", ({ + enumerable: true, + get: function get() { + return _index158.default; + } +})); +Object.defineProperty(exports, "millisecondsToMinutes", ({ + enumerable: true, + get: function get() { + return _index159.default; + } +})); +Object.defineProperty(exports, "millisecondsToSeconds", ({ + enumerable: true, + get: function get() { + return _index160.default; + } +})); +Object.defineProperty(exports, "min", ({ + enumerable: true, + get: function get() { + return _index161.default; + } +})); +Object.defineProperty(exports, "minutesToHours", ({ + enumerable: true, + get: function get() { + return _index162.default; + } +})); +Object.defineProperty(exports, "minutesToMilliseconds", ({ + enumerable: true, + get: function get() { + return _index163.default; + } +})); +Object.defineProperty(exports, "minutesToSeconds", ({ + enumerable: true, + get: function get() { + return _index164.default; + } +})); +Object.defineProperty(exports, "monthsToQuarters", ({ + enumerable: true, + get: function get() { + return _index165.default; + } +})); +Object.defineProperty(exports, "monthsToYears", ({ + enumerable: true, + get: function get() { + return _index166.default; + } +})); +Object.defineProperty(exports, "nextDay", ({ + enumerable: true, + get: function get() { + return _index167.default; + } +})); +Object.defineProperty(exports, "nextFriday", ({ + enumerable: true, + get: function get() { + return _index168.default; + } +})); +Object.defineProperty(exports, "nextMonday", ({ + enumerable: true, + get: function get() { + return _index169.default; + } +})); +Object.defineProperty(exports, "nextSaturday", ({ + enumerable: true, + get: function get() { + return _index170.default; + } +})); +Object.defineProperty(exports, "nextSunday", ({ + enumerable: true, + get: function get() { + return _index171.default; + } +})); +Object.defineProperty(exports, "nextThursday", ({ + enumerable: true, + get: function get() { + return _index172.default; + } +})); +Object.defineProperty(exports, "nextTuesday", ({ + enumerable: true, + get: function get() { + return _index173.default; + } +})); +Object.defineProperty(exports, "nextWednesday", ({ + enumerable: true, + get: function get() { + return _index174.default; + } +})); +Object.defineProperty(exports, "parse", ({ + enumerable: true, + get: function get() { + return _index175.default; + } +})); +Object.defineProperty(exports, "parseISO", ({ + enumerable: true, + get: function get() { + return _index176.default; + } +})); +Object.defineProperty(exports, "parseJSON", ({ + enumerable: true, + get: function get() { + return _index177.default; + } +})); +Object.defineProperty(exports, "previousDay", ({ + enumerable: true, + get: function get() { + return _index178.default; + } +})); +Object.defineProperty(exports, "previousFriday", ({ + enumerable: true, + get: function get() { + return _index179.default; + } +})); +Object.defineProperty(exports, "previousMonday", ({ + enumerable: true, + get: function get() { + return _index180.default; + } +})); +Object.defineProperty(exports, "previousSaturday", ({ + enumerable: true, + get: function get() { + return _index181.default; + } +})); +Object.defineProperty(exports, "previousSunday", ({ + enumerable: true, + get: function get() { + return _index182.default; + } +})); +Object.defineProperty(exports, "previousThursday", ({ + enumerable: true, + get: function get() { + return _index183.default; + } +})); +Object.defineProperty(exports, "previousTuesday", ({ + enumerable: true, + get: function get() { + return _index184.default; + } +})); +Object.defineProperty(exports, "previousWednesday", ({ + enumerable: true, + get: function get() { + return _index185.default; + } +})); +Object.defineProperty(exports, "quartersToMonths", ({ + enumerable: true, + get: function get() { + return _index186.default; + } +})); +Object.defineProperty(exports, "quartersToYears", ({ + enumerable: true, + get: function get() { + return _index187.default; + } +})); +Object.defineProperty(exports, "roundToNearestMinutes", ({ + enumerable: true, + get: function get() { + return _index188.default; + } +})); +Object.defineProperty(exports, "secondsToHours", ({ + enumerable: true, + get: function get() { + return _index189.default; + } +})); +Object.defineProperty(exports, "secondsToMilliseconds", ({ + enumerable: true, + get: function get() { + return _index190.default; + } +})); +Object.defineProperty(exports, "secondsToMinutes", ({ + enumerable: true, + get: function get() { + return _index191.default; + } +})); +Object.defineProperty(exports, "set", ({ + enumerable: true, + get: function get() { + return _index192.default; + } +})); +Object.defineProperty(exports, "setDate", ({ + enumerable: true, + get: function get() { + return _index193.default; + } +})); +Object.defineProperty(exports, "setDay", ({ + enumerable: true, + get: function get() { + return _index194.default; + } +})); +Object.defineProperty(exports, "setDayOfYear", ({ + enumerable: true, + get: function get() { + return _index195.default; + } +})); +Object.defineProperty(exports, "setDefaultOptions", ({ + enumerable: true, + get: function get() { + return _index196.default; + } +})); +Object.defineProperty(exports, "setHours", ({ + enumerable: true, + get: function get() { + return _index197.default; + } +})); +Object.defineProperty(exports, "setISODay", ({ + enumerable: true, + get: function get() { + return _index198.default; + } +})); +Object.defineProperty(exports, "setISOWeek", ({ + enumerable: true, + get: function get() { + return _index199.default; + } +})); +Object.defineProperty(exports, "setISOWeekYear", ({ + enumerable: true, + get: function get() { + return _index200.default; + } +})); +Object.defineProperty(exports, "setMilliseconds", ({ + enumerable: true, + get: function get() { + return _index201.default; + } +})); +Object.defineProperty(exports, "setMinutes", ({ + enumerable: true, + get: function get() { + return _index202.default; + } +})); +Object.defineProperty(exports, "setMonth", ({ + enumerable: true, + get: function get() { + return _index203.default; + } +})); +Object.defineProperty(exports, "setQuarter", ({ + enumerable: true, + get: function get() { + return _index204.default; + } +})); +Object.defineProperty(exports, "setSeconds", ({ + enumerable: true, + get: function get() { + return _index205.default; + } +})); +Object.defineProperty(exports, "setWeek", ({ + enumerable: true, + get: function get() { + return _index206.default; + } +})); +Object.defineProperty(exports, "setWeekYear", ({ + enumerable: true, + get: function get() { + return _index207.default; + } +})); +Object.defineProperty(exports, "setYear", ({ + enumerable: true, + get: function get() { + return _index208.default; + } +})); +Object.defineProperty(exports, "startOfDay", ({ + enumerable: true, + get: function get() { + return _index209.default; + } +})); +Object.defineProperty(exports, "startOfDecade", ({ + enumerable: true, + get: function get() { + return _index210.default; + } +})); +Object.defineProperty(exports, "startOfHour", ({ + enumerable: true, + get: function get() { + return _index211.default; + } +})); +Object.defineProperty(exports, "startOfISOWeek", ({ + enumerable: true, + get: function get() { + return _index212.default; + } +})); +Object.defineProperty(exports, "startOfISOWeekYear", ({ + enumerable: true, + get: function get() { + return _index213.default; + } +})); +Object.defineProperty(exports, "startOfMinute", ({ + enumerable: true, + get: function get() { + return _index214.default; + } +})); +Object.defineProperty(exports, "startOfMonth", ({ + enumerable: true, + get: function get() { + return _index215.default; + } +})); +Object.defineProperty(exports, "startOfQuarter", ({ + enumerable: true, + get: function get() { + return _index216.default; + } +})); +Object.defineProperty(exports, "startOfSecond", ({ + enumerable: true, + get: function get() { + return _index217.default; + } +})); +Object.defineProperty(exports, "startOfToday", ({ + enumerable: true, + get: function get() { + return _index218.default; + } +})); +Object.defineProperty(exports, "startOfTomorrow", ({ + enumerable: true, + get: function get() { + return _index219.default; + } +})); +Object.defineProperty(exports, "startOfWeek", ({ + enumerable: true, + get: function get() { + return _index220.default; + } +})); +Object.defineProperty(exports, "startOfWeekYear", ({ + enumerable: true, + get: function get() { + return _index221.default; + } +})); +Object.defineProperty(exports, "startOfYear", ({ + enumerable: true, + get: function get() { + return _index222.default; + } +})); +Object.defineProperty(exports, "startOfYesterday", ({ + enumerable: true, + get: function get() { + return _index223.default; + } +})); +Object.defineProperty(exports, "sub", ({ + enumerable: true, + get: function get() { + return _index224.default; + } +})); +Object.defineProperty(exports, "subBusinessDays", ({ + enumerable: true, + get: function get() { + return _index225.default; + } +})); +Object.defineProperty(exports, "subDays", ({ + enumerable: true, + get: function get() { + return _index226.default; + } +})); +Object.defineProperty(exports, "subHours", ({ + enumerable: true, + get: function get() { + return _index227.default; + } +})); +Object.defineProperty(exports, "subISOWeekYears", ({ + enumerable: true, + get: function get() { + return _index228.default; + } +})); +Object.defineProperty(exports, "subMilliseconds", ({ + enumerable: true, + get: function get() { + return _index229.default; + } +})); +Object.defineProperty(exports, "subMinutes", ({ + enumerable: true, + get: function get() { + return _index230.default; + } +})); +Object.defineProperty(exports, "subMonths", ({ + enumerable: true, + get: function get() { + return _index231.default; + } +})); +Object.defineProperty(exports, "subQuarters", ({ + enumerable: true, + get: function get() { + return _index232.default; + } +})); +Object.defineProperty(exports, "subSeconds", ({ + enumerable: true, + get: function get() { + return _index233.default; + } +})); +Object.defineProperty(exports, "subWeeks", ({ + enumerable: true, + get: function get() { + return _index234.default; + } +})); +Object.defineProperty(exports, "subYears", ({ + enumerable: true, + get: function get() { + return _index235.default; + } +})); +Object.defineProperty(exports, "toDate", ({ + enumerable: true, + get: function get() { + return _index236.default; + } +})); +Object.defineProperty(exports, "weeksToDays", ({ + enumerable: true, + get: function get() { + return _index237.default; + } +})); +Object.defineProperty(exports, "yearsToMonths", ({ + enumerable: true, + get: function get() { + return _index238.default; + } +})); +Object.defineProperty(exports, "yearsToQuarters", ({ + enumerable: true, + get: function get() { + return _index239.default; + } +})); + +var _index = _interopRequireDefault(__nccwpck_require__(6211)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(1727)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(6227)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(9956)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(5318)); + +var _index6 = _interopRequireDefault(__nccwpck_require__(524)); + +var _index7 = _interopRequireDefault(__nccwpck_require__(5268)); + +var _index8 = _interopRequireDefault(__nccwpck_require__(2995)); + +var _index9 = _interopRequireDefault(__nccwpck_require__(5149)); + +var _index10 = _interopRequireDefault(__nccwpck_require__(4112)); + +var _index11 = _interopRequireDefault(__nccwpck_require__(7195)); + +var _index12 = _interopRequireDefault(__nccwpck_require__(3367)); + +var _index13 = _interopRequireDefault(__nccwpck_require__(2282)); + +var _index14 = _interopRequireDefault(__nccwpck_require__(9660)); + +var _index15 = _interopRequireDefault(__nccwpck_require__(2264)); + +var _index16 = _interopRequireDefault(__nccwpck_require__(2013)); + +var _index17 = _interopRequireDefault(__nccwpck_require__(9818)); + +var _index18 = _interopRequireDefault(__nccwpck_require__(7783)); + +var _index19 = _interopRequireDefault(__nccwpck_require__(6237)); + +var _index20 = _interopRequireDefault(__nccwpck_require__(4734)); + +var _index21 = _interopRequireDefault(__nccwpck_require__(3086)); + +var _index22 = _interopRequireDefault(__nccwpck_require__(6778)); + +var _index23 = _interopRequireDefault(__nccwpck_require__(1656)); + +var _index24 = _interopRequireDefault(__nccwpck_require__(5536)); + +var _index25 = _interopRequireDefault(__nccwpck_require__(2342)); + +var _index26 = _interopRequireDefault(__nccwpck_require__(8620)); + +var _index27 = _interopRequireDefault(__nccwpck_require__(5237)); + +var _index28 = _interopRequireDefault(__nccwpck_require__(6311)); + +var _index29 = _interopRequireDefault(__nccwpck_require__(8740)); + +var _index30 = _interopRequireDefault(__nccwpck_require__(8815)); + +var _index31 = _interopRequireDefault(__nccwpck_require__(2288)); + +var _index32 = _interopRequireDefault(__nccwpck_require__(3842)); + +var _index33 = _interopRequireDefault(__nccwpck_require__(2713)); + +var _index34 = _interopRequireDefault(__nccwpck_require__(7074)); + +var _index35 = _interopRequireDefault(__nccwpck_require__(9448)); + +var _index36 = _interopRequireDefault(__nccwpck_require__(2701)); + +var _index37 = _interopRequireDefault(__nccwpck_require__(3959)); + +var _index38 = _interopRequireDefault(__nccwpck_require__(6545)); + +var _index39 = _interopRequireDefault(__nccwpck_require__(6802)); + +var _index40 = _interopRequireDefault(__nccwpck_require__(2029)); + +var _index41 = _interopRequireDefault(__nccwpck_require__(5879)); + +var _index42 = _interopRequireDefault(__nccwpck_require__(6516)); + +var _index43 = _interopRequireDefault(__nccwpck_require__(5994)); + +var _index44 = _interopRequireDefault(__nccwpck_require__(1944)); + +var _index45 = _interopRequireDefault(__nccwpck_require__(3973)); + +var _index46 = _interopRequireDefault(__nccwpck_require__(7961)); + +var _index47 = _interopRequireDefault(__nccwpck_require__(6525)); + +var _index48 = _interopRequireDefault(__nccwpck_require__(8569)); + +var _index49 = _interopRequireDefault(__nccwpck_require__(1517)); + +var _index50 = _interopRequireDefault(__nccwpck_require__(1894)); + +var _index51 = _interopRequireDefault(__nccwpck_require__(1920)); + +var _index52 = _interopRequireDefault(__nccwpck_require__(9731)); + +var _index53 = _interopRequireDefault(__nccwpck_require__(1389)); + +var _index54 = _interopRequireDefault(__nccwpck_require__(2621)); + +var _index55 = _interopRequireDefault(__nccwpck_require__(5596)); + +var _index56 = _interopRequireDefault(__nccwpck_require__(6121)); + +var _index57 = _interopRequireDefault(__nccwpck_require__(5700)); + +var _index58 = _interopRequireDefault(__nccwpck_require__(6935)); + +var _index59 = _interopRequireDefault(__nccwpck_require__(5218)); + +var _index60 = _interopRequireDefault(__nccwpck_require__(7079)); + +var _index61 = _interopRequireDefault(__nccwpck_require__(66)); + +var _index62 = _interopRequireDefault(__nccwpck_require__(2168)); + +var _index63 = _interopRequireDefault(__nccwpck_require__(8149)); + +var _index64 = _interopRequireDefault(__nccwpck_require__(7128)); + +var _index65 = _interopRequireDefault(__nccwpck_require__(1163)); + +var _index66 = _interopRequireDefault(__nccwpck_require__(4741)); + +var _index67 = _interopRequireDefault(__nccwpck_require__(8917)); + +var _index68 = _interopRequireDefault(__nccwpck_require__(3385)); + +var _index69 = _interopRequireDefault(__nccwpck_require__(5296)); + +var _index70 = _interopRequireDefault(__nccwpck_require__(2448)); + +var _index71 = _interopRequireDefault(__nccwpck_require__(4182)); + +var _index72 = _interopRequireDefault(__nccwpck_require__(402)); + +var _index73 = _interopRequireDefault(__nccwpck_require__(675)); + +var _index74 = _interopRequireDefault(__nccwpck_require__(4897)); + +var _index75 = _interopRequireDefault(__nccwpck_require__(7626)); + +var _index76 = _interopRequireDefault(__nccwpck_require__(9361)); + +var _index77 = _interopRequireDefault(__nccwpck_require__(7468)); + +var _index78 = _interopRequireDefault(__nccwpck_require__(7573)); + +var _index79 = _interopRequireDefault(__nccwpck_require__(2784)); + +var _index80 = _interopRequireDefault(__nccwpck_require__(9322)); + +var _index81 = _interopRequireDefault(__nccwpck_require__(5795)); + +var _index82 = _interopRequireDefault(__nccwpck_require__(7941)); + +var _index83 = _interopRequireDefault(__nccwpck_require__(8313)); + +var _index84 = _interopRequireDefault(__nccwpck_require__(9894)); + +var _index85 = _interopRequireDefault(__nccwpck_require__(6991)); + +var _index86 = _interopRequireDefault(__nccwpck_require__(5438)); + +var _index87 = _interopRequireDefault(__nccwpck_require__(7560)); + +var _index88 = _interopRequireDefault(__nccwpck_require__(7030)); + +var _index89 = _interopRequireDefault(__nccwpck_require__(2194)); + +var _index90 = _interopRequireDefault(__nccwpck_require__(7647)); + +var _index91 = _interopRequireDefault(__nccwpck_require__(4523)); + +var _index92 = _interopRequireDefault(__nccwpck_require__(8755)); + +var _index93 = _interopRequireDefault(__nccwpck_require__(5052)); + +var _index94 = _interopRequireDefault(__nccwpck_require__(6476)); + +var _index95 = _interopRequireDefault(__nccwpck_require__(81)); + +var _index96 = _interopRequireDefault(__nccwpck_require__(9229)); + +var _index97 = _interopRequireDefault(__nccwpck_require__(3494)); + +var _index98 = _interopRequireDefault(__nccwpck_require__(9482)); + +var _index99 = _interopRequireDefault(__nccwpck_require__(5714)); + +var _index100 = _interopRequireDefault(__nccwpck_require__(3895)); + +var _index101 = _interopRequireDefault(__nccwpck_require__(2449)); + +var _index102 = _interopRequireDefault(__nccwpck_require__(775)); + +var _index103 = _interopRequireDefault(__nccwpck_require__(2079)); + +var _index104 = _interopRequireDefault(__nccwpck_require__(1982)); + +var _index105 = _interopRequireDefault(__nccwpck_require__(3858)); + +var _index106 = _interopRequireDefault(__nccwpck_require__(2755)); + +var _index107 = _interopRequireDefault(__nccwpck_require__(9369)); + +var _index108 = _interopRequireDefault(__nccwpck_require__(6801)); + +var _index109 = _interopRequireDefault(__nccwpck_require__(4669)); + +var _index110 = _interopRequireDefault(__nccwpck_require__(7352)); + +var _index111 = _interopRequireDefault(__nccwpck_require__(5387)); + +var _index112 = _interopRequireDefault(__nccwpck_require__(1758)); + +var _index113 = _interopRequireDefault(__nccwpck_require__(6803)); + +var _index114 = _interopRequireDefault(__nccwpck_require__(8506)); + +var _index115 = _interopRequireDefault(__nccwpck_require__(74)); + +var _index116 = _interopRequireDefault(__nccwpck_require__(525)); + +var _index117 = _interopRequireDefault(__nccwpck_require__(6030)); + +var _index118 = _interopRequireDefault(__nccwpck_require__(9543)); + +var _index119 = _interopRequireDefault(__nccwpck_require__(2154)); + +var _index120 = _interopRequireDefault(__nccwpck_require__(2489)); + +var _index121 = _interopRequireDefault(__nccwpck_require__(9852)); + +var _index122 = _interopRequireDefault(__nccwpck_require__(3944)); + +var _index123 = _interopRequireDefault(__nccwpck_require__(3197)); + +var _index124 = _interopRequireDefault(__nccwpck_require__(5421)); + +var _index125 = _interopRequireDefault(__nccwpck_require__(938)); + +var _index126 = _interopRequireDefault(__nccwpck_require__(1988)); + +var _index127 = _interopRequireDefault(__nccwpck_require__(7013)); + +var _index128 = _interopRequireDefault(__nccwpck_require__(9821)); + +var _index129 = _interopRequireDefault(__nccwpck_require__(6308)); + +var _index130 = _interopRequireDefault(__nccwpck_require__(5852)); + +var _index131 = _interopRequireDefault(__nccwpck_require__(4078)); + +var _index132 = _interopRequireDefault(__nccwpck_require__(6065)); + +var _index133 = _interopRequireDefault(__nccwpck_require__(3413)); + +var _index134 = _interopRequireDefault(__nccwpck_require__(1157)); + +var _index135 = _interopRequireDefault(__nccwpck_require__(547)); + +var _index136 = _interopRequireDefault(__nccwpck_require__(4641)); + +var _index137 = _interopRequireDefault(__nccwpck_require__(2373)); + +var _index138 = _interopRequireDefault(__nccwpck_require__(856)); + +var _index139 = _interopRequireDefault(__nccwpck_require__(4350)); + +var _index140 = _interopRequireDefault(__nccwpck_require__(7185)); + +var _index141 = _interopRequireDefault(__nccwpck_require__(3014)); + +var _index142 = _interopRequireDefault(__nccwpck_require__(8235)); + +var _index143 = _interopRequireDefault(__nccwpck_require__(9920)); + +var _index144 = _interopRequireDefault(__nccwpck_require__(9218)); + +var _index145 = _interopRequireDefault(__nccwpck_require__(403)); + +var _index146 = _interopRequireDefault(__nccwpck_require__(4419)); + +var _index147 = _interopRequireDefault(__nccwpck_require__(9583)); + +var _index148 = _interopRequireDefault(__nccwpck_require__(4864)); + +var _index149 = _interopRequireDefault(__nccwpck_require__(7692)); + +var _index150 = _interopRequireDefault(__nccwpck_require__(217)); + +var _index151 = _interopRequireDefault(__nccwpck_require__(3346)); + +var _index152 = _interopRequireDefault(__nccwpck_require__(8635)); + +var _index153 = _interopRequireDefault(__nccwpck_require__(666)); + +var _index154 = _interopRequireDefault(__nccwpck_require__(9771)); + +var _index155 = _interopRequireDefault(__nccwpck_require__(4018)); + +var _index156 = _interopRequireDefault(__nccwpck_require__(5815)); + +var _index157 = _interopRequireDefault(__nccwpck_require__(6133)); + +var _index158 = _interopRequireDefault(__nccwpck_require__(9571)); + +var _index159 = _interopRequireDefault(__nccwpck_require__(5419)); + +var _index160 = _interopRequireDefault(__nccwpck_require__(2294)); + +var _index161 = _interopRequireDefault(__nccwpck_require__(5310)); + +var _index162 = _interopRequireDefault(__nccwpck_require__(2516)); + +var _index163 = _interopRequireDefault(__nccwpck_require__(1886)); + +var _index164 = _interopRequireDefault(__nccwpck_require__(8192)); + +var _index165 = _interopRequireDefault(__nccwpck_require__(1142)); + +var _index166 = _interopRequireDefault(__nccwpck_require__(3757)); + +var _index167 = _interopRequireDefault(__nccwpck_require__(6771)); + +var _index168 = _interopRequireDefault(__nccwpck_require__(1491)); + +var _index169 = _interopRequireDefault(__nccwpck_require__(5947)); + +var _index170 = _interopRequireDefault(__nccwpck_require__(363)); + +var _index171 = _interopRequireDefault(__nccwpck_require__(7266)); + +var _index172 = _interopRequireDefault(__nccwpck_require__(9457)); + +var _index173 = _interopRequireDefault(__nccwpck_require__(7894)); + +var _index174 = _interopRequireDefault(__nccwpck_require__(29)); + +var _index175 = _interopRequireDefault(__nccwpck_require__(1287)); + +var _index176 = _interopRequireDefault(__nccwpck_require__(3390)); + +var _index177 = _interopRequireDefault(__nccwpck_require__(8159)); + +var _index178 = _interopRequireDefault(__nccwpck_require__(8756)); + +var _index179 = _interopRequireDefault(__nccwpck_require__(9558)); + +var _index180 = _interopRequireDefault(__nccwpck_require__(8386)); + +var _index181 = _interopRequireDefault(__nccwpck_require__(4834)); + +var _index182 = _interopRequireDefault(__nccwpck_require__(264)); + +var _index183 = _interopRequireDefault(__nccwpck_require__(19)); + +var _index184 = _interopRequireDefault(__nccwpck_require__(3294)); + +var _index185 = _interopRequireDefault(__nccwpck_require__(8630)); + +var _index186 = _interopRequireDefault(__nccwpck_require__(8995)); + +var _index187 = _interopRequireDefault(__nccwpck_require__(883)); + +var _index188 = _interopRequireDefault(__nccwpck_require__(5515)); + +var _index189 = _interopRequireDefault(__nccwpck_require__(594)); + +var _index190 = _interopRequireDefault(__nccwpck_require__(6779)); + +var _index191 = _interopRequireDefault(__nccwpck_require__(8438)); + +var _index192 = _interopRequireDefault(__nccwpck_require__(2031)); + +var _index193 = _interopRequireDefault(__nccwpck_require__(8760)); + +var _index194 = _interopRequireDefault(__nccwpck_require__(9540)); + +var _index195 = _interopRequireDefault(__nccwpck_require__(4002)); + +var _index196 = _interopRequireDefault(__nccwpck_require__(54)); + +var _index197 = _interopRequireDefault(__nccwpck_require__(6355)); + +var _index198 = _interopRequireDefault(__nccwpck_require__(3705)); + +var _index199 = _interopRequireDefault(__nccwpck_require__(3035)); + +var _index200 = _interopRequireDefault(__nccwpck_require__(822)); + +var _index201 = _interopRequireDefault(__nccwpck_require__(9105)); + +var _index202 = _interopRequireDefault(__nccwpck_require__(9207)); + +var _index203 = _interopRequireDefault(__nccwpck_require__(847)); + +var _index204 = _interopRequireDefault(__nccwpck_require__(621)); + +var _index205 = _interopRequireDefault(__nccwpck_require__(1346)); + +var _index206 = _interopRequireDefault(__nccwpck_require__(2664)); + +var _index207 = _interopRequireDefault(__nccwpck_require__(3438)); + +var _index208 = _interopRequireDefault(__nccwpck_require__(6212)); + +var _index209 = _interopRequireDefault(__nccwpck_require__(1868)); + +var _index210 = _interopRequireDefault(__nccwpck_require__(2025)); + +var _index211 = _interopRequireDefault(__nccwpck_require__(6277)); + +var _index212 = _interopRequireDefault(__nccwpck_require__(6307)); + +var _index213 = _interopRequireDefault(__nccwpck_require__(776)); + +var _index214 = _interopRequireDefault(__nccwpck_require__(8567)); + +var _index215 = _interopRequireDefault(__nccwpck_require__(7182)); + +var _index216 = _interopRequireDefault(__nccwpck_require__(2932)); + +var _index217 = _interopRequireDefault(__nccwpck_require__(6738)); + +var _index218 = _interopRequireDefault(__nccwpck_require__(5516)); + +var _index219 = _interopRequireDefault(__nccwpck_require__(2442)); + +var _index220 = _interopRequireDefault(__nccwpck_require__(9813)); + +var _index221 = _interopRequireDefault(__nccwpck_require__(8014)); + +var _index222 = _interopRequireDefault(__nccwpck_require__(8225)); + +var _index223 = _interopRequireDefault(__nccwpck_require__(1672)); + +var _index224 = _interopRequireDefault(__nccwpck_require__(3875)); + +var _index225 = _interopRequireDefault(__nccwpck_require__(1952)); + +var _index226 = _interopRequireDefault(__nccwpck_require__(970)); + +var _index227 = _interopRequireDefault(__nccwpck_require__(2481)); + +var _index228 = _interopRequireDefault(__nccwpck_require__(3925)); + +var _index229 = _interopRequireDefault(__nccwpck_require__(7923)); + +var _index230 = _interopRequireDefault(__nccwpck_require__(7535)); + +var _index231 = _interopRequireDefault(__nccwpck_require__(6752)); + +var _index232 = _interopRequireDefault(__nccwpck_require__(3139)); + +var _index233 = _interopRequireDefault(__nccwpck_require__(138)); + +var _index234 = _interopRequireDefault(__nccwpck_require__(5504)); + +var _index235 = _interopRequireDefault(__nccwpck_require__(843)); + +var _index236 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index237 = _interopRequireDefault(__nccwpck_require__(6812)); + +var _index238 = _interopRequireDefault(__nccwpck_require__(4616)); + +var _index239 = _interopRequireDefault(__nccwpck_require__(7384)); + +var _index240 = __nccwpck_require__(5756); + +Object.keys(_index240).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _index240[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _index240[key]; + } + }); +}); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/***/ }), + +/***/ 2079: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = intervalToDuration; + +var _index = _interopRequireDefault(__nccwpck_require__(9818)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6211)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(6311)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(8740)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(3842)); + +var _index6 = _interopRequireDefault(__nccwpck_require__(2713)); + +var _index7 = _interopRequireDefault(__nccwpck_require__(9448)); + +var _index8 = _interopRequireDefault(__nccwpck_require__(3959)); + +var _index9 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index10 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name intervalToDuration + * @category Common Helpers + * @summary Convert interval to duration + * + * @description + * Convert a interval object to a duration object. + * + * @param {Interval} interval - the interval to convert to duration + * + * @returns {Duration} The duration Object + * @throws {TypeError} Requires 2 arguments + * @throws {RangeError} `start` must not be Invalid Date + * @throws {RangeError} `end` must not be Invalid Date + * + * @example + * // Get the duration between January 15, 1929 and April 4, 1968. + * intervalToDuration({ + * start: new Date(1929, 0, 15, 12, 0, 0), + * end: new Date(1968, 3, 4, 19, 5, 0) + * }) + * // => { years: 39, months: 2, days: 20, hours: 7, minutes: 5, seconds: 0 } + */ +function intervalToDuration(interval) { + (0, _index10.default)(1, arguments); + var start = (0, _index9.default)(interval.start); + var end = (0, _index9.default)(interval.end); + if (isNaN(start.getTime())) throw new RangeError('Start Date is invalid'); + if (isNaN(end.getTime())) throw new RangeError('End Date is invalid'); + var duration = {}; + duration.years = Math.abs((0, _index8.default)(end, start)); + var sign = (0, _index.default)(end, start); + var remainingMonths = (0, _index2.default)(start, { + years: sign * duration.years + }); + duration.months = Math.abs((0, _index6.default)(end, remainingMonths)); + var remainingDays = (0, _index2.default)(remainingMonths, { + months: sign * duration.months + }); + duration.days = Math.abs((0, _index3.default)(end, remainingDays)); + var remainingHours = (0, _index2.default)(remainingDays, { + days: sign * duration.days + }); + duration.hours = Math.abs((0, _index4.default)(end, remainingHours)); + var remainingMinutes = (0, _index2.default)(remainingHours, { + hours: sign * duration.hours + }); + duration.minutes = Math.abs((0, _index5.default)(end, remainingMinutes)); + var remainingSeconds = (0, _index2.default)(remainingMinutes, { + minutes: sign * duration.minutes + }); + duration.seconds = Math.abs((0, _index7.default)(end, remainingSeconds)); + return duration; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1982: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = intlFormat; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name intlFormat + * @category Common Helpers + * @summary Format the date with Intl.DateTimeFormat (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat). + * + * @description + * Return the formatted date string in the given format. + * The method uses [`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) inside. + * formatOptions are the same as [`Intl.DateTimeFormat` options](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options) + * + * > ⚠️ Please note that before Node version 13.0.0, only the locale data for en-US is available by default. + * + * @param {Date|Number} argument - the original date. + * @param {Object} [formatOptions] - an object with options. + * @param {'lookup'|'best fit'} [formatOptions.localeMatcher='best fit'] - locale selection algorithm. + * @param {'narrow'|'short'|'long'} [formatOptions.weekday] - representation the days of the week. + * @param {'narrow'|'short'|'long'} [formatOptions.era] - representation of eras. + * @param {'numeric'|'2-digit'} [formatOptions.year] - representation of years. + * @param {'numeric'|'2-digit'|'narrow'|'short'|'long'} [formatOptions.month='numeric'] - representation of month. + * @param {'numeric'|'2-digit'} [formatOptions.day='numeric'] - representation of day. + * @param {'numeric'|'2-digit'} [formatOptions.hour='numeric'] - representation of hours. + * @param {'numeric'|'2-digit'} [formatOptions.minute] - representation of minutes. + * @param {'numeric'|'2-digit'} [formatOptions.second] - representation of seconds. + * @param {'short'|'long'} [formatOptions.timeZoneName] - representation of names of time zones. + * @param {'basic'|'best fit'} [formatOptions.formatMatcher='best fit'] - format selection algorithm. + * @param {Boolean} [formatOptions.hour12] - determines whether to use 12-hour time format. + * @param {String} [formatOptions.timeZone] - the time zone to use. + * @param {Object} [localeOptions] - an object with locale. + * @param {String|String[]} [localeOptions.locale] - the locale code + * @returns {String} the formatted date string. + * @throws {TypeError} 1 argument required. + * @throws {RangeError} `date` must not be Invalid Date + * + * @example + * // Represent 10 October 2019 in German. + * // Convert the date with format's options and locale's options. + * const result = intlFormat(new Date(2019, 9, 4, 12, 30, 13, 456), { + * weekday: 'long', + * year: 'numeric', + * month: 'long', + * day: 'numeric', + * }, { + * locale: 'de-DE', + * }) + * //=> Freitag, 4. Oktober 2019 + * + * @example + * // Represent 10 October 2019. + * // Convert the date with format's options. + * const result = intlFormat.default(new Date(2019, 9, 4, 12, 30, 13, 456), { + * year: 'numeric', + * month: 'numeric', + * day: 'numeric', + * hour: 'numeric', + * }) + * //=> 10/4/2019, 12 PM + * + * @example + * // Represent 10 October 2019 in Korean. + * // Convert the date with locale's options. + * const result = intlFormat(new Date(2019, 9, 4, 12, 30, 13, 456), { + * locale: 'ko-KR', + * }) + * //=> 2019. 10. 4. + * + * @example + * // Represent 10 October 2019 in middle-endian format: + * const result = intlFormat(new Date(2019, 9, 4, 12, 30, 13, 456)) + * //=> 10/4/2019 + */ +function intlFormat(date, formatOrLocale, localeOptions) { + var _localeOptions; + + (0, _index.default)(1, arguments); + var formatOptions; + + if (isFormatOptions(formatOrLocale)) { + formatOptions = formatOrLocale; + } else { + localeOptions = formatOrLocale; + } + + return new Intl.DateTimeFormat((_localeOptions = localeOptions) === null || _localeOptions === void 0 ? void 0 : _localeOptions.locale, formatOptions).format(date); +} + +function isFormatOptions(opts) { + return opts !== undefined && !('locale' in opts); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3858: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = intlFormatDistance; + +var _index = __nccwpck_require__(5756); + +var _index2 = _interopRequireDefault(__nccwpck_require__(3086)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(5536)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2342)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(8620)); + +var _index6 = _interopRequireDefault(__nccwpck_require__(5237)); + +var _index7 = _interopRequireDefault(__nccwpck_require__(8740)); + +var _index8 = _interopRequireDefault(__nccwpck_require__(3842)); + +var _index9 = _interopRequireDefault(__nccwpck_require__(9448)); + +var _index10 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index11 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name intlFormatDistance + * @category Common Helpers + * @summary Formats distance between two dates in a human-readable format + * @description + * The function calculates the difference between two dates and formats it as a human-readable string. + * + * The function will pick the most appropriate unit depending on the distance between dates. For example, if the distance is a few hours, it might return `x hours`. If the distance is a few months, it might return `x months`. + * + * You can also specify a unit to force using it regardless of the distance to get a result like `123456 hours`. + * + * See the table below for the unit picking logic: + * + * | Distance between dates | Result (past) | Result (future) | + * | ---------------------- | -------------- | --------------- | + * | 0 seconds | now | now | + * | 1-59 seconds | X seconds ago | in X seconds | + * | 1-59 minutes | X minutes ago | in X minutes | + * | 1-23 hours | X hours ago | in X hours | + * | 1 day | yesterday | tomorrow | + * | 2-6 days | X days ago | in X days | + * | 7 days | last week | next week | + * | 8 days-1 month | X weeks ago | in X weeks | + * | 1 month | last month | next month | + * | 2-3 months | X months ago | in X months | + * | 1 quarter | last quarter | next quarter | + * | 2-3 quarters | X quarters ago | in X quarters | + * | 1 year | last year | next year | + * | 2+ years | X years ago | in X years | + * + * @param {Date|Number} date - the date + * @param {Date|Number} baseDate - the date to compare with. + * @param {Object} [options] - an object with options. + * @param {String} [options.unit] - formats the distance with the given unit ('year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second'). + * @param {String|String[]} [options.locale] - the locale to use. + * @param {String} [options.localeMatcher='best fit'] - the locale matching algorithm to use. Other value: 'lookup'. + * See MDN for details [Locale identification and negotiation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * @param {String} [options.numeric='auto'] - the output message format. The values are 'auto' (e.g. `yesterday`), 'always'(e.g. `1 day ago`). + * @param {String} [options.style='long'] - the length of the result. The values are: 'long' (e.g. `1 month`), 'short' (e.g. 'in 1 mo.'), 'narrow' (e.g. 'in 1 mo.'). + * The narrow one could be similar to the short one for some locales. + * @returns {String} the distance in words according to language-sensitive relative time formatting. + * @throws {TypeError} 2 arguments required + * @throws {RangeError} `date` must not be Invalid Date + * @throws {RangeError} `baseDate` must not be Invalid Date + * @throws {RangeError} `options.unit` must not be invalid Unit + * @throws {RangeError} `options.locale` must not be invalid locale + * @throws {RangeError} `options.localeMatcher` must not be invalid localeMatcher + * @throws {RangeError} `options.numeric` must not be invalid numeric + * @throws {RangeError} `options.style` must not be invalid style + * + * @example + * // What is the distance between the dates when the fist date is after the second? + * intlFormatDistance( + * new Date(1986, 3, 4, 11, 30, 0), + * new Date(1986, 3, 4, 10, 30, 0) + * ) + * //=> 'in 1 hour' + * + * // What is the distance between the dates when the fist date is before the second? + * intlFormatDistance( + * new Date(1986, 3, 4, 10, 30, 0), + * new Date(1986, 3, 4, 11, 30, 0) + * ) + * //=> '1 hour ago' + * + * @example + * // Use the unit option to force the function to output the result in quarters. Without setting it, the example would return "next year" + * intlFormatDistance( + * new Date(1987, 6, 4, 10, 30, 0), + * new Date(1986, 3, 4, 10, 30, 0), + * { unit: 'quarter' } + * ) + * //=> 'in 5 quarters' + * + * @example + * // Use the locale option to get the result in Spanish. Without setting it, the example would return "in 1 hour". + * intlFormatDistance( + * new Date(1986, 3, 4, 11, 30, 0), + * new Date(1986, 3, 4, 10, 30, 0), + * { locale: 'es' } + * ) + * //=> 'dentro de 1 hora' + * + * @example + * // Use the numeric option to force the function to use numeric values. Without setting it, the example would return "tomorrow". + * intlFormatDistance( + * new Date(1986, 3, 5, 11, 30, 0), + * new Date(1986, 3, 4, 11, 30, 0), + * { numeric: 'always' } + * ) + * //=> 'in 1 day' + * + * @example + * // Use the style option to force the function to use short values. Without setting it, the example would return "in 2 years". + * intlFormatDistance( + * new Date(1988, 3, 4, 11, 30, 0), + * new Date(1986, 3, 4, 11, 30, 0), + * { style: 'short' } + * ) + * //=> 'in 2 yr' + */ +function intlFormatDistance(date, baseDate, options) { + (0, _index11.default)(2, arguments); + var value = 0; + var unit; + var dateLeft = (0, _index10.default)(date); + var dateRight = (0, _index10.default)(baseDate); + + if (!(options !== null && options !== void 0 && options.unit)) { + // Get the unit based on diffInSeconds calculations if no unit is specified + var diffInSeconds = (0, _index9.default)(dateLeft, dateRight); // The smallest unit + + if (Math.abs(diffInSeconds) < _index.secondsInMinute) { + value = (0, _index9.default)(dateLeft, dateRight); + unit = 'second'; + } else if (Math.abs(diffInSeconds) < _index.secondsInHour) { + value = (0, _index8.default)(dateLeft, dateRight); + unit = 'minute'; + } else if (Math.abs(diffInSeconds) < _index.secondsInDay && Math.abs((0, _index2.default)(dateLeft, dateRight)) < 1) { + value = (0, _index7.default)(dateLeft, dateRight); + unit = 'hour'; + } else if (Math.abs(diffInSeconds) < _index.secondsInWeek && (value = (0, _index2.default)(dateLeft, dateRight)) && Math.abs(value) < 7) { + unit = 'day'; + } else if (Math.abs(diffInSeconds) < _index.secondsInMonth) { + value = (0, _index5.default)(dateLeft, dateRight); + unit = 'week'; + } else if (Math.abs(diffInSeconds) < _index.secondsInQuarter) { + value = (0, _index3.default)(dateLeft, dateRight); + unit = 'month'; + } else if (Math.abs(diffInSeconds) < _index.secondsInYear) { + if ((0, _index4.default)(dateLeft, dateRight) < 4) { + // To filter out cases that are less than a year but match 4 quarters + value = (0, _index4.default)(dateLeft, dateRight); + unit = 'quarter'; + } else { + value = (0, _index6.default)(dateLeft, dateRight); + unit = 'year'; + } + } else { + value = (0, _index6.default)(dateLeft, dateRight); + unit = 'year'; + } + } else { + // Get the value if unit is specified + unit = options === null || options === void 0 ? void 0 : options.unit; + + if (unit === 'second') { + value = (0, _index9.default)(dateLeft, dateRight); + } else if (unit === 'minute') { + value = (0, _index8.default)(dateLeft, dateRight); + } else if (unit === 'hour') { + value = (0, _index7.default)(dateLeft, dateRight); + } else if (unit === 'day') { + value = (0, _index2.default)(dateLeft, dateRight); + } else if (unit === 'week') { + value = (0, _index5.default)(dateLeft, dateRight); + } else if (unit === 'month') { + value = (0, _index3.default)(dateLeft, dateRight); + } else if (unit === 'quarter') { + value = (0, _index4.default)(dateLeft, dateRight); + } else if (unit === 'year') { + value = (0, _index6.default)(dateLeft, dateRight); + } + } + + var rtf = new Intl.RelativeTimeFormat(options === null || options === void 0 ? void 0 : options.locale, { + localeMatcher: options === null || options === void 0 ? void 0 : options.localeMatcher, + numeric: (options === null || options === void 0 ? void 0 : options.numeric) || 'auto', + style: options === null || options === void 0 ? void 0 : options.style + }); + return rtf.format(value, unit); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2755: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isAfter; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isAfter + * @category Common Helpers + * @summary Is the first date after the second one? + * + * @description + * Is the first date after the second one? + * + * @param {Date|Number} date - the date that should be after the other one to return true + * @param {Date|Number} dateToCompare - the date to compare with + * @returns {Boolean} the first date is after the second date + * @throws {TypeError} 2 arguments required + * + * @example + * // Is 10 July 1989 after 11 February 1987? + * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11)) + * //=> true + */ +function isAfter(dirtyDate, dirtyDateToCompare) { + (0, _index2.default)(2, arguments); + var date = (0, _index.default)(dirtyDate); + var dateToCompare = (0, _index.default)(dirtyDateToCompare); + return date.getTime() > dateToCompare.getTime(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9369: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isBefore; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isBefore + * @category Common Helpers + * @summary Is the first date before the second one? + * + * @description + * Is the first date before the second one? + * + * @param {Date|Number} date - the date that should be before the other one to return true + * @param {Date|Number} dateToCompare - the date to compare with + * @returns {Boolean} the first date is before the second date + * @throws {TypeError} 2 arguments required + * + * @example + * // Is 10 July 1989 before 11 February 1987? + * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11)) + * //=> false + */ +function isBefore(dirtyDate, dirtyDateToCompare) { + (0, _index2.default)(2, arguments); + var date = (0, _index.default)(dirtyDate); + var dateToCompare = (0, _index.default)(dirtyDateToCompare); + return date.getTime() < dateToCompare.getTime(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6801: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isDate; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +/** + * @name isDate + * @category Common Helpers + * @summary Is the given value a date? + * + * @description + * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes. + * + * @param {*} value - the value to check + * @returns {boolean} true if the given value is a date + * @throws {TypeError} 1 arguments required + * + * @example + * // For a valid date: + * const result = isDate(new Date()) + * //=> true + * + * @example + * // For an invalid date: + * const result = isDate(new Date(NaN)) + * //=> true + * + * @example + * // For some value: + * const result = isDate('2014-02-31') + * //=> false + * + * @example + * // For an object: + * const result = isDate({}) + * //=> false + */ +function isDate(value) { + (0, _index.default)(1, arguments); + return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]'; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 4669: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isEqual; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isEqual + * @category Common Helpers + * @summary Are the given dates equal? + * + * @description + * Are the given dates equal? + * + * @param {Date|Number} dateLeft - the first date to compare + * @param {Date|Number} dateRight - the second date to compare + * @returns {Boolean} the dates are equal + * @throws {TypeError} 2 arguments required + * + * @example + * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal? + * const result = isEqual( + * new Date(2014, 6, 2, 6, 30, 45, 0), + * new Date(2014, 6, 2, 6, 30, 45, 500) + * ) + * //=> false + */ +function isEqual(dirtyLeftDate, dirtyRightDate) { + (0, _index2.default)(2, arguments); + var dateLeft = (0, _index.default)(dirtyLeftDate); + var dateRight = (0, _index.default)(dirtyRightDate); + return dateLeft.getTime() === dateRight.getTime(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7352: +/***/ ((module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isExists; + +/** + * @name isExists + * @category Common Helpers + * @summary Is the given date exists? + * + * @description + * Checks if the given arguments convert to an existing date. + * + * @param {Number} year of the date to check + * @param {Number} month of the date to check + * @param {Number} day of the date to check + * @returns {Boolean} the date exists + * @throws {TypeError} 3 arguments required + * + * @example + * // For the valid date: + * const result = isExists(2018, 0, 31) + * //=> true + * + * @example + * // For the invalid date: + * const result = isExists(2018, 1, 31) + * //=> false + */ +function isExists(year, month, day) { + if (arguments.length < 3) { + throw new TypeError('3 argument required, but only ' + arguments.length + ' present'); + } + + var date = new Date(year, month, day); + return date.getFullYear() === year && date.getMonth() === month && date.getDate() === day; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5387: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isFirstDayOfMonth; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isFirstDayOfMonth + * @category Month Helpers + * @summary Is the given date the first day of a month? + * + * @description + * Is the given date the first day of a month? + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is the first day of a month + * @throws {TypeError} 1 argument required + * + * @example + * // Is 1 September 2014 the first day of a month? + * const result = isFirstDayOfMonth(new Date(2014, 8, 1)) + * //=> true + */ +function isFirstDayOfMonth(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate).getDate() === 1; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1758: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isFriday; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isFriday + * @category Weekday Helpers + * @summary Is the given date Friday? + * + * @description + * Is the given date Friday? + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is Friday + * @throws {TypeError} 1 argument required + * + * @example + * // Is 26 September 2014 Friday? + * const result = isFriday(new Date(2014, 8, 26)) + * //=> true + */ +function isFriday(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate).getDay() === 5; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6803: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isFuture; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isFuture + * @category Common Helpers + * @summary Is the given date in the future? + * @pure false + * + * @description + * Is the given date in the future? + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `Date.now()` internally hence impure and can't be safely curried. + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is in the future + * @throws {TypeError} 1 argument required + * + * @example + * // If today is 6 October 2014, is 31 December 2014 in the future? + * const result = isFuture(new Date(2014, 11, 31)) + * //=> true + */ +function isFuture(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate).getTime() > Date.now(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8506: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isLastDayOfMonth; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(8569)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2621)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isLastDayOfMonth + * @category Month Helpers + * @summary Is the given date the last day of a month? + * + * @description + * Is the given date the last day of a month? + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is the last day of a month + * @throws {TypeError} 1 argument required + * + * @example + * // Is 28 February 2014 the last day of a month? + * const result = isLastDayOfMonth(new Date(2014, 1, 28)) + * //=> true + */ +function isLastDayOfMonth(dirtyDate) { + (0, _index4.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + return (0, _index2.default)(date).getTime() === (0, _index3.default)(date).getTime(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 74: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isLeapYear; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isLeapYear + * @category Year Helpers + * @summary Is the given date in the leap year? + * + * @description + * Is the given date in the leap year? + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is in the leap year + * @throws {TypeError} 1 argument required + * + * @example + * // Is 1 September 2012 in the leap year? + * const result = isLeapYear(new Date(2012, 8, 1)) + * //=> true + */ +function isLeapYear(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var year = date.getFullYear(); + return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 525: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isMatch; + +var _index = _interopRequireDefault(__nccwpck_require__(1287)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(9920)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isMatch + * @category Common Helpers + * @summary validates the date string against given formats + * + * @description + * Return the true if given date is string correct against the given format else + * will return false. + * + * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries. + * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * + * The characters in the format string wrapped between two single quotes characters (') are escaped. + * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote. + * + * Format of the format string is based on Unicode Technical Standard #35: + * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table + * with a few additions (see note 5 below the table). + * + * Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited + * and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception: + * + * ```javascript + * isMatch('23 AM', 'HH a') + * //=> RangeError: The format string mustn't contain `HH` and `a` at the same time + * ``` + * + * See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true + * + * Accepted format string patterns: + * | Unit |Prior| Pattern | Result examples | Notes | + * |---------------------------------|-----|---------|-----------------------------------|-------| + * | Era | 140 | G..GGG | AD, BC | | + * | | | GGGG | Anno Domini, Before Christ | 2 | + * | | | GGGGG | A, B | | + * | Calendar year | 130 | y | 44, 1, 1900, 2017, 9999 | 4 | + * | | | yo | 44th, 1st, 1900th, 9999999th | 4,5 | + * | | | yy | 44, 01, 00, 17 | 4 | + * | | | yyy | 044, 001, 123, 999 | 4 | + * | | | yyyy | 0044, 0001, 1900, 2017 | 4 | + * | | | yyyyy | ... | 2,4 | + * | Local week-numbering year | 130 | Y | 44, 1, 1900, 2017, 9000 | 4 | + * | | | Yo | 44th, 1st, 1900th, 9999999th | 4,5 | + * | | | YY | 44, 01, 00, 17 | 4,6 | + * | | | YYY | 044, 001, 123, 999 | 4 | + * | | | YYYY | 0044, 0001, 1900, 2017 | 4,6 | + * | | | YYYYY | ... | 2,4 | + * | ISO week-numbering year | 130 | R | -43, 1, 1900, 2017, 9999, -9999 | 4,5 | + * | | | RR | -43, 01, 00, 17 | 4,5 | + * | | | RRR | -043, 001, 123, 999, -999 | 4,5 | + * | | | RRRR | -0043, 0001, 2017, 9999, -9999 | 4,5 | + * | | | RRRRR | ... | 2,4,5 | + * | Extended year | 130 | u | -43, 1, 1900, 2017, 9999, -999 | 4 | + * | | | uu | -43, 01, 99, -99 | 4 | + * | | | uuu | -043, 001, 123, 999, -999 | 4 | + * | | | uuuu | -0043, 0001, 2017, 9999, -9999 | 4 | + * | | | uuuuu | ... | 2,4 | + * | Quarter (formatting) | 120 | Q | 1, 2, 3, 4 | | + * | | | Qo | 1st, 2nd, 3rd, 4th | 5 | + * | | | QQ | 01, 02, 03, 04 | | + * | | | QQQ | Q1, Q2, Q3, Q4 | | + * | | | QQQQ | 1st quarter, 2nd quarter, ... | 2 | + * | | | QQQQQ | 1, 2, 3, 4 | 4 | + * | Quarter (stand-alone) | 120 | q | 1, 2, 3, 4 | | + * | | | qo | 1st, 2nd, 3rd, 4th | 5 | + * | | | qq | 01, 02, 03, 04 | | + * | | | qqq | Q1, Q2, Q3, Q4 | | + * | | | qqqq | 1st quarter, 2nd quarter, ... | 2 | + * | | | qqqqq | 1, 2, 3, 4 | 3 | + * | Month (formatting) | 110 | M | 1, 2, ..., 12 | | + * | | | Mo | 1st, 2nd, ..., 12th | 5 | + * | | | MM | 01, 02, ..., 12 | | + * | | | MMM | Jan, Feb, ..., Dec | | + * | | | MMMM | January, February, ..., December | 2 | + * | | | MMMMM | J, F, ..., D | | + * | Month (stand-alone) | 110 | L | 1, 2, ..., 12 | | + * | | | Lo | 1st, 2nd, ..., 12th | 5 | + * | | | LL | 01, 02, ..., 12 | | + * | | | LLL | Jan, Feb, ..., Dec | | + * | | | LLLL | January, February, ..., December | 2 | + * | | | LLLLL | J, F, ..., D | | + * | Local week of year | 100 | w | 1, 2, ..., 53 | | + * | | | wo | 1st, 2nd, ..., 53th | 5 | + * | | | ww | 01, 02, ..., 53 | | + * | ISO week of year | 100 | I | 1, 2, ..., 53 | 5 | + * | | | Io | 1st, 2nd, ..., 53th | 5 | + * | | | II | 01, 02, ..., 53 | 5 | + * | Day of month | 90 | d | 1, 2, ..., 31 | | + * | | | do | 1st, 2nd, ..., 31st | 5 | + * | | | dd | 01, 02, ..., 31 | | + * | Day of year | 90 | D | 1, 2, ..., 365, 366 | 7 | + * | | | Do | 1st, 2nd, ..., 365th, 366th | 5 | + * | | | DD | 01, 02, ..., 365, 366 | 7 | + * | | | DDD | 001, 002, ..., 365, 366 | | + * | | | DDDD | ... | 2 | + * | Day of week (formatting) | 90 | E..EEE | Mon, Tue, Wed, ..., Su | | + * | | | EEEE | Monday, Tuesday, ..., Sunday | 2 | + * | | | EEEEE | M, T, W, T, F, S, S | | + * | | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | | + * | ISO day of week (formatting) | 90 | i | 1, 2, 3, ..., 7 | 5 | + * | | | io | 1st, 2nd, ..., 7th | 5 | + * | | | ii | 01, 02, ..., 07 | 5 | + * | | | iii | Mon, Tue, Wed, ..., Su | 5 | + * | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 | + * | | | iiiii | M, T, W, T, F, S, S | 5 | + * | | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 5 | + * | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | | + * | | | eo | 2nd, 3rd, ..., 1st | 5 | + * | | | ee | 02, 03, ..., 01 | | + * | | | eee | Mon, Tue, Wed, ..., Su | | + * | | | eeee | Monday, Tuesday, ..., Sunday | 2 | + * | | | eeeee | M, T, W, T, F, S, S | | + * | | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | | + * | Local day of week (stand-alone) | 90 | c | 2, 3, 4, ..., 1 | | + * | | | co | 2nd, 3rd, ..., 1st | 5 | + * | | | cc | 02, 03, ..., 01 | | + * | | | ccc | Mon, Tue, Wed, ..., Su | | + * | | | cccc | Monday, Tuesday, ..., Sunday | 2 | + * | | | ccccc | M, T, W, T, F, S, S | | + * | | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | | + * | AM, PM | 80 | a..aaa | AM, PM | | + * | | | aaaa | a.m., p.m. | 2 | + * | | | aaaaa | a, p | | + * | AM, PM, noon, midnight | 80 | b..bbb | AM, PM, noon, midnight | | + * | | | bbbb | a.m., p.m., noon, midnight | 2 | + * | | | bbbbb | a, p, n, mi | | + * | Flexible day period | 80 | B..BBB | at night, in the morning, ... | | + * | | | BBBB | at night, in the morning, ... | 2 | + * | | | BBBBB | at night, in the morning, ... | | + * | Hour [1-12] | 70 | h | 1, 2, ..., 11, 12 | | + * | | | ho | 1st, 2nd, ..., 11th, 12th | 5 | + * | | | hh | 01, 02, ..., 11, 12 | | + * | Hour [0-23] | 70 | H | 0, 1, 2, ..., 23 | | + * | | | Ho | 0th, 1st, 2nd, ..., 23rd | 5 | + * | | | HH | 00, 01, 02, ..., 23 | | + * | Hour [0-11] | 70 | K | 1, 2, ..., 11, 0 | | + * | | | Ko | 1st, 2nd, ..., 11th, 0th | 5 | + * | | | KK | 01, 02, ..., 11, 00 | | + * | Hour [1-24] | 70 | k | 24, 1, 2, ..., 23 | | + * | | | ko | 24th, 1st, 2nd, ..., 23rd | 5 | + * | | | kk | 24, 01, 02, ..., 23 | | + * | Minute | 60 | m | 0, 1, ..., 59 | | + * | | | mo | 0th, 1st, ..., 59th | 5 | + * | | | mm | 00, 01, ..., 59 | | + * | Second | 50 | s | 0, 1, ..., 59 | | + * | | | so | 0th, 1st, ..., 59th | 5 | + * | | | ss | 00, 01, ..., 59 | | + * | Seconds timestamp | 40 | t | 512969520 | | + * | | | tt | ... | 2 | + * | Fraction of second | 30 | S | 0, 1, ..., 9 | | + * | | | SS | 00, 01, ..., 99 | | + * | | | SSS | 000, 001, ..., 999 | | + * | | | SSSS | ... | 2 | + * | Milliseconds timestamp | 20 | T | 512969520900 | | + * | | | TT | ... | 2 | + * | Timezone (ISO-8601 w/ Z) | 10 | X | -08, +0530, Z | | + * | | | XX | -0800, +0530, Z | | + * | | | XXX | -08:00, +05:30, Z | | + * | | | XXXX | -0800, +0530, Z, +123456 | 2 | + * | | | XXXXX | -08:00, +05:30, Z, +12:34:56 | | + * | Timezone (ISO-8601 w/o Z) | 10 | x | -08, +0530, +00 | | + * | | | xx | -0800, +0530, +0000 | | + * | | | xxx | -08:00, +05:30, +00:00 | 2 | + * | | | xxxx | -0800, +0530, +0000, +123456 | | + * | | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | | + * | Long localized date | NA | P | 05/29/1453 | 5,8 | + * | | | PP | May 29, 1453 | | + * | | | PPP | May 29th, 1453 | | + * | | | PPPP | Sunday, May 29th, 1453 | 2,5,8 | + * | Long localized time | NA | p | 12:00 AM | 5,8 | + * | | | pp | 12:00:00 AM | | + * | Combination of date and time | NA | Pp | 05/29/1453, 12:00 AM | | + * | | | PPpp | May 29, 1453, 12:00:00 AM | | + * | | | PPPpp | May 29th, 1453 at ... | | + * | | | PPPPpp | Sunday, May 29th, 1453 at ... | 2,5,8 | + * Notes: + * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale + * are the same as "stand-alone" units, but are different in some languages. + * "Formatting" units are declined according to the rules of the language + * in the context of a date. "Stand-alone" units are always nominative singular. + * In `format` function, they will produce different result: + * + * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'` + * + * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'` + * + * `isMatch` will try to match both formatting and stand-alone units interchangably. + * + * 2. Any sequence of the identical letters is a pattern, unless it is escaped by + * the single quote characters (see below). + * If the sequence is longer than listed in table: + * - for numerical units (`yyyyyyyy`) `isMatch` will try to match a number + * as wide as the sequence + * - for text units (`MMMMMMMM`) `isMatch` will try to match the widest variation of the unit. + * These variations are marked with "2" in the last column of the table. + * + * 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales. + * These tokens represent the shortest form of the quarter. + * + * 4. The main difference between `y` and `u` patterns are B.C. years: + * + * | Year | `y` | `u` | + * |------|-----|-----| + * | AC 1 | 1 | 1 | + * | BC 1 | 1 | 0 | + * | BC 2 | 2 | -1 | + * + * Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`: + * + * `isMatch('50', 'yy') //=> true` + * + * `isMatch('75', 'yy') //=> true` + * + * while `uu` will use the year as is: + * + * `isMatch('50', 'uu') //=> true` + * + * `isMatch('75', 'uu') //=> true` + * + * The same difference is true for local and ISO week-numbering years (`Y` and `R`), + * except local week-numbering years are dependent on `options.weekStartsOn` + * and `options.firstWeekContainsDate` (compare [setISOWeekYear]{@link https://date-fns.org/docs/setISOWeekYear} + * and [setWeekYear]{@link https://date-fns.org/docs/setWeekYear}). + * + * 5. These patterns are not in the Unicode Technical Standard #35: + * - `i`: ISO day of week + * - `I`: ISO week of year + * - `R`: ISO week-numbering year + * - `o`: ordinal number modifier + * - `P`: long localized date + * - `p`: long localized time + * + * 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years. + * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * + * 7. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month. + * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * + * 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based + * on the given locale. + * + * using `en-US` locale: `P` => `MM/dd/yyyy` + * using `en-US` locale: `p` => `hh:mm a` + * using `pt-BR` locale: `P` => `dd/MM/yyyy` + * using `pt-BR` locale: `p` => `HH:mm` + * + * Values will be checked in the descending order of its unit's priority. + * Units of an equal priority overwrite each other in the order of appearance. + * + * If no values of higher priority are matched (e.g. when matching string 'January 1st' without a year), + * the values will be taken from today's using `new Date()` date which works as a context of parsing. + * + * The result may vary by locale. + * + * If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned. + * + * + * + * @param {String} dateString - the date string to verify + * @param {String} formatString - the string of tokens + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year + * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`; + * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`; + * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * @returns {Boolean} + * @throws {TypeError} 2 arguments required + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 + * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7 + * @throws {RangeError} `options.locale` must contain `match` property + * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * @throws {RangeError} use `yy` instead of `YY` for formatting years; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * @throws {RangeError} use `d` instead of `D` for formatting days of the month; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * @throws {RangeError} format string contains an unescaped latin alphabet character + * + * @example + * // Match 11 February 2014 from middle-endian format: + * const result = isMatch('02/11/2014', 'MM/dd/yyyy') + * //=> true + * + * @example + * // Match 28th of February in Esperanto locale in the context of 2010 year: + * import eo from 'date-fns/locale/eo' + * const result = isMatch('28-a de februaro', "do 'de' MMMM", { + * locale: eo + * }) + * //=> true + */ +function isMatch(dateString, formatString, options) { + (0, _index3.default)(2, arguments); + return (0, _index2.default)((0, _index.default)(dateString, formatString, new Date(), options)); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6030: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isMonday; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isMonday + * @category Weekday Helpers + * @summary Is the given date Monday? + * + * @description + * Is the given date Monday? + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is Monday + * @throws {TypeError} 1 argument required + * + * @example + * // Is 22 September 2014 Monday? + * const result = isMonday(new Date(2014, 8, 22)) + * //=> true + */ +function isMonday(date) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(date).getDay() === 1; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9543: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isPast; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isPast + * @category Common Helpers + * @summary Is the given date in the past? + * @pure false + * + * @description + * Is the given date in the past? + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `Date.now()` internally hence impure and can't be safely curried. + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is in the past + * @throws {TypeError} 1 argument required + * + * @example + * // If today is 6 October 2014, is 2 July 2014 in the past? + * const result = isPast(new Date(2014, 6, 2)) + * //=> true + */ +function isPast(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate).getTime() < Date.now(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2154: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isSameDay; + +var _index = _interopRequireDefault(__nccwpck_require__(1868)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isSameDay + * @category Day Helpers + * @summary Are the given dates in the same day (and year and month)? + * + * @description + * Are the given dates in the same day (and year and month)? + * + * @param {Date|Number} dateLeft - the first date to check + * @param {Date|Number} dateRight - the second date to check + * @returns {Boolean} the dates are in the same day (and year and month) + * @throws {TypeError} 2 arguments required + * + * @example + * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day? + * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0)) + * //=> true + * + * @example + * // Are 4 September and 4 October in the same day? + * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4)) + * //=> false + * + * @example + * // Are 4 September, 2014 and 4 September, 2015 in the same day? + * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4)) + * //=> false + */ +function isSameDay(dirtyDateLeft, dirtyDateRight) { + (0, _index2.default)(2, arguments); + var dateLeftStartOfDay = (0, _index.default)(dirtyDateLeft); + var dateRightStartOfDay = (0, _index.default)(dirtyDateRight); + return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2489: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isSameHour; + +var _index = _interopRequireDefault(__nccwpck_require__(6277)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isSameHour + * @category Hour Helpers + * @summary Are the given dates in the same hour (and same day)? + * + * @description + * Are the given dates in the same hour (and same day)? + * + * @param {Date|Number} dateLeft - the first date to check + * @param {Date|Number} dateRight - the second date to check + * @returns {Boolean} the dates are in the same hour (and same day) + * @throws {TypeError} 2 arguments required + * + * @example + * // Are 4 September 2014 06:00:00 and 4 September 06:30:00 in the same hour? + * const result = isSameHour(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 6, 30)) + * //=> true + * + * @example + * // Are 4 September 2014 06:00:00 and 5 September 06:00:00 in the same hour? + * const result = isSameHour(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 5, 6, 0)) + * //=> false + */ +function isSameHour(dirtyDateLeft, dirtyDateRight) { + (0, _index2.default)(2, arguments); + var dateLeftStartOfHour = (0, _index.default)(dirtyDateLeft); + var dateRightStartOfHour = (0, _index.default)(dirtyDateRight); + return dateLeftStartOfHour.getTime() === dateRightStartOfHour.getTime(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9852: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isSameISOWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(7013)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isSameISOWeek + * @category ISO Week Helpers + * @summary Are the given dates in the same ISO week (and year)? + * + * @description + * Are the given dates in the same ISO week (and year)? + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} dateLeft - the first date to check + * @param {Date|Number} dateRight - the second date to check + * @returns {Boolean} the dates are in the same ISO week (and year) + * @throws {TypeError} 2 arguments required + * + * @example + * // Are 1 September 2014 and 7 September 2014 in the same ISO week? + * const result = isSameISOWeek(new Date(2014, 8, 1), new Date(2014, 8, 7)) + * //=> true + * + * @example + * // Are 1 September 2014 and 1 September 2015 in the same ISO week? + * const result = isSameISOWeek(new Date(2014, 8, 1), new Date(2015, 8, 1)) + * //=> false + */ +function isSameISOWeek(dirtyDateLeft, dirtyDateRight) { + (0, _index2.default)(2, arguments); + return (0, _index.default)(dirtyDateLeft, dirtyDateRight, { + weekStartsOn: 1 + }); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3944: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isSameISOWeekYear; + +var _index = _interopRequireDefault(__nccwpck_require__(776)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isSameISOWeekYear + * @category ISO Week-Numbering Year Helpers + * @summary Are the given dates in the same ISO week-numbering year? + * + * @description + * Are the given dates in the same ISO week-numbering year? + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} dateLeft - the first date to check + * @param {Date|Number} dateRight - the second date to check + * @returns {Boolean} the dates are in the same ISO week-numbering year + * @throws {TypeError} 2 arguments required + * + * @example + * // Are 29 December 2003 and 2 January 2005 in the same ISO week-numbering year? + * const result = isSameISOWeekYear(new Date(2003, 11, 29), new Date(2005, 0, 2)) + * //=> true + */ +function isSameISOWeekYear(dirtyDateLeft, dirtyDateRight) { + (0, _index2.default)(2, arguments); + var dateLeftStartOfYear = (0, _index.default)(dirtyDateLeft); + var dateRightStartOfYear = (0, _index.default)(dirtyDateRight); + return dateLeftStartOfYear.getTime() === dateRightStartOfYear.getTime(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3197: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isSameMinute; + +var _index = _interopRequireDefault(__nccwpck_require__(8567)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isSameMinute + * @category Minute Helpers + * @summary Are the given dates in the same minute (and hour and day)? + * + * @description + * Are the given dates in the same minute (and hour and day)? + * + * @param {Date|Number} dateLeft - the first date to check + * @param {Date|Number} dateRight - the second date to check + * @returns {Boolean} the dates are in the same minute (and hour and day) + * @throws {TypeError} 2 arguments required + * + * @example + * // Are 4 September 2014 06:30:00 and 4 September 2014 06:30:15 in the same minute? + * const result = isSameMinute( + * new Date(2014, 8, 4, 6, 30), + * new Date(2014, 8, 4, 6, 30, 15) + * ) + * //=> true + * + * @example + * // Are 4 September 2014 06:30:00 and 5 September 2014 06:30:00 in the same minute? + * const result = isSameMinute( + * new Date(2014, 8, 4, 6, 30), + * new Date(2014, 8, 5, 6, 30) + * ) + * //=> false + */ +function isSameMinute(dirtyDateLeft, dirtyDateRight) { + (0, _index2.default)(2, arguments); + var dateLeftStartOfMinute = (0, _index.default)(dirtyDateLeft); + var dateRightStartOfMinute = (0, _index.default)(dirtyDateRight); + return dateLeftStartOfMinute.getTime() === dateRightStartOfMinute.getTime(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5421: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isSameMonth; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isSameMonth + * @category Month Helpers + * @summary Are the given dates in the same month (and year)? + * + * @description + * Are the given dates in the same month (and year)? + * + * @param {Date|Number} dateLeft - the first date to check + * @param {Date|Number} dateRight - the second date to check + * @returns {Boolean} the dates are in the same month (and year) + * @throws {TypeError} 2 arguments required + * + * @example + * // Are 2 September 2014 and 25 September 2014 in the same month? + * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25)) + * //=> true + * + * @example + * // Are 2 September 2014 and 25 September 2015 in the same month? + * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25)) + * //=> false + */ +function isSameMonth(dirtyDateLeft, dirtyDateRight) { + (0, _index2.default)(2, arguments); + var dateLeft = (0, _index.default)(dirtyDateLeft); + var dateRight = (0, _index.default)(dirtyDateRight); + return dateLeft.getFullYear() === dateRight.getFullYear() && dateLeft.getMonth() === dateRight.getMonth(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 938: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isSameQuarter; + +var _index = _interopRequireDefault(__nccwpck_require__(2932)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isSameQuarter + * @category Quarter Helpers + * @summary Are the given dates in the same quarter (and year)? + * + * @description + * Are the given dates in the same quarter (and year)? + * + * @param {Date|Number} dateLeft - the first date to check + * @param {Date|Number} dateRight - the second date to check + * @returns {Boolean} the dates are in the same quarter (and year) + * @throws {TypeError} 2 arguments required + * + * @example + * // Are 1 January 2014 and 8 March 2014 in the same quarter? + * const result = isSameQuarter(new Date(2014, 0, 1), new Date(2014, 2, 8)) + * //=> true + * + * @example + * // Are 1 January 2014 and 1 January 2015 in the same quarter? + * const result = isSameQuarter(new Date(2014, 0, 1), new Date(2015, 0, 1)) + * //=> false + */ +function isSameQuarter(dirtyDateLeft, dirtyDateRight) { + (0, _index2.default)(2, arguments); + var dateLeftStartOfQuarter = (0, _index.default)(dirtyDateLeft); + var dateRightStartOfQuarter = (0, _index.default)(dirtyDateRight); + return dateLeftStartOfQuarter.getTime() === dateRightStartOfQuarter.getTime(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1988: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isSameSecond; + +var _index = _interopRequireDefault(__nccwpck_require__(6738)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isSameSecond + * @category Second Helpers + * @summary Are the given dates in the same second (and hour and day)? + * + * @description + * Are the given dates in the same second (and hour and day)? + * + * @param {Date|Number} dateLeft - the first date to check + * @param {Date|Number} dateRight - the second date to check + * @returns {Boolean} the dates are in the same second (and hour and day) + * @throws {TypeError} 2 arguments required + * + * @example + * // Are 4 September 2014 06:30:15.000 and 4 September 2014 06:30.15.500 in the same second? + * const result = isSameSecond( + * new Date(2014, 8, 4, 6, 30, 15), + * new Date(2014, 8, 4, 6, 30, 15, 500) + * ) + * //=> true + * + * @example + * // Are 4 September 2014 06:00:15.000 and 4 September 2014 06:01.15.000 in the same second? + * const result = isSameSecond( + * new Date(2014, 8, 4, 6, 0, 15), + * new Date(2014, 8, 4, 6, 1, 15) + * ) + * //=> false + * + * @example + * // Are 4 September 2014 06:00:15.000 and 5 September 2014 06:00.15.000 in the same second? + * const result = isSameSecond( + * new Date(2014, 8, 4, 6, 0, 15), + * new Date(2014, 8, 5, 6, 0, 15) + * ) + * //=> false + */ +function isSameSecond(dirtyDateLeft, dirtyDateRight) { + (0, _index2.default)(2, arguments); + var dateLeftStartOfSecond = (0, _index.default)(dirtyDateLeft); + var dateRightStartOfSecond = (0, _index.default)(dirtyDateRight); + return dateLeftStartOfSecond.getTime() === dateRightStartOfSecond.getTime(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7013: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isSameWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(9813)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isSameWeek + * @category Week Helpers + * @summary Are the given dates in the same week (and month and year)? + * + * @description + * Are the given dates in the same week (and month and year)? + * + * @param {Date|Number} dateLeft - the first date to check + * @param {Date|Number} dateRight - the second date to check + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @returns {Boolean} the dates are in the same week (and month and year) + * @throws {TypeError} 2 arguments required + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 + * + * @example + * // Are 31 August 2014 and 4 September 2014 in the same week? + * const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4)) + * //=> true + * + * @example + * // If week starts with Monday, + * // are 31 August 2014 and 4 September 2014 in the same week? + * const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4), { + * weekStartsOn: 1 + * }) + * //=> false + * + * @example + * // Are 1 January 2014 and 1 January 2015 in the same week? + * const result = isSameWeek(new Date(2014, 0, 1), new Date(2015, 0, 1)) + * //=> false + */ +function isSameWeek(dirtyDateLeft, dirtyDateRight, options) { + (0, _index2.default)(2, arguments); + var dateLeftStartOfWeek = (0, _index.default)(dirtyDateLeft, options); + var dateRightStartOfWeek = (0, _index.default)(dirtyDateRight, options); + return dateLeftStartOfWeek.getTime() === dateRightStartOfWeek.getTime(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9821: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isSameYear; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isSameYear + * @category Year Helpers + * @summary Are the given dates in the same year? + * + * @description + * Are the given dates in the same year? + * + * @param {Date|Number} dateLeft - the first date to check + * @param {Date|Number} dateRight - the second date to check + * @returns {Boolean} the dates are in the same year + * @throws {TypeError} 2 arguments required + * + * @example + * // Are 2 September 2014 and 25 September 2014 in the same year? + * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25)) + * //=> true + */ +function isSameYear(dirtyDateLeft, dirtyDateRight) { + (0, _index2.default)(2, arguments); + var dateLeft = (0, _index.default)(dirtyDateLeft); + var dateRight = (0, _index.default)(dirtyDateRight); + return dateLeft.getFullYear() === dateRight.getFullYear(); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6308: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isSaturday; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isSaturday + * @category Weekday Helpers + * @summary Is the given date Saturday? + * + * @description + * Is the given date Saturday? + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is Saturday + * @throws {TypeError} 1 argument required + * + * @example + * // Is 27 September 2014 Saturday? + * const result = isSaturday(new Date(2014, 8, 27)) + * //=> true + */ +function isSaturday(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate).getDay() === 6; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5852: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isSunday; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isSunday + * @category Weekday Helpers + * @summary Is the given date Sunday? + * + * @description + * Is the given date Sunday? + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is Sunday + * @throws {TypeError} 1 argument required + * + * @example + * // Is 21 September 2014 Sunday? + * const result = isSunday(new Date(2014, 8, 21)) + * //=> true + */ +function isSunday(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate).getDay() === 0; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 4078: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isThisHour; + +var _index = _interopRequireDefault(__nccwpck_require__(2489)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isThisHour + * @category Hour Helpers + * @summary Is the given date in the same hour as the current date? + * @pure false + * + * @description + * Is the given date in the same hour as the current date? + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `Date.now()` internally hence impure and can't be safely curried. + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is in this hour + * @throws {TypeError} 1 argument required + * + * @example + * // If now is 25 September 2014 18:30:15.500, + * // is 25 September 2014 18:00:00 in this hour? + * const result = isThisHour(new Date(2014, 8, 25, 18)) + * //=> true + */ +function isThisHour(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(Date.now(), dirtyDate); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6065: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isThisISOWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(9852)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isThisISOWeek + * @category ISO Week Helpers + * @summary Is the given date in the same ISO week as the current date? + * @pure false + * + * @description + * Is the given date in the same ISO week as the current date? + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `Date.now()` internally hence impure and can't be safely curried. + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is in this ISO week + * @throws {TypeError} 1 argument required + * + * @example + * // If today is 25 September 2014, is 22 September 2014 in this ISO week? + * const result = isThisISOWeek(new Date(2014, 8, 22)) + * //=> true + */ +function isThisISOWeek(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate, Date.now()); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3413: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isThisMinute; + +var _index = _interopRequireDefault(__nccwpck_require__(3197)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isThisMinute + * @category Minute Helpers + * @summary Is the given date in the same minute as the current date? + * @pure false + * + * @description + * Is the given date in the same minute as the current date? + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `Date.now()` internally hence impure and can't be safely curried. + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is in this minute + * @throws {TypeError} 1 argument required + * + * @example + * // If now is 25 September 2014 18:30:15.500, + * // is 25 September 2014 18:30:00 in this minute? + * const result = isThisMinute(new Date(2014, 8, 25, 18, 30)) + * //=> true + */ +function isThisMinute(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(Date.now(), dirtyDate); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1157: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isThisMonth; + +var _index = _interopRequireDefault(__nccwpck_require__(5421)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isThisMonth + * @category Month Helpers + * @summary Is the given date in the same month as the current date? + * @pure false + * + * @description + * Is the given date in the same month as the current date? + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `Date.now()` internally hence impure and can't be safely curried. + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is in this month + * @throws {TypeError} 1 argument required + * + * @example + * // If today is 25 September 2014, is 15 September 2014 in this month? + * const result = isThisMonth(new Date(2014, 8, 15)) + * //=> true + */ +function isThisMonth(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(Date.now(), dirtyDate); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 547: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isThisQuarter; + +var _index = _interopRequireDefault(__nccwpck_require__(938)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isThisQuarter + * @category Quarter Helpers + * @summary Is the given date in the same quarter as the current date? + * @pure false + * + * @description + * Is the given date in the same quarter as the current date? + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `Date.now()` internally hence impure and can't be safely curried. + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is in this quarter + * @throws {TypeError} 1 argument required + * + * @example + * // If today is 25 September 2014, is 2 July 2014 in this quarter? + * const result = isThisQuarter(new Date(2014, 6, 2)) + * //=> true + */ +function isThisQuarter(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(Date.now(), dirtyDate); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 4641: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isThisSecond; + +var _index = _interopRequireDefault(__nccwpck_require__(1988)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isThisSecond + * @category Second Helpers + * @summary Is the given date in the same second as the current date? + * @pure false + * + * @description + * Is the given date in the same second as the current date? + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `Date.now()` internally hence impure and can't be safely curried. + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is in this second + * @throws {TypeError} 1 argument required + * + * @example + * // If now is 25 September 2014 18:30:15.500, + * // is 25 September 2014 18:30:15.000 in this second? + * const result = isThisSecond(new Date(2014, 8, 25, 18, 30, 15)) + * //=> true + */ +function isThisSecond(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(Date.now(), dirtyDate); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2373: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isThisWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(7013)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isThisWeek + * @category Week Helpers + * @summary Is the given date in the same week as the current date? + * @pure false + * + * @description + * Is the given date in the same week as the current date? + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `Date.now()` internally hence impure and can't be safely curried. + * + * @param {Date|Number} date - the date to check + * @param {Object} [options] - the object with options + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @returns {Boolean} the date is in this week + * @throws {TypeError} 1 argument required + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 + * + * @example + * // If today is 25 September 2014, is 21 September 2014 in this week? + * const result = isThisWeek(new Date(2014, 8, 21)) + * //=> true + * + * @example + * // If today is 25 September 2014 and week starts with Monday + * // is 21 September 2014 in this week? + * const result = isThisWeek(new Date(2014, 8, 21), { weekStartsOn: 1 }) + * //=> false + */ +function isThisWeek(dirtyDate, options) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate, Date.now(), options); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 856: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isThisYear; + +var _index = _interopRequireDefault(__nccwpck_require__(9821)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isThisYear + * @category Year Helpers + * @summary Is the given date in the same year as the current date? + * @pure false + * + * @description + * Is the given date in the same year as the current date? + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `Date.now()` internally hence impure and can't be safely curried. + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is in this year + * @throws {TypeError} 1 argument required + * + * @example + * // If today is 25 September 2014, is 2 July 2014 in this year? + * const result = isThisYear(new Date(2014, 6, 2)) + * //=> true + */ +function isThisYear(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate, Date.now()); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 4350: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isThursday; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isThursday + * @category Weekday Helpers + * @summary Is the given date Thursday? + * + * @description + * Is the given date Thursday? + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is Thursday + * @throws {TypeError} 1 argument required + * + * @example + * // Is 25 September 2014 Thursday? + * const result = isThursday(new Date(2014, 8, 25)) + * //=> true + */ +function isThursday(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate).getDay() === 4; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7185: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isToday; + +var _index = _interopRequireDefault(__nccwpck_require__(2154)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isToday + * @category Day Helpers + * @summary Is the given date today? + * @pure false + * + * @description + * Is the given date today? + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `Date.now()` internally hence impure and can't be safely curried. + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is today + * @throws {TypeError} 1 argument required + * + * @example + * // If today is 6 October 2014, is 6 October 14:00:00 today? + * const result = isToday(new Date(2014, 9, 6, 14, 0)) + * //=> true + */ +function isToday(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate, Date.now()); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3014: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isTomorrow; + +var _index = _interopRequireDefault(__nccwpck_require__(6227)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2154)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isTomorrow + * @category Day Helpers + * @summary Is the given date tomorrow? + * @pure false + * + * @description + * Is the given date tomorrow? + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `Date.now()` internally hence impure and can't be safely curried. + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is tomorrow + * @throws {TypeError} 1 argument required + * + * @example + * // If today is 6 October 2014, is 7 October 14:00:00 tomorrow? + * const result = isTomorrow(new Date(2014, 9, 7, 14, 0)) + * //=> true + */ +function isTomorrow(dirtyDate) { + (0, _index3.default)(1, arguments); + return (0, _index2.default)(dirtyDate, (0, _index.default)(Date.now(), 1)); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8235: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isTuesday; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isTuesday + * @category Weekday Helpers + * @summary Is the given date Tuesday? + * + * @description + * Is the given date Tuesday? + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is Tuesday + * @throws {TypeError} 1 argument required + * + * @example + * // Is 23 September 2014 Tuesday? + * const result = isTuesday(new Date(2014, 8, 23)) + * //=> true + */ +function isTuesday(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate).getDay() === 2; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9920: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isValid; + +var _index = _interopRequireDefault(__nccwpck_require__(6801)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isValid + * @category Common Helpers + * @summary Is the given date valid? + * + * @description + * Returns false if argument is Invalid Date and true otherwise. + * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate} + * Invalid Date is a Date, whose time value is NaN. + * + * Time value of Date: http://es5.github.io/#x15.9.1.1 + * + * @param {*} date - the date to check + * @returns {Boolean} the date is valid + * @throws {TypeError} 1 argument required + * + * @example + * // For the valid date: + * const result = isValid(new Date(2014, 1, 31)) + * //=> true + * + * @example + * // For the value, convertable into a date: + * const result = isValid(1393804800000) + * //=> true + * + * @example + * // For the invalid date: + * const result = isValid(new Date('')) + * //=> false + */ +function isValid(dirtyDate) { + (0, _index3.default)(1, arguments); + + if (!(0, _index.default)(dirtyDate) && typeof dirtyDate !== 'number') { + return false; + } + + var date = (0, _index2.default)(dirtyDate); + return !isNaN(Number(date)); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9218: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isWednesday; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isWednesday + * @category Weekday Helpers + * @summary Is the given date Wednesday? + * + * @description + * Is the given date Wednesday? + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is Wednesday + * @throws {TypeError} 1 argument required + * + * @example + * // Is 24 September 2014 Wednesday? + * const result = isWednesday(new Date(2014, 8, 24)) + * //=> true + */ +function isWednesday(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate).getDay() === 3; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 403: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isWeekend; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isWeekend + * @category Weekday Helpers + * @summary Does the given date fall on a weekend? + * + * @description + * Does the given date fall on a weekend? + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date falls on a weekend + * @throws {TypeError} 1 argument required + * + * @example + * // Does 5 October 2014 fall on a weekend? + * const result = isWeekend(new Date(2014, 9, 5)) + * //=> true + */ +function isWeekend(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var day = date.getDay(); + return day === 0 || day === 6; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 4419: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isWithinInterval; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isWithinInterval + * @category Interval Helpers + * @summary Is the given date within the interval? + * + * @description + * Is the given date within the interval? (Including start and end.) + * + * @param {Date|Number} date - the date to check + * @param {Interval} interval - the interval to check + * @returns {Boolean} the date is within the interval + * @throws {TypeError} 2 arguments required + * @throws {RangeError} The start of an interval cannot be after its end + * @throws {RangeError} Date in interval cannot be `Invalid Date` + * + * @example + * // For the date within the interval: + * isWithinInterval(new Date(2014, 0, 3), { + * start: new Date(2014, 0, 1), + * end: new Date(2014, 0, 7) + * }) + * //=> true + * + * @example + * // For the date outside of the interval: + * isWithinInterval(new Date(2014, 0, 10), { + * start: new Date(2014, 0, 1), + * end: new Date(2014, 0, 7) + * }) + * //=> false + * + * @example + * // For date equal to interval start: + * isWithinInterval(date, { start, end: date }) // => true + * + * @example + * // For date equal to interval end: + * isWithinInterval(date, { start: date, end }) // => true + */ +function isWithinInterval(dirtyDate, interval) { + (0, _index2.default)(2, arguments); + var time = (0, _index.default)(dirtyDate).getTime(); + var startTime = (0, _index.default)(interval.start).getTime(); + var endTime = (0, _index.default)(interval.end).getTime(); // Throw an exception if start date is after end date or if any date is `Invalid Date` + + if (!(startTime <= endTime)) { + throw new RangeError('Invalid interval'); + } + + return time >= startTime && time <= endTime; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9583: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = isYesterday; + +var _index = _interopRequireDefault(__nccwpck_require__(2154)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(970)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name isYesterday + * @category Day Helpers + * @summary Is the given date yesterday? + * @pure false + * + * @description + * Is the given date yesterday? + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `Date.now()` internally hence impure and can't be safely curried. + * + * @param {Date|Number} date - the date to check + * @returns {Boolean} the date is yesterday + * @throws {TypeError} 1 argument required + * + * @example + * // If today is 6 October 2014, is 5 October 14:00:00 yesterday? + * const result = isYesterday(new Date(2014, 9, 5, 14, 0)) + * //=> true + */ +function isYesterday(dirtyDate) { + (0, _index3.default)(1, arguments); + return (0, _index.default)(dirtyDate, (0, _index2.default)(Date.now(), 1)); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 4864: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = lastDayOfDecade; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name lastDayOfDecade + * @category Decade Helpers + * @summary Return the last day of a decade for the given date. + * + * @description + * Return the last day of a decade for the given date. + * + * @param {Date|Number} date - the original date + * @returns {Date} the last day of a decade + * @throws {TypeError} 1 argument required + * + * @example + * // The last day of a decade for 21 December 2012 21:12:00: + * const result = lastDayOfDecade(new Date(2012, 11, 21, 21, 12, 00)) + * //=> Wed Dec 31 2019 00:00:00 + */ +function lastDayOfDecade(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var year = date.getFullYear(); + var decade = 9 + Math.floor(year / 10) * 10; + date.setFullYear(decade + 1, 0, 0); + date.setHours(0, 0, 0, 0); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7692: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = lastDayOfISOWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(666)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name lastDayOfISOWeek + * @category ISO Week Helpers + * @summary Return the last day of an ISO week for the given date. + * + * @description + * Return the last day of an ISO week for the given date. + * The result will be in the local timezone. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} date - the original date + * @returns {Date} the last day of an ISO week + * @throws {TypeError} 1 argument required + * + * @example + * // The last day of an ISO week for 2 September 2014 11:55:00: + * const result = lastDayOfISOWeek(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Sun Sep 07 2014 00:00:00 + */ +function lastDayOfISOWeek(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate, { + weekStartsOn: 1 + }); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 217: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = lastDayOfISOWeekYear; + +var _index = _interopRequireDefault(__nccwpck_require__(6991)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6307)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name lastDayOfISOWeekYear + * @category ISO Week-Numbering Year Helpers + * @summary Return the last day of an ISO week-numbering year for the given date. + * + * @description + * Return the last day of an ISO week-numbering year, + * which always starts 3 days before the year's first Thursday. + * The result will be in the local timezone. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} date - the original date + * @returns {Date} the end of an ISO week-numbering year + * @throws {TypeError} 1 argument required + * + * @example + * // The last day of an ISO week-numbering year for 2 July 2005: + * const result = lastDayOfISOWeekYear(new Date(2005, 6, 2)) + * //=> Sun Jan 01 2006 00:00:00 + */ +function lastDayOfISOWeekYear(dirtyDate) { + (0, _index3.default)(1, arguments); + var year = (0, _index.default)(dirtyDate); + var fourthOfJanuary = new Date(0); + fourthOfJanuary.setFullYear(year + 1, 0, 4); + fourthOfJanuary.setHours(0, 0, 0, 0); + var date = (0, _index2.default)(fourthOfJanuary); + date.setDate(date.getDate() - 1); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3346: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = lastDayOfMonth; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name lastDayOfMonth + * @category Month Helpers + * @summary Return the last day of a month for the given date. + * + * @description + * Return the last day of a month for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @returns {Date} the last day of a month + * @throws {TypeError} 1 argument required + * + * @example + * // The last day of a month for 2 September 2014 11:55:00: + * const result = lastDayOfMonth(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Tue Sep 30 2014 00:00:00 + */ +function lastDayOfMonth(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var month = date.getMonth(); + date.setFullYear(date.getFullYear(), month + 1, 0); + date.setHours(0, 0, 0, 0); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8635: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = lastDayOfQuarter; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name lastDayOfQuarter + * @category Quarter Helpers + * @summary Return the last day of a year quarter for the given date. + * + * @description + * Return the last day of a year quarter for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @param {Object} [options] - an object with options. + * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate} + * @returns {Date} the last day of a quarter + * @throws {TypeError} 1 argument required + * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2 + * + * @example + * // The last day of a quarter for 2 September 2014 11:55:00: + * const result = lastDayOfQuarter(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Tue Sep 30 2014 00:00:00 + */ +function lastDayOfQuarter(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var currentMonth = date.getMonth(); + var month = currentMonth - currentMonth % 3 + 3; + date.setMonth(month, 0); + date.setHours(0, 0, 0, 0); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 666: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = lastDayOfWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index4 = __nccwpck_require__(9307); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name lastDayOfWeek + * @category Week Helpers + * @summary Return the last day of a week for the given date. + * + * @description + * Return the last day of a week for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @returns {Date} the last day of a week + * @throws {TypeError} 1 argument required + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 + * + * @example + * // The last day of a week for 2 September 2014 11:55:00: + * const result = lastDayOfWeek(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Sat Sep 06 2014 00:00:00 + * + * @example + * // If the week starts on Monday, the last day of the week for 2 September 2014 11:55:00: + * const result = lastDayOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 }) + * //=> Sun Sep 07 2014 00:00:00 + */ +function lastDayOfWeek(dirtyDate, options) { + var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2; + + (0, _index3.default)(1, arguments); + var defaultOptions = (0, _index4.getDefaultOptions)(); + var weekStartsOn = (0, _index2.default)((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN + + if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) { + throw new RangeError('weekStartsOn must be between 0 and 6'); + } + + var date = (0, _index.default)(dirtyDate); + var day = date.getDay(); + var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn); + date.setHours(0, 0, 0, 0); + date.setDate(date.getDate() + diff); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9771: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = lastDayOfYear; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name lastDayOfYear + * @category Year Helpers + * @summary Return the last day of a year for the given date. + * + * @description + * Return the last day of a year for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @returns {Date} the last day of a year + * @throws {TypeError} 1 argument required + * + * @example + * // The last day of a year for 2 September 2014 11:55:00: + * const result = lastDayOfYear(new Date(2014, 8, 2, 11, 55, 00)) + * //=> Wed Dec 31 2014 00:00:00 + */ +function lastDayOfYear(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var year = date.getFullYear(); + date.setFullYear(year + 1, 0, 0); + date.setHours(0, 0, 0, 0); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 4018: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = lightFormat; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(289)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(7032)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(9920)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(7923)); + +var _index6 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// This RegExp consists of three parts separated by `|`: +// - (\w)\1* matches any sequences of the same letter +// - '' matches two quote characters in a row +// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('), +// except a single quote symbol, which ends the sequence. +// Two quote characters do not end the sequence. +// If there is no matching single quote +// then the sequence will continue until the end of the string. +// - . matches any single character unmatched by previous parts of the RegExps +var formattingTokensRegExp = /(\w)\1*|''|'(''|[^'])+('|$)|./g; +var escapedStringRegExp = /^'([^]*?)'?$/; +var doubleQuoteRegExp = /''/g; +var unescapedLatinCharacterRegExp = /[a-zA-Z]/; +/** + * @name lightFormat + * @category Common Helpers + * @summary Format the date. + * + * @description + * Return the formatted date string in the given format. Unlike `format`, + * `lightFormat` doesn't use locales and outputs date using the most popular tokens. + * + * > ⚠️ Please note that the `lightFormat` tokens differ from Moment.js and other libraries. + * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * + * The characters wrapped between two single quotes characters (') are escaped. + * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote. + * + * Format of the string is based on Unicode Technical Standard #35: + * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table + * + * Accepted patterns: + * | Unit | Pattern | Result examples | + * |---------------------------------|---------|-----------------------------------| + * | AM, PM | a..aaa | AM, PM | + * | | aaaa | a.m., p.m. | + * | | aaaaa | a, p | + * | Calendar year | y | 44, 1, 1900, 2017 | + * | | yy | 44, 01, 00, 17 | + * | | yyy | 044, 001, 000, 017 | + * | | yyyy | 0044, 0001, 1900, 2017 | + * | Month (formatting) | M | 1, 2, ..., 12 | + * | | MM | 01, 02, ..., 12 | + * | Day of month | d | 1, 2, ..., 31 | + * | | dd | 01, 02, ..., 31 | + * | Hour [1-12] | h | 1, 2, ..., 11, 12 | + * | | hh | 01, 02, ..., 11, 12 | + * | Hour [0-23] | H | 0, 1, 2, ..., 23 | + * | | HH | 00, 01, 02, ..., 23 | + * | Minute | m | 0, 1, ..., 59 | + * | | mm | 00, 01, ..., 59 | + * | Second | s | 0, 1, ..., 59 | + * | | ss | 00, 01, ..., 59 | + * | Fraction of second | S | 0, 1, ..., 9 | + * | | SS | 00, 01, ..., 99 | + * | | SSS | 000, 001, ..., 999 | + * | | SSSS | ... | + * + * @param {Date|Number} date - the original date + * @param {String} format - the string of tokens + * @returns {String} the formatted date string + * @throws {TypeError} 2 arguments required + * @throws {RangeError} format string contains an unescaped latin alphabet character + * + * @example + * const result = lightFormat(new Date(2014, 1, 11), 'yyyy-MM-dd') + * //=> '2014-02-11' + */ + +function lightFormat(dirtyDate, formatStr) { + (0, _index6.default)(2, arguments); + var originalDate = (0, _index.default)(dirtyDate); + + if (!(0, _index4.default)(originalDate)) { + throw new RangeError('Invalid time value'); + } // Convert the date in system timezone to the same date in UTC+00:00 timezone. + // This ensures that when UTC functions will be implemented, locales will be compatible with them. + // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376 + + + var timezoneOffset = (0, _index3.default)(originalDate); + var utcDate = (0, _index5.default)(originalDate, timezoneOffset); + var tokens = formatStr.match(formattingTokensRegExp); // The only case when formattingTokensRegExp doesn't match the string is when it's empty + + if (!tokens) return ''; + var result = tokens.map(function (substring) { + // Replace two single quote characters with one single quote character + if (substring === "''") { + return "'"; + } + + var firstCharacter = substring[0]; + + if (firstCharacter === "'") { + return cleanEscapedString(substring); + } + + var formatter = _index2.default[firstCharacter]; + + if (formatter) { + return formatter(utcDate, substring); + } + + if (firstCharacter.match(unescapedLatinCharacterRegExp)) { + throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`'); + } + + return substring; + }).join(''); + return result; +} + +function cleanEscapedString(input) { + var matches = input.match(escapedStringRegExp); + + if (!matches) { + return input; + } + + return matches[1].replace(doubleQuoteRegExp, "'"); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1244: +/***/ ((module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = buildFormatLongFn; + +function buildFormatLongFn(args) { + return function () { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + // TODO: Remove String() + var width = options.width ? String(options.width) : args.defaultWidth; + var format = args.formats[width] || args.formats[args.defaultWidth]; + return format; + }; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3647: +/***/ ((module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = buildLocalizeFn; + +function buildLocalizeFn(args) { + return function (dirtyIndex, options) { + var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone'; + var valuesArray; + + if (context === 'formatting' && args.formattingValues) { + var defaultWidth = args.defaultFormattingWidth || args.defaultWidth; + var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth; + valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth]; + } else { + var _defaultWidth = args.defaultWidth; + + var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth; + + valuesArray = args.values[_width] || args.values[_defaultWidth]; + } + + var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it! + + return valuesArray[index]; + }; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 4029: +/***/ ((module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = buildMatchFn; + +function buildMatchFn(args) { + return function (string) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var width = options.width; + var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth]; + var matchResult = string.match(matchPattern); + + if (!matchResult) { + return null; + } + + var matchedString = matchResult[0]; + var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth]; + var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) { + return pattern.test(matchedString); + }) : findKey(parsePatterns, function (pattern) { + return pattern.test(matchedString); + }); + var value; + value = args.valueCallback ? args.valueCallback(key) : key; + value = options.valueCallback ? options.valueCallback(value) : value; + var rest = string.slice(matchedString.length); + return { + value: value, + rest: rest + }; + }; +} + +function findKey(object, predicate) { + for (var key in object) { + if (object.hasOwnProperty(key) && predicate(object[key])) { + return key; + } + } + + return undefined; +} + +function findIndex(array, predicate) { + for (var key = 0; key < array.length; key++) { + if (predicate(array[key])) { + return key; + } + } + + return undefined; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3364: +/***/ ((module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = buildMatchPatternFn; + +function buildMatchPatternFn(args) { + return function (string) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var matchResult = string.match(args.matchPattern); + if (!matchResult) return null; + var matchedString = matchResult[0]; + var parseResult = string.match(args.parsePattern); + if (!parseResult) return null; + var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0]; + value = options.valueCallback ? options.valueCallback(value) : value; + var rest = string.slice(matchedString.length); + return { + value: value, + rest: rest + }; + }; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 4846: +/***/ ((module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var formatDistanceLocale = { + lessThanXSeconds: { + one: 'less than a second', + other: 'less than {{count}} seconds' + }, + xSeconds: { + one: '1 second', + other: '{{count}} seconds' + }, + halfAMinute: 'half a minute', + lessThanXMinutes: { + one: 'less than a minute', + other: 'less than {{count}} minutes' + }, + xMinutes: { + one: '1 minute', + other: '{{count}} minutes' + }, + aboutXHours: { + one: 'about 1 hour', + other: 'about {{count}} hours' + }, + xHours: { + one: '1 hour', + other: '{{count}} hours' + }, + xDays: { + one: '1 day', + other: '{{count}} days' + }, + aboutXWeeks: { + one: 'about 1 week', + other: 'about {{count}} weeks' + }, + xWeeks: { + one: '1 week', + other: '{{count}} weeks' + }, + aboutXMonths: { + one: 'about 1 month', + other: 'about {{count}} months' + }, + xMonths: { + one: '1 month', + other: '{{count}} months' + }, + aboutXYears: { + one: 'about 1 year', + other: 'about {{count}} years' + }, + xYears: { + one: '1 year', + other: '{{count}} years' + }, + overXYears: { + one: 'over 1 year', + other: 'over {{count}} years' + }, + almostXYears: { + one: 'almost 1 year', + other: 'almost {{count}} years' + } +}; + +var formatDistance = function formatDistance(token, count, options) { + var result; + var tokenValue = formatDistanceLocale[token]; + + if (typeof tokenValue === 'string') { + result = tokenValue; + } else if (count === 1) { + result = tokenValue.one; + } else { + result = tokenValue.other.replace('{{count}}', count.toString()); + } + + if (options !== null && options !== void 0 && options.addSuffix) { + if (options.comparison && options.comparison > 0) { + return 'in ' + result; + } else { + return result + ' ago'; + } + } + + return result; +}; + +var _default = formatDistance; +exports["default"] = _default; +module.exports = exports.default; + +/***/ }), + +/***/ 368: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _index = _interopRequireDefault(__nccwpck_require__(1244)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var dateFormats = { + full: 'EEEE, MMMM do, y', + long: 'MMMM do, y', + medium: 'MMM d, y', + short: 'MM/dd/yyyy' +}; +var timeFormats = { + full: 'h:mm:ss a zzzz', + long: 'h:mm:ss a z', + medium: 'h:mm:ss a', + short: 'h:mm a' +}; +var dateTimeFormats = { + full: "{{date}} 'at' {{time}}", + long: "{{date}} 'at' {{time}}", + medium: '{{date}}, {{time}}', + short: '{{date}}, {{time}}' +}; +var formatLong = { + date: (0, _index.default)({ + formats: dateFormats, + defaultWidth: 'full' + }), + time: (0, _index.default)({ + formats: timeFormats, + defaultWidth: 'full' + }), + dateTime: (0, _index.default)({ + formats: dateTimeFormats, + defaultWidth: 'full' + }) +}; +var _default = formatLong; +exports["default"] = _default; +module.exports = exports.default; + +/***/ }), + +/***/ 2430: +/***/ ((module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var formatRelativeLocale = { + lastWeek: "'last' eeee 'at' p", + yesterday: "'yesterday at' p", + today: "'today at' p", + tomorrow: "'tomorrow at' p", + nextWeek: "eeee 'at' p", + other: 'P' +}; + +var formatRelative = function formatRelative(token, _date, _baseDate, _options) { + return formatRelativeLocale[token]; +}; + +var _default = formatRelative; +exports["default"] = _default; +module.exports = exports.default; + +/***/ }), + +/***/ 5474: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _index = _interopRequireDefault(__nccwpck_require__(3647)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var eraValues = { + narrow: ['B', 'A'], + abbreviated: ['BC', 'AD'], + wide: ['Before Christ', 'Anno Domini'] +}; +var quarterValues = { + narrow: ['1', '2', '3', '4'], + abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'], + wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter'] +}; // Note: in English, the names of days of the week and months are capitalized. +// If you are making a new locale based on this one, check if the same is true for the language you're working on. +// Generally, formatted dates should look like they are in the middle of a sentence, +// e.g. in Spanish language the weekdays and months should be in the lowercase. + +var monthValues = { + narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'], + abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] +}; +var dayValues = { + narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'], + short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], + abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] +}; +var dayPeriodValues = { + narrow: { + am: 'a', + pm: 'p', + midnight: 'mi', + noon: 'n', + morning: 'morning', + afternoon: 'afternoon', + evening: 'evening', + night: 'night' + }, + abbreviated: { + am: 'AM', + pm: 'PM', + midnight: 'midnight', + noon: 'noon', + morning: 'morning', + afternoon: 'afternoon', + evening: 'evening', + night: 'night' + }, + wide: { + am: 'a.m.', + pm: 'p.m.', + midnight: 'midnight', + noon: 'noon', + morning: 'morning', + afternoon: 'afternoon', + evening: 'evening', + night: 'night' + } +}; +var formattingDayPeriodValues = { + narrow: { + am: 'a', + pm: 'p', + midnight: 'mi', + noon: 'n', + morning: 'in the morning', + afternoon: 'in the afternoon', + evening: 'in the evening', + night: 'at night' + }, + abbreviated: { + am: 'AM', + pm: 'PM', + midnight: 'midnight', + noon: 'noon', + morning: 'in the morning', + afternoon: 'in the afternoon', + evening: 'in the evening', + night: 'at night' + }, + wide: { + am: 'a.m.', + pm: 'p.m.', + midnight: 'midnight', + noon: 'noon', + morning: 'in the morning', + afternoon: 'in the afternoon', + evening: 'in the evening', + night: 'at night' + } +}; + +var ordinalNumber = function ordinalNumber(dirtyNumber, _options) { + var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example, + // if they are different for different grammatical genders, + // use `options.unit`. + // + // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear', + // 'day', 'hour', 'minute', 'second'. + + var rem100 = number % 100; + + if (rem100 > 20 || rem100 < 10) { + switch (rem100 % 10) { + case 1: + return number + 'st'; + + case 2: + return number + 'nd'; + + case 3: + return number + 'rd'; + } + } + + return number + 'th'; +}; + +var localize = { + ordinalNumber: ordinalNumber, + era: (0, _index.default)({ + values: eraValues, + defaultWidth: 'wide' + }), + quarter: (0, _index.default)({ + values: quarterValues, + defaultWidth: 'wide', + argumentCallback: function argumentCallback(quarter) { + return quarter - 1; + } + }), + month: (0, _index.default)({ + values: monthValues, + defaultWidth: 'wide' + }), + day: (0, _index.default)({ + values: dayValues, + defaultWidth: 'wide' + }), + dayPeriod: (0, _index.default)({ + values: dayPeriodValues, + defaultWidth: 'wide', + formattingValues: formattingDayPeriodValues, + defaultFormattingWidth: 'wide' + }) +}; +var _default = localize; +exports["default"] = _default; +module.exports = exports.default; + +/***/ }), + +/***/ 1338: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _index = _interopRequireDefault(__nccwpck_require__(4029)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(3364)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i; +var parseOrdinalNumberPattern = /\d+/i; +var matchEraPatterns = { + narrow: /^(b|a)/i, + abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i, + wide: /^(before christ|before common era|anno domini|common era)/i +}; +var parseEraPatterns = { + any: [/^b/i, /^(a|c)/i] +}; +var matchQuarterPatterns = { + narrow: /^[1234]/i, + abbreviated: /^q[1234]/i, + wide: /^[1234](th|st|nd|rd)? quarter/i +}; +var parseQuarterPatterns = { + any: [/1/i, /2/i, /3/i, /4/i] +}; +var matchMonthPatterns = { + narrow: /^[jfmasond]/i, + abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i, + wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i +}; +var parseMonthPatterns = { + narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i], + any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i] +}; +var matchDayPatterns = { + narrow: /^[smtwf]/i, + short: /^(su|mo|tu|we|th|fr|sa)/i, + abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i, + wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i +}; +var parseDayPatterns = { + narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i], + any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i] +}; +var matchDayPeriodPatterns = { + narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i, + any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i +}; +var parseDayPeriodPatterns = { + any: { + am: /^a/i, + pm: /^p/i, + midnight: /^mi/i, + noon: /^no/i, + morning: /morning/i, + afternoon: /afternoon/i, + evening: /evening/i, + night: /night/i + } +}; +var match = { + ordinalNumber: (0, _index2.default)({ + matchPattern: matchOrdinalNumberPattern, + parsePattern: parseOrdinalNumberPattern, + valueCallback: function valueCallback(value) { + return parseInt(value, 10); + } + }), + era: (0, _index.default)({ + matchPatterns: matchEraPatterns, + defaultMatchWidth: 'wide', + parsePatterns: parseEraPatterns, + defaultParseWidth: 'any' + }), + quarter: (0, _index.default)({ + matchPatterns: matchQuarterPatterns, + defaultMatchWidth: 'wide', + parsePatterns: parseQuarterPatterns, + defaultParseWidth: 'any', + valueCallback: function valueCallback(index) { + return index + 1; + } + }), + month: (0, _index.default)({ + matchPatterns: matchMonthPatterns, + defaultMatchWidth: 'wide', + parsePatterns: parseMonthPatterns, + defaultParseWidth: 'any' + }), + day: (0, _index.default)({ + matchPatterns: matchDayPatterns, + defaultMatchWidth: 'wide', + parsePatterns: parseDayPatterns, + defaultParseWidth: 'any' + }), + dayPeriod: (0, _index.default)({ + matchPatterns: matchDayPeriodPatterns, + defaultMatchWidth: 'any', + parsePatterns: parseDayPeriodPatterns, + defaultParseWidth: 'any' + }) +}; +var _default = match; +exports["default"] = _default; +module.exports = exports.default; + +/***/ }), + +/***/ 1773: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _index = _interopRequireDefault(__nccwpck_require__(4846)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(368)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2430)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(5474)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(1338)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @type {Locale} + * @category Locales + * @summary English locale (United States). + * @language English + * @iso-639-2 eng + * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp} + * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss} + */ +var locale = { + code: 'en-US', + formatDistance: _index.default, + formatLong: _index2.default, + formatRelative: _index3.default, + localize: _index4.default, + match: _index5.default, + options: { + weekStartsOn: 0 + /* Sunday */ + , + firstWeekContainsDate: 1 + } +}; +var _default = locale; +exports["default"] = _default; +module.exports = exports.default; + +/***/ }), + +/***/ 5815: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = max; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +/** + * @name max + * @category Common Helpers + * @summary Return the latest of the given dates. + * + * @description + * Return the latest of the given dates. + * + * @param {Date[]|Number[]} datesArray - the dates to compare + * @returns {Date} the latest of the dates + * @throws {TypeError} 1 argument required + * + * @example + * // Which of these dates is the latest? + * const result = max([ + * new Date(1989, 6, 10), + * new Date(1987, 1, 11), + * new Date(1995, 6, 2), + * new Date(1990, 0, 1) + * ]) + * //=> Sun Jul 02 1995 00:00:00 + */ +function max(dirtyDatesArray) { + (0, _index2.default)(1, arguments); + var datesArray; // `dirtyDatesArray` is Array, Set or Map, or object with custom `forEach` method + + if (dirtyDatesArray && typeof dirtyDatesArray.forEach === 'function') { + datesArray = dirtyDatesArray; // If `dirtyDatesArray` is Array-like Object, convert to Array. + } else if (_typeof(dirtyDatesArray) === 'object' && dirtyDatesArray !== null) { + datesArray = Array.prototype.slice.call(dirtyDatesArray); + } else { + // `dirtyDatesArray` is non-iterable, return Invalid Date + return new Date(NaN); + } + + var result; + datesArray.forEach(function (dirtyDate) { + var currentDate = (0, _index.default)(dirtyDate); + + if (result === undefined || result < currentDate || isNaN(Number(currentDate))) { + result = currentDate; + } + }); + return result || new Date(NaN); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6133: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = milliseconds; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400. +// 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days +var daysInYear = 365.2425; +/** + * @name milliseconds + * @category Millisecond Helpers + * @summary + * Returns the number of milliseconds in the specified, years, months, weeks, days, hours, minutes and seconds. + * + * @description + * Returns the number of milliseconds in the specified, years, months, weeks, days, hours, minutes and seconds. + * + * One years equals 365.2425 days according to the formula: + * + * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400. + * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days + * + * One month is a year divided by 12. + * + * @param {Duration} duration - the object with years, months, weeks, days, hours, minutes and seconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {number} the milliseconds + * @throws {TypeError} 1 argument required + * + * @example + * // 1 year in milliseconds + * milliseconds({ years: 1 }) + * //=> 31556952000 + * + * // 3 months in milliseconds + * milliseconds({ months: 3 }) + * //=> 7889238000 + */ + +function milliseconds(_ref) { + var years = _ref.years, + months = _ref.months, + weeks = _ref.weeks, + days = _ref.days, + hours = _ref.hours, + minutes = _ref.minutes, + seconds = _ref.seconds; + (0, _index.default)(1, arguments); + var totalDays = 0; + if (years) totalDays += years * daysInYear; + if (months) totalDays += months * (daysInYear / 12); + if (weeks) totalDays += weeks * 7; + if (days) totalDays += days; + var totalSeconds = totalDays * 24 * 60 * 60; + if (hours) totalSeconds += hours * 60 * 60; + if (minutes) totalSeconds += minutes * 60; + if (seconds) totalSeconds += seconds; + return Math.round(totalSeconds * 1000); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9571: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = millisecondsToHours; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name millisecondsToHours + * @category Conversion Helpers + * @summary Convert milliseconds to hours. + * + * @description + * Convert a number of milliseconds to a full number of hours. + * + * @param {number} milliseconds - number of milliseconds to be converted + * + * @returns {number} the number of milliseconds converted in hours + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 7200000 milliseconds to hours: + * const result = millisecondsToHours(7200000) + * //=> 2 + * + * @example + * // It uses floor rounding: + * const result = millisecondsToHours(7199999) + * //=> 1 + */ +function millisecondsToHours(milliseconds) { + (0, _index.default)(1, arguments); + var hours = milliseconds / _index2.millisecondsInHour; + return Math.floor(hours); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5419: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = millisecondsToMinutes; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name millisecondsToMinutes + * @category Conversion Helpers + * @summary Convert milliseconds to minutes. + * + * @description + * Convert a number of milliseconds to a full number of minutes. + * + * @param {number} milliseconds - number of milliseconds to be converted. + * + * @returns {number} the number of milliseconds converted in minutes + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 60000 milliseconds to minutes: + * const result = millisecondsToMinutes(60000) + * //=> 1 + * + * @example + * // It uses floor rounding: + * const result = millisecondsToMinutes(119999) + * //=> 1 + */ +function millisecondsToMinutes(milliseconds) { + (0, _index.default)(1, arguments); + var minutes = milliseconds / _index2.millisecondsInMinute; + return Math.floor(minutes); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2294: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = millisecondsToSeconds; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name millisecondsToSeconds + * @category Conversion Helpers + * @summary Convert milliseconds to seconds. + * + * @description + * Convert a number of milliseconds to a full number of seconds. + * + * @param {number} milliseconds - number of milliseconds to be converted + * + * @returns {number} the number of milliseconds converted in seconds + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 1000 miliseconds to seconds: + * const result = millisecondsToSeconds(1000) + * //=> 1 + * + * @example + * // It uses floor rounding: + * const result = millisecondsToSeconds(1999) + * //=> 1 + */ +function millisecondsToSeconds(milliseconds) { + (0, _index.default)(1, arguments); + var seconds = milliseconds / _index2.millisecondsInSecond; + return Math.floor(seconds); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5310: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = min; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +/** + * @name min + * @category Common Helpers + * @summary Returns the earliest of the given dates. + * + * @description + * Returns the earliest of the given dates. + * + * @param {Date[]|Number[]} datesArray - the dates to compare + * @returns {Date} - the earliest of the dates + * @throws {TypeError} 1 argument required + * + * @example + * // Which of these dates is the earliest? + * const result = min([ + * new Date(1989, 6, 10), + * new Date(1987, 1, 11), + * new Date(1995, 6, 2), + * new Date(1990, 0, 1) + * ]) + * //=> Wed Feb 11 1987 00:00:00 + */ +function min(dirtyDatesArray) { + (0, _index2.default)(1, arguments); + var datesArray; // `dirtyDatesArray` is Array, Set or Map, or object with custom `forEach` method + + if (dirtyDatesArray && typeof dirtyDatesArray.forEach === 'function') { + datesArray = dirtyDatesArray; // If `dirtyDatesArray` is Array-like Object, convert to Array. + } else if (_typeof(dirtyDatesArray) === 'object' && dirtyDatesArray !== null) { + datesArray = Array.prototype.slice.call(dirtyDatesArray); + } else { + // `dirtyDatesArray` is non-iterable, return Invalid Date + return new Date(NaN); + } + + var result; + datesArray.forEach(function (dirtyDate) { + var currentDate = (0, _index.default)(dirtyDate); + + if (result === undefined || result > currentDate || isNaN(currentDate.getDate())) { + result = currentDate; + } + }); + return result || new Date(NaN); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2516: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = minutesToHours; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name minutesToHours + * @category Conversion Helpers + * @summary Convert minutes to hours. + * + * @description + * Convert a number of minutes to a full number of hours. + * + * @param {number} minutes - number of minutes to be converted + * + * @returns {number} the number of minutes converted in hours + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 140 minutes to hours: + * const result = minutesToHours(120) + * //=> 2 + * + * @example + * // It uses floor rounding: + * const result = minutesToHours(179) + * //=> 2 + */ +function minutesToHours(minutes) { + (0, _index.default)(1, arguments); + var hours = minutes / _index2.minutesInHour; + return Math.floor(hours); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1886: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = minutesToMilliseconds; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name minutesToMilliseconds + * @category Conversion Helpers + * @summary Convert minutes to milliseconds. + * + * @description + * Convert a number of minutes to a full number of milliseconds. + * + * @param {number} minutes - number of minutes to be converted + * + * @returns {number} the number of minutes converted in milliseconds + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 2 minutes to milliseconds + * const result = minutesToMilliseconds(2) + * //=> 120000 + */ +function minutesToMilliseconds(minutes) { + (0, _index.default)(1, arguments); + return Math.floor(minutes * _index2.millisecondsInMinute); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8192: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = minutesToSeconds; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name minutesToSeconds + * @category Conversion Helpers + * @summary Convert minutes to seconds. + * + * @description + * Convert a number of minutes to a full number of seconds. + * + * @param { number } minutes - number of minutes to be converted + * + * @returns {number} the number of minutes converted in seconds + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 2 minutes to seconds + * const result = minutesToSeconds(2) + * //=> 120 + */ +function minutesToSeconds(minutes) { + (0, _index.default)(1, arguments); + return Math.floor(minutes * _index2.secondsInMinute); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1142: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = monthsToQuarters; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name monthsToQuarters + * @category Conversion Helpers + * @summary Convert number of months to quarters. + * + * @description + * Convert a number of months to a full number of quarters. + * + * @param {number} months - number of months to be converted. + * + * @returns {number} the number of months converted in quarters + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 6 months to quarters: + * const result = monthsToQuarters(6) + * //=> 2 + * + * @example + * // It uses floor rounding: + * const result = monthsToQuarters(7) + * //=> 2 + */ +function monthsToQuarters(months) { + (0, _index.default)(1, arguments); + var quarters = months / _index2.monthsInQuarter; + return Math.floor(quarters); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3757: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = monthsToYears; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name monthsToYears + * @category Conversion Helpers + * @summary Convert number of months to years. + * + * @description + * Convert a number of months to a full number of years. + * + * @param {number} months - number of months to be converted + * + * @returns {number} the number of months converted in years + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 36 months to years: + * const result = monthsToYears(36) + * //=> 3 + * + * // It uses floor rounding: + * const result = monthsToYears(40) + * //=> 3 + */ +function monthsToYears(months) { + (0, _index.default)(1, arguments); + var years = months / _index2.monthsInYear; + return Math.floor(years); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6771: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = nextDay; + +var _index = _interopRequireDefault(__nccwpck_require__(6227)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(9361)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name nextDay + * @category Weekday Helpers + * @summary When is the next day of the week? + * + * @description + * When is the next day of the week? 0-6 the day of the week, 0 represents Sunday. + * + * @param {Date | number} date - the date to check + * @param {Day} day - day of the week + * @returns {Date} - the date is the next day of week + * @throws {TypeError} - 2 arguments required + * + * @example + * // When is the next Monday after Mar, 20, 2020? + * const result = nextDay(new Date(2020, 2, 20), 1) + * //=> Mon Mar 23 2020 00:00:00 + * + * @example + * // When is the next Tuesday after Mar, 21, 2020? + * const result = nextDay(new Date(2020, 2, 21), 2) + * //=> Tue Mar 24 2020 00:00:00 + */ +function nextDay(date, day) { + (0, _index3.default)(2, arguments); + var delta = day - (0, _index2.default)(date); + if (delta <= 0) delta += 7; + return (0, _index.default)(date, delta); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1491: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = nextFriday; + +var _index = _interopRequireDefault(__nccwpck_require__(6771)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name nextFriday + * @category Weekday Helpers + * @summary When is the next Friday? + * + * @description + * When is the next Friday? + * + * @param {Date | number} date - the date to start counting from + * @returns {Date} the next Friday + * @throws {TypeError} 1 argument required + * + * @example + * // When is the next Friday after Mar, 22, 2020? + * const result = nextFriday(new Date(2020, 2, 22)) + * //=> Fri Mar 27 2020 00:00:00 + */ +function nextFriday(date) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(date, 5); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5947: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = nextMonday; + +var _index = _interopRequireDefault(__nccwpck_require__(6771)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name nextMonday + * @category Weekday Helpers + * @summary When is the next Monday? + * + * @description + * When is the next Monday? + * + * @param {Date | number} date - the date to start counting from + * @returns {Date} the next Monday + * @throws {TypeError} 1 argument required + * + * @example + * // When is the next Monday after Mar, 22, 2020? + * const result = nextMonday(new Date(2020, 2, 22)) + * //=> Mon Mar 23 2020 00:00:00 + */ +function nextMonday(date) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(date, 1); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 363: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = nextSaturday; + +var _index = _interopRequireDefault(__nccwpck_require__(6771)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name nextSaturday + * @category Weekday Helpers + * @summary When is the next Saturday? + * + * @description + * When is the next Saturday? + * + * @param {Date | number} date - the date to start counting from + * @returns {Date} the next Saturday + * @throws {TypeError} 1 argument required + * + * @example + * // When is the next Saturday after Mar, 22, 2020? + * const result = nextSaturday(new Date(2020, 2, 22)) + * //=> Sat Mar 28 2020 00:00:00 + */ +function nextSaturday(date) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(date, 6); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7266: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = nextSunday; + +var _index = _interopRequireDefault(__nccwpck_require__(6771)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name nextSunday + * @category Weekday Helpers + * @summary When is the next Sunday? + * + * @description + * When is the next Sunday? + * + * @param {Date | number} date - the date to start counting from + * @returns {Date} the next Sunday + * @throws {TypeError} 1 argument required + * + * @example + * // When is the next Sunday after Mar, 22, 2020? + * const result = nextSunday(new Date(2020, 2, 22)) + * //=> Sun Mar 29 2020 00:00:00 + */ +function nextSunday(date) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(date, 0); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9457: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = nextThursday; + +var _index = _interopRequireDefault(__nccwpck_require__(6771)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name nextThursday + * @category Weekday Helpers + * @summary When is the next Thursday? + * + * @description + * When is the next Thursday? + * + * @param {Date | number} date - the date to start counting from + * @returns {Date} the next Thursday + * @throws {TypeError} 1 argument required + * + * @example + * // When is the next Thursday after Mar, 22, 2020? + * const result = nextThursday(new Date(2020, 2, 22)) + * //=> Thur Mar 26 2020 00:00:00 + */ +function nextThursday(date) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(date, 4); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7894: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = nextTuesday; + +var _index = _interopRequireDefault(__nccwpck_require__(6771)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name nextTuesday + * @category Weekday Helpers + * @summary When is the next Tuesday? + * + * @description + * When is the next Tuesday? + * + * @param {Date | number} date - the date to start counting from + * @returns {Date} the next Tuesday + * @throws {TypeError} 1 argument required + * + * @example + * // When is the next Tuesday after Mar, 22, 2020? + * const result = nextTuesday(new Date(2020, 2, 22)) + * //=> Tue Mar 24 2020 00:00:00 + */ +function nextTuesday(date) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(date, 2); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 29: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = nextWednesday; + +var _index = _interopRequireDefault(__nccwpck_require__(6771)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name nextWednesday + * @category Weekday Helpers + * @summary When is the next Wednesday? + * + * @description + * When is the next Wednesday? + * + * @param {Date | number} date - the date to start counting from + * @returns {Date} the next Wednesday + * @throws {TypeError} 1 argument required + * + * @example + * // When is the next Wednesday after Mar, 22, 2020? + * const result = nextWednesday(new Date(2020, 2, 22)) + * //=> Wed Mar 25 2020 00:00:00 + */ +function nextWednesday(date) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(date, 3); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5619: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.Parser = void 0; + +var _Setter = __nccwpck_require__(5665); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var Parser = /*#__PURE__*/function () { + function Parser() { + _classCallCheck(this, Parser); + } + + _createClass(Parser, [{ + key: "run", + value: function run(dateString, token, match, options) { + var result = this.parse(dateString, token, match, options); + + if (!result) { + return null; + } + + return { + setter: new _Setter.ValueSetter(result.value, this.validate, this.set, this.priority, this.subPriority), + rest: result.rest + }; + } + }, { + key: "validate", + value: function validate(_utcDate, _value, _options) { + return true; + } + }]); + + return Parser; +}(); + +exports.Parser = Parser; + +/***/ }), + +/***/ 5665: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ValueSetter = exports.Setter = exports.DateToSystemTimezoneSetter = void 0; + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var TIMEZONE_UNIT_PRIORITY = 10; + +var Setter = /*#__PURE__*/function () { + function Setter() { + _classCallCheck(this, Setter); + + _defineProperty(this, "subPriority", 0); + } + + _createClass(Setter, [{ + key: "validate", + value: function validate(_utcDate, _options) { + return true; + } + }]); + + return Setter; +}(); + +exports.Setter = Setter; + +var ValueSetter = /*#__PURE__*/function (_Setter) { + _inherits(ValueSetter, _Setter); + + var _super = _createSuper(ValueSetter); + + function ValueSetter(value, validateValue, setValue, priority, subPriority) { + var _this; + + _classCallCheck(this, ValueSetter); + + _this = _super.call(this); + _this.value = value; + _this.validateValue = validateValue; + _this.setValue = setValue; + _this.priority = priority; + + if (subPriority) { + _this.subPriority = subPriority; + } + + return _this; + } + + _createClass(ValueSetter, [{ + key: "validate", + value: function validate(utcDate, options) { + return this.validateValue(utcDate, this.value, options); + } + }, { + key: "set", + value: function set(utcDate, flags, options) { + return this.setValue(utcDate, flags, this.value, options); + } + }]); + + return ValueSetter; +}(Setter); + +exports.ValueSetter = ValueSetter; + +var DateToSystemTimezoneSetter = /*#__PURE__*/function (_Setter2) { + _inherits(DateToSystemTimezoneSetter, _Setter2); + + var _super2 = _createSuper(DateToSystemTimezoneSetter); + + function DateToSystemTimezoneSetter() { + var _this2; + + _classCallCheck(this, DateToSystemTimezoneSetter); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this2 = _super2.call.apply(_super2, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this2), "priority", TIMEZONE_UNIT_PRIORITY); + + _defineProperty(_assertThisInitialized(_this2), "subPriority", -1); + + return _this2; + } + + _createClass(DateToSystemTimezoneSetter, [{ + key: "set", + value: function set(date, flags) { + if (flags.timestampIsSet) { + return date; + } + + var convertedDate = new Date(0); + convertedDate.setFullYear(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()); + convertedDate.setHours(date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds()); + return convertedDate; + } + }]); + + return DateToSystemTimezoneSetter; +}(Setter); + +exports.DateToSystemTimezoneSetter = DateToSystemTimezoneSetter; + +/***/ }), + +/***/ 463: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.timezonePatterns = exports.numericPatterns = void 0; +var numericPatterns = { + month: /^(1[0-2]|0?\d)/, + // 0 to 12 + date: /^(3[0-1]|[0-2]?\d)/, + // 0 to 31 + dayOfYear: /^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/, + // 0 to 366 + week: /^(5[0-3]|[0-4]?\d)/, + // 0 to 53 + hour23h: /^(2[0-3]|[0-1]?\d)/, + // 0 to 23 + hour24h: /^(2[0-4]|[0-1]?\d)/, + // 0 to 24 + hour11h: /^(1[0-1]|0?\d)/, + // 0 to 11 + hour12h: /^(1[0-2]|0?\d)/, + // 0 to 12 + minute: /^[0-5]?\d/, + // 0 to 59 + second: /^[0-5]?\d/, + // 0 to 59 + singleDigit: /^\d/, + // 0 to 9 + twoDigits: /^\d{1,2}/, + // 0 to 99 + threeDigits: /^\d{1,3}/, + // 0 to 999 + fourDigits: /^\d{1,4}/, + // 0 to 9999 + anyDigitsSigned: /^-?\d+/, + singleDigitSigned: /^-?\d/, + // 0 to 9, -0 to -9 + twoDigitsSigned: /^-?\d{1,2}/, + // 0 to 99, -0 to -99 + threeDigitsSigned: /^-?\d{1,3}/, + // 0 to 999, -0 to -999 + fourDigitsSigned: /^-?\d{1,4}/ // 0 to 9999, -0 to -9999 + +}; +exports.numericPatterns = numericPatterns; +var timezonePatterns = { + basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/, + basic: /^([+-])(\d{2})(\d{2})|Z/, + basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/, + extended: /^([+-])(\d{2}):(\d{2})|Z/, + extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/ +}; +exports.timezonePatterns = timezonePatterns; + +/***/ }), + +/***/ 9187: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.AMPMMidnightParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var AMPMMidnightParser = /*#__PURE__*/function (_Parser) { + _inherits(AMPMMidnightParser, _Parser); + + var _super = _createSuper(AMPMMidnightParser); + + function AMPMMidnightParser() { + var _this; + + _classCallCheck(this, AMPMMidnightParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 80); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['a', 'B', 'H', 'k', 't', 'T']); + + return _this; + } + + _createClass(AMPMMidnightParser, [{ + key: "parse", + value: function parse(dateString, token, match) { + switch (token) { + case 'b': + case 'bb': + case 'bbb': + return match.dayPeriod(dateString, { + width: 'abbreviated', + context: 'formatting' + }) || match.dayPeriod(dateString, { + width: 'narrow', + context: 'formatting' + }); + + case 'bbbbb': + return match.dayPeriod(dateString, { + width: 'narrow', + context: 'formatting' + }); + + case 'bbbb': + default: + return match.dayPeriod(dateString, { + width: 'wide', + context: 'formatting' + }) || match.dayPeriod(dateString, { + width: 'abbreviated', + context: 'formatting' + }) || match.dayPeriod(dateString, { + width: 'narrow', + context: 'formatting' + }); + } + } + }, { + key: "set", + value: function set(date, _flags, value) { + date.setUTCHours((0, _utils.dayPeriodEnumToHours)(value), 0, 0, 0); + return date; + } + }]); + + return AMPMMidnightParser; +}(_Parser2.Parser); + +exports.AMPMMidnightParser = AMPMMidnightParser; + +/***/ }), + +/***/ 8678: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.AMPMParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var AMPMParser = /*#__PURE__*/function (_Parser) { + _inherits(AMPMParser, _Parser); + + var _super = _createSuper(AMPMParser); + + function AMPMParser() { + var _this; + + _classCallCheck(this, AMPMParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 80); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['b', 'B', 'H', 'k', 't', 'T']); + + return _this; + } + + _createClass(AMPMParser, [{ + key: "parse", + value: function parse(dateString, token, match) { + switch (token) { + case 'a': + case 'aa': + case 'aaa': + return match.dayPeriod(dateString, { + width: 'abbreviated', + context: 'formatting' + }) || match.dayPeriod(dateString, { + width: 'narrow', + context: 'formatting' + }); + + case 'aaaaa': + return match.dayPeriod(dateString, { + width: 'narrow', + context: 'formatting' + }); + + case 'aaaa': + default: + return match.dayPeriod(dateString, { + width: 'wide', + context: 'formatting' + }) || match.dayPeriod(dateString, { + width: 'abbreviated', + context: 'formatting' + }) || match.dayPeriod(dateString, { + width: 'narrow', + context: 'formatting' + }); + } + } + }, { + key: "set", + value: function set(date, _flags, value) { + date.setUTCHours((0, _utils.dayPeriodEnumToHours)(value), 0, 0, 0); + return date; + } + }]); + + return AMPMParser; +}(_Parser2.Parser); + +exports.AMPMParser = AMPMParser; + +/***/ }), + +/***/ 4757: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.DateParser = void 0; + +var _utils = __nccwpck_require__(9042); + +var _Parser2 = __nccwpck_require__(5619); + +var _constants = __nccwpck_require__(463); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; +var DAYS_IN_MONTH_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; // Day of the month + +var DateParser = /*#__PURE__*/function (_Parser) { + _inherits(DateParser, _Parser); + + var _super = _createSuper(DateParser); + + function DateParser() { + var _this; + + _classCallCheck(this, DateParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 90); + + _defineProperty(_assertThisInitialized(_this), "subPriority", 1); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['Y', 'R', 'q', 'Q', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']); + + return _this; + } + + _createClass(DateParser, [{ + key: "parse", + value: function parse(dateString, token, match) { + switch (token) { + case 'd': + return (0, _utils.parseNumericPattern)(_constants.numericPatterns.date, dateString); + + case 'do': + return match.ordinalNumber(dateString, { + unit: 'date' + }); + + default: + return (0, _utils.parseNDigits)(token.length, dateString); + } + } + }, { + key: "validate", + value: function validate(date, value) { + var year = date.getUTCFullYear(); + var isLeapYear = (0, _utils.isLeapYearIndex)(year); + var month = date.getUTCMonth(); + + if (isLeapYear) { + return value >= 1 && value <= DAYS_IN_MONTH_LEAP_YEAR[month]; + } else { + return value >= 1 && value <= DAYS_IN_MONTH[month]; + } + } + }, { + key: "set", + value: function set(date, _flags, value) { + date.setUTCDate(value); + date.setUTCHours(0, 0, 0, 0); + return date; + } + }]); + + return DateParser; +}(_Parser2.Parser); + +exports.DateParser = DateParser; + +/***/ }), + +/***/ 7001: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.DayOfYearParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _constants = __nccwpck_require__(463); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var DayOfYearParser = /*#__PURE__*/function (_Parser) { + _inherits(DayOfYearParser, _Parser); + + var _super = _createSuper(DayOfYearParser); + + function DayOfYearParser() { + var _this; + + _classCallCheck(this, DayOfYearParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 90); + + _defineProperty(_assertThisInitialized(_this), "subpriority", 1); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['Y', 'R', 'q', 'Q', 'M', 'L', 'w', 'I', 'd', 'E', 'i', 'e', 'c', 't', 'T']); + + return _this; + } + + _createClass(DayOfYearParser, [{ + key: "parse", + value: function parse(dateString, token, match) { + switch (token) { + case 'D': + case 'DD': + return (0, _utils.parseNumericPattern)(_constants.numericPatterns.dayOfYear, dateString); + + case 'Do': + return match.ordinalNumber(dateString, { + unit: 'date' + }); + + default: + return (0, _utils.parseNDigits)(token.length, dateString); + } + } + }, { + key: "validate", + value: function validate(date, value) { + var year = date.getUTCFullYear(); + var isLeapYear = (0, _utils.isLeapYearIndex)(year); + + if (isLeapYear) { + return value >= 1 && value <= 366; + } else { + return value >= 1 && value <= 365; + } + } + }, { + key: "set", + value: function set(date, _flags, value) { + date.setUTCMonth(0, value); + date.setUTCHours(0, 0, 0, 0); + return date; + } + }]); + + return DayOfYearParser; +}(_Parser2.Parser); + +exports.DayOfYearParser = DayOfYearParser; + +/***/ }), + +/***/ 2280: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.DayParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _index = _interopRequireDefault(__nccwpck_require__(2694)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +// Day of week +var DayParser = /*#__PURE__*/function (_Parser) { + _inherits(DayParser, _Parser); + + var _super = _createSuper(DayParser); + + function DayParser() { + var _this; + + _classCallCheck(this, DayParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 90); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['D', 'i', 'e', 'c', 't', 'T']); + + return _this; + } + + _createClass(DayParser, [{ + key: "parse", + value: function parse(dateString, token, match) { + switch (token) { + // Tue + case 'E': + case 'EE': + case 'EEE': + return match.day(dateString, { + width: 'abbreviated', + context: 'formatting' + }) || match.day(dateString, { + width: 'short', + context: 'formatting' + }) || match.day(dateString, { + width: 'narrow', + context: 'formatting' + }); + // T + + case 'EEEEE': + return match.day(dateString, { + width: 'narrow', + context: 'formatting' + }); + // Tu + + case 'EEEEEE': + return match.day(dateString, { + width: 'short', + context: 'formatting' + }) || match.day(dateString, { + width: 'narrow', + context: 'formatting' + }); + // Tuesday + + case 'EEEE': + default: + return match.day(dateString, { + width: 'wide', + context: 'formatting' + }) || match.day(dateString, { + width: 'abbreviated', + context: 'formatting' + }) || match.day(dateString, { + width: 'short', + context: 'formatting' + }) || match.day(dateString, { + width: 'narrow', + context: 'formatting' + }); + } + } + }, { + key: "validate", + value: function validate(_date, value) { + return value >= 0 && value <= 6; + } + }, { + key: "set", + value: function set(date, _flags, value, options) { + date = (0, _index.default)(date, value, options); + date.setUTCHours(0, 0, 0, 0); + return date; + } + }]); + + return DayParser; +}(_Parser2.Parser); + +exports.DayParser = DayParser; + +/***/ }), + +/***/ 9273: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.DayPeriodParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +// in the morning, in the afternoon, in the evening, at night +var DayPeriodParser = /*#__PURE__*/function (_Parser) { + _inherits(DayPeriodParser, _Parser); + + var _super = _createSuper(DayPeriodParser); + + function DayPeriodParser() { + var _this; + + _classCallCheck(this, DayPeriodParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 80); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['a', 'b', 't', 'T']); + + return _this; + } + + _createClass(DayPeriodParser, [{ + key: "parse", + value: function parse(dateString, token, match) { + switch (token) { + case 'B': + case 'BB': + case 'BBB': + return match.dayPeriod(dateString, { + width: 'abbreviated', + context: 'formatting' + }) || match.dayPeriod(dateString, { + width: 'narrow', + context: 'formatting' + }); + + case 'BBBBB': + return match.dayPeriod(dateString, { + width: 'narrow', + context: 'formatting' + }); + + case 'BBBB': + default: + return match.dayPeriod(dateString, { + width: 'wide', + context: 'formatting' + }) || match.dayPeriod(dateString, { + width: 'abbreviated', + context: 'formatting' + }) || match.dayPeriod(dateString, { + width: 'narrow', + context: 'formatting' + }); + } + } + }, { + key: "set", + value: function set(date, _flags, value) { + date.setUTCHours((0, _utils.dayPeriodEnumToHours)(value), 0, 0, 0); + return date; + } + }]); + + return DayPeriodParser; +}(_Parser2.Parser); + +exports.DayPeriodParser = DayPeriodParser; + +/***/ }), + +/***/ 6309: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.EraParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var EraParser = /*#__PURE__*/function (_Parser) { + _inherits(EraParser, _Parser); + + var _super = _createSuper(EraParser); + + function EraParser() { + var _this; + + _classCallCheck(this, EraParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 140); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['R', 'u', 't', 'T']); + + return _this; + } + + _createClass(EraParser, [{ + key: "parse", + value: function parse(dateString, token, match) { + switch (token) { + // AD, BC + case 'G': + case 'GG': + case 'GGG': + return match.era(dateString, { + width: 'abbreviated' + }) || match.era(dateString, { + width: 'narrow' + }); + // A, B + + case 'GGGGG': + return match.era(dateString, { + width: 'narrow' + }); + // Anno Domini, Before Christ + + case 'GGGG': + default: + return match.era(dateString, { + width: 'wide' + }) || match.era(dateString, { + width: 'abbreviated' + }) || match.era(dateString, { + width: 'narrow' + }); + } + } + }, { + key: "set", + value: function set(date, flags, value) { + flags.era = value; + date.setUTCFullYear(value, 0, 1); + date.setUTCHours(0, 0, 0, 0); + return date; + } + }]); + + return EraParser; +}(_Parser2.Parser); + +exports.EraParser = EraParser; + +/***/ }), + +/***/ 4754: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ExtendedYearParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var ExtendedYearParser = /*#__PURE__*/function (_Parser) { + _inherits(ExtendedYearParser, _Parser); + + var _super = _createSuper(ExtendedYearParser); + + function ExtendedYearParser() { + var _this; + + _classCallCheck(this, ExtendedYearParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 130); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['G', 'y', 'Y', 'R', 'w', 'I', 'i', 'e', 'c', 't', 'T']); + + return _this; + } + + _createClass(ExtendedYearParser, [{ + key: "parse", + value: function parse(dateString, token) { + if (token === 'u') { + return (0, _utils.parseNDigitsSigned)(4, dateString); + } + + return (0, _utils.parseNDigitsSigned)(token.length, dateString); + } + }, { + key: "set", + value: function set(date, _flags, value) { + date.setUTCFullYear(value, 0, 1); + date.setUTCHours(0, 0, 0, 0); + return date; + } + }]); + + return ExtendedYearParser; +}(_Parser2.Parser); + +exports.ExtendedYearParser = ExtendedYearParser; + +/***/ }), + +/***/ 5194: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.FractionOfSecondParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var FractionOfSecondParser = /*#__PURE__*/function (_Parser) { + _inherits(FractionOfSecondParser, _Parser); + + var _super = _createSuper(FractionOfSecondParser); + + function FractionOfSecondParser() { + var _this; + + _classCallCheck(this, FractionOfSecondParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 30); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['t', 'T']); + + return _this; + } + + _createClass(FractionOfSecondParser, [{ + key: "parse", + value: function parse(dateString, token) { + var valueCallback = function valueCallback(value) { + return Math.floor(value * Math.pow(10, -token.length + 3)); + }; + + return (0, _utils.mapValue)((0, _utils.parseNDigits)(token.length, dateString), valueCallback); + } + }, { + key: "set", + value: function set(date, _flags, value) { + date.setUTCMilliseconds(value); + return date; + } + }]); + + return FractionOfSecondParser; +}(_Parser2.Parser); + +exports.FractionOfSecondParser = FractionOfSecondParser; + +/***/ }), + +/***/ 323: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.Hour0To11Parser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _constants = __nccwpck_require__(463); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Hour0To11Parser = /*#__PURE__*/function (_Parser) { + _inherits(Hour0To11Parser, _Parser); + + var _super = _createSuper(Hour0To11Parser); + + function Hour0To11Parser() { + var _this; + + _classCallCheck(this, Hour0To11Parser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 70); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['h', 'H', 'k', 't', 'T']); + + return _this; + } + + _createClass(Hour0To11Parser, [{ + key: "parse", + value: function parse(dateString, token, match) { + switch (token) { + case 'K': + return (0, _utils.parseNumericPattern)(_constants.numericPatterns.hour11h, dateString); + + case 'Ko': + return match.ordinalNumber(dateString, { + unit: 'hour' + }); + + default: + return (0, _utils.parseNDigits)(token.length, dateString); + } + } + }, { + key: "validate", + value: function validate(_date, value) { + return value >= 0 && value <= 11; + } + }, { + key: "set", + value: function set(date, _flags, value) { + var isPM = date.getUTCHours() >= 12; + + if (isPM && value < 12) { + date.setUTCHours(value + 12, 0, 0, 0); + } else { + date.setUTCHours(value, 0, 0, 0); + } + + return date; + } + }]); + + return Hour0To11Parser; +}(_Parser2.Parser); + +exports.Hour0To11Parser = Hour0To11Parser; + +/***/ }), + +/***/ 2610: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.Hour0to23Parser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _constants = __nccwpck_require__(463); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Hour0to23Parser = /*#__PURE__*/function (_Parser) { + _inherits(Hour0to23Parser, _Parser); + + var _super = _createSuper(Hour0to23Parser); + + function Hour0to23Parser() { + var _this; + + _classCallCheck(this, Hour0to23Parser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 70); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['a', 'b', 'h', 'K', 'k', 't', 'T']); + + return _this; + } + + _createClass(Hour0to23Parser, [{ + key: "parse", + value: function parse(dateString, token, match) { + switch (token) { + case 'H': + return (0, _utils.parseNumericPattern)(_constants.numericPatterns.hour23h, dateString); + + case 'Ho': + return match.ordinalNumber(dateString, { + unit: 'hour' + }); + + default: + return (0, _utils.parseNDigits)(token.length, dateString); + } + } + }, { + key: "validate", + value: function validate(_date, value) { + return value >= 0 && value <= 23; + } + }, { + key: "set", + value: function set(date, _flags, value) { + date.setUTCHours(value, 0, 0, 0); + return date; + } + }]); + + return Hour0to23Parser; +}(_Parser2.Parser); + +exports.Hour0to23Parser = Hour0to23Parser; + +/***/ }), + +/***/ 5980: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.Hour1To24Parser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _constants = __nccwpck_require__(463); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Hour1To24Parser = /*#__PURE__*/function (_Parser) { + _inherits(Hour1To24Parser, _Parser); + + var _super = _createSuper(Hour1To24Parser); + + function Hour1To24Parser() { + var _this; + + _classCallCheck(this, Hour1To24Parser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 70); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['a', 'b', 'h', 'H', 'K', 't', 'T']); + + return _this; + } + + _createClass(Hour1To24Parser, [{ + key: "parse", + value: function parse(dateString, token, match) { + switch (token) { + case 'k': + return (0, _utils.parseNumericPattern)(_constants.numericPatterns.hour24h, dateString); + + case 'ko': + return match.ordinalNumber(dateString, { + unit: 'hour' + }); + + default: + return (0, _utils.parseNDigits)(token.length, dateString); + } + } + }, { + key: "validate", + value: function validate(_date, value) { + return value >= 1 && value <= 24; + } + }, { + key: "set", + value: function set(date, _flags, value) { + var hours = value <= 24 ? value % 24 : value; + date.setUTCHours(hours, 0, 0, 0); + return date; + } + }]); + + return Hour1To24Parser; +}(_Parser2.Parser); + +exports.Hour1To24Parser = Hour1To24Parser; + +/***/ }), + +/***/ 7929: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.Hour1to12Parser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _constants = __nccwpck_require__(463); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Hour1to12Parser = /*#__PURE__*/function (_Parser) { + _inherits(Hour1to12Parser, _Parser); + + var _super = _createSuper(Hour1to12Parser); + + function Hour1to12Parser() { + var _this; + + _classCallCheck(this, Hour1to12Parser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 70); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['H', 'K', 'k', 't', 'T']); + + return _this; + } + + _createClass(Hour1to12Parser, [{ + key: "parse", + value: function parse(dateString, token, match) { + switch (token) { + case 'h': + return (0, _utils.parseNumericPattern)(_constants.numericPatterns.hour12h, dateString); + + case 'ho': + return match.ordinalNumber(dateString, { + unit: 'hour' + }); + + default: + return (0, _utils.parseNDigits)(token.length, dateString); + } + } + }, { + key: "validate", + value: function validate(_date, value) { + return value >= 1 && value <= 12; + } + }, { + key: "set", + value: function set(date, _flags, value) { + var isPM = date.getUTCHours() >= 12; + + if (isPM && value < 12) { + date.setUTCHours(value + 12, 0, 0, 0); + } else if (!isPM && value === 12) { + date.setUTCHours(0, 0, 0, 0); + } else { + date.setUTCHours(value, 0, 0, 0); + } + + return date; + } + }]); + + return Hour1to12Parser; +}(_Parser2.Parser); + +exports.Hour1to12Parser = Hour1to12Parser; + +/***/ }), + +/***/ 6376: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ISODayParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _utils = __nccwpck_require__(9042); + +var _index = _interopRequireDefault(__nccwpck_require__(7985)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +// ISO day of week +var ISODayParser = /*#__PURE__*/function (_Parser) { + _inherits(ISODayParser, _Parser); + + var _super = _createSuper(ISODayParser); + + function ISODayParser() { + var _this; + + _classCallCheck(this, ISODayParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 90); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['y', 'Y', 'u', 'q', 'Q', 'M', 'L', 'w', 'd', 'D', 'E', 'e', 'c', 't', 'T']); + + return _this; + } + + _createClass(ISODayParser, [{ + key: "parse", + value: function parse(dateString, token, match) { + var valueCallback = function valueCallback(value) { + if (value === 0) { + return 7; + } + + return value; + }; + + switch (token) { + // 2 + case 'i': + case 'ii': + // 02 + return (0, _utils.parseNDigits)(token.length, dateString); + // 2nd + + case 'io': + return match.ordinalNumber(dateString, { + unit: 'day' + }); + // Tue + + case 'iii': + return (0, _utils.mapValue)(match.day(dateString, { + width: 'abbreviated', + context: 'formatting' + }) || match.day(dateString, { + width: 'short', + context: 'formatting' + }) || match.day(dateString, { + width: 'narrow', + context: 'formatting' + }), valueCallback); + // T + + case 'iiiii': + return (0, _utils.mapValue)(match.day(dateString, { + width: 'narrow', + context: 'formatting' + }), valueCallback); + // Tu + + case 'iiiiii': + return (0, _utils.mapValue)(match.day(dateString, { + width: 'short', + context: 'formatting' + }) || match.day(dateString, { + width: 'narrow', + context: 'formatting' + }), valueCallback); + // Tuesday + + case 'iiii': + default: + return (0, _utils.mapValue)(match.day(dateString, { + width: 'wide', + context: 'formatting' + }) || match.day(dateString, { + width: 'abbreviated', + context: 'formatting' + }) || match.day(dateString, { + width: 'short', + context: 'formatting' + }) || match.day(dateString, { + width: 'narrow', + context: 'formatting' + }), valueCallback); + } + } + }, { + key: "validate", + value: function validate(_date, value) { + return value >= 1 && value <= 7; + } + }, { + key: "set", + value: function set(date, _flags, value) { + date = (0, _index.default)(date, value); + date.setUTCHours(0, 0, 0, 0); + return date; + } + }]); + + return ISODayParser; +}(_Parser2.Parser); + +exports.ISODayParser = ISODayParser; + +/***/ }), + +/***/ 9874: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ISOTimezoneParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _constants = __nccwpck_require__(463); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +// Timezone (ISO-8601) +var ISOTimezoneParser = /*#__PURE__*/function (_Parser) { + _inherits(ISOTimezoneParser, _Parser); + + var _super = _createSuper(ISOTimezoneParser); + + function ISOTimezoneParser() { + var _this; + + _classCallCheck(this, ISOTimezoneParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 10); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['t', 'T', 'X']); + + return _this; + } + + _createClass(ISOTimezoneParser, [{ + key: "parse", + value: function parse(dateString, token) { + switch (token) { + case 'x': + return (0, _utils.parseTimezonePattern)(_constants.timezonePatterns.basicOptionalMinutes, dateString); + + case 'xx': + return (0, _utils.parseTimezonePattern)(_constants.timezonePatterns.basic, dateString); + + case 'xxxx': + return (0, _utils.parseTimezonePattern)(_constants.timezonePatterns.basicOptionalSeconds, dateString); + + case 'xxxxx': + return (0, _utils.parseTimezonePattern)(_constants.timezonePatterns.extendedOptionalSeconds, dateString); + + case 'xxx': + default: + return (0, _utils.parseTimezonePattern)(_constants.timezonePatterns.extended, dateString); + } + } + }, { + key: "set", + value: function set(date, flags, value) { + if (flags.timestampIsSet) { + return date; + } + + return new Date(date.getTime() - value); + } + }]); + + return ISOTimezoneParser; +}(_Parser2.Parser); + +exports.ISOTimezoneParser = ISOTimezoneParser; + +/***/ }), + +/***/ 9822: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ISOTimezoneWithZParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _constants = __nccwpck_require__(463); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +// Timezone (ISO-8601. +00:00 is `'Z'`) +var ISOTimezoneWithZParser = /*#__PURE__*/function (_Parser) { + _inherits(ISOTimezoneWithZParser, _Parser); + + var _super = _createSuper(ISOTimezoneWithZParser); + + function ISOTimezoneWithZParser() { + var _this; + + _classCallCheck(this, ISOTimezoneWithZParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 10); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['t', 'T', 'x']); + + return _this; + } + + _createClass(ISOTimezoneWithZParser, [{ + key: "parse", + value: function parse(dateString, token) { + switch (token) { + case 'X': + return (0, _utils.parseTimezonePattern)(_constants.timezonePatterns.basicOptionalMinutes, dateString); + + case 'XX': + return (0, _utils.parseTimezonePattern)(_constants.timezonePatterns.basic, dateString); + + case 'XXXX': + return (0, _utils.parseTimezonePattern)(_constants.timezonePatterns.basicOptionalSeconds, dateString); + + case 'XXXXX': + return (0, _utils.parseTimezonePattern)(_constants.timezonePatterns.extendedOptionalSeconds, dateString); + + case 'XXX': + default: + return (0, _utils.parseTimezonePattern)(_constants.timezonePatterns.extended, dateString); + } + } + }, { + key: "set", + value: function set(date, flags, value) { + if (flags.timestampIsSet) { + return date; + } + + return new Date(date.getTime() - value); + } + }]); + + return ISOTimezoneWithZParser; +}(_Parser2.Parser); + +exports.ISOTimezoneWithZParser = ISOTimezoneWithZParser; + +/***/ }), + +/***/ 2127: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ISOWeekParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _constants = __nccwpck_require__(463); + +var _utils = __nccwpck_require__(9042); + +var _index = _interopRequireDefault(__nccwpck_require__(8921)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(3061)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +// ISO week of year +var ISOWeekParser = /*#__PURE__*/function (_Parser) { + _inherits(ISOWeekParser, _Parser); + + var _super = _createSuper(ISOWeekParser); + + function ISOWeekParser() { + var _this; + + _classCallCheck(this, ISOWeekParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 100); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['y', 'Y', 'u', 'q', 'Q', 'M', 'L', 'w', 'd', 'D', 'e', 'c', 't', 'T']); + + return _this; + } + + _createClass(ISOWeekParser, [{ + key: "parse", + value: function parse(dateString, token, match) { + switch (token) { + case 'I': + return (0, _utils.parseNumericPattern)(_constants.numericPatterns.week, dateString); + + case 'Io': + return match.ordinalNumber(dateString, { + unit: 'week' + }); + + default: + return (0, _utils.parseNDigits)(token.length, dateString); + } + } + }, { + key: "validate", + value: function validate(_date, value) { + return value >= 1 && value <= 53; + } + }, { + key: "set", + value: function set(date, _flags, value) { + return (0, _index2.default)((0, _index.default)(date, value)); + } + }]); + + return ISOWeekParser; +}(_Parser2.Parser); + +exports.ISOWeekParser = ISOWeekParser; + +/***/ }), + +/***/ 519: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ISOWeekYearParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _utils = __nccwpck_require__(9042); + +var _index = _interopRequireDefault(__nccwpck_require__(3061)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +// ISO week-numbering year +var ISOWeekYearParser = /*#__PURE__*/function (_Parser) { + _inherits(ISOWeekYearParser, _Parser); + + var _super = _createSuper(ISOWeekYearParser); + + function ISOWeekYearParser() { + var _this; + + _classCallCheck(this, ISOWeekYearParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 130); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['G', 'y', 'Y', 'u', 'Q', 'q', 'M', 'L', 'w', 'd', 'D', 'e', 'c', 't', 'T']); + + return _this; + } + + _createClass(ISOWeekYearParser, [{ + key: "parse", + value: function parse(dateString, token) { + if (token === 'R') { + return (0, _utils.parseNDigitsSigned)(4, dateString); + } + + return (0, _utils.parseNDigitsSigned)(token.length, dateString); + } + }, { + key: "set", + value: function set(_date, _flags, value) { + var firstWeekOfYear = new Date(0); + firstWeekOfYear.setUTCFullYear(value, 0, 4); + firstWeekOfYear.setUTCHours(0, 0, 0, 0); + return (0, _index.default)(firstWeekOfYear); + } + }]); + + return ISOWeekYearParser; +}(_Parser2.Parser); + +exports.ISOWeekYearParser = ISOWeekYearParser; + +/***/ }), + +/***/ 1190: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.LocalDayParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _utils = __nccwpck_require__(9042); + +var _index = _interopRequireDefault(__nccwpck_require__(2694)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +// Local day of week +var LocalDayParser = /*#__PURE__*/function (_Parser) { + _inherits(LocalDayParser, _Parser); + + var _super = _createSuper(LocalDayParser); + + function LocalDayParser() { + var _this; + + _classCallCheck(this, LocalDayParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 90); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'E', 'i', 'c', 't', 'T']); + + return _this; + } + + _createClass(LocalDayParser, [{ + key: "parse", + value: function parse(dateString, token, match, options) { + var valueCallback = function valueCallback(value) { + var wholeWeekDays = Math.floor((value - 1) / 7) * 7; + return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays; + }; + + switch (token) { + // 3 + case 'e': + case 'ee': + // 03 + return (0, _utils.mapValue)((0, _utils.parseNDigits)(token.length, dateString), valueCallback); + // 3rd + + case 'eo': + return (0, _utils.mapValue)(match.ordinalNumber(dateString, { + unit: 'day' + }), valueCallback); + // Tue + + case 'eee': + return match.day(dateString, { + width: 'abbreviated', + context: 'formatting' + }) || match.day(dateString, { + width: 'short', + context: 'formatting' + }) || match.day(dateString, { + width: 'narrow', + context: 'formatting' + }); + // T + + case 'eeeee': + return match.day(dateString, { + width: 'narrow', + context: 'formatting' + }); + // Tu + + case 'eeeeee': + return match.day(dateString, { + width: 'short', + context: 'formatting' + }) || match.day(dateString, { + width: 'narrow', + context: 'formatting' + }); + // Tuesday + + case 'eeee': + default: + return match.day(dateString, { + width: 'wide', + context: 'formatting' + }) || match.day(dateString, { + width: 'abbreviated', + context: 'formatting' + }) || match.day(dateString, { + width: 'short', + context: 'formatting' + }) || match.day(dateString, { + width: 'narrow', + context: 'formatting' + }); + } + } + }, { + key: "validate", + value: function validate(_date, value) { + return value >= 0 && value <= 6; + } + }, { + key: "set", + value: function set(date, _flags, value, options) { + date = (0, _index.default)(date, value, options); + date.setUTCHours(0, 0, 0, 0); + return date; + } + }]); + + return LocalDayParser; +}(_Parser2.Parser); + +exports.LocalDayParser = LocalDayParser; + +/***/ }), + +/***/ 6125: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.LocalWeekParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _constants = __nccwpck_require__(463); + +var _utils = __nccwpck_require__(9042); + +var _index = _interopRequireDefault(__nccwpck_require__(3285)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2258)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +// Local week of year +var LocalWeekParser = /*#__PURE__*/function (_Parser) { + _inherits(LocalWeekParser, _Parser); + + var _super = _createSuper(LocalWeekParser); + + function LocalWeekParser() { + var _this; + + _classCallCheck(this, LocalWeekParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 100); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'i', 't', 'T']); + + return _this; + } + + _createClass(LocalWeekParser, [{ + key: "parse", + value: function parse(dateString, token, match) { + switch (token) { + case 'w': + return (0, _utils.parseNumericPattern)(_constants.numericPatterns.week, dateString); + + case 'wo': + return match.ordinalNumber(dateString, { + unit: 'week' + }); + + default: + return (0, _utils.parseNDigits)(token.length, dateString); + } + } + }, { + key: "validate", + value: function validate(_date, value) { + return value >= 1 && value <= 53; + } + }, { + key: "set", + value: function set(date, _flags, value, options) { + return (0, _index2.default)((0, _index.default)(date, value, options), options); + } + }]); + + return LocalWeekParser; +}(_Parser2.Parser); + +exports.LocalWeekParser = LocalWeekParser; + +/***/ }), + +/***/ 85: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.LocalWeekYearParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _utils = __nccwpck_require__(9042); + +var _index = _interopRequireDefault(__nccwpck_require__(8050)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2258)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +// Local week-numbering year +var LocalWeekYearParser = /*#__PURE__*/function (_Parser) { + _inherits(LocalWeekYearParser, _Parser); + + var _super = _createSuper(LocalWeekYearParser); + + function LocalWeekYearParser() { + var _this; + + _classCallCheck(this, LocalWeekYearParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 130); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['y', 'R', 'u', 'Q', 'q', 'M', 'L', 'I', 'd', 'D', 'i', 't', 'T']); + + return _this; + } + + _createClass(LocalWeekYearParser, [{ + key: "parse", + value: function parse(dateString, token, match) { + var valueCallback = function valueCallback(year) { + return { + year: year, + isTwoDigitYear: token === 'YY' + }; + }; + + switch (token) { + case 'Y': + return (0, _utils.mapValue)((0, _utils.parseNDigits)(4, dateString), valueCallback); + + case 'Yo': + return (0, _utils.mapValue)(match.ordinalNumber(dateString, { + unit: 'year' + }), valueCallback); + + default: + return (0, _utils.mapValue)((0, _utils.parseNDigits)(token.length, dateString), valueCallback); + } + } + }, { + key: "validate", + value: function validate(_date, value) { + return value.isTwoDigitYear || value.year > 0; + } + }, { + key: "set", + value: function set(date, flags, value, options) { + var currentYear = (0, _index.default)(date, options); + + if (value.isTwoDigitYear) { + var normalizedTwoDigitYear = (0, _utils.normalizeTwoDigitYear)(value.year, currentYear); + date.setUTCFullYear(normalizedTwoDigitYear, 0, options.firstWeekContainsDate); + date.setUTCHours(0, 0, 0, 0); + return (0, _index2.default)(date, options); + } + + var year = !('era' in flags) || flags.era === 1 ? value.year : 1 - value.year; + date.setUTCFullYear(year, 0, options.firstWeekContainsDate); + date.setUTCHours(0, 0, 0, 0); + return (0, _index2.default)(date, options); + } + }]); + + return LocalWeekYearParser; +}(_Parser2.Parser); + +exports.LocalWeekYearParser = LocalWeekYearParser; + +/***/ }), + +/***/ 4254: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.MinuteParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _constants = __nccwpck_require__(463); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var MinuteParser = /*#__PURE__*/function (_Parser) { + _inherits(MinuteParser, _Parser); + + var _super = _createSuper(MinuteParser); + + function MinuteParser() { + var _this; + + _classCallCheck(this, MinuteParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 60); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['t', 'T']); + + return _this; + } + + _createClass(MinuteParser, [{ + key: "parse", + value: function parse(dateString, token, match) { + switch (token) { + case 'm': + return (0, _utils.parseNumericPattern)(_constants.numericPatterns.minute, dateString); + + case 'mo': + return match.ordinalNumber(dateString, { + unit: 'minute' + }); + + default: + return (0, _utils.parseNDigits)(token.length, dateString); + } + } + }, { + key: "validate", + value: function validate(_date, value) { + return value >= 0 && value <= 59; + } + }, { + key: "set", + value: function set(date, _flags, value) { + date.setUTCMinutes(value, 0, 0); + return date; + } + }]); + + return MinuteParser; +}(_Parser2.Parser); + +exports.MinuteParser = MinuteParser; + +/***/ }), + +/***/ 9581: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.MonthParser = void 0; + +var _utils = __nccwpck_require__(9042); + +var _Parser2 = __nccwpck_require__(5619); + +var _constants = __nccwpck_require__(463); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var MonthParser = /*#__PURE__*/function (_Parser) { + _inherits(MonthParser, _Parser); + + var _super = _createSuper(MonthParser); + + function MonthParser() { + var _this; + + _classCallCheck(this, MonthParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['Y', 'R', 'q', 'Q', 'L', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']); + + _defineProperty(_assertThisInitialized(_this), "priority", 110); + + return _this; + } + + _createClass(MonthParser, [{ + key: "parse", + value: function parse(dateString, token, match) { + var valueCallback = function valueCallback(value) { + return value - 1; + }; + + switch (token) { + // 1, 2, ..., 12 + case 'M': + return (0, _utils.mapValue)((0, _utils.parseNumericPattern)(_constants.numericPatterns.month, dateString), valueCallback); + // 01, 02, ..., 12 + + case 'MM': + return (0, _utils.mapValue)((0, _utils.parseNDigits)(2, dateString), valueCallback); + // 1st, 2nd, ..., 12th + + case 'Mo': + return (0, _utils.mapValue)(match.ordinalNumber(dateString, { + unit: 'month' + }), valueCallback); + // Jan, Feb, ..., Dec + + case 'MMM': + return match.month(dateString, { + width: 'abbreviated', + context: 'formatting' + }) || match.month(dateString, { + width: 'narrow', + context: 'formatting' + }); + // J, F, ..., D + + case 'MMMMM': + return match.month(dateString, { + width: 'narrow', + context: 'formatting' + }); + // January, February, ..., December + + case 'MMMM': + default: + return match.month(dateString, { + width: 'wide', + context: 'formatting' + }) || match.month(dateString, { + width: 'abbreviated', + context: 'formatting' + }) || match.month(dateString, { + width: 'narrow', + context: 'formatting' + }); + } + } + }, { + key: "validate", + value: function validate(_date, value) { + return value >= 0 && value <= 11; + } + }, { + key: "set", + value: function set(date, _flags, value) { + date.setUTCMonth(value, 1); + date.setUTCHours(0, 0, 0, 0); + return date; + } + }]); + + return MonthParser; +}(_Parser2.Parser); + +exports.MonthParser = MonthParser; + +/***/ }), + +/***/ 5667: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.QuarterParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var QuarterParser = /*#__PURE__*/function (_Parser) { + _inherits(QuarterParser, _Parser); + + var _super = _createSuper(QuarterParser); + + function QuarterParser() { + var _this; + + _classCallCheck(this, QuarterParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 120); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['Y', 'R', 'q', 'M', 'L', 'w', 'I', 'd', 'D', 'i', 'e', 'c', 't', 'T']); + + return _this; + } + + _createClass(QuarterParser, [{ + key: "parse", + value: function parse(dateString, token, match) { + switch (token) { + // 1, 2, 3, 4 + case 'Q': + case 'QQ': + // 01, 02, 03, 04 + return (0, _utils.parseNDigits)(token.length, dateString); + // 1st, 2nd, 3rd, 4th + + case 'Qo': + return match.ordinalNumber(dateString, { + unit: 'quarter' + }); + // Q1, Q2, Q3, Q4 + + case 'QQQ': + return match.quarter(dateString, { + width: 'abbreviated', + context: 'formatting' + }) || match.quarter(dateString, { + width: 'narrow', + context: 'formatting' + }); + // 1, 2, 3, 4 (narrow quarter; could be not numerical) + + case 'QQQQQ': + return match.quarter(dateString, { + width: 'narrow', + context: 'formatting' + }); + // 1st quarter, 2nd quarter, ... + + case 'QQQQ': + default: + return match.quarter(dateString, { + width: 'wide', + context: 'formatting' + }) || match.quarter(dateString, { + width: 'abbreviated', + context: 'formatting' + }) || match.quarter(dateString, { + width: 'narrow', + context: 'formatting' + }); + } + } + }, { + key: "validate", + value: function validate(_date, value) { + return value >= 1 && value <= 4; + } + }, { + key: "set", + value: function set(date, _flags, value) { + date.setUTCMonth((value - 1) * 3, 1); + date.setUTCHours(0, 0, 0, 0); + return date; + } + }]); + + return QuarterParser; +}(_Parser2.Parser); + +exports.QuarterParser = QuarterParser; + +/***/ }), + +/***/ 3478: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.SecondParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _constants = __nccwpck_require__(463); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var SecondParser = /*#__PURE__*/function (_Parser) { + _inherits(SecondParser, _Parser); + + var _super = _createSuper(SecondParser); + + function SecondParser() { + var _this; + + _classCallCheck(this, SecondParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 50); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['t', 'T']); + + return _this; + } + + _createClass(SecondParser, [{ + key: "parse", + value: function parse(dateString, token, match) { + switch (token) { + case 's': + return (0, _utils.parseNumericPattern)(_constants.numericPatterns.second, dateString); + + case 'so': + return match.ordinalNumber(dateString, { + unit: 'second' + }); + + default: + return (0, _utils.parseNDigits)(token.length, dateString); + } + } + }, { + key: "validate", + value: function validate(_date, value) { + return value >= 0 && value <= 59; + } + }, { + key: "set", + value: function set(date, _flags, value) { + date.setUTCSeconds(value, 0); + return date; + } + }]); + + return SecondParser; +}(_Parser2.Parser); + +exports.SecondParser = SecondParser; + +/***/ }), + +/***/ 1556: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.StandAloneLocalDayParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _utils = __nccwpck_require__(9042); + +var _index = _interopRequireDefault(__nccwpck_require__(2694)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +// Stand-alone local day of week +var StandAloneLocalDayParser = /*#__PURE__*/function (_Parser) { + _inherits(StandAloneLocalDayParser, _Parser); + + var _super = _createSuper(StandAloneLocalDayParser); + + function StandAloneLocalDayParser() { + var _this; + + _classCallCheck(this, StandAloneLocalDayParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 90); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'E', 'i', 'e', 't', 'T']); + + return _this; + } + + _createClass(StandAloneLocalDayParser, [{ + key: "parse", + value: function parse(dateString, token, match, options) { + var valueCallback = function valueCallback(value) { + var wholeWeekDays = Math.floor((value - 1) / 7) * 7; + return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays; + }; + + switch (token) { + // 3 + case 'c': + case 'cc': + // 03 + return (0, _utils.mapValue)((0, _utils.parseNDigits)(token.length, dateString), valueCallback); + // 3rd + + case 'co': + return (0, _utils.mapValue)(match.ordinalNumber(dateString, { + unit: 'day' + }), valueCallback); + // Tue + + case 'ccc': + return match.day(dateString, { + width: 'abbreviated', + context: 'standalone' + }) || match.day(dateString, { + width: 'short', + context: 'standalone' + }) || match.day(dateString, { + width: 'narrow', + context: 'standalone' + }); + // T + + case 'ccccc': + return match.day(dateString, { + width: 'narrow', + context: 'standalone' + }); + // Tu + + case 'cccccc': + return match.day(dateString, { + width: 'short', + context: 'standalone' + }) || match.day(dateString, { + width: 'narrow', + context: 'standalone' + }); + // Tuesday + + case 'cccc': + default: + return match.day(dateString, { + width: 'wide', + context: 'standalone' + }) || match.day(dateString, { + width: 'abbreviated', + context: 'standalone' + }) || match.day(dateString, { + width: 'short', + context: 'standalone' + }) || match.day(dateString, { + width: 'narrow', + context: 'standalone' + }); + } + } + }, { + key: "validate", + value: function validate(_date, value) { + return value >= 0 && value <= 6; + } + }, { + key: "set", + value: function set(date, _flags, value, options) { + date = (0, _index.default)(date, value, options); + date.setUTCHours(0, 0, 0, 0); + return date; + } + }]); + + return StandAloneLocalDayParser; +}(_Parser2.Parser); + +exports.StandAloneLocalDayParser = StandAloneLocalDayParser; + +/***/ }), + +/***/ 9915: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.StandAloneMonthParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _constants = __nccwpck_require__(463); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var StandAloneMonthParser = /*#__PURE__*/function (_Parser) { + _inherits(StandAloneMonthParser, _Parser); + + var _super = _createSuper(StandAloneMonthParser); + + function StandAloneMonthParser() { + var _this; + + _classCallCheck(this, StandAloneMonthParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 110); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['Y', 'R', 'q', 'Q', 'M', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']); + + return _this; + } + + _createClass(StandAloneMonthParser, [{ + key: "parse", + value: function parse(dateString, token, match) { + var valueCallback = function valueCallback(value) { + return value - 1; + }; + + switch (token) { + // 1, 2, ..., 12 + case 'L': + return (0, _utils.mapValue)((0, _utils.parseNumericPattern)(_constants.numericPatterns.month, dateString), valueCallback); + // 01, 02, ..., 12 + + case 'LL': + return (0, _utils.mapValue)((0, _utils.parseNDigits)(2, dateString), valueCallback); + // 1st, 2nd, ..., 12th + + case 'Lo': + return (0, _utils.mapValue)(match.ordinalNumber(dateString, { + unit: 'month' + }), valueCallback); + // Jan, Feb, ..., Dec + + case 'LLL': + return match.month(dateString, { + width: 'abbreviated', + context: 'standalone' + }) || match.month(dateString, { + width: 'narrow', + context: 'standalone' + }); + // J, F, ..., D + + case 'LLLLL': + return match.month(dateString, { + width: 'narrow', + context: 'standalone' + }); + // January, February, ..., December + + case 'LLLL': + default: + return match.month(dateString, { + width: 'wide', + context: 'standalone' + }) || match.month(dateString, { + width: 'abbreviated', + context: 'standalone' + }) || match.month(dateString, { + width: 'narrow', + context: 'standalone' + }); + } + } + }, { + key: "validate", + value: function validate(_date, value) { + return value >= 0 && value <= 11; + } + }, { + key: "set", + value: function set(date, _flags, value) { + date.setUTCMonth(value, 1); + date.setUTCHours(0, 0, 0, 0); + return date; + } + }]); + + return StandAloneMonthParser; +}(_Parser2.Parser); + +exports.StandAloneMonthParser = StandAloneMonthParser; + +/***/ }), + +/***/ 2898: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.StandAloneQuarterParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var StandAloneQuarterParser = /*#__PURE__*/function (_Parser) { + _inherits(StandAloneQuarterParser, _Parser); + + var _super = _createSuper(StandAloneQuarterParser); + + function StandAloneQuarterParser() { + var _this; + + _classCallCheck(this, StandAloneQuarterParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 120); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['Y', 'R', 'Q', 'M', 'L', 'w', 'I', 'd', 'D', 'i', 'e', 'c', 't', 'T']); + + return _this; + } + + _createClass(StandAloneQuarterParser, [{ + key: "parse", + value: function parse(dateString, token, match) { + switch (token) { + // 1, 2, 3, 4 + case 'q': + case 'qq': + // 01, 02, 03, 04 + return (0, _utils.parseNDigits)(token.length, dateString); + // 1st, 2nd, 3rd, 4th + + case 'qo': + return match.ordinalNumber(dateString, { + unit: 'quarter' + }); + // Q1, Q2, Q3, Q4 + + case 'qqq': + return match.quarter(dateString, { + width: 'abbreviated', + context: 'standalone' + }) || match.quarter(dateString, { + width: 'narrow', + context: 'standalone' + }); + // 1, 2, 3, 4 (narrow quarter; could be not numerical) + + case 'qqqqq': + return match.quarter(dateString, { + width: 'narrow', + context: 'standalone' + }); + // 1st quarter, 2nd quarter, ... + + case 'qqqq': + default: + return match.quarter(dateString, { + width: 'wide', + context: 'standalone' + }) || match.quarter(dateString, { + width: 'abbreviated', + context: 'standalone' + }) || match.quarter(dateString, { + width: 'narrow', + context: 'standalone' + }); + } + } + }, { + key: "validate", + value: function validate(_date, value) { + return value >= 1 && value <= 4; + } + }, { + key: "set", + value: function set(date, _flags, value) { + date.setUTCMonth((value - 1) * 3, 1); + date.setUTCHours(0, 0, 0, 0); + return date; + } + }]); + + return StandAloneQuarterParser; +}(_Parser2.Parser); + +exports.StandAloneQuarterParser = StandAloneQuarterParser; + +/***/ }), + +/***/ 3726: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.TimestampMillisecondsParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var TimestampMillisecondsParser = /*#__PURE__*/function (_Parser) { + _inherits(TimestampMillisecondsParser, _Parser); + + var _super = _createSuper(TimestampMillisecondsParser); + + function TimestampMillisecondsParser() { + var _this; + + _classCallCheck(this, TimestampMillisecondsParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 20); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", '*'); + + return _this; + } + + _createClass(TimestampMillisecondsParser, [{ + key: "parse", + value: function parse(dateString) { + return (0, _utils.parseAnyDigitsSigned)(dateString); + } + }, { + key: "set", + value: function set(_date, _flags, value) { + return [new Date(value), { + timestampIsSet: true + }]; + } + }]); + + return TimestampMillisecondsParser; +}(_Parser2.Parser); + +exports.TimestampMillisecondsParser = TimestampMillisecondsParser; + +/***/ }), + +/***/ 771: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.TimestampSecondsParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var TimestampSecondsParser = /*#__PURE__*/function (_Parser) { + _inherits(TimestampSecondsParser, _Parser); + + var _super = _createSuper(TimestampSecondsParser); + + function TimestampSecondsParser() { + var _this; + + _classCallCheck(this, TimestampSecondsParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 40); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", '*'); + + return _this; + } + + _createClass(TimestampSecondsParser, [{ + key: "parse", + value: function parse(dateString) { + return (0, _utils.parseAnyDigitsSigned)(dateString); + } + }, { + key: "set", + value: function set(_date, _flags, value) { + return [new Date(value * 1000), { + timestampIsSet: true + }]; + } + }]); + + return TimestampSecondsParser; +}(_Parser2.Parser); + +exports.TimestampSecondsParser = TimestampSecondsParser; + +/***/ }), + +/***/ 2493: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.YearParser = void 0; + +var _Parser2 = __nccwpck_require__(5619); + +var _utils = __nccwpck_require__(9042); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns +// | Year | y | yy | yyy | yyyy | yyyyy | +// |----------|-------|----|-------|-------|-------| +// | AD 1 | 1 | 01 | 001 | 0001 | 00001 | +// | AD 12 | 12 | 12 | 012 | 0012 | 00012 | +// | AD 123 | 123 | 23 | 123 | 0123 | 00123 | +// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 | +// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 | +var YearParser = /*#__PURE__*/function (_Parser) { + _inherits(YearParser, _Parser); + + var _super = _createSuper(YearParser); + + function YearParser() { + var _this; + + _classCallCheck(this, YearParser); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + + _defineProperty(_assertThisInitialized(_this), "priority", 130); + + _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ['Y', 'R', 'u', 'w', 'I', 'i', 'e', 'c', 't', 'T']); + + return _this; + } + + _createClass(YearParser, [{ + key: "parse", + value: function parse(dateString, token, match) { + var valueCallback = function valueCallback(year) { + return { + year: year, + isTwoDigitYear: token === 'yy' + }; + }; + + switch (token) { + case 'y': + return (0, _utils.mapValue)((0, _utils.parseNDigits)(4, dateString), valueCallback); + + case 'yo': + return (0, _utils.mapValue)(match.ordinalNumber(dateString, { + unit: 'year' + }), valueCallback); + + default: + return (0, _utils.mapValue)((0, _utils.parseNDigits)(token.length, dateString), valueCallback); + } + } + }, { + key: "validate", + value: function validate(_date, value) { + return value.isTwoDigitYear || value.year > 0; + } + }, { + key: "set", + value: function set(date, flags, value) { + var currentYear = date.getUTCFullYear(); + + if (value.isTwoDigitYear) { + var normalizedTwoDigitYear = (0, _utils.normalizeTwoDigitYear)(value.year, currentYear); + date.setUTCFullYear(normalizedTwoDigitYear, 0, 1); + date.setUTCHours(0, 0, 0, 0); + return date; + } + + var year = !('era' in flags) || flags.era === 1 ? value.year : 1 - value.year; + date.setUTCFullYear(year, 0, 1); + date.setUTCHours(0, 0, 0, 0); + return date; + } + }]); + + return YearParser; +}(_Parser2.Parser); + +exports.YearParser = YearParser; + +/***/ }), + +/***/ 5193: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.parsers = void 0; + +var _EraParser = __nccwpck_require__(6309); + +var _YearParser = __nccwpck_require__(2493); + +var _LocalWeekYearParser = __nccwpck_require__(85); + +var _ISOWeekYearParser = __nccwpck_require__(519); + +var _ExtendedYearParser = __nccwpck_require__(4754); + +var _QuarterParser = __nccwpck_require__(5667); + +var _StandAloneQuarterParser = __nccwpck_require__(2898); + +var _MonthParser = __nccwpck_require__(9581); + +var _StandAloneMonthParser = __nccwpck_require__(9915); + +var _LocalWeekParser = __nccwpck_require__(6125); + +var _ISOWeekParser = __nccwpck_require__(2127); + +var _DateParser = __nccwpck_require__(4757); + +var _DayOfYearParser = __nccwpck_require__(7001); + +var _DayParser = __nccwpck_require__(2280); + +var _LocalDayParser = __nccwpck_require__(1190); + +var _StandAloneLocalDayParser = __nccwpck_require__(1556); + +var _ISODayParser = __nccwpck_require__(6376); + +var _AMPMParser = __nccwpck_require__(8678); + +var _AMPMMidnightParser = __nccwpck_require__(9187); + +var _DayPeriodParser = __nccwpck_require__(9273); + +var _Hour1to12Parser = __nccwpck_require__(7929); + +var _Hour0to23Parser = __nccwpck_require__(2610); + +var _Hour0To11Parser = __nccwpck_require__(323); + +var _Hour1To24Parser = __nccwpck_require__(5980); + +var _MinuteParser = __nccwpck_require__(4254); + +var _SecondParser = __nccwpck_require__(3478); + +var _FractionOfSecondParser = __nccwpck_require__(5194); + +var _ISOTimezoneWithZParser = __nccwpck_require__(9822); + +var _ISOTimezoneParser = __nccwpck_require__(9874); + +var _TimestampSecondsParser = __nccwpck_require__(771); + +var _TimestampMillisecondsParser = __nccwpck_require__(3726); + +/* + * | | Unit | | Unit | + * |-----|--------------------------------|-----|--------------------------------| + * | a | AM, PM | A* | Milliseconds in day | + * | b | AM, PM, noon, midnight | B | Flexible day period | + * | c | Stand-alone local day of week | C* | Localized hour w/ day period | + * | d | Day of month | D | Day of year | + * | e | Local day of week | E | Day of week | + * | f | | F* | Day of week in month | + * | g* | Modified Julian day | G | Era | + * | h | Hour [1-12] | H | Hour [0-23] | + * | i! | ISO day of week | I! | ISO week of year | + * | j* | Localized hour w/ day period | J* | Localized hour w/o day period | + * | k | Hour [1-24] | K | Hour [0-11] | + * | l* | (deprecated) | L | Stand-alone month | + * | m | Minute | M | Month | + * | n | | N | | + * | o! | Ordinal number modifier | O* | Timezone (GMT) | + * | p | | P | | + * | q | Stand-alone quarter | Q | Quarter | + * | r* | Related Gregorian year | R! | ISO week-numbering year | + * | s | Second | S | Fraction of second | + * | t! | Seconds timestamp | T! | Milliseconds timestamp | + * | u | Extended year | U* | Cyclic year | + * | v* | Timezone (generic non-locat.) | V* | Timezone (location) | + * | w | Local week of year | W* | Week of month | + * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) | + * | y | Year (abs) | Y | Local week-numbering year | + * | z* | Timezone (specific non-locat.) | Z* | Timezone (aliases) | + * + * Letters marked by * are not implemented but reserved by Unicode standard. + * + * Letters marked by ! are non-standard, but implemented by date-fns: + * - `o` modifies the previous token to turn it into an ordinal (see `parse` docs) + * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days, + * i.e. 7 for Sunday, 1 for Monday, etc. + * - `I` is ISO week of year, as opposed to `w` which is local week of year. + * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year. + * `R` is supposed to be used in conjunction with `I` and `i` + * for universal ISO week-numbering date, whereas + * `Y` is supposed to be used in conjunction with `w` and `e` + * for week-numbering date specific to the locale. + */ +var parsers = { + G: new _EraParser.EraParser(), + y: new _YearParser.YearParser(), + Y: new _LocalWeekYearParser.LocalWeekYearParser(), + R: new _ISOWeekYearParser.ISOWeekYearParser(), + u: new _ExtendedYearParser.ExtendedYearParser(), + Q: new _QuarterParser.QuarterParser(), + q: new _StandAloneQuarterParser.StandAloneQuarterParser(), + M: new _MonthParser.MonthParser(), + L: new _StandAloneMonthParser.StandAloneMonthParser(), + w: new _LocalWeekParser.LocalWeekParser(), + I: new _ISOWeekParser.ISOWeekParser(), + d: new _DateParser.DateParser(), + D: new _DayOfYearParser.DayOfYearParser(), + E: new _DayParser.DayParser(), + e: new _LocalDayParser.LocalDayParser(), + c: new _StandAloneLocalDayParser.StandAloneLocalDayParser(), + i: new _ISODayParser.ISODayParser(), + a: new _AMPMParser.AMPMParser(), + b: new _AMPMMidnightParser.AMPMMidnightParser(), + B: new _DayPeriodParser.DayPeriodParser(), + h: new _Hour1to12Parser.Hour1to12Parser(), + H: new _Hour0to23Parser.Hour0to23Parser(), + K: new _Hour0To11Parser.Hour0To11Parser(), + k: new _Hour1To24Parser.Hour1To24Parser(), + m: new _MinuteParser.MinuteParser(), + s: new _SecondParser.SecondParser(), + S: new _FractionOfSecondParser.FractionOfSecondParser(), + X: new _ISOTimezoneWithZParser.ISOTimezoneWithZParser(), + x: new _ISOTimezoneParser.ISOTimezoneParser(), + t: new _TimestampSecondsParser.TimestampSecondsParser(), + T: new _TimestampMillisecondsParser.TimestampMillisecondsParser() +}; +exports.parsers = parsers; + +/***/ }), + +/***/ 9042: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.dayPeriodEnumToHours = dayPeriodEnumToHours; +exports.isLeapYearIndex = isLeapYearIndex; +exports.mapValue = mapValue; +exports.normalizeTwoDigitYear = normalizeTwoDigitYear; +exports.parseAnyDigitsSigned = parseAnyDigitsSigned; +exports.parseNDigits = parseNDigits; +exports.parseNDigitsSigned = parseNDigitsSigned; +exports.parseNumericPattern = parseNumericPattern; +exports.parseTimezonePattern = parseTimezonePattern; + +var _index = __nccwpck_require__(5756); + +var _constants = __nccwpck_require__(463); + +function mapValue(parseFnResult, mapFn) { + if (!parseFnResult) { + return parseFnResult; + } + + return { + value: mapFn(parseFnResult.value), + rest: parseFnResult.rest + }; +} + +function parseNumericPattern(pattern, dateString) { + var matchResult = dateString.match(pattern); + + if (!matchResult) { + return null; + } + + return { + value: parseInt(matchResult[0], 10), + rest: dateString.slice(matchResult[0].length) + }; +} + +function parseTimezonePattern(pattern, dateString) { + var matchResult = dateString.match(pattern); + + if (!matchResult) { + return null; + } // Input is 'Z' + + + if (matchResult[0] === 'Z') { + return { + value: 0, + rest: dateString.slice(1) + }; + } + + var sign = matchResult[1] === '+' ? 1 : -1; + var hours = matchResult[2] ? parseInt(matchResult[2], 10) : 0; + var minutes = matchResult[3] ? parseInt(matchResult[3], 10) : 0; + var seconds = matchResult[5] ? parseInt(matchResult[5], 10) : 0; + return { + value: sign * (hours * _index.millisecondsInHour + minutes * _index.millisecondsInMinute + seconds * _index.millisecondsInSecond), + rest: dateString.slice(matchResult[0].length) + }; +} + +function parseAnyDigitsSigned(dateString) { + return parseNumericPattern(_constants.numericPatterns.anyDigitsSigned, dateString); +} + +function parseNDigits(n, dateString) { + switch (n) { + case 1: + return parseNumericPattern(_constants.numericPatterns.singleDigit, dateString); + + case 2: + return parseNumericPattern(_constants.numericPatterns.twoDigits, dateString); + + case 3: + return parseNumericPattern(_constants.numericPatterns.threeDigits, dateString); + + case 4: + return parseNumericPattern(_constants.numericPatterns.fourDigits, dateString); + + default: + return parseNumericPattern(new RegExp('^\\d{1,' + n + '}'), dateString); + } +} + +function parseNDigitsSigned(n, dateString) { + switch (n) { + case 1: + return parseNumericPattern(_constants.numericPatterns.singleDigitSigned, dateString); + + case 2: + return parseNumericPattern(_constants.numericPatterns.twoDigitsSigned, dateString); + + case 3: + return parseNumericPattern(_constants.numericPatterns.threeDigitsSigned, dateString); + + case 4: + return parseNumericPattern(_constants.numericPatterns.fourDigitsSigned, dateString); + + default: + return parseNumericPattern(new RegExp('^-?\\d{1,' + n + '}'), dateString); + } +} + +function dayPeriodEnumToHours(dayPeriod) { + switch (dayPeriod) { + case 'morning': + return 4; + + case 'evening': + return 17; + + case 'pm': + case 'noon': + case 'afternoon': + return 12; + + case 'am': + case 'midnight': + case 'night': + default: + return 0; + } +} + +function normalizeTwoDigitYear(twoDigitYear, currentYear) { + var isCommonEra = currentYear > 0; // Absolute number of the current year: + // 1 -> 1 AC + // 0 -> 1 BC + // -1 -> 2 BC + + var absCurrentYear = isCommonEra ? currentYear : 1 - currentYear; + var result; + + if (absCurrentYear <= 50) { + result = twoDigitYear || 100; + } else { + var rangeEnd = absCurrentYear + 50; + var rangeEndCentury = Math.floor(rangeEnd / 100) * 100; + var isPreviousCentury = twoDigitYear >= rangeEnd % 100; + result = twoDigitYear + rangeEndCentury - (isPreviousCentury ? 100 : 0); + } + + return isCommonEra ? result : 1 - result; +} + +function isLeapYearIndex(year) { + return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0; +} + +/***/ }), + +/***/ 1287: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = parse; + +var _index = _interopRequireDefault(__nccwpck_require__(618)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(7923)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2631)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(8387)); + +var _index6 = _interopRequireDefault(__nccwpck_require__(7032)); + +var _index7 = __nccwpck_require__(2509); + +var _index8 = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index9 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _Setter = __nccwpck_require__(5665); + +var _index10 = __nccwpck_require__(5193); + +var _index11 = __nccwpck_require__(9307); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { "@babel/helpers - typeof"; 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 _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +// This RegExp consists of three parts separated by `|`: +// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token +// (one of the certain letters followed by `o`) +// - (\w)\1* matches any sequences of the same letter +// - '' matches two quote characters in a row +// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('), +// except a single quote symbol, which ends the sequence. +// Two quote characters do not end the sequence. +// If there is no matching single quote +// then the sequence will continue until the end of the string. +// - . matches any single character unmatched by previous parts of the RegExps +var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also +// sequences of symbols P, p, and the combinations like `PPPPPPPppppp` + +var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g; +var escapedStringRegExp = /^'([^]*?)'?$/; +var doubleQuoteRegExp = /''/g; +var notWhitespaceRegExp = /\S/; +var unescapedLatinCharacterRegExp = /[a-zA-Z]/; +/** + * @name parse + * @category Common Helpers + * @summary Parse the date. + * + * @description + * Return the date parsed from string using the given format string. + * + * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries. + * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * + * The characters in the format string wrapped between two single quotes characters (') are escaped. + * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote. + * + * Format of the format string is based on Unicode Technical Standard #35: + * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table + * with a few additions (see note 5 below the table). + * + * Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited + * and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception: + * + * ```javascript + * parse('23 AM', 'HH a', new Date()) + * //=> RangeError: The format string mustn't contain `HH` and `a` at the same time + * ``` + * + * See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true + * + * Accepted format string patterns: + * | Unit |Prior| Pattern | Result examples | Notes | + * |---------------------------------|-----|---------|-----------------------------------|-------| + * | Era | 140 | G..GGG | AD, BC | | + * | | | GGGG | Anno Domini, Before Christ | 2 | + * | | | GGGGG | A, B | | + * | Calendar year | 130 | y | 44, 1, 1900, 2017, 9999 | 4 | + * | | | yo | 44th, 1st, 1900th, 9999999th | 4,5 | + * | | | yy | 44, 01, 00, 17 | 4 | + * | | | yyy | 044, 001, 123, 999 | 4 | + * | | | yyyy | 0044, 0001, 1900, 2017 | 4 | + * | | | yyyyy | ... | 2,4 | + * | Local week-numbering year | 130 | Y | 44, 1, 1900, 2017, 9000 | 4 | + * | | | Yo | 44th, 1st, 1900th, 9999999th | 4,5 | + * | | | YY | 44, 01, 00, 17 | 4,6 | + * | | | YYY | 044, 001, 123, 999 | 4 | + * | | | YYYY | 0044, 0001, 1900, 2017 | 4,6 | + * | | | YYYYY | ... | 2,4 | + * | ISO week-numbering year | 130 | R | -43, 1, 1900, 2017, 9999, -9999 | 4,5 | + * | | | RR | -43, 01, 00, 17 | 4,5 | + * | | | RRR | -043, 001, 123, 999, -999 | 4,5 | + * | | | RRRR | -0043, 0001, 2017, 9999, -9999 | 4,5 | + * | | | RRRRR | ... | 2,4,5 | + * | Extended year | 130 | u | -43, 1, 1900, 2017, 9999, -999 | 4 | + * | | | uu | -43, 01, 99, -99 | 4 | + * | | | uuu | -043, 001, 123, 999, -999 | 4 | + * | | | uuuu | -0043, 0001, 2017, 9999, -9999 | 4 | + * | | | uuuuu | ... | 2,4 | + * | Quarter (formatting) | 120 | Q | 1, 2, 3, 4 | | + * | | | Qo | 1st, 2nd, 3rd, 4th | 5 | + * | | | QQ | 01, 02, 03, 04 | | + * | | | QQQ | Q1, Q2, Q3, Q4 | | + * | | | QQQQ | 1st quarter, 2nd quarter, ... | 2 | + * | | | QQQQQ | 1, 2, 3, 4 | 4 | + * | Quarter (stand-alone) | 120 | q | 1, 2, 3, 4 | | + * | | | qo | 1st, 2nd, 3rd, 4th | 5 | + * | | | qq | 01, 02, 03, 04 | | + * | | | qqq | Q1, Q2, Q3, Q4 | | + * | | | qqqq | 1st quarter, 2nd quarter, ... | 2 | + * | | | qqqqq | 1, 2, 3, 4 | 3 | + * | Month (formatting) | 110 | M | 1, 2, ..., 12 | | + * | | | Mo | 1st, 2nd, ..., 12th | 5 | + * | | | MM | 01, 02, ..., 12 | | + * | | | MMM | Jan, Feb, ..., Dec | | + * | | | MMMM | January, February, ..., December | 2 | + * | | | MMMMM | J, F, ..., D | | + * | Month (stand-alone) | 110 | L | 1, 2, ..., 12 | | + * | | | Lo | 1st, 2nd, ..., 12th | 5 | + * | | | LL | 01, 02, ..., 12 | | + * | | | LLL | Jan, Feb, ..., Dec | | + * | | | LLLL | January, February, ..., December | 2 | + * | | | LLLLL | J, F, ..., D | | + * | Local week of year | 100 | w | 1, 2, ..., 53 | | + * | | | wo | 1st, 2nd, ..., 53th | 5 | + * | | | ww | 01, 02, ..., 53 | | + * | ISO week of year | 100 | I | 1, 2, ..., 53 | 5 | + * | | | Io | 1st, 2nd, ..., 53th | 5 | + * | | | II | 01, 02, ..., 53 | 5 | + * | Day of month | 90 | d | 1, 2, ..., 31 | | + * | | | do | 1st, 2nd, ..., 31st | 5 | + * | | | dd | 01, 02, ..., 31 | | + * | Day of year | 90 | D | 1, 2, ..., 365, 366 | 7 | + * | | | Do | 1st, 2nd, ..., 365th, 366th | 5 | + * | | | DD | 01, 02, ..., 365, 366 | 7 | + * | | | DDD | 001, 002, ..., 365, 366 | | + * | | | DDDD | ... | 2 | + * | Day of week (formatting) | 90 | E..EEE | Mon, Tue, Wed, ..., Sun | | + * | | | EEEE | Monday, Tuesday, ..., Sunday | 2 | + * | | | EEEEE | M, T, W, T, F, S, S | | + * | | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | | + * | ISO day of week (formatting) | 90 | i | 1, 2, 3, ..., 7 | 5 | + * | | | io | 1st, 2nd, ..., 7th | 5 | + * | | | ii | 01, 02, ..., 07 | 5 | + * | | | iii | Mon, Tue, Wed, ..., Sun | 5 | + * | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 | + * | | | iiiii | M, T, W, T, F, S, S | 5 | + * | | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 5 | + * | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | | + * | | | eo | 2nd, 3rd, ..., 1st | 5 | + * | | | ee | 02, 03, ..., 01 | | + * | | | eee | Mon, Tue, Wed, ..., Sun | | + * | | | eeee | Monday, Tuesday, ..., Sunday | 2 | + * | | | eeeee | M, T, W, T, F, S, S | | + * | | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | | + * | Local day of week (stand-alone) | 90 | c | 2, 3, 4, ..., 1 | | + * | | | co | 2nd, 3rd, ..., 1st | 5 | + * | | | cc | 02, 03, ..., 01 | | + * | | | ccc | Mon, Tue, Wed, ..., Sun | | + * | | | cccc | Monday, Tuesday, ..., Sunday | 2 | + * | | | ccccc | M, T, W, T, F, S, S | | + * | | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | | + * | AM, PM | 80 | a..aaa | AM, PM | | + * | | | aaaa | a.m., p.m. | 2 | + * | | | aaaaa | a, p | | + * | AM, PM, noon, midnight | 80 | b..bbb | AM, PM, noon, midnight | | + * | | | bbbb | a.m., p.m., noon, midnight | 2 | + * | | | bbbbb | a, p, n, mi | | + * | Flexible day period | 80 | B..BBB | at night, in the morning, ... | | + * | | | BBBB | at night, in the morning, ... | 2 | + * | | | BBBBB | at night, in the morning, ... | | + * | Hour [1-12] | 70 | h | 1, 2, ..., 11, 12 | | + * | | | ho | 1st, 2nd, ..., 11th, 12th | 5 | + * | | | hh | 01, 02, ..., 11, 12 | | + * | Hour [0-23] | 70 | H | 0, 1, 2, ..., 23 | | + * | | | Ho | 0th, 1st, 2nd, ..., 23rd | 5 | + * | | | HH | 00, 01, 02, ..., 23 | | + * | Hour [0-11] | 70 | K | 1, 2, ..., 11, 0 | | + * | | | Ko | 1st, 2nd, ..., 11th, 0th | 5 | + * | | | KK | 01, 02, ..., 11, 00 | | + * | Hour [1-24] | 70 | k | 24, 1, 2, ..., 23 | | + * | | | ko | 24th, 1st, 2nd, ..., 23rd | 5 | + * | | | kk | 24, 01, 02, ..., 23 | | + * | Minute | 60 | m | 0, 1, ..., 59 | | + * | | | mo | 0th, 1st, ..., 59th | 5 | + * | | | mm | 00, 01, ..., 59 | | + * | Second | 50 | s | 0, 1, ..., 59 | | + * | | | so | 0th, 1st, ..., 59th | 5 | + * | | | ss | 00, 01, ..., 59 | | + * | Seconds timestamp | 40 | t | 512969520 | | + * | | | tt | ... | 2 | + * | Fraction of second | 30 | S | 0, 1, ..., 9 | | + * | | | SS | 00, 01, ..., 99 | | + * | | | SSS | 000, 001, ..., 999 | | + * | | | SSSS | ... | 2 | + * | Milliseconds timestamp | 20 | T | 512969520900 | | + * | | | TT | ... | 2 | + * | Timezone (ISO-8601 w/ Z) | 10 | X | -08, +0530, Z | | + * | | | XX | -0800, +0530, Z | | + * | | | XXX | -08:00, +05:30, Z | | + * | | | XXXX | -0800, +0530, Z, +123456 | 2 | + * | | | XXXXX | -08:00, +05:30, Z, +12:34:56 | | + * | Timezone (ISO-8601 w/o Z) | 10 | x | -08, +0530, +00 | | + * | | | xx | -0800, +0530, +0000 | | + * | | | xxx | -08:00, +05:30, +00:00 | 2 | + * | | | xxxx | -0800, +0530, +0000, +123456 | | + * | | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | | + * | Long localized date | NA | P | 05/29/1453 | 5,8 | + * | | | PP | May 29, 1453 | | + * | | | PPP | May 29th, 1453 | | + * | | | PPPP | Sunday, May 29th, 1453 | 2,5,8 | + * | Long localized time | NA | p | 12:00 AM | 5,8 | + * | | | pp | 12:00:00 AM | | + * | Combination of date and time | NA | Pp | 05/29/1453, 12:00 AM | | + * | | | PPpp | May 29, 1453, 12:00:00 AM | | + * | | | PPPpp | May 29th, 1453 at ... | | + * | | | PPPPpp | Sunday, May 29th, 1453 at ... | 2,5,8 | + * Notes: + * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale + * are the same as "stand-alone" units, but are different in some languages. + * "Formatting" units are declined according to the rules of the language + * in the context of a date. "Stand-alone" units are always nominative singular. + * In `format` function, they will produce different result: + * + * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'` + * + * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'` + * + * `parse` will try to match both formatting and stand-alone units interchangably. + * + * 2. Any sequence of the identical letters is a pattern, unless it is escaped by + * the single quote characters (see below). + * If the sequence is longer than listed in table: + * - for numerical units (`yyyyyyyy`) `parse` will try to match a number + * as wide as the sequence + * - for text units (`MMMMMMMM`) `parse` will try to match the widest variation of the unit. + * These variations are marked with "2" in the last column of the table. + * + * 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales. + * These tokens represent the shortest form of the quarter. + * + * 4. The main difference between `y` and `u` patterns are B.C. years: + * + * | Year | `y` | `u` | + * |------|-----|-----| + * | AC 1 | 1 | 1 | + * | BC 1 | 1 | 0 | + * | BC 2 | 2 | -1 | + * + * Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`: + * + * `parse('50', 'yy', new Date(2018, 0, 1)) //=> Sat Jan 01 2050 00:00:00` + * + * `parse('75', 'yy', new Date(2018, 0, 1)) //=> Wed Jan 01 1975 00:00:00` + * + * while `uu` will just assign the year as is: + * + * `parse('50', 'uu', new Date(2018, 0, 1)) //=> Sat Jan 01 0050 00:00:00` + * + * `parse('75', 'uu', new Date(2018, 0, 1)) //=> Tue Jan 01 0075 00:00:00` + * + * The same difference is true for local and ISO week-numbering years (`Y` and `R`), + * except local week-numbering years are dependent on `options.weekStartsOn` + * and `options.firstWeekContainsDate` (compare [setISOWeekYear]{@link https://date-fns.org/docs/setISOWeekYear} + * and [setWeekYear]{@link https://date-fns.org/docs/setWeekYear}). + * + * 5. These patterns are not in the Unicode Technical Standard #35: + * - `i`: ISO day of week + * - `I`: ISO week of year + * - `R`: ISO week-numbering year + * - `o`: ordinal number modifier + * - `P`: long localized date + * - `p`: long localized time + * + * 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years. + * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * + * 7. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month. + * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * + * 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based + * on the given locale. + * + * using `en-US` locale: `P` => `MM/dd/yyyy` + * using `en-US` locale: `p` => `hh:mm a` + * using `pt-BR` locale: `P` => `dd/MM/yyyy` + * using `pt-BR` locale: `p` => `HH:mm` + * + * Values will be assigned to the date in the descending order of its unit's priority. + * Units of an equal priority overwrite each other in the order of appearance. + * + * If no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year), + * the values will be taken from 3rd argument `referenceDate` which works as a context of parsing. + * + * `referenceDate` must be passed for correct work of the function. + * If you're not sure which `referenceDate` to supply, create a new instance of Date: + * `parse('02/11/2014', 'MM/dd/yyyy', new Date())` + * In this case parsing will be done in the context of the current date. + * If `referenceDate` is `Invalid Date` or a value not convertible to valid `Date`, + * then `Invalid Date` will be returned. + * + * The result may vary by locale. + * + * If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned. + * + * If parsing failed, `Invalid Date` will be returned. + * Invalid Date is a Date, whose time value is NaN. + * Time value of Date: http://es5.github.io/#x15.9.1.1 + * + * @param {String} dateString - the string to parse + * @param {String} formatString - the string of tokens + * @param {Date|Number} referenceDate - defines values missing from the parsed dateString + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year + * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`; + * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`; + * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * @returns {Date} the parsed date + * @throws {TypeError} 3 arguments required + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 + * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7 + * @throws {RangeError} `options.locale` must contain `match` property + * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md + * @throws {RangeError} format string contains an unescaped latin alphabet character + * + * @example + * // Parse 11 February 2014 from middle-endian format: + * var result = parse('02/11/2014', 'MM/dd/yyyy', new Date()) + * //=> Tue Feb 11 2014 00:00:00 + * + * @example + * // Parse 28th of February in Esperanto locale in the context of 2010 year: + * import eo from 'date-fns/locale/eo' + * var result = parse('28-a de februaro', "do 'de' MMMM", new Date(2010, 0, 1), { + * locale: eo + * }) + * //=> Sun Feb 28 2010 00:00:00 + */ + +function parse(dirtyDateString, dirtyFormatString, dirtyReferenceDate, options) { + var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4; + + (0, _index9.default)(3, arguments); + var dateString = String(dirtyDateString); + var formatString = String(dirtyFormatString); + var defaultOptions = (0, _index11.getDefaultOptions)(); + var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : _index.default; + + if (!locale.match) { + throw new RangeError('locale must contain match property'); + } + + var firstWeekContainsDate = (0, _index8.default)((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN + + if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) { + throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively'); + } + + var weekStartsOn = (0, _index8.default)((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN + + if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) { + throw new RangeError('weekStartsOn must be between 0 and 6 inclusively'); + } + + if (formatString === '') { + if (dateString === '') { + return (0, _index3.default)(dirtyReferenceDate); + } else { + return new Date(NaN); + } + } + + var subFnOptions = { + firstWeekContainsDate: firstWeekContainsDate, + weekStartsOn: weekStartsOn, + locale: locale + }; // If timezone isn't specified, it will be set to the system timezone + + var setters = [new _Setter.DateToSystemTimezoneSetter()]; + var tokens = formatString.match(longFormattingTokensRegExp).map(function (substring) { + var firstCharacter = substring[0]; + + if (firstCharacter in _index5.default) { + var longFormatter = _index5.default[firstCharacter]; + return longFormatter(substring, locale.formatLong); + } + + return substring; + }).join('').match(formattingTokensRegExp); + var usedTokens = []; + + var _iterator = _createForOfIteratorHelper(tokens), + _step; + + try { + var _loop = function _loop() { + var token = _step.value; + + if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && (0, _index7.isProtectedWeekYearToken)(token)) { + (0, _index7.throwProtectedError)(token, formatString, dirtyDateString); + } + + if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && (0, _index7.isProtectedDayOfYearToken)(token)) { + (0, _index7.throwProtectedError)(token, formatString, dirtyDateString); + } + + var firstCharacter = token[0]; + var parser = _index10.parsers[firstCharacter]; + + if (parser) { + var incompatibleTokens = parser.incompatibleTokens; + + if (Array.isArray(incompatibleTokens)) { + var incompatibleToken = usedTokens.find(function (usedToken) { + return incompatibleTokens.includes(usedToken.token) || usedToken.token === firstCharacter; + }); + + if (incompatibleToken) { + throw new RangeError("The format string mustn't contain `".concat(incompatibleToken.fullToken, "` and `").concat(token, "` at the same time")); + } + } else if (parser.incompatibleTokens === '*' && usedTokens.length > 0) { + throw new RangeError("The format string mustn't contain `".concat(token, "` and any other token at the same time")); + } + + usedTokens.push({ + token: firstCharacter, + fullToken: token + }); + var parseResult = parser.run(dateString, token, locale.match, subFnOptions); + + if (!parseResult) { + return { + v: new Date(NaN) + }; + } + + setters.push(parseResult.setter); + dateString = parseResult.rest; + } else { + if (firstCharacter.match(unescapedLatinCharacterRegExp)) { + throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`'); + } // Replace two single quote characters with one single quote character + + + if (token === "''") { + token = "'"; + } else if (firstCharacter === "'") { + token = cleanEscapedString(token); + } // Cut token from string, or, if string doesn't match the token, return Invalid Date + + + if (dateString.indexOf(token) === 0) { + dateString = dateString.slice(token.length); + } else { + return { + v: new Date(NaN) + }; + } + } + }; + + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var _ret = _loop(); + + if (_typeof(_ret) === "object") return _ret.v; + } // Check if the remaining input contains something other than whitespace + + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + if (dateString.length > 0 && notWhitespaceRegExp.test(dateString)) { + return new Date(NaN); + } + + var uniquePrioritySetters = setters.map(function (setter) { + return setter.priority; + }).sort(function (a, b) { + return b - a; + }).filter(function (priority, index, array) { + return array.indexOf(priority) === index; + }).map(function (priority) { + return setters.filter(function (setter) { + return setter.priority === priority; + }).sort(function (a, b) { + return b.subPriority - a.subPriority; + }); + }).map(function (setterArray) { + return setterArray[0]; + }); + var date = (0, _index3.default)(dirtyReferenceDate); + + if (isNaN(date.getTime())) { + return new Date(NaN); + } // Convert the date in system timezone to the same date in UTC+00:00 timezone. + + + var utcDate = (0, _index2.default)(date, (0, _index6.default)(date)); + var flags = {}; + + var _iterator2 = _createForOfIteratorHelper(uniquePrioritySetters), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var setter = _step2.value; + + if (!setter.validate(utcDate, subFnOptions)) { + return new Date(NaN); + } + + var result = setter.set(utcDate, flags, subFnOptions); // Result is tuple (date, flags) + + if (Array.isArray(result)) { + utcDate = result[0]; + (0, _index4.default)(flags, result[1]); // Result is date + } else { + utcDate = result; + } + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + + return utcDate; +} + +function cleanEscapedString(input) { + return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'"); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3390: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = parseISO; + +var _index = __nccwpck_require__(5756); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(1985)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name parseISO + * @category Common Helpers + * @summary Parse ISO string + * + * @description + * Parse the given string in ISO 8601 format and return an instance of Date. + * + * Function accepts complete ISO 8601 formats as well as partial implementations. + * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601 + * + * If the argument isn't a string, the function cannot parse the string or + * the values are invalid, it returns Invalid Date. + * + * @param {String} argument - the value to convert + * @param {Object} [options] - an object with options. + * @param {0|1|2} [options.additionalDigits=2] - the additional number of digits in the extended year format + * @returns {Date} the parsed date in the local time zone + * @throws {TypeError} 1 argument required + * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2 + * + * @example + * // Convert string '2014-02-11T11:30:30' to date: + * const result = parseISO('2014-02-11T11:30:30') + * //=> Tue Feb 11 2014 11:30:30 + * + * @example + * // Convert string '+02014101' to date, + * // if the additional number of digits in the extended year format is 1: + * const result = parseISO('+02014101', { additionalDigits: 1 }) + * //=> Fri Apr 11 2014 00:00:00 + */ +function parseISO(argument, options) { + var _options$additionalDi; + + (0, _index2.default)(1, arguments); + var additionalDigits = (0, _index3.default)((_options$additionalDi = options === null || options === void 0 ? void 0 : options.additionalDigits) !== null && _options$additionalDi !== void 0 ? _options$additionalDi : 2); + + if (additionalDigits !== 2 && additionalDigits !== 1 && additionalDigits !== 0) { + throw new RangeError('additionalDigits must be 0, 1 or 2'); + } + + if (!(typeof argument === 'string' || Object.prototype.toString.call(argument) === '[object String]')) { + return new Date(NaN); + } + + var dateStrings = splitDateString(argument); + var date; + + if (dateStrings.date) { + var parseYearResult = parseYear(dateStrings.date, additionalDigits); + date = parseDate(parseYearResult.restDateString, parseYearResult.year); + } + + if (!date || isNaN(date.getTime())) { + return new Date(NaN); + } + + var timestamp = date.getTime(); + var time = 0; + var offset; + + if (dateStrings.time) { + time = parseTime(dateStrings.time); + + if (isNaN(time)) { + return new Date(NaN); + } + } + + if (dateStrings.timezone) { + offset = parseTimezone(dateStrings.timezone); + + if (isNaN(offset)) { + return new Date(NaN); + } + } else { + var dirtyDate = new Date(timestamp + time); // js parsed string assuming it's in UTC timezone + // but we need it to be parsed in our timezone + // so we use utc values to build date in our timezone. + // Year values from 0 to 99 map to the years 1900 to 1999 + // so set year explicitly with setFullYear. + + var result = new Date(0); + result.setFullYear(dirtyDate.getUTCFullYear(), dirtyDate.getUTCMonth(), dirtyDate.getUTCDate()); + result.setHours(dirtyDate.getUTCHours(), dirtyDate.getUTCMinutes(), dirtyDate.getUTCSeconds(), dirtyDate.getUTCMilliseconds()); + return result; + } + + return new Date(timestamp + time + offset); +} + +var patterns = { + dateTimeDelimiter: /[T ]/, + timeZoneDelimiter: /[Z ]/i, + timezone: /([Z+-].*)$/ +}; +var dateRegex = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/; +var timeRegex = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/; +var timezoneRegex = /^([+-])(\d{2})(?::?(\d{2}))?$/; + +function splitDateString(dateString) { + var dateStrings = {}; + var array = dateString.split(patterns.dateTimeDelimiter); + var timeString; // The regex match should only return at maximum two array elements. + // [date], [time], or [date, time]. + + if (array.length > 2) { + return dateStrings; + } + + if (/:/.test(array[0])) { + timeString = array[0]; + } else { + dateStrings.date = array[0]; + timeString = array[1]; + + if (patterns.timeZoneDelimiter.test(dateStrings.date)) { + dateStrings.date = dateString.split(patterns.timeZoneDelimiter)[0]; + timeString = dateString.substr(dateStrings.date.length, dateString.length); + } + } + + if (timeString) { + var token = patterns.timezone.exec(timeString); + + if (token) { + dateStrings.time = timeString.replace(token[1], ''); + dateStrings.timezone = token[1]; + } else { + dateStrings.time = timeString; + } + } + + return dateStrings; +} + +function parseYear(dateString, additionalDigits) { + var regex = new RegExp('^(?:(\\d{4}|[+-]\\d{' + (4 + additionalDigits) + '})|(\\d{2}|[+-]\\d{' + (2 + additionalDigits) + '})$)'); + var captures = dateString.match(regex); // Invalid ISO-formatted year + + if (!captures) return { + year: NaN, + restDateString: '' + }; + var year = captures[1] ? parseInt(captures[1]) : null; + var century = captures[2] ? parseInt(captures[2]) : null; // either year or century is null, not both + + return { + year: century === null ? year : century * 100, + restDateString: dateString.slice((captures[1] || captures[2]).length) + }; +} + +function parseDate(dateString, year) { + // Invalid ISO-formatted year + if (year === null) return new Date(NaN); + var captures = dateString.match(dateRegex); // Invalid ISO-formatted string + + if (!captures) return new Date(NaN); + var isWeekDate = !!captures[4]; + var dayOfYear = parseDateUnit(captures[1]); + var month = parseDateUnit(captures[2]) - 1; + var day = parseDateUnit(captures[3]); + var week = parseDateUnit(captures[4]); + var dayOfWeek = parseDateUnit(captures[5]) - 1; + + if (isWeekDate) { + if (!validateWeekDate(year, week, dayOfWeek)) { + return new Date(NaN); + } + + return dayOfISOWeekYear(year, week, dayOfWeek); + } else { + var date = new Date(0); + + if (!validateDate(year, month, day) || !validateDayOfYearDate(year, dayOfYear)) { + return new Date(NaN); + } + + date.setUTCFullYear(year, month, Math.max(dayOfYear, day)); + return date; + } +} + +function parseDateUnit(value) { + return value ? parseInt(value) : 1; +} + +function parseTime(timeString) { + var captures = timeString.match(timeRegex); + if (!captures) return NaN; // Invalid ISO-formatted time + + var hours = parseTimeUnit(captures[1]); + var minutes = parseTimeUnit(captures[2]); + var seconds = parseTimeUnit(captures[3]); + + if (!validateTime(hours, minutes, seconds)) { + return NaN; + } + + return hours * _index.millisecondsInHour + minutes * _index.millisecondsInMinute + seconds * 1000; +} + +function parseTimeUnit(value) { + return value && parseFloat(value.replace(',', '.')) || 0; +} + +function parseTimezone(timezoneString) { + if (timezoneString === 'Z') return 0; + var captures = timezoneString.match(timezoneRegex); + if (!captures) return 0; + var sign = captures[1] === '+' ? -1 : 1; + var hours = parseInt(captures[2]); + var minutes = captures[3] && parseInt(captures[3]) || 0; + + if (!validateTimezone(hours, minutes)) { + return NaN; + } + + return sign * (hours * _index.millisecondsInHour + minutes * _index.millisecondsInMinute); +} + +function dayOfISOWeekYear(isoWeekYear, week, day) { + var date = new Date(0); + date.setUTCFullYear(isoWeekYear, 0, 4); + var fourthOfJanuaryDay = date.getUTCDay() || 7; + var diff = (week - 1) * 7 + day + 1 - fourthOfJanuaryDay; + date.setUTCDate(date.getUTCDate() + diff); + return date; +} // Validation functions +// February is null to handle the leap year (using ||) + + +var daysInMonths = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + +function isLeapYearIndex(year) { + return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0; +} + +function validateDate(year, month, date) { + return month >= 0 && month <= 11 && date >= 1 && date <= (daysInMonths[month] || (isLeapYearIndex(year) ? 29 : 28)); +} + +function validateDayOfYearDate(year, dayOfYear) { + return dayOfYear >= 1 && dayOfYear <= (isLeapYearIndex(year) ? 366 : 365); +} + +function validateWeekDate(_year, week, day) { + return week >= 1 && week <= 53 && day >= 0 && day <= 6; +} + +function validateTime(hours, minutes, seconds) { + if (hours === 24) { + return minutes === 0 && seconds === 0; + } + + return seconds >= 0 && seconds < 60 && minutes >= 0 && minutes < 60 && hours >= 0 && hours < 25; +} + +function validateTimezone(_hours, minutes) { + return minutes >= 0 && minutes <= 59; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8159: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = parseJSON; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name parseJSON + * @category Common Helpers + * @summary Parse a JSON date string + * + * @description + * Converts a complete ISO date string in UTC time, the typical format for transmitting + * a date in JSON, to a JavaScript `Date` instance. + * + * This is a minimal implementation for converting dates retrieved from a JSON API to + * a `Date` instance which can be used with other functions in the `date-fns` library. + * The following formats are supported: + * + * - `2000-03-15T05:20:10.123Z`: The output of `.toISOString()` and `JSON.stringify(new Date())` + * - `2000-03-15T05:20:10Z`: Without milliseconds + * - `2000-03-15T05:20:10+00:00`: With a zero offset, the default JSON encoded format in some other languages + * - `2000-03-15T05:20:10+05:45`: With a positive or negative offset, the default JSON encoded format in some other languages + * - `2000-03-15T05:20:10+0000`: With a zero offset without a colon + * - `2000-03-15T05:20:10`: Without a trailing 'Z' symbol + * - `2000-03-15T05:20:10.1234567`: Up to 7 digits in milliseconds field. Only first 3 are taken into account since JS does not allow fractional milliseconds + * - `2000-03-15 05:20:10`: With a space instead of a 'T' separator for APIs returning a SQL date without reformatting + * + * For convenience and ease of use these other input types are also supported + * via [toDate]{@link https://date-fns.org/docs/toDate}: + * + * - A `Date` instance will be cloned + * - A `number` will be treated as a timestamp + * + * Any other input type or invalid date strings will return an `Invalid Date`. + * + * @param {String|Number|Date} argument A fully formed ISO8601 date string to convert + * @returns {Date} the parsed date in the local time zone + * @throws {TypeError} 1 argument required + */ +function parseJSON(argument) { + (0, _index2.default)(1, arguments); + + if (typeof argument === 'string') { + var parts = argument.match(/(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/); + + if (parts) { + // Group 8 matches the sign + return new Date(Date.UTC(+parts[1], +parts[2] - 1, +parts[3], +parts[4] - (+parts[9] || 0) * (parts[8] == '-' ? -1 : 1), +parts[5] - (+parts[10] || 0) * (parts[8] == '-' ? -1 : 1), +parts[6], +((parts[7] || '0') + '00').substring(0, 3))); + } + + return new Date(NaN); + } + + return (0, _index.default)(argument); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8756: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = previousDay; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(9361)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(970)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name previousDay + * @category Weekday Helpers + * @summary When is the previous day of the week? + * + * @description + * When is the previous day of the week? 0-6 the day of the week, 0 represents Sunday. + * + * @param {Date | number} date - the date to check + * @param {number} day - day of the week + * @returns {Date} - the date is the previous day of week + * @throws {TypeError} - 2 arguments required + * + * @example + * // When is the previous Monday before Mar, 20, 2020? + * const result = previousDay(new Date(2020, 2, 20), 1) + * //=> Mon Mar 16 2020 00:00:00 + * + * @example + * // When is the previous Tuesday before Mar, 21, 2020? + * const result = previousDay(new Date(2020, 2, 21), 2) + * //=> Tue Mar 17 2020 00:00:00 + */ +function previousDay(date, day) { + (0, _index.default)(2, arguments); + var delta = (0, _index2.default)(date) - day; + if (delta <= 0) delta += 7; + return (0, _index3.default)(date, delta); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9558: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = previousFriday; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(8756)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name previousFriday + * @category Weekday Helpers + * @summary When is the previous Friday? + * + * @description + * When is the previous Friday? + * + * @param {Date | number} date - the date to start counting from + * @returns {Date} the previous Friday + * @throws {TypeError} 1 argument required + * + * @example + * // When is the previous Friday before Jun, 19, 2021? + * const result = previousFriday(new Date(2021, 5, 19)) + * //=> Fri June 18 2021 00:00:00 + */ +function previousFriday(date) { + (0, _index.default)(1, arguments); + return (0, _index2.default)(date, 5); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8386: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = previousMonday; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(8756)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name previousMonday + * @category Weekday Helpers + * @summary When is the previous Monday? + * + * @description + * When is the previous Monday? + * + * @param {Date | number} date - the date to start counting from + * @returns {Date} the previous Monday + * @throws {TypeError} 1 argument required + * + * @example + * // When is the previous Monday before Jun, 18, 2021? + * const result = previousMonday(new Date(2021, 5, 18)) + * //=> Mon June 14 2021 00:00:00 + */ +function previousMonday(date) { + (0, _index.default)(1, arguments); + return (0, _index2.default)(date, 1); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 4834: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = previousSaturday; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(8756)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name previousSaturday + * @category Weekday Helpers + * @summary When is the previous Saturday? + * + * @description + * When is the previous Saturday? + * + * @param {Date | number} date - the date to start counting from + * @returns {Date} the previous Saturday + * @throws {TypeError} 1 argument required + * + * @example + * // When is the previous Saturday before Jun, 20, 2021? + * const result = previousSaturday(new Date(2021, 5, 20)) + * //=> Sat June 19 2021 00:00:00 + */ +function previousSaturday(date) { + (0, _index.default)(1, arguments); + return (0, _index2.default)(date, 6); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 264: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = previousSunday; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(8756)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name previousSunday + * @category Weekday Helpers + * @summary When is the previous Sunday? + * + * @description + * When is the previous Sunday? + * + * @param {Date | number} date - the date to start counting from + * @returns {Date} the previous Sunday + * @throws {TypeError} 1 argument required + * + * @example + * // When is the previous Sunday before Jun, 21, 2021? + * const result = previousSunday(new Date(2021, 5, 21)) + * //=> Sun June 20 2021 00:00:00 + */ +function previousSunday(date) { + (0, _index.default)(1, arguments); + return (0, _index2.default)(date, 0); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 19: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = previousThursday; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(8756)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name previousThursday + * @category Weekday Helpers + * @summary When is the previous Thursday? + * + * @description + * When is the previous Thursday? + * + * @param {Date | number} date - the date to start counting from + * @returns {Date} the previous Thursday + * @throws {TypeError} 1 argument required + * + * @example + * // When is the previous Thursday before Jun, 18, 2021? + * const result = previousThursday(new Date(2021, 5, 18)) + * //=> Thu June 17 2021 00:00:00 + */ +function previousThursday(date) { + (0, _index.default)(1, arguments); + return (0, _index2.default)(date, 4); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3294: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = previousTuesday; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(8756)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name previousTuesday + * @category Weekday Helpers + * @summary When is the previous Tuesday? + * + * @description + * When is the previous Tuesday? + * + * @param {Date | number} date - the date to start counting from + * @returns {Date} the previous Tuesday + * @throws {TypeError} 1 argument required + * + * @example + * // When is the previous Tuesday before Jun, 18, 2021? + * const result = previousTuesday(new Date(2021, 5, 18)) + * //=> Tue June 15 2021 00:00:00 + */ +function previousTuesday(date) { + (0, _index.default)(1, arguments); + return (0, _index2.default)(date, 2); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8630: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = previousWednesday; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(8756)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name previousWednesday + * @category Weekday Helpers + * @summary When is the previous Wednesday? + * + * @description + * When is the previous Wednesday? + * + * @param {Date | number} date - the date to start counting from + * @returns {Date} the previous Wednesday + * @throws {TypeError} 1 argument required + * + * @example + * // When is the previous Wednesday before Jun, 18, 2021? + * const result = previousWednesday(new Date(2021, 5, 18)) + * //=> Wed June 16 2021 00:00:00 + */ +function previousWednesday(date) { + (0, _index.default)(1, arguments); + return (0, _index2.default)(date, 3); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8995: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = quartersToMonths; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name quartersToMonths + * @category Conversion Helpers + * @summary Convert number of quarters to months. + * + * @description + * Convert a number of quarters to a full number of months. + * + * @param {number} quarters - number of quarters to be converted + * + * @returns {number} the number of quarters converted in months + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 2 quarters to months + * const result = quartersToMonths(2) + * //=> 6 + */ +function quartersToMonths(quarters) { + (0, _index.default)(1, arguments); + return Math.floor(quarters * _index2.monthsInQuarter); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 883: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = quartersToYears; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name quartersToYears + * @category Conversion Helpers + * @summary Convert number of quarters to years. + * + * @description + * Convert a number of quarters to a full number of years. + * + * @param {number} quarters - number of quarters to be converted + * + * @returns {number} the number of quarters converted in years + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 8 quarters to years + * const result = quartersToYears(8) + * //=> 2 + * + * @example + * // It uses floor rounding: + * const result = quartersToYears(11) + * //=> 2 + */ +function quartersToYears(quarters) { + (0, _index.default)(1, arguments); + var years = quarters / _index2.quartersInYear; + return Math.floor(years); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5515: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = roundToNearestMinutes; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = __nccwpck_require__(8016); + +var _index3 = _interopRequireDefault(__nccwpck_require__(1985)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name roundToNearestMinutes + * @category Minute Helpers + * @summary Rounds the given date to the nearest minute + * + * @description + * Rounds the given date to the nearest minute (or number of minutes). + * Rounds up when the given date is exactly between the nearest round minutes. + * + * @param {Date|Number} date - the date to round + * @param {Object} [options] - an object with options. + * @param {Number} [options.nearestTo=1] - nearest number of minutes to round to. E.g. `15` to round to quarter hours. + * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`) + * @returns {Date} the new date rounded to the closest minute + * @throws {TypeError} 1 argument required + * @throws {RangeError} `options.nearestTo` must be between 1 and 30 + * + * @example + * // Round 10 July 2014 12:12:34 to nearest minute: + * const result = roundToNearestMinutes(new Date(2014, 6, 10, 12, 12, 34)) + * //=> Thu Jul 10 2014 12:13:00 + * + * @example + * // Round 10 July 2014 12:07:30 to nearest quarter hour: + * const result = roundToNearestMinutes(new Date(2014, 6, 10, 12, 12, 34), { nearestTo: 15 }) + * // rounds up because given date is exactly between 12:00:00 and 12:15:00 + * //=> Thu Jul 10 2014 12:15:00 + */ +function roundToNearestMinutes(dirtyDate, options) { + var _options$nearestTo; + + if (arguments.length < 1) { + throw new TypeError('1 argument required, but only none provided present'); + } + + var nearestTo = (0, _index3.default)((_options$nearestTo = options === null || options === void 0 ? void 0 : options.nearestTo) !== null && _options$nearestTo !== void 0 ? _options$nearestTo : 1); + + if (nearestTo < 1 || nearestTo > 30) { + throw new RangeError('`options.nearestTo` must be between 1 and 30'); + } + + var date = (0, _index.default)(dirtyDate); + var seconds = date.getSeconds(); // relevant if nearestTo is 1, which is the default case + + var minutes = date.getMinutes() + seconds / 60; + var roundingMethod = (0, _index2.getRoundingMethod)(options === null || options === void 0 ? void 0 : options.roundingMethod); + var roundedMinutes = roundingMethod(minutes / nearestTo) * nearestTo; + var remainderMinutes = minutes % nearestTo; + var addedMinutes = Math.round(remainderMinutes / nearestTo) * nearestTo; + return new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), roundedMinutes + addedMinutes); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 594: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = secondsToHours; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name secondsToHours + * @category Conversion Helpers + * @summary Convert seconds to hours. + * + * @description + * Convert a number of seconds to a full number of hours. + * + * @param {number} seconds - number of seconds to be converted + * + * @returns {number} the number of seconds converted in hours + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 7200 seconds into hours + * const result = secondsToHours(7200) + * //=> 2 + * + * @example + * // It uses floor rounding: + * const result = secondsToHours(7199) + * //=> 1 + */ +function secondsToHours(seconds) { + (0, _index.default)(1, arguments); + var hours = seconds / _index2.secondsInHour; + return Math.floor(hours); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6779: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = secondsToMilliseconds; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name secondsToMilliseconds + * @category Conversion Helpers + * @summary Convert seconds to milliseconds. + * + * @description + * Convert a number of seconds to a full number of milliseconds. + * + * @param {number} seconds - number of seconds to be converted + * + * @returns {number} the number of seconds converted in milliseconds + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 2 seconds into milliseconds + * const result = secondsToMilliseconds(2) + * //=> 2000 + */ +function secondsToMilliseconds(seconds) { + (0, _index.default)(1, arguments); + return seconds * _index2.millisecondsInSecond; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8438: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = secondsToMinutes; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name secondsToMinutes + * @category Conversion Helpers + * @summary Convert seconds to minutes. + * + * @description + * Convert a number of seconds to a full number of minutes. + * + * @param {number} seconds - number of seconds to be converted + * + * @returns {number} the number of seconds converted in minutes + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 120 seconds into minutes + * const result = secondsToMinutes(120) + * //=> 2 + * + * @example + * // It uses floor rounding: + * const result = secondsToMinutes(119) + * //=> 1 + */ +function secondsToMinutes(seconds) { + (0, _index.default)(1, arguments); + var minutes = seconds / _index2.secondsInMinute; + return Math.floor(minutes); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2031: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = set; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(847)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +/** + * @name set + * @category Common Helpers + * @summary Set date values to a given date. + * + * @description + * Set date values to a given date. + * + * Sets time values to date from object `values`. + * A value is not set if it is undefined or null or doesn't exist in `values`. + * + * Note about bundle size: `set` does not internally use `setX` functions from date-fns but instead opts + * to use native `Date#setX` methods. If you use this function, you may not want to include the + * other `setX` functions that date-fns provides if you are concerned about the bundle size. + * + * @param {Date|Number} date - the date to be changed + * @param {Object} values - an object with options + * @param {Number} [values.year] - the number of years to be set + * @param {Number} [values.month] - the number of months to be set + * @param {Number} [values.date] - the number of days to be set + * @param {Number} [values.hours] - the number of hours to be set + * @param {Number} [values.minutes] - the number of minutes to be set + * @param {Number} [values.seconds] - the number of seconds to be set + * @param {Number} [values.milliseconds] - the number of milliseconds to be set + * @returns {Date} the new date with options set + * @throws {TypeError} 2 arguments required + * @throws {RangeError} `values` must be an object + * + * @example + * // Transform 1 September 2014 into 20 October 2015 in a single line: + * const result = set(new Date(2014, 8, 20), { year: 2015, month: 9, date: 20 }) + * //=> Tue Oct 20 2015 00:00:00 + * + * @example + * // Set 12 PM to 1 September 2014 01:23:45 to 1 September 2014 12:00:00: + * const result = set(new Date(2014, 8, 1, 1, 23, 45), { hours: 12 }) + * //=> Mon Sep 01 2014 12:23:45 + */ +function set(dirtyDate, values) { + (0, _index4.default)(2, arguments); + + if (_typeof(values) !== 'object' || values === null) { + throw new RangeError('values parameter must be an object'); + } + + var date = (0, _index.default)(dirtyDate); // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date + + if (isNaN(date.getTime())) { + return new Date(NaN); + } + + if (values.year != null) { + date.setFullYear(values.year); + } + + if (values.month != null) { + date = (0, _index2.default)(date, values.month); + } + + if (values.date != null) { + date.setDate((0, _index3.default)(values.date)); + } + + if (values.hours != null) { + date.setHours((0, _index3.default)(values.hours)); + } + + if (values.minutes != null) { + date.setMinutes((0, _index3.default)(values.minutes)); + } + + if (values.seconds != null) { + date.setSeconds((0, _index3.default)(values.seconds)); + } + + if (values.milliseconds != null) { + date.setMilliseconds((0, _index3.default)(values.milliseconds)); + } + + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8760: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setDate; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name setDate + * @category Day Helpers + * @summary Set the day of the month to the given date. + * + * @description + * Set the day of the month to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} dayOfMonth - the day of the month of the new date + * @returns {Date} the new date with the day of the month set + * @throws {TypeError} 2 arguments required + * + * @example + * // Set the 30th day of the month to 1 September 2014: + * const result = setDate(new Date(2014, 8, 1), 30) + * //=> Tue Sep 30 2014 00:00:00 + */ +function setDate(dirtyDate, dirtyDayOfMonth) { + (0, _index3.default)(2, arguments); + var date = (0, _index2.default)(dirtyDate); + var dayOfMonth = (0, _index.default)(dirtyDayOfMonth); + date.setDate(dayOfMonth); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9540: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setDay; + +var _index = _interopRequireDefault(__nccwpck_require__(6227)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index5 = __nccwpck_require__(9307); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name setDay + * @category Weekday Helpers + * @summary Set the day of the week to the given date. + * + * @description + * Set the day of the week to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} day - the day of the week of the new date + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @returns {Date} the new date with the day of the week set + * @throws {TypeError} 2 arguments required + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 + * + * @example + * // Set week day to Sunday, with the default weekStartsOn of Sunday: + * const result = setDay(new Date(2014, 8, 1), 0) + * //=> Sun Aug 31 2014 00:00:00 + * + * @example + * // Set week day to Sunday, with a weekStartsOn of Monday: + * const result = setDay(new Date(2014, 8, 1), 0, { weekStartsOn: 1 }) + * //=> Sun Sep 07 2014 00:00:00 + */ +function setDay(dirtyDate, dirtyDay, options) { + var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2; + + (0, _index4.default)(2, arguments); + var defaultOptions = (0, _index5.getDefaultOptions)(); + var weekStartsOn = (0, _index3.default)((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN + + if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) { + throw new RangeError('weekStartsOn must be between 0 and 6 inclusively'); + } + + var date = (0, _index2.default)(dirtyDate); + var day = (0, _index3.default)(dirtyDay); + var currentDay = date.getDay(); + var remainder = day % 7; + var dayIndex = (remainder + 7) % 7; + var delta = 7 - weekStartsOn; + var diff = day < 0 || day > 6 ? day - (currentDay + delta) % 7 : (dayIndex + delta) % 7 - (currentDay + delta) % 7; + return (0, _index.default)(date, diff); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 4002: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setDayOfYear; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name setDayOfYear + * @category Day Helpers + * @summary Set the day of the year to the given date. + * + * @description + * Set the day of the year to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} dayOfYear - the day of the year of the new date + * @returns {Date} the new date with the day of the year set + * @throws {TypeError} 2 arguments required + * + * @example + * // Set the 2nd day of the year to 2 July 2014: + * const result = setDayOfYear(new Date(2014, 6, 2), 2) + * //=> Thu Jan 02 2014 00:00:00 + */ +function setDayOfYear(dirtyDate, dirtyDayOfYear) { + (0, _index3.default)(2, arguments); + var date = (0, _index2.default)(dirtyDate); + var dayOfYear = (0, _index.default)(dirtyDayOfYear); + date.setMonth(0); + date.setDate(dayOfYear); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 54: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setDefaultOptions; + +var _index = __nccwpck_require__(9307); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name setDefaultOptions + * @category Common Helpers + * @summary Set default options including locale. + * @pure false + * + * @description + * Sets the defaults for + * `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate` + * arguments for all functions. + * + * @param {Object} newOptions - an object with options. + * @param {Locale} [newOptions.locale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [newOptions.weekStartsOn] - the index of the first day of the week (0 - Sunday) + * @param {1|2|3|4|5|6|7} [newOptions.firstWeekContainsDate] - the day of January, which is always in the first week of the year + * @throws {TypeError} 1 argument required + * + * @example + * // Set global locale: + * import { es } from 'date-fns/locale' + * setDefaultOptions({ locale: es }) + * const result = format(new Date(2014, 8, 2), 'PPPP') + * //=> 'martes, 2 de septiembre de 2014' + * + * @example + * // Start of the week for 2 September 2014: + * const result = startOfWeek(new Date(2014, 8, 2)) + * //=> Sun Aug 31 2014 00:00:00 + * + * @example + * // Start of the week for 2 September 2014, + * // when we set that week starts on Monday by default: + * setDefaultOptions({ weekStartsOn: 1 }) + * const result = startOfWeek(new Date(2014, 8, 2)) + * //=> Mon Sep 01 2014 00:00:00 + * + * @example + * // Manually set options take priority over default options: + * setDefaultOptions({ weekStartsOn: 1 }) + * const result = startOfWeek(new Date(2014, 8, 2), { weekStartsOn: 0 }) + * //=> Sun Aug 31 2014 00:00:00 + * + * @example + * // Remove the option by setting it to `undefined`: + * setDefaultOptions({ weekStartsOn: 1 }) + * setDefaultOptions({ weekStartsOn: undefined }) + * const result = startOfWeek(new Date(2014, 8, 2)) + * //=> Sun Aug 31 2014 00:00:00 + */ +function setDefaultOptions(newOptions) { + (0, _index2.default)(1, arguments); + var result = {}; + var defaultOptions = (0, _index.getDefaultOptions)(); + + for (var property in defaultOptions) { + if (Object.prototype.hasOwnProperty.call(defaultOptions, property)) { + ; + result[property] = defaultOptions[property]; + } + } + + for (var _property in newOptions) { + if (Object.prototype.hasOwnProperty.call(newOptions, _property)) { + if (newOptions[_property] === undefined) { + delete result[_property]; + } else { + ; + result[_property] = newOptions[_property]; + } + } + } + + (0, _index.setDefaultOptions)(result); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6355: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setHours; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name setHours + * @category Hour Helpers + * @summary Set the hours to the given date. + * + * @description + * Set the hours to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} hours - the hours of the new date + * @returns {Date} the new date with the hours set + * @throws {TypeError} 2 arguments required + * + * @example + * // Set 4 hours to 1 September 2014 11:30:00: + * const result = setHours(new Date(2014, 8, 1, 11, 30), 4) + * //=> Mon Sep 01 2014 04:30:00 + */ +function setHours(dirtyDate, dirtyHours) { + (0, _index3.default)(2, arguments); + var date = (0, _index2.default)(dirtyDate); + var hours = (0, _index.default)(dirtyHours); + date.setHours(hours); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3705: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setISODay; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(6227)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(8313)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name setISODay + * @category Weekday Helpers + * @summary Set the day of the ISO week to the given date. + * + * @description + * Set the day of the ISO week to the given date. + * ISO week starts with Monday. + * 7 is the index of Sunday, 1 is the index of Monday etc. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} day - the day of the ISO week of the new date + * @returns {Date} the new date with the day of the ISO week set + * @throws {TypeError} 2 arguments required + * + * @example + * // Set Sunday to 1 September 2014: + * const result = setISODay(new Date(2014, 8, 1), 7) + * //=> Sun Sep 07 2014 00:00:00 + */ +function setISODay(dirtyDate, dirtyDay) { + (0, _index5.default)(2, arguments); + var date = (0, _index2.default)(dirtyDate); + var day = (0, _index.default)(dirtyDay); + var currentDay = (0, _index4.default)(date); + var diff = day - currentDay; + return (0, _index3.default)(date, diff); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3035: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setISOWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(9894)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name setISOWeek + * @category ISO Week Helpers + * @summary Set the ISO week to the given date. + * + * @description + * Set the ISO week to the given date, saving the weekday number. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} date - the date to be changed + * @param {Number} isoWeek - the ISO week of the new date + * @returns {Date} the new date with the ISO week set + * @throws {TypeError} 2 arguments required + * + * @example + * // Set the 53rd ISO week to 7 August 2004: + * const result = setISOWeek(new Date(2004, 7, 7), 53) + * //=> Sat Jan 01 2005 00:00:00 + */ +function setISOWeek(dirtyDate, dirtyISOWeek) { + (0, _index4.default)(2, arguments); + var date = (0, _index2.default)(dirtyDate); + var isoWeek = (0, _index.default)(dirtyISOWeek); + var diff = (0, _index3.default)(date) - isoWeek; + date.setDate(date.getDate() - diff * 7); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 822: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setISOWeekYear; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(776)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(3086)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name setISOWeekYear + * @category ISO Week-Numbering Year Helpers + * @summary Set the ISO week-numbering year to the given date. + * + * @description + * Set the ISO week-numbering year to the given date, + * saving the week number and the weekday number. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} date - the date to be changed + * @param {Number} isoWeekYear - the ISO week-numbering year of the new date + * @returns {Date} the new date with the ISO week-numbering year set + * @throws {TypeError} 2 arguments required + * + * @example + * // Set ISO week-numbering year 2007 to 29 December 2008: + * const result = setISOWeekYear(new Date(2008, 11, 29), 2007) + * //=> Mon Jan 01 2007 00:00:00 + */ +function setISOWeekYear(dirtyDate, dirtyISOWeekYear) { + (0, _index5.default)(2, arguments); + var date = (0, _index2.default)(dirtyDate); + var isoWeekYear = (0, _index.default)(dirtyISOWeekYear); + var diff = (0, _index4.default)(date, (0, _index3.default)(date)); + var fourthOfJanuary = new Date(0); + fourthOfJanuary.setFullYear(isoWeekYear, 0, 4); + fourthOfJanuary.setHours(0, 0, 0, 0); + date = (0, _index3.default)(fourthOfJanuary); + date.setDate(date.getDate() + diff); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9105: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setMilliseconds; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name setMilliseconds + * @category Millisecond Helpers + * @summary Set the milliseconds to the given date. + * + * @description + * Set the milliseconds to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} milliseconds - the milliseconds of the new date + * @returns {Date} the new date with the milliseconds set + * @throws {TypeError} 2 arguments required + * + * @example + * // Set 300 milliseconds to 1 September 2014 11:30:40.500: + * const result = setMilliseconds(new Date(2014, 8, 1, 11, 30, 40, 500), 300) + * //=> Mon Sep 01 2014 11:30:40.300 + */ +function setMilliseconds(dirtyDate, dirtyMilliseconds) { + (0, _index3.default)(2, arguments); + var date = (0, _index2.default)(dirtyDate); + var milliseconds = (0, _index.default)(dirtyMilliseconds); + date.setMilliseconds(milliseconds); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9207: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setMinutes; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name setMinutes + * @category Minute Helpers + * @summary Set the minutes to the given date. + * + * @description + * Set the minutes to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} minutes - the minutes of the new date + * @returns {Date} the new date with the minutes set + * @throws {TypeError} 2 arguments required + * + * @example + * // Set 45 minutes to 1 September 2014 11:30:40: + * const result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45) + * //=> Mon Sep 01 2014 11:45:40 + */ +function setMinutes(dirtyDate, dirtyMinutes) { + (0, _index3.default)(2, arguments); + var date = (0, _index2.default)(dirtyDate); + var minutes = (0, _index.default)(dirtyMinutes); + date.setMinutes(minutes); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 847: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setMonth; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(7573)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name setMonth + * @category Month Helpers + * @summary Set the month to the given date. + * + * @description + * Set the month to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} month - the month of the new date + * @returns {Date} the new date with the month set + * @throws {TypeError} 2 arguments required + * + * @example + * // Set February to 1 September 2014: + * const result = setMonth(new Date(2014, 8, 1), 1) + * //=> Sat Feb 01 2014 00:00:00 + */ +function setMonth(dirtyDate, dirtyMonth) { + (0, _index4.default)(2, arguments); + var date = (0, _index2.default)(dirtyDate); + var month = (0, _index.default)(dirtyMonth); + var year = date.getFullYear(); + var day = date.getDate(); + var dateWithDesiredMonth = new Date(0); + dateWithDesiredMonth.setFullYear(year, month, 15); + dateWithDesiredMonth.setHours(0, 0, 0, 0); + var daysInMonth = (0, _index3.default)(dateWithDesiredMonth); // Set the last day of the new month + // if the original date was the last day of the longer month + + date.setMonth(month, Math.min(day, daysInMonth)); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 621: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setQuarter; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(847)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name setQuarter + * @category Quarter Helpers + * @summary Set the year quarter to the given date. + * + * @description + * Set the year quarter to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} quarter - the quarter of the new date + * @returns {Date} the new date with the quarter set + * @throws {TypeError} 2 arguments required + * + * @example + * // Set the 2nd quarter to 2 July 2014: + * const result = setQuarter(new Date(2014, 6, 2), 2) + * //=> Wed Apr 02 2014 00:00:00 + */ +function setQuarter(dirtyDate, dirtyQuarter) { + (0, _index4.default)(2, arguments); + var date = (0, _index2.default)(dirtyDate); + var quarter = (0, _index.default)(dirtyQuarter); + var oldQuarter = Math.floor(date.getMonth() / 3) + 1; + var diff = quarter - oldQuarter; + return (0, _index3.default)(date, date.getMonth() + diff * 3); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1346: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setSeconds; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name setSeconds + * @category Second Helpers + * @summary Set the seconds to the given date. + * + * @description + * Set the seconds to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} seconds - the seconds of the new date + * @returns {Date} the new date with the seconds set + * @throws {TypeError} 2 arguments required + * + * @example + * // Set 45 seconds to 1 September 2014 11:30:40: + * const result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45) + * //=> Mon Sep 01 2014 11:30:45 + */ +function setSeconds(dirtyDate, dirtySeconds) { + (0, _index3.default)(2, arguments); + var date = (0, _index2.default)(dirtyDate); + var seconds = (0, _index.default)(dirtySeconds); + date.setSeconds(seconds); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2664: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(81)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(1985)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name setWeek + * @category Week Helpers + * @summary Set the local week to the given date. + * + * @description + * Set the local week to the given date, saving the weekday number. + * The exact calculation depends on the values of + * `options.weekStartsOn` (which is the index of the first day of the week) + * and `options.firstWeekContainsDate` (which is the day of January, which is always in + * the first week of the week-numbering year) + * + * Week numbering: https://en.wikipedia.org/wiki/Week#Week_numbering + * + * @param {Date|Number} date - the date to be changed + * @param {Number} week - the week of the new date + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year + * @returns {Date} the new date with the local week set + * @throws {TypeError} 2 arguments required + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 + * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7 + * + * @example + * // Set the 1st week to 2 January 2005 with default options: + * const result = setWeek(new Date(2005, 0, 2), 1) + * //=> Sun Dec 26 2004 00:00:00 + * + * @example + * // Set the 1st week to 2 January 2005, + * // if Monday is the first day of the week, + * // and the first week of the year always contains 4 January: + * const result = setWeek(new Date(2005, 0, 2), 1, { + * weekStartsOn: 1, + * firstWeekContainsDate: 4 + * }) + * //=> Sun Jan 4 2004 00:00:00 + */ +function setWeek(dirtyDate, dirtyWeek, options) { + (0, _index3.default)(2, arguments); + var date = (0, _index2.default)(dirtyDate); + var week = (0, _index4.default)(dirtyWeek); + var diff = (0, _index.default)(date, options) - week; + date.setDate(date.getDate() - diff * 7); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3438: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setWeekYear; + +var _index = _interopRequireDefault(__nccwpck_require__(3086)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(8014)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index5 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index6 = __nccwpck_require__(9307); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name setWeekYear + * @category Week-Numbering Year Helpers + * @summary Set the local week-numbering year to the given date. + * + * @description + * Set the local week-numbering year to the given date, + * saving the week number and the weekday number. + * The exact calculation depends on the values of + * `options.weekStartsOn` (which is the index of the first day of the week) + * and `options.firstWeekContainsDate` (which is the day of January, which is always in + * the first week of the week-numbering year) + * + * Week numbering: https://en.wikipedia.org/wiki/Week#Week_numbering + * + * @param {Date|Number} date - the date to be changed + * @param {Number} weekYear - the local week-numbering year of the new date + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year + * @returns {Date} the new date with the local week-numbering year set + * @throws {TypeError} 2 arguments required + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 + * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7 + * + * @example + * // Set the local week-numbering year 2004 to 2 January 2010 with default options: + * const result = setWeekYear(new Date(2010, 0, 2), 2004) + * //=> Sat Jan 03 2004 00:00:00 + * + * @example + * // Set the local week-numbering year 2004 to 2 January 2010, + * // if Monday is the first day of week + * // and 4 January is always in the first week of the year: + * const result = setWeekYear(new Date(2010, 0, 2), 2004, { + * weekStartsOn: 1, + * firstWeekContainsDate: 4 + * }) + * //=> Sat Jan 01 2005 00:00:00 + */ +function setWeekYear(dirtyDate, dirtyWeekYear, options) { + var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2; + + (0, _index5.default)(2, arguments); + var defaultOptions = (0, _index6.getDefaultOptions)(); + var firstWeekContainsDate = (0, _index4.default)((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1); + var date = (0, _index3.default)(dirtyDate); + var weekYear = (0, _index4.default)(dirtyWeekYear); + var diff = (0, _index.default)(date, (0, _index2.default)(date, options)); + var firstWeek = new Date(0); + firstWeek.setFullYear(weekYear, 0, firstWeekContainsDate); + firstWeek.setHours(0, 0, 0, 0); + date = (0, _index2.default)(firstWeek, options); + date.setDate(date.getDate() + diff); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6212: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = setYear; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name setYear + * @category Year Helpers + * @summary Set the year to the given date. + * + * @description + * Set the year to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} year - the year of the new date + * @returns {Date} the new date with the year set + * @throws {TypeError} 2 arguments required + * + * @example + * // Set year 2013 to 1 September 2014: + * const result = setYear(new Date(2014, 8, 1), 2013) + * //=> Sun Sep 01 2013 00:00:00 + */ +function setYear(dirtyDate, dirtyYear) { + (0, _index3.default)(2, arguments); + var date = (0, _index2.default)(dirtyDate); + var year = (0, _index.default)(dirtyYear); // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date + + if (isNaN(date.getTime())) { + return new Date(NaN); + } + + date.setFullYear(year); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1868: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfDay; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name startOfDay + * @category Day Helpers + * @summary Return the start of a day for the given date. + * + * @description + * Return the start of a day for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @returns {Date} the start of a day + * @throws {TypeError} 1 argument required + * + * @example + * // The start of a day for 2 September 2014 11:55:00: + * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Tue Sep 02 2014 00:00:00 + */ +function startOfDay(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + date.setHours(0, 0, 0, 0); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2025: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfDecade; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name startOfDecade + * @category Decade Helpers + * @summary Return the start of a decade for the given date. + * + * @description + * Return the start of a decade for the given date. + * + * @param {Date|Number} date - the original date + * @returns {Date} the start of a decade + * @throws {TypeError} 1 argument required + * + * @example + * // The start of a decade for 21 October 2015 00:00:00: + * const result = startOfDecade(new Date(2015, 9, 21, 00, 00, 00)) + * //=> Jan 01 2010 00:00:00 + */ +function startOfDecade(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var year = date.getFullYear(); + var decade = Math.floor(year / 10) * 10; + date.setFullYear(decade, 0, 1); + date.setHours(0, 0, 0, 0); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6277: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfHour; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name startOfHour + * @category Hour Helpers + * @summary Return the start of an hour for the given date. + * + * @description + * Return the start of an hour for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @returns {Date} the start of an hour + * @throws {TypeError} 1 argument required + * + * @example + * // The start of an hour for 2 September 2014 11:55:00: + * const result = startOfHour(new Date(2014, 8, 2, 11, 55)) + * //=> Tue Sep 02 2014 11:00:00 + */ +function startOfHour(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + date.setMinutes(0, 0, 0); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6307: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfISOWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(9813)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name startOfISOWeek + * @category ISO Week Helpers + * @summary Return the start of an ISO week for the given date. + * + * @description + * Return the start of an ISO week for the given date. + * The result will be in the local timezone. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} date - the original date + * @returns {Date} the start of an ISO week + * @throws {TypeError} 1 argument required + * + * @example + * // The start of an ISO week for 2 September 2014 11:55:00: + * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Mon Sep 01 2014 00:00:00 + */ +function startOfISOWeek(dirtyDate) { + (0, _index2.default)(1, arguments); + return (0, _index.default)(dirtyDate, { + weekStartsOn: 1 + }); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 776: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfISOWeekYear; + +var _index = _interopRequireDefault(__nccwpck_require__(6991)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6307)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name startOfISOWeekYear + * @category ISO Week-Numbering Year Helpers + * @summary Return the start of an ISO week-numbering year for the given date. + * + * @description + * Return the start of an ISO week-numbering year, + * which always starts 3 days before the year's first Thursday. + * The result will be in the local timezone. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} date - the original date + * @returns {Date} the start of an ISO week-numbering year + * @throws {TypeError} 1 argument required + * + * @example + * // The start of an ISO week-numbering year for 2 July 2005: + * const result = startOfISOWeekYear(new Date(2005, 6, 2)) + * //=> Mon Jan 03 2005 00:00:00 + */ +function startOfISOWeekYear(dirtyDate) { + (0, _index3.default)(1, arguments); + var year = (0, _index.default)(dirtyDate); + var fourthOfJanuary = new Date(0); + fourthOfJanuary.setFullYear(year, 0, 4); + fourthOfJanuary.setHours(0, 0, 0, 0); + var date = (0, _index2.default)(fourthOfJanuary); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8567: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfMinute; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name startOfMinute + * @category Minute Helpers + * @summary Return the start of a minute for the given date. + * + * @description + * Return the start of a minute for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @returns {Date} the start of a minute + * @throws {TypeError} 1 argument required + * + * @example + * // The start of a minute for 1 December 2014 22:15:45.400: + * const result = startOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400)) + * //=> Mon Dec 01 2014 22:15:00 + */ +function startOfMinute(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + date.setSeconds(0, 0); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7182: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfMonth; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name startOfMonth + * @category Month Helpers + * @summary Return the start of a month for the given date. + * + * @description + * Return the start of a month for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @returns {Date} the start of a month + * @throws {TypeError} 1 argument required + * + * @example + * // The start of a month for 2 September 2014 11:55:00: + * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Mon Sep 01 2014 00:00:00 + */ +function startOfMonth(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + date.setDate(1); + date.setHours(0, 0, 0, 0); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2932: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfQuarter; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name startOfQuarter + * @category Quarter Helpers + * @summary Return the start of a year quarter for the given date. + * + * @description + * Return the start of a year quarter for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @returns {Date} the start of a quarter + * @throws {TypeError} 1 argument required + * + * @example + * // The start of a quarter for 2 September 2014 11:55:00: + * const result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Tue Jul 01 2014 00:00:00 + */ +function startOfQuarter(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + var currentMonth = date.getMonth(); + var month = currentMonth - currentMonth % 3; + date.setMonth(month, 1); + date.setHours(0, 0, 0, 0); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6738: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfSecond; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name startOfSecond + * @category Second Helpers + * @summary Return the start of a second for the given date. + * + * @description + * Return the start of a second for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @returns {Date} the start of a second + * @throws {TypeError} 1 argument required + * + * @example + * // The start of a second for 1 December 2014 22:15:45.400: + * const result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400)) + * //=> Mon Dec 01 2014 22:15:45.000 + */ +function startOfSecond(dirtyDate) { + (0, _index2.default)(1, arguments); + var date = (0, _index.default)(dirtyDate); + date.setMilliseconds(0); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5516: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfToday; + +var _index = _interopRequireDefault(__nccwpck_require__(1868)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name startOfToday + * @category Day Helpers + * @summary Return the start of today. + * @pure false + * + * @description + * Return the start of today. + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `Date.now()` internally hence impure and can't be safely curried. + * + * @returns {Date} the start of today + * + * @example + * // If today is 6 October 2014: + * const result = startOfToday() + * //=> Mon Oct 6 2014 00:00:00 + */ +function startOfToday() { + return (0, _index.default)(Date.now()); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2442: +/***/ ((module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfTomorrow; + +/** + * @name startOfTomorrow + * @category Day Helpers + * @summary Return the start of tomorrow. + * @pure false + * + * @description + * Return the start of tomorrow. + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `new Date()` internally hence impure and can't be safely curried. + * + * @returns {Date} the start of tomorrow + * + * @example + * // If today is 6 October 2014: + * const result = startOfTomorrow() + * //=> Tue Oct 7 2014 00:00:00 + */ +function startOfTomorrow() { + var now = new Date(); + var year = now.getFullYear(); + var month = now.getMonth(); + var day = now.getDate(); + var date = new Date(0); + date.setFullYear(year, month, day + 1); + date.setHours(0, 0, 0, 0); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 9813: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfWeek; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index4 = __nccwpck_require__(9307); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name startOfWeek + * @category Week Helpers + * @summary Return the start of a week for the given date. + * + * @description + * Return the start of a week for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @returns {Date} the start of a week + * @throws {TypeError} 1 argument required + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 + * + * @example + * // The start of a week for 2 September 2014 11:55:00: + * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Sun Aug 31 2014 00:00:00 + * + * @example + * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00: + * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 }) + * //=> Mon Sep 01 2014 00:00:00 + */ +function startOfWeek(dirtyDate, options) { + var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2; + + (0, _index3.default)(1, arguments); + var defaultOptions = (0, _index4.getDefaultOptions)(); + var weekStartsOn = (0, _index2.default)((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN + + if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) { + throw new RangeError('weekStartsOn must be between 0 and 6 inclusively'); + } + + var date = (0, _index.default)(dirtyDate); + var day = date.getDay(); + var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn; + date.setDate(date.getDate() - diff); + date.setHours(0, 0, 0, 0); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8014: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfWeekYear; + +var _index = _interopRequireDefault(__nccwpck_require__(3494)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(9813)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index5 = __nccwpck_require__(9307); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name startOfWeekYear + * @category Week-Numbering Year Helpers + * @summary Return the start of a local week-numbering year for the given date. + * + * @description + * Return the start of a local week-numbering year. + * The exact calculation depends on the values of + * `options.weekStartsOn` (which is the index of the first day of the week) + * and `options.firstWeekContainsDate` (which is the day of January, which is always in + * the first week of the week-numbering year) + * + * Week numbering: https://en.wikipedia.org/wiki/Week#Week_numbering + * + * @param {Date|Number} date - the original date + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year + * @returns {Date} the start of a week-numbering year + * @throws {TypeError} 1 argument required + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 + * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7 + * + * @example + * // The start of an a week-numbering year for 2 July 2005 with default settings: + * const result = startOfWeekYear(new Date(2005, 6, 2)) + * //=> Sun Dec 26 2004 00:00:00 + * + * @example + * // The start of a week-numbering year for 2 July 2005 + * // if Monday is the first day of week + * // and 4 January is always in the first week of the year: + * const result = startOfWeekYear(new Date(2005, 6, 2), { + * weekStartsOn: 1, + * firstWeekContainsDate: 4 + * }) + * //=> Mon Jan 03 2005 00:00:00 + */ +function startOfWeekYear(dirtyDate, options) { + var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2; + + (0, _index4.default)(1, arguments); + var defaultOptions = (0, _index5.getDefaultOptions)(); + var firstWeekContainsDate = (0, _index3.default)((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1); + var year = (0, _index.default)(dirtyDate, options); + var firstWeek = new Date(0); + firstWeek.setFullYear(year, 0, firstWeekContainsDate); + firstWeek.setHours(0, 0, 0, 0); + var date = (0, _index2.default)(firstWeek, options); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8225: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfYear; + +var _index = _interopRequireDefault(__nccwpck_require__(6477)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name startOfYear + * @category Year Helpers + * @summary Return the start of a year for the given date. + * + * @description + * Return the start of a year for the given date. + * The result will be in the local timezone. + * + * @param {Date|Number} date - the original date + * @returns {Date} the start of a year + * @throws {TypeError} 1 argument required + * + * @example + * // The start of a year for 2 September 2014 11:55:00: + * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00)) + * //=> Wed Jan 01 2014 00:00:00 + */ +function startOfYear(dirtyDate) { + (0, _index2.default)(1, arguments); + var cleanDate = (0, _index.default)(dirtyDate); + var date = new Date(0); + date.setFullYear(cleanDate.getFullYear(), 0, 1); + date.setHours(0, 0, 0, 0); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1672: +/***/ ((module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = startOfYesterday; + +/** + * @name startOfYesterday + * @category Day Helpers + * @summary Return the start of yesterday. + * @pure false + * + * @description + * Return the start of yesterday. + * + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `new Date()` internally hence impure and can't be safely curried. + * + * @returns {Date} the start of yesterday + * + * @example + * // If today is 6 October 2014: + * const result = startOfYesterday() + * //=> Sun Oct 5 2014 00:00:00 + */ +function startOfYesterday() { + var now = new Date(); + var year = now.getFullYear(); + var month = now.getMonth(); + var day = now.getDate(); + var date = new Date(0); + date.setFullYear(year, month, day - 1); + date.setHours(0, 0, 0, 0); + return date; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3875: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = sub; + +var _index = _interopRequireDefault(__nccwpck_require__(970)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(6752)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index4 = _interopRequireDefault(__nccwpck_require__(1985)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +/** + * @name sub + * @category Common Helpers + * @summary Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date. + * + * @description + * Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Duration} duration - the object with years, months, weeks, days, hours, minutes and seconds to be subtracted + * + * | Key | Description | + * |---------|------------------------------------| + * | years | Amount of years to be subtracted | + * | months | Amount of months to be subtracted | + * | weeks | Amount of weeks to be subtracted | + * | days | Amount of days to be subtracted | + * | hours | Amount of hours to be subtracted | + * | minutes | Amount of minutes to be subtracted | + * | seconds | Amount of seconds to be subtracted | + * + * All values default to 0 + * + * @returns {Date} the new date with the seconds subtracted + * @throws {TypeError} 2 arguments required + * + * @example + * // Subtract the following duration from 15 June 2017 15:29:20 + * const result = sub(new Date(2017, 5, 15, 15, 29, 20), { + * years: 2, + * months: 9, + * weeks: 1, + * days: 7, + * hours: 5, + * minutes: 9, + * seconds: 30 + * }) + * //=> Mon Sep 1 2014 10:19:50 + */ +function sub(date, duration) { + (0, _index3.default)(2, arguments); + if (!duration || _typeof(duration) !== 'object') return new Date(NaN); + var years = duration.years ? (0, _index4.default)(duration.years) : 0; + var months = duration.months ? (0, _index4.default)(duration.months) : 0; + var weeks = duration.weeks ? (0, _index4.default)(duration.weeks) : 0; + var days = duration.days ? (0, _index4.default)(duration.days) : 0; + var hours = duration.hours ? (0, _index4.default)(duration.hours) : 0; + var minutes = duration.minutes ? (0, _index4.default)(duration.minutes) : 0; + var seconds = duration.seconds ? (0, _index4.default)(duration.seconds) : 0; // Subtract years and months + + var dateWithoutMonths = (0, _index2.default)(date, months + years * 12); // Subtract weeks and days + + var dateWithoutDays = (0, _index.default)(dateWithoutMonths, days + weeks * 7); // Subtract hours, minutes and seconds + + var minutestoSub = minutes + hours * 60; + var secondstoSub = seconds + minutestoSub * 60; + var mstoSub = secondstoSub * 1000; + var finalDate = new Date(dateWithoutDays.getTime() - mstoSub); + return finalDate; +} + +module.exports = exports.default; + +/***/ }), + +/***/ 1952: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = subBusinessDays; + +var _index = _interopRequireDefault(__nccwpck_require__(1727)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(1985)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name subBusinessDays + * @category Day Helpers + * @summary Substract the specified number of business days (mon - fri) to the given date. + * + * @description + * Substract the specified number of business days (mon - fri) to the given date, ignoring weekends. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of business days to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the business days subtracted + * @throws {TypeError} 2 arguments required + * + * @example + * // Substract 10 business days from 1 September 2014: + * const result = subBusinessDays(new Date(2014, 8, 1), 10) + * //=> Mon Aug 18 2014 00:00:00 (skipped weekend days) + */ +function subBusinessDays(dirtyDate, dirtyAmount) { + (0, _index2.default)(2, arguments); + var amount = (0, _index3.default)(dirtyAmount); + return (0, _index.default)(dirtyDate, -amount); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 970: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = subDays; + +var _index = _interopRequireDefault(__nccwpck_require__(6227)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(1985)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name subDays + * @category Day Helpers + * @summary Subtract the specified number of days from the given date. + * + * @description + * Subtract the specified number of days from the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of days to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the days subtracted + * @throws {TypeError} 2 arguments required + * + * @example + * // Subtract 10 days from 1 September 2014: + * const result = subDays(new Date(2014, 8, 1), 10) + * //=> Fri Aug 22 2014 00:00:00 + */ +function subDays(dirtyDate, dirtyAmount) { + (0, _index2.default)(2, arguments); + var amount = (0, _index3.default)(dirtyAmount); + return (0, _index.default)(dirtyDate, -amount); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 2481: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = subHours; + +var _index = _interopRequireDefault(__nccwpck_require__(9956)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(1985)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name subHours + * @category Hour Helpers + * @summary Subtract the specified number of hours from the given date. + * + * @description + * Subtract the specified number of hours from the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of hours to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the hours subtracted + * @throws {TypeError} 2 arguments required + * + * @example + * // Subtract 2 hours from 11 July 2014 01:00:00: + * const result = subHours(new Date(2014, 6, 11, 1, 0), 2) + * //=> Thu Jul 10 2014 23:00:00 + */ +function subHours(dirtyDate, dirtyAmount) { + (0, _index2.default)(2, arguments); + var amount = (0, _index3.default)(dirtyAmount); + return (0, _index.default)(dirtyDate, -amount); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3925: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = subISOWeekYears; + +var _index = _interopRequireDefault(__nccwpck_require__(5318)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(1985)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name subISOWeekYears + * @category ISO Week-Numbering Year Helpers + * @summary Subtract the specified number of ISO week-numbering years from the given date. + * + * @description + * Subtract the specified number of ISO week-numbering years from the given date. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of ISO week-numbering years to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the ISO week-numbering years subtracted + * @throws {TypeError} 2 arguments required + * + * @example + * // Subtract 5 ISO week-numbering years from 1 September 2014: + * const result = subISOWeekYears(new Date(2014, 8, 1), 5) + * //=> Mon Aug 31 2009 00:00:00 + */ +function subISOWeekYears(dirtyDate, dirtyAmount) { + (0, _index2.default)(2, arguments); + var amount = (0, _index3.default)(dirtyAmount); + return (0, _index.default)(dirtyDate, -amount); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7923: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = subMilliseconds; + +var _index = _interopRequireDefault(__nccwpck_require__(524)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(1985)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name subMilliseconds + * @category Millisecond Helpers + * @summary Subtract the specified number of milliseconds from the given date. + * + * @description + * Subtract the specified number of milliseconds from the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the milliseconds subtracted + * @throws {TypeError} 2 arguments required + * + * @example + * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000: + * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750) + * //=> Thu Jul 10 2014 12:45:29.250 + */ +function subMilliseconds(dirtyDate, dirtyAmount) { + (0, _index2.default)(2, arguments); + var amount = (0, _index3.default)(dirtyAmount); + return (0, _index.default)(dirtyDate, -amount); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7535: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = subMinutes; + +var _index = _interopRequireDefault(__nccwpck_require__(5268)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(1985)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name subMinutes + * @category Minute Helpers + * @summary Subtract the specified number of minutes from the given date. + * + * @description + * Subtract the specified number of minutes from the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of minutes to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the minutes subtracted + * @throws {TypeError} 2 arguments required + * + * @example + * // Subtract 30 minutes from 10 July 2014 12:00:00: + * const result = subMinutes(new Date(2014, 6, 10, 12, 0), 30) + * //=> Thu Jul 10 2014 11:30:00 + */ +function subMinutes(dirtyDate, dirtyAmount) { + (0, _index2.default)(2, arguments); + var amount = (0, _index3.default)(dirtyAmount); + return (0, _index.default)(dirtyDate, -amount); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6752: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = subMonths; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(2995)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name subMonths + * @category Month Helpers + * @summary Subtract the specified number of months from the given date. + * + * @description + * Subtract the specified number of months from the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of months to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the months subtracted + * @throws {TypeError} 2 arguments required + * + * @example + * // Subtract 5 months from 1 February 2015: + * const result = subMonths(new Date(2015, 1, 1), 5) + * //=> Mon Sep 01 2014 00:00:00 + */ +function subMonths(dirtyDate, dirtyAmount) { + (0, _index3.default)(2, arguments); + var amount = (0, _index.default)(dirtyAmount); + return (0, _index2.default)(dirtyDate, -amount); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 3139: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = subQuarters; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(5149)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name subQuarters + * @category Quarter Helpers + * @summary Subtract the specified number of year quarters from the given date. + * + * @description + * Subtract the specified number of year quarters from the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of quarters to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the quarters subtracted + * @throws {TypeError} 2 arguments required + * + * @example + * // Subtract 3 quarters from 1 September 2014: + * const result = subQuarters(new Date(2014, 8, 1), 3) + * //=> Sun Dec 01 2013 00:00:00 + */ +function subQuarters(dirtyDate, dirtyAmount) { + (0, _index3.default)(2, arguments); + var amount = (0, _index.default)(dirtyAmount); + return (0, _index2.default)(dirtyDate, -amount); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 138: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = subSeconds; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(4112)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name subSeconds + * @category Second Helpers + * @summary Subtract the specified number of seconds from the given date. + * + * @description + * Subtract the specified number of seconds from the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of seconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the seconds subtracted + * @throws {TypeError} 2 arguments required + * + * @example + * // Subtract 30 seconds from 10 July 2014 12:45:00: + * const result = subSeconds(new Date(2014, 6, 10, 12, 45, 0), 30) + * //=> Thu Jul 10 2014 12:44:30 + */ +function subSeconds(dirtyDate, dirtyAmount) { + (0, _index3.default)(2, arguments); + var amount = (0, _index.default)(dirtyAmount); + return (0, _index2.default)(dirtyDate, -amount); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 5504: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = subWeeks; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(7195)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name subWeeks + * @category Week Helpers + * @summary Subtract the specified number of weeks from the given date. + * + * @description + * Subtract the specified number of weeks from the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of weeks to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the weeks subtracted + * @throws {TypeError} 2 arguments required + * + * @example + * // Subtract 4 weeks from 1 September 2014: + * const result = subWeeks(new Date(2014, 8, 1), 4) + * //=> Mon Aug 04 2014 00:00:00 + */ +function subWeeks(dirtyDate, dirtyAmount) { + (0, _index3.default)(2, arguments); + var amount = (0, _index.default)(dirtyAmount); + return (0, _index2.default)(dirtyDate, -amount); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 843: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = subYears; + +var _index = _interopRequireDefault(__nccwpck_require__(1985)); + +var _index2 = _interopRequireDefault(__nccwpck_require__(3367)); + +var _index3 = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name subYears + * @category Year Helpers + * @summary Subtract the specified number of years from the given date. + * + * @description + * Subtract the specified number of years from the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of years to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the years subtracted + * @throws {TypeError} 2 arguments required + * + * @example + * // Subtract 5 years from 1 September 2014: + * const result = subYears(new Date(2014, 8, 1), 5) + * //=> Tue Sep 01 2009 00:00:00 + */ +function subYears(dirtyDate, dirtyAmount) { + (0, _index3.default)(2, arguments); + var amount = (0, _index.default)(dirtyAmount); + return (0, _index2.default)(dirtyDate, -amount); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6477: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = toDate; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { "@babel/helpers - typeof"; 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); } + +/** + * @name toDate + * @category Common Helpers + * @summary Convert the given argument to an instance of Date. + * + * @description + * Convert the given argument to an instance of Date. + * + * If the argument is an instance of Date, the function returns its clone. + * + * If the argument is a number, it is treated as a timestamp. + * + * If the argument is none of the above, the function returns Invalid Date. + * + * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`. + * + * @param {Date|Number} argument - the value to convert + * @returns {Date} the parsed date in the local time zone + * @throws {TypeError} 1 argument required + * + * @example + * // Clone the date: + * const result = toDate(new Date(2014, 1, 11, 11, 30, 30)) + * //=> Tue Feb 11 2014 11:30:30 + * + * @example + * // Convert the timestamp to date: + * const result = toDate(1392098430000) + * //=> Tue Feb 11 2014 11:30:30 + */ +function toDate(argument) { + (0, _index.default)(1, arguments); + var argStr = Object.prototype.toString.call(argument); // Clone the date + + if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') { + // Prevent the date to lose the milliseconds when passed to new Date() in IE10 + return new Date(argument.getTime()); + } else if (typeof argument === 'number' || argStr === '[object Number]') { + return new Date(argument); + } else { + if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') { + // eslint-disable-next-line no-console + console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"); // eslint-disable-next-line no-console + + console.warn(new Error().stack); + } + + return new Date(NaN); + } +} + +module.exports = exports.default; + +/***/ }), + +/***/ 6812: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = weeksToDays; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name weeksToDays + * @category Conversion Helpers + * @summary Convert weeks to days. + * + * @description + * Convert a number of weeks to a full number of days. + * + * @param {number} weeks - number of weeks to be converted + * + * @returns {number} the number of weeks converted in days + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 2 weeks into days + * const result = weeksToDays(2) + * //=> 14 + */ +function weeksToDays(weeks) { + (0, _index.default)(1, arguments); + return Math.floor(weeks * _index2.daysInWeek); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 4616: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = yearsToMonths; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name yearsToMonths + * @category Conversion Helpers + * @summary Convert years to months. + * + * @description + * Convert a number of years to a full number of months. + * + * @param {number} years - number of years to be converted + * + * @returns {number} the number of years converted in months + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 2 years into months + * const result = yearsToMonths(2) + * //=> 24 + */ +function yearsToMonths(years) { + (0, _index.default)(1, arguments); + return Math.floor(years * _index2.monthsInYear); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 7384: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = yearsToQuarters; + +var _index = _interopRequireDefault(__nccwpck_require__(2063)); + +var _index2 = __nccwpck_require__(5756); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @name yearsToQuarters + * @category Conversion Helpers + * @summary Convert years to quarters. + * + * @description + * Convert a number of years to a full number of quarters. + * + * @param {number} years - number of years to be converted + * + * @returns {number} the number of years converted in quarters + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 2 years to quarters + * const result = yearsToQuarters(2) + * //=> 8 + */ +function yearsToQuarters(years) { + (0, _index.default)(1, arguments); + return Math.floor(years * _index2.quartersInYear); +} + +module.exports = exports.default; + +/***/ }), + +/***/ 8505: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + +//-------------------------------------- +// Setup +//-------------------------------------- +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.nonEmpty = exports.minSize = exports.intFromString = exports.numberFromString = exports.booleanFromString = exports.url = exports.absoluteUrl = exports.relativeUrl = exports.snakeCaseTransformation = exports.isoDate = exports.recursion = exports.undefined = exports["null"] = exports.errorDebugString = exports.prettifyJson = exports.validateAs = exports.discriminatedUnion = exports.union = exports.intersection = exports.literal = exports.dictionary = exports.object = exports.tuple = exports.array = exports.unknown = exports.boolean = exports.number = exports.string = exports.is = exports.getPath = exports.Err = exports.Ok = exports.Validator = void 0; +var Validator = /** @class */ (function () { + function Validator(validationFunction) { + this.validationFunction = validationFunction; + // Phantom type + this.T = undefined; + // Opaque metadata + this.meta = undefined; + this.meta = {}; + } + /** + * Validate any value. + */ + Validator.prototype.validate = function (value, context, path) { + return this.validationFunction(value, context || __assign({}, defaultContext), path || rootPath); + }; + /** + * Maps the validated value or do nothing if this validator returned an error. + */ + Validator.prototype.map = function (fn) { + return withSameMeta(this, this.and(function (v) { return Ok(fn(v)); })); + }; + /** + * Filter this validated value or do nothing if this validator returned an error. + */ + Validator.prototype.filter = function (fn) { + return withSameMeta(this, this.and(function (v) { return (fn(v) ? Ok(v) : Err("filter error: ".concat(prettifyJson(v), "\""))); })); + }; + /** + * Chains this validator with another one, in series. + * The resulting value of the first validator will be the input of the second. + * + * ```ts + * declare const stringToInt: Validator + * declare const intToDate: Validator + * const stringToDate = stringToInt.then(intToDate) + * ``` + */ + Validator.prototype.then = function (validator) { + var self = this; + return withSameMeta(this, new Validator(function (v, context, p) { + var validated = self.validate(v, context, p); + if (!validated.ok) + return validated; + return validator.validate(validated.value, context, p); + })); + }; + /** + * Further refines this validator's output. + */ + Validator.prototype.and = function (fn) { + return withSameMeta(this, transform(this, function (r) { return (r.ok ? fn(r.value) : r); })); + }; + /** + * Swaps the default error string with a custom one. + */ + Validator.prototype.withError = function (errorFunction) { + return withSameMeta(this, transform(this, function (result, value, _p, context) { + if (result.ok || '_hadCustomError' in context) + return result; + context._hadCustomError = true; + return Err(errorFunction(value)); + })); + }; + /** + * Maps the produced errors to new ones. This is the more advanced counterpart of withError. + */ + Validator.prototype.mapErrors = function (errorFunction) { + return withSameMeta(this, transform(this, function (result, _value, _p, context) { + if (result.ok || '_hadCustomError' in context) + return result; + context._hadCustomError = true; + return Err(errorFunction(result.errors)); + })); + }; + Validator.prototype.tagged = function () { + return this; + }; + /** + * Returns a new validator where undefined and null are also valid inputs. + */ + Validator.prototype.nullable = function () { + var n = withSameMeta(this, union(this, nullValidator, undefinedValidator)); + n.meta.nullable = true; + return n; + }; + /** + * Returns a new validator where undefined is also a valid input. + */ + Validator.prototype.optional = function () { + var u = withSameMeta(this, union(this, undefinedValidator)); + u.meta.optional = true; + return u; + }; + Validator.prototype.default = function (defaultValue) { + var opt = withSameMeta(this, this.nullable().map(function (v) { + return v === null || v === undefined ? defaultValue : v; + })); + opt.meta.default = defaultValue; + return opt; + }; + return Validator; +}()); +exports.Validator = Validator; +function Ok(value) { + return { ok: true, value: value }; +} +exports.Ok = Ok; +function Err(errors) { + return { ok: false, errors: errors }; +} +exports.Err = Err; +function failure(path, message) { + return Err([{ path: path, message: message }]); +} +function valueType(value) { + if (Array.isArray(value)) + return 'array'; + if (value === null) + return 'null'; + return typeof value; +} +function typeFailureMessage(expectedType, value) { + return "Expected ".concat(expectedType, ", got ").concat(valueType(value)); +} +function typeFailure(value, path, expectedType) { + var message = typeFailureMessage(expectedType, value); + return Err([{ path: path, message: message }]); +} +function getPath(name, parent) { + return (parent ? "".concat(parent, ".").concat(name) : name); +} +exports.getPath = getPath; +var rootPath = getPath(''); +var defaultContext = {}; +function is(value, validator) { + return validator.validate(value).ok; +} +exports.is = is; +function withSameMeta(source, target) { + target.meta = __assign({}, source.meta); + return target; +} +//-------------------------------------- +// Primitives +//-------------------------------------- +function primitive(name, validationFunction) { + var v = new Validator(validationFunction); + v.meta.tag = name; + return v; +} +var nullValidator = primitive('null', function (v, _c, p) { + return v === null ? Ok(v) : typeFailure(v, p, 'null'); +}); +exports["null"] = nullValidator; +var undefinedValidator = primitive('undefined', function (v, _c, p) { + return v === void 0 ? Ok(v) : typeFailure(v, p, 'undefined'); +}); +exports.undefined = undefinedValidator; +exports.string = primitive('string', function (v, _c, p) { + return typeof v === 'string' ? Ok(v) : typeFailure(v, p, 'string'); +}); +exports.number = primitive('number', function (v, _c, p) { + return typeof v === 'number' ? Ok(v) : typeFailure(v, p, 'number'); +}); +exports.boolean = primitive('boolean', function (v, _c, p) { + return typeof v === 'boolean' ? Ok(v) : typeFailure(v, p, 'boolean'); +}); +exports.unknown = primitive('unknown', Ok); +//-------------------------------------- +// array +//-------------------------------------- +function array(validator) { + var arrayValidator = new Validator(function (v, context, p) { + if (!Array.isArray(v)) + return typeFailure(v, p, 'array'); + var validatedArray = []; + var errors = []; + for (var i = 0; i < v.length; i++) { + var item = v[i]; + var validation = validator.validate(item, __assign({}, context), getPath(String(i), p)); + if (validation.ok) { + validatedArray.push(validation.value); + } + else { + pushAll(errors, validation.errors); + } + } + return errors.length ? Err(errors) : Ok(validatedArray); + }); + arrayValidator.meta.tag = 'array'; + arrayValidator.meta.value = validator; + return arrayValidator; +} +exports.array = array; +function tuple() { + var validators = []; + for (var _i = 0; _i < arguments.length; _i++) { + validators[_i] = arguments[_i]; + } + var validator = new Validator(function (v, context, p) { + if (!Array.isArray(v)) + return typeFailure(v, p, 'Tuple'); + if (v.length !== validators.length) + return failure(p, "Expected Tuple".concat(validators.length, ", got Tuple").concat(v.length)); + var validatedArray = []; + var errors = []; + for (var i = 0; i < v.length; i++) { + var item = v[i]; + var validation = validators[i].validate(item, __assign({}, context), getPath(String(i), p)); + if (validation.ok) { + validatedArray.push(validation.value); + } + else { + pushAll(errors, validation.errors); + } + } + return errors.length ? Err(errors) : Ok(validatedArray); + }); + validator.meta.tag = 'tuple'; + return validator; +} +exports.tuple = tuple; +function object(props) { + var validator = new Validator(function (v, context, p) { + if (v == null || typeof v !== 'object') + return typeFailure(v, p, 'object'); + var validatedObject = {}; + var errors = []; + for (var key in props) { + var transformedKey = context.transformObjectKeys !== undefined + ? context.transformObjectKeys(key) + : key; + var value = v[transformedKey]; + var validator_1 = props[key]; + var validation = validator_1.validate(value, __assign({}, context), getPath(transformedKey, p)); + if (validation.ok) { + if (validation.value !== undefined) + validatedObject[key] = validation.value; + } + else { + pushAll(errors, validation.errors); + } + } + return errors.length ? Err(errors) : Ok(validatedObject); + }); + validator.meta.tag = 'object'; + validator.meta.props = props; + validator.props = props; // For compatibility + return validator; +} +exports.object = object; +//-------------------------------------- +// dictionary +//-------------------------------------- +function dictionary(domain, codomain) { + var validator = new Validator(function (v, context, p) { + if (v == null || typeof v !== 'object') + return typeFailure(v, p, 'object'); + var validatedDict = {}; + var errors = []; + var _loop_1 = function (key) { + var value = v[key]; + var path = getPath(key, p); + var domainValidation = domain.validate(key, __assign({}, context), path); + var codomainValidation = codomain.validate(value, __assign({}, context), path); + if (domainValidation.ok) { + key = domainValidation.value; + } + else { + var error = domainValidation.errors; + pushAll(errors, error.map(function (e) { return ({ path: path, message: "key error: ".concat(e.message) }); })); + } + if (codomainValidation.ok) { + validatedDict[key] = codomainValidation.value; + } + else { + var error = codomainValidation.errors; + pushAll(errors, error.map(function (e) { return ({ + path: e.path, + message: "value error: ".concat(e.message) + }); })); + } + }; + for (var key in v) { + _loop_1(key); + } + return errors.length ? Err(errors) : Ok(validatedDict); + }); + validator.meta.tag = 'dictionary'; + validator.meta.value = codomain; + return validator; +} +exports.dictionary = dictionary; +function literal(value) { + var validator = new Validator(function (v, _c, p) { + return v === value + ? Ok(v) + : failure(p, "Expected ".concat(prettifyJson(value), ", got ").concat(prettifyJson(v))); + }); + validator.literal = value; + return validator; +} +exports.literal = literal; +function intersection() { + var validators = []; + for (var _i = 0; _i < arguments.length; _i++) { + validators[_i] = arguments[_i]; + } + var allObjectValidators = validators.every(function (v) { return Boolean(v.props); }); + var validator = new Validator(function (v, context, p) { + var result = {}; + var errors = []; + for (var i = 0; i < validators.length; i++) { + var validation = validators[i].validate(v, context, p); + if (validation.ok) { + result = __assign(__assign({}, result), validation.value); + } + else { + pushAll(errors, validation.errors); + } + } + return errors.length ? Err(errors) : Ok(result); + }); + if (allObjectValidators) { + var allProps = validators.reduce(function (acc, v) { + Object.assign(acc, v.meta.props); + return acc; + }, {}); + validator.meta.tag = 'object'; + validator.meta.props = allProps; + validator.props = allProps; // For compatibility + } + else { + validator.meta.tag = 'intersection'; + } + return validator; +} +exports.intersection = intersection; +function union() { + var validators = []; + for (var _i = 0; _i < arguments.length; _i++) { + validators[_i] = arguments[_i]; + } + var probe = validators[0]; + // All arguments are validators + if (probe && typeof probe === 'object') { + var validator_2 = new Validator(function (v, context, p) { + var errors = []; + for (var i = 0; i < validators.length; i++) { + var validation = validators[i].validate(v, __assign({}, context), p); + if (validation.ok) + return validation; + else + errors.push(validation.errors); + } + var detailString = errors + .map(function (es, index) { + return "Union type #".concat(index, " => \n ").concat(errorDebugString(es).replace(/\n/g, '\n ')); + }) + .join('\n'); + return failure(p, "The value ".concat(prettifyJson(v), " \nis not part of the union: \n\n").concat(detailString)); + }); + validator_2.union = validators; // for compatibility + validator_2.meta.union = validators; + validator_2.meta.tag = 'union'; + return validator_2; + } + // All arguments are primitives + validators = validators.map(literal); + var validator = new Validator(function (v, context, p) { + for (var i = 0; i < validators.length; i++) { + var validator_3 = validators[i]; + var validation = validator_3.validate(v, __assign({}, context), p); + if (validation.ok) + return validation; + } + return failure(p, "The value ".concat(prettifyJson(v), " is not part of the union")); + }); + validator.union = validators; // for compatibility + validator.meta.union = validators; + validator.meta.tag = 'union'; + return validator; +} +exports.union = union; +//-------------------------------------- +// discriminatedUnion +//-------------------------------------- +function discriminatedUnion(typeKey) { + var vs = []; + for (var _i = 1; _i < arguments.length; _i++) { + vs[_i - 1] = arguments[_i]; + } + var validatorByType = vs.reduce(function (map, validator) { + var v = validator.props[typeKey]; + if ('literal' in v) { + map.set(v.literal, validator); + } + else { + v.union.forEach(function (l) { return map.set(l.literal, validator); }); + } + return map; + }, new Map()); + var discriminated = new Validator(function (v, context, p) { + if (v == null) + return failure(p, "union member is nullish: ".concat(v)); + var typeValue = v[typeKey]; + var validator = validatorByType.get(typeValue); + if (typeValue === undefined) { + return failure(getPath(typeKey, p), "discriminant key (\"".concat(typeKey, "\") missing in: ").concat(prettifyJson(v))); + } + else if (!validator) { + return failure(getPath(typeKey, p), "discriminant value (\"".concat(typeKey, "\": \"").concat(typeValue, "\") not part of the union")); + } + return validator.validate(v, context, p); + }); + discriminated.meta.tag = 'discriminatedUnion'; + return discriminated; +} +exports.discriminatedUnion = discriminatedUnion; +//-------------------------------------- +// transform +//-------------------------------------- +function transform(validator, fn) { + return new Validator(function (v, context, p) { + var validated = validator.validate(v, context, p); + var transformed = fn(validated, v, p, context); + if (transformed.ok) + return transformed; + var error = transformed.errors; + if (typeof error === 'string') + return failure(p, error); + return transformed; + }); +} +function validateAs(validator, value) { + return validator.validate(value); +} +exports.validateAs = validateAs; +//-------------------------------------- +// util +//-------------------------------------- +function pushAll(xs, ys) { + Array.prototype.push.apply(xs, ys); +} +function prettifyJson(value) { + return JSON.stringify(value, undefined, 2); +} +exports.prettifyJson = prettifyJson; +function errorDebugString(errors) { + return errors + .map(function (e) { return "At [root".concat((e.path && '.' + e.path) || '', "] ").concat(e.message); }) + .join('\n'); +} +exports.errorDebugString = errorDebugString; +//-------------------------------------- +// extra validators +//-------------------------------------- +function recursion(definition) { + var Self = new Validator(function (value, context, path) { + return Result.validate(value, context, path); + }); + var Result = definition(Self); + return Result; +} +exports.recursion = recursion; +exports.isoDate = exports.string.and(function (str) { + var date = new Date(str); + return isNaN(date.getTime()) + ? Err("Expected ISO date, got: ".concat(prettifyJson(str))) + : Ok(date); +}); +//-------------------------------------- +// context +//-------------------------------------- +var upperThenLower = /([A-Z]+)([A-Z][a-z])/g; +var lowerThenUpper = /([a-z\\\\d])([A-Z])/g; +var snakeCaseTransformation = function (key) { + return key + .replace(upperThenLower, '$1_$2') + .replace(lowerThenUpper, '$1_$2') + .toLowerCase(); +}; +exports.snakeCaseTransformation = snakeCaseTransformation; +function withLogicalType(logicalType, validator) { + validator.meta.logicalType = logicalType; + return validator; +} +//-------------------------------------- +// url +//-------------------------------------- +var relativeUrl = function (baseUrl) { + if (baseUrl === void 0) { baseUrl = 'http://some-domain.com'; } + return withLogicalType('relativeUrl', exports.string.and(function (str) { + try { + new URL(str, baseUrl); + return Ok(str); + } + catch (err) { + return Err("".concat(str, " is not a relative URL for baseURL: ").concat(baseUrl)); + } + })); +}; +exports.relativeUrl = relativeUrl; +exports.absoluteUrl = withLogicalType('absoluteUrl', exports.string.and(function (str) { + try { + new URL(str); + return Ok(str); + } + catch (err) { + return Err("".concat(str, " is not an absolute URL")); + } +})); +exports.url = union(exports.absoluteUrl, (0, exports.relativeUrl)()); +//-------------------------------------- +// parsed from string +//-------------------------------------- +exports.booleanFromString = withLogicalType('boolean', union('true', 'false') + .withError(function (v) { return "Expected \"true\" | \"false\", got: ".concat(v); }) + .map(function (str) { return str === 'true'; })); +exports.numberFromString = withLogicalType('number', exports.string.and(function (str) { + var parsed = Number(str); + return Number.isNaN(parsed) + ? Err("\"".concat(str, "\" is not a stringified number")) + : Ok(parsed); +})); +exports.intFromString = withLogicalType('integer', exports.numberFromString.and(function (num) { + return Number.isInteger(num) ? Ok(num) : Err("".concat(num, " is not an int")); +})); +function minSize(minSize) { + return function (value) { + var size = typeof value === 'string' + ? value.length + : Array.isArray(value) + ? value.length + : value instanceof Map || value instanceof Set + ? value.size + : Object.keys(value).length; + return size >= minSize + ? Ok(value) + : Err("Expected a min size of ".concat(minSize, ", got ").concat(size)); + }; +} +exports.minSize = minSize; +// Note: this a fully fledged function so that inference on T will work. +function nonEmpty(value) { + return minSize(1)(value); +} +exports.nonEmpty = nonEmpty; + + +/***/ }), + +/***/ 4294: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = __nccwpck_require__(4219); + + +/***/ }), + +/***/ 4219: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var net = __nccwpck_require__(1808); +var tls = __nccwpck_require__(4404); +var http = __nccwpck_require__(3685); +var https = __nccwpck_require__(5687); +var events = __nccwpck_require__(2361); +var assert = __nccwpck_require__(9491); +var util = __nccwpck_require__(3837); + + +exports.httpOverHttp = httpOverHttp; +exports.httpsOverHttp = httpsOverHttp; +exports.httpOverHttps = httpOverHttps; +exports.httpsOverHttps = httpsOverHttps; + + +function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; +} + +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + +function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; +} + +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + + +function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + + self.on('free', function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); +} +util.inherits(TunnelingAgent, events.EventEmitter); + +TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); + + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push(options); + return; + } + + // If we are under maxSockets create a new one. + self.createSocket(options, function(socket) { + socket.on('free', onFree); + socket.on('close', onCloseOrRemove); + socket.on('agentRemove', onCloseOrRemove); + req.onSocket(socket); + + function onFree() { + self.emit('free', socket, options); + } + + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener('free', onFree); + socket.removeListener('close', onCloseOrRemove); + socket.removeListener('agentRemove', onCloseOrRemove); + } + }); +}; + +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: 'CONNECT', + path: options.host + ':' + options.port, + agent: false, + headers: { + host: options.host + ':' + options.port + } + }); + if (options.localAddress) { + connectOptions.localAddress = options.localAddress; + } + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + new Buffer(connectOptions.proxyAuth).toString('base64'); + } + + debug('making CONNECT request'); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; // for v0.6 + connectReq.once('response', onResponse); // for v0.6 + connectReq.once('upgrade', onUpgrade); // for v0.6 + connectReq.once('connect', onConnect); // for v0.7 or later + connectReq.once('error', onError); + connectReq.end(); + + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true; + } + + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + + if (res.statusCode !== 200) { + debug('tunneling socket could not be established, statusCode=%d', + res.statusCode); + socket.destroy(); + var error = new Error('tunneling socket could not be established, ' + + 'statusCode=' + res.statusCode); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug('got illegal response body from proxy'); + socket.destroy(); + var error = new Error('got illegal response body from proxy'); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + debug('tunneling connection has established'); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + + function onError(cause) { + connectReq.removeAllListeners(); + + debug('tunneling socket could not be established, cause=%s\n', + cause.message, cause.stack); + var error = new Error('tunneling socket could not be established, ' + + 'cause=' + cause.message); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + } +}; + +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) { + return; + } + this.sockets.splice(pos, 1); + + var pending = this.requests.shift(); + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); + } +}; + +function createSecureSocket(options, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader('host'); + var tlsOptions = mergeOptions({}, self.options, { + socket: socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host + }); + + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); +} + + +function toOptions(host, port, localAddress) { + if (typeof host === 'string') { // since v0.10 + return { + host: host, + port: port, + localAddress: localAddress + }; + } + return host; // for v0.11 or later +} + +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === 'object') { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== undefined) { + target[k] = overrides[k]; + } + } + } + } + return target; +} + + +var debug; +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0]; + } else { + args.unshift('TUNNEL:'); + } + console.error.apply(console, args); + } +} else { + debug = function() {}; +} +exports.debug = debug; // for test + + +/***/ }), + +/***/ 5840: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "v1", ({ + enumerable: true, + get: function () { + return _v.default; + } +})); +Object.defineProperty(exports, "v3", ({ + enumerable: true, + get: function () { + return _v2.default; + } +})); +Object.defineProperty(exports, "v4", ({ + enumerable: true, + get: function () { + return _v3.default; + } +})); +Object.defineProperty(exports, "v5", ({ + enumerable: true, + get: function () { + return _v4.default; + } +})); +Object.defineProperty(exports, "NIL", ({ + enumerable: true, + get: function () { + return _nil.default; + } +})); +Object.defineProperty(exports, "version", ({ + enumerable: true, + get: function () { + return _version.default; + } +})); +Object.defineProperty(exports, "validate", ({ + enumerable: true, + get: function () { + return _validate.default; + } +})); +Object.defineProperty(exports, "stringify", ({ + enumerable: true, + get: function () { + return _stringify.default; + } +})); +Object.defineProperty(exports, "parse", ({ + enumerable: true, + get: function () { + return _parse.default; + } +})); + +var _v = _interopRequireDefault(__nccwpck_require__(8628)); + +var _v2 = _interopRequireDefault(__nccwpck_require__(6409)); + +var _v3 = _interopRequireDefault(__nccwpck_require__(5122)); + +var _v4 = _interopRequireDefault(__nccwpck_require__(9120)); + +var _nil = _interopRequireDefault(__nccwpck_require__(5332)); + +var _version = _interopRequireDefault(__nccwpck_require__(1595)); + +var _validate = _interopRequireDefault(__nccwpck_require__(6900)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(8950)); + +var _parse = _interopRequireDefault(__nccwpck_require__(2746)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/***/ }), + +/***/ 4569: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('md5').update(bytes).digest(); +} + +var _default = md5; +exports["default"] = _default; + +/***/ }), + +/***/ 5332: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = '00000000-0000-0000-0000-000000000000'; +exports["default"] = _default; + +/***/ }), + +/***/ 2746: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(6900)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} + +var _default = parse; +exports["default"] = _default; + +/***/ }), + +/***/ 814: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +exports["default"] = _default; + +/***/ }), + +/***/ 807: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = rng; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; + +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); + + poolPtr = 0; + } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} + +/***/ }), + +/***/ 5274: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('sha1').update(bytes).digest(); +} + +var _default = sha1; +exports["default"] = _default; + +/***/ }), + +/***/ 8950: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(6900)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); +} + +function stringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!(0, _validate.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +var _default = stringify; +exports["default"] = _default; + +/***/ }), + +/***/ 8628: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _rng = _interopRequireDefault(__nccwpck_require__(807)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(8950)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || (0, _stringify.default)(b); +} + +var _default = v1; +exports["default"] = _default; + +/***/ }), + +/***/ 6409: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(5998)); + +var _md = _interopRequireDefault(__nccwpck_require__(4569)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports["default"] = _default; + +/***/ }), + +/***/ 5998: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = _default; +exports.URL = exports.DNS = void 0; + +var _stringify = _interopRequireDefault(__nccwpck_require__(8950)); + +var _parse = _interopRequireDefault(__nccwpck_require__(2746)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; + +function _default(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); + } + + if (namespace.length !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return (0, _stringify.default)(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} + +/***/ }), + +/***/ 5122: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _rng = _interopRequireDefault(__nccwpck_require__(807)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(8950)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function v4(options, buf, offset) { + options = options || {}; + + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + + return buf; + } + + return (0, _stringify.default)(rnds); +} + +var _default = v4; +exports["default"] = _default; + +/***/ }), + +/***/ 9120: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(5998)); + +var _sha = _interopRequireDefault(__nccwpck_require__(5274)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default = v5; +exports["default"] = _default; + +/***/ }), + +/***/ 6900: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _regex = _interopRequireDefault(__nccwpck_require__(814)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); +} + +var _default = validate; +exports["default"] = _default; + +/***/ }), + +/***/ 1595: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(6900)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.substr(14, 1), 16); +} + +var _default = version; +exports["default"] = _default; + +/***/ }), + +/***/ 7533: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.apiClient = void 0; +const http = __importStar(__nccwpck_require__(6255)); +const http_client_1 = __nccwpck_require__(6255); +const apiClient = (conf) => { + const client = new http.HttpClient(); + return { + startSimulation: (simulationId, options) => postJson(client, conf, "/simulations/start", options ?? {}, { simulation: simulationId }), + getRunInformation: (runId) => getJson(client, conf, "/run", { run: runId }), + getSimulations: () => getJson(client, conf, "/simulations"), + abortRun: (runId) => abortRun(client, conf, runId), + getConcurrentUserMetric: (runId, scenario) => getJson(client, conf, "/series", seriesParams(runId, scenario)), + getRequestsSummary: (runId) => getJson(client, conf, "/summaries/requests", { run: runId }), + checkCloudCompatibility: () => checkCloudCompatibility(client, conf) + }; +}; +exports.apiClient = apiClient; +const seriesParams = (runId, scenario) => ({ + run: runId, + scenario: scenario, + group: "", + request: "", + node: "", + remote: "", + metric: "usrActive" +}); +const abortRun = async (client, conf, runId) => { + try { + await postJson(client, conf, "/simulations/abort", {}, { run: runId }); + return true; + } + catch (error) { + if (error instanceof http_client_1.HttpClientError && + (error.statusCode == http_client_1.HttpCodes.BadRequest || error.statusCode == http_client_1.HttpCodes.NotFound)) { + return false; + } + else { + throw error; + } + } +}; +const checkCloudCompatibility = async (client, conf) => { + const clientName = "gatling-enterprise-github-action"; + const version = "0.0.1"; + const response = await client.get(buildUrl(conf, "/compatibility", { clientName, version }), baseHeaders); + if (response.message.statusCode === http_client_1.HttpCodes.BadRequest) { + throw new Error(`Plugin ${clientName} version ${version} is no longer supported; please upgrade to the latest version`); + } +}; +const getJson = (client, conf, path, params) => client.getJson(buildUrl(conf, path, params), headers(conf)).then(handleJsonResponse); +const postJson = (client, conf, path, payload, params) => client.postJson(buildUrl(conf, path, params), payload, headers(conf)).then(handleJsonResponse); +const headers = (conf) => ({ + ...baseHeaders, + Authorization: conf.apiToken +}); +const baseHeaders = { "User-Agent": "GatlingEnterpriseGitHubAction/v1" }; +const buildUrl = (conf, path, queryParams) => { + const resourceUrl = conf.baseUrl + path; + const url = new URL(resourceUrl); + if (queryParams) { + for (const [key, value] of Object.entries(queryParams)) { + url.searchParams.append(key, value); + } + } + return url.toString(); +}; +const handleJsonResponse = (response) => { + if (response.statusCode === http_client_1.HttpCodes.NotFound || response.result === null) { + throw new http_client_1.HttpClientError("Unexpected empty response", http_client_1.HttpCodes.NotFound); + } + return response.result; +}; + + +/***/ }), + +/***/ 6373: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.overrideLoadGeneratorsInputValidation = exports.configKeysInputValidation = exports.jsonValidation = exports.uuidValidation = exports.requiredBooleanValidation = exports.readConfig = void 0; +const core = __importStar(__nccwpck_require__(2186)); +const idonttrustlikethat_1 = __nccwpck_require__(8505); +const log_1 = __nccwpck_require__(8410); +const readConfig = () => { + const gatlingEnterpriseUrl = getGatlingEnterpriseUrlConfig(); + const failActionOnRunFailure = getFailActionOnRunFailureConfig(); + const waitForRunEnd = getWaitForRunEnd(); + const config = { + gatlingEnterpriseUrl, + api: getApiConfig(gatlingEnterpriseUrl), + run: getRunConfig(), + failActionOnRunFailure, + waitForRunEnd + }; + (0, log_1.logDebug)("Parsed configuration: " + JSON.stringify({ api: { ...config.api, apiToken: "*****" }, run: config.run })); + return config; +}; +exports.readConfig = readConfig; +const getGatlingEnterpriseUrlConfig = () => getValidatedInput("gatling_enterprise_url", requiredInputValidation, "gatling_enterprise_url is required"); +const getFailActionOnRunFailureConfig = () => getValidatedInput("fail_action_on_run_failure", exports.requiredBooleanValidation, "fail_action_on_run_failure is required"); +const getWaitForRunEnd = () => getValidatedInput("wait_for_run_end", exports.requiredBooleanValidation, "wait_for_run_end is required"); +const getApiConfig = (gatlingEnterpriseUrl) => { + const apiToken = getValidatedInput("api_token", requiredInputValidation, "api_token is required", "GATLING_ENTERPRISE_API_TOKEN"); + return { + baseUrl: `${gatlingEnterpriseUrl}/api/public`, + apiToken + }; +}; +const getRunConfig = () => { + const simulationId = getValidatedInput("simulation_id", exports.uuidValidation, "simulation_id must be a valid UUID"); + const extraSystemProperties = getValidatedInput("extra_system_properties", exports.configKeysInputValidation, "extra_system_properties must be a JSON object and only contain string, number, and boolean values (or omitted entirely)"); + const extraEnvironmentVariables = getValidatedInput("extra_environment_variables", exports.configKeysInputValidation, "extra_environment_variables must be a JSON object and only contain string, number, and boolean values (or omitted entirely)"); + const overrideLoadGenerators = getValidatedInput("override_load_generators", exports.overrideLoadGeneratorsInputValidation, "override_load_generators must be a valid configuration for overriding load generators"); + return { + simulationId, + extraSystemProperties, + extraEnvironmentVariables, + overrideLoadGenerators: overrideLoadGenerators + }; +}; +const requiredInputValidation = idonttrustlikethat_1.string.filter((str) => str !== ""); +const optionalInputValidation = idonttrustlikethat_1.string.map((str) => (str === "" ? undefined : str)); +exports.requiredBooleanValidation = requiredInputValidation.and((str) => { + const lowerCaseStr = str.toLowerCase(); + return lowerCaseStr === "true" + ? (0, idonttrustlikethat_1.Ok)(true) + : lowerCaseStr === "false" + ? (0, idonttrustlikethat_1.Ok)(false) + : (0, idonttrustlikethat_1.Err)(`Invalid boolean value: ${str}`); +}); +exports.uuidValidation = idonttrustlikethat_1.string.filter((str) => /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(str)); +exports.jsonValidation = idonttrustlikethat_1.string.and((str) => { + try { + return (0, idonttrustlikethat_1.Ok)(JSON.parse(str)); + } + catch (e) { + if (e instanceof Error) { + return (0, idonttrustlikethat_1.Err)(`Invalid JSON. ${e.name}: ${e.message}`); + } + throw e; + } +}); +const configKeyValueValidation = (0, idonttrustlikethat_1.union)(idonttrustlikethat_1.string, idonttrustlikethat_1.number, idonttrustlikethat_1.boolean).map((value) => typeof value === "string" ? value : `${value}`); +const configKeysValidation = exports.jsonValidation.then((0, idonttrustlikethat_1.dictionary)(idonttrustlikethat_1.string, configKeyValueValidation)); +exports.configKeysInputValidation = optionalInputValidation.then(configKeysValidation.optional()); +const overrideLoadGeneratorsValidation = exports.jsonValidation.then((0, idonttrustlikethat_1.dictionary)(exports.uuidValidation, (0, idonttrustlikethat_1.object)({ size: idonttrustlikethat_1.number, weight: idonttrustlikethat_1.number.optional() }))); +exports.overrideLoadGeneratorsInputValidation = optionalInputValidation.then(overrideLoadGeneratorsValidation.optional()); +const getValidatedInput = (name, validator, errorMessage, envVarName) => { + const rawInput = core.getInput(name); + const inputWithFallback = rawInput === "" && envVarName ? getEnvVar(envVarName) : rawInput; + const result = validator.validate(inputWithFallback); + if (!result.ok) { + // TODO RND-10 use validation error result to give better error messages + throw new TypeError(errorMessage); + } + return result.value; +}; +/** + * Returns an empty string if not found, to stay consistent with how GH Actions handles empty input values. + */ +const getEnvVar = (envVarName) => process.env[envVarName] ?? ""; + + +/***/ }), + +/***/ 6144: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const runMain_1 = __importDefault(__nccwpck_require__(5158)); +const runCleanup_1 = __importDefault(__nccwpck_require__(5460)); +const state_1 = __nccwpck_require__(9738); +const log_1 = __nccwpck_require__(8410); +const run = async () => { + switch ((0, state_1.getPostStatusState)()) { + case "post_noop": + (0, log_1.log)("Post-execution cleanup: no cleanup is required."); + break; + case "post_cleanup": + (0, log_1.log)("Post-execution cleanup: trying to stop simulation run if required."); + await (0, runCleanup_1.default)(); + break; + default: + // Do not re-run the main action when launched again later + (0, state_1.setPostStatusState)("post_noop"); + await (0, runMain_1.default)(); + break; + } +}; +run(); + + +/***/ }), + +/***/ 4076: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getAndLogMetricsSummary = void 0; +const date_fns_1 = __nccwpck_require__(3314); +const duration_1 = __nccwpck_require__(2627); +const log_1 = __nccwpck_require__(8410); +const getAndLogMetricsSummary = async (client, runInfo) => { + const metricsSummary = await getMetricsSummary(client, runInfo); + logMetricsSummary(metricsSummary); +}; +exports.getAndLogMetricsSummary = getAndLogMetricsSummary; +const getMetricsSummary = async (client, runInfo) => { + const [seriesResponse, requestsSummary] = await Promise.all([ + client.getConcurrentUserMetric(runInfo.runId, runInfo.scenario), + client.getRequestsSummary(runInfo.runId) + ]); + const currentTimestamp = Date.now(); + const date = (0, date_fns_1.format)(currentTimestamp, "yyyy-MM-dd HH:mm:ss"); + const duration = (0, duration_1.formatDuration)(runInfo.injectStart, currentTimestamp); + const nbUsers = seriesResponse + .map(({ values }) => (values.length === 0 ? 0.0 : values[values.length - 1])) + .reduce((acc, next) => acc + next, 0.0); + const nbRequest = requestsSummary.out.counts.total; + const requestsSeconds = requestsSummary.out.rps.total; + const failureRatio = requestsSummary.in.counts.koPercent; + const listMetric = recursivelyGetChildren(requestsSummary.children ?? []); + return { + date, + duration, + nbUsers, + nbRequest, + requestsSeconds, + failureRatio, + listMetric + }; +}; +const recursivelyGetChildren = (children) => children.map((child) => child.children + ? { name: child.name, children: recursivelyGetChildren(child.children) } + : { + name: child.name, + nbRequest: child.out.counts.total, + failureRatio: child.in.counts.koPercent, + requestsSeconds: child.out.rps.total + }); +const logMetricsSummary = (summary) => { + (0, log_1.logGroup)(`Time: ${summary.date}, ${summary.duration} elapsed\n`, (summary.nbUsers > 0 ? `Number of concurrent users: ${summary.nbUsers}\n` : "") + + `Number of requests: ${summary.nbRequest}\n` + + `Number of requests per seconds: ${summary.requestsSeconds}\n` + + formatListMetrics(summary.listMetric)); +}; +const formatListMetrics = (listMetric) => { + const recurs = (listMetric, level) => { + const padding = " ".repeat(2 * level); + const formatNode = (node) => `${padding}> Group ${node.name}`; + const formatLeaf = (leaf) => [ + `${padding}> Request ${leaf.name}`, + `${padding} Counts: ${leaf.nbRequest}`, + `${padding} Requests per seconds: ${leaf.requestsSeconds}`, + `${padding} Failure ratio: ${leaf.failureRatio}%` + ]; + return listMetric.flatMap((child) => isChildMetricLeaf(child) ? formatLeaf(child) : [formatNode(child), ...recurs(child.children, level + 1)]); + }; + return recurs(listMetric, 0).join("\n"); +}; +const isChildMetricLeaf = (o) => !("children" in o); + + +/***/ }), + +/***/ 2811: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.waitForRunEnd = void 0; +const promises_1 = __nccwpck_require__(8670); +const status_1 = __nccwpck_require__(1813); +const metrics_1 = __nccwpck_require__(4076); +const error_1 = __nccwpck_require__(9955); +const log_1 = __nccwpck_require__(8410); +const MAX_CONSECUTIVE_ERRORS = 5; +const waitForRunEnd = async (client, startedRun) => { + let runInfo; + let oldStatus = -1; + let consecutiveErrorsCount = 0; + do { + try { + await (0, promises_1.setTimeout)(5000); // Initial delay even on first iteration because run duration might not be populated yet + runInfo = await client.getRunInformation(startedRun.runId); + const statusMsg = `Run status is now ${(0, status_1.statusName)(runInfo.status)} [${runInfo.status}]`; + runInfo.status !== oldStatus ? (0, log_1.log)(statusMsg) : (0, log_1.logDebug)(statusMsg); + oldStatus = runInfo.status; + if (runInfo.injectStart > 0) { + await (0, metrics_1.getAndLogMetricsSummary)(client, runInfo); + } + consecutiveErrorsCount = 0; + } + catch (error) { + consecutiveErrorsCount++; + if (consecutiveErrorsCount < MAX_CONSECUTIVE_ERRORS) { + const msg = (0, error_1.formatErrorMessage)(error); + (0, log_1.log)((0, log_1.yellow)(`Failed to retrieve current run information (attempt ${consecutiveErrorsCount}/${MAX_CONSECUTIVE_ERRORS}): ${msg}`)); + } + else { + throw error; + } + } + } while (runInfo === undefined || (0, status_1.isRunning)(runInfo.status)); + return { + runId: runInfo.runId, + statusCode: runInfo.status, + statusName: (0, status_1.statusName)(runInfo.status), + assertions: runInfo.assertions + }; +}; +exports.waitForRunEnd = waitForRunEnd; + + +/***/ }), + +/***/ 9459: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.startRun = void 0; +const startRun = async (client, config) => { + const response = await client.startSimulation(config.run.simulationId, { + extraSystemProperties: config.run.extraSystemProperties, + extraEnvironmentVariables: config.run.extraEnvironmentVariables, + overrideHostsByPool: config.run.overrideLoadGenerators + }); + // Fallback URLs for Gatling Enterprise Self-Hosted + const reportsPath = response.reportsPath ?? `/simulations/reports/${response.runId}`; + const runsPath = response.runsPath ?? `/simulations/runs/${config.run.simulationId}`; + return { + runId: response.runId, + reportsUrl: webAppUrl(config, reportsPath), + runsUrl: webAppUrl(config, runsPath) + }; +}; +exports.startRun = startRun; +const webAppUrl = (config, path) => config.gatlingEnterpriseUrl + path; + + +/***/ }), + +/***/ 1813: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isSuccessful = exports.isRunning = exports.statusName = exports.RunStatus = void 0; +var RunStatus; +(function (RunStatus) { + RunStatus[RunStatus["Building"] = 0] = "Building"; + RunStatus[RunStatus["Deploying"] = 1] = "Deploying"; + RunStatus[RunStatus["Deployed"] = 2] = "Deployed"; + RunStatus[RunStatus["Injecting"] = 3] = "Injecting"; + RunStatus[RunStatus["Successful"] = 4] = "Successful"; + RunStatus[RunStatus["AssertionsSuccessful"] = 5] = "AssertionsSuccessful"; + RunStatus[RunStatus["AutomaticallyStopped"] = 6] = "AutomaticallyStopped"; + RunStatus[RunStatus["ManuallyStopped"] = 7] = "ManuallyStopped"; + RunStatus[RunStatus["AssertionsFailed"] = 8] = "AssertionsFailed"; + RunStatus[RunStatus["Timeout"] = 9] = "Timeout"; + RunStatus[RunStatus["BuildFailed"] = 10] = "BuildFailed"; + RunStatus[RunStatus["Broken"] = 11] = "Broken"; + RunStatus[RunStatus["DeploymentFailed"] = 12] = "DeploymentFailed"; + RunStatus[RunStatus["InvalidLicense"] = 13] = "InvalidLicense"; + RunStatus[RunStatus["Collected"] = 14] = "Collected"; + RunStatus[RunStatus["KillRequested"] = 15] = "KillRequested"; +})(RunStatus = exports.RunStatus || (exports.RunStatus = {})); +const statusName = (status) => RunStatus[status]; +exports.statusName = statusName; +const RUNNING_STATUSES = [ + RunStatus.Building, + RunStatus.Deploying, + RunStatus.Deployed, + RunStatus.Injecting, + RunStatus.Collected, + RunStatus.KillRequested +]; +const SUCCESSFUL_STATUSES = [RunStatus.Successful, RunStatus.AssertionsSuccessful]; +const isRunning = (status) => RUNNING_STATUSES.includes(status); +exports.isRunning = isRunning; +const isSuccessful = (status) => SUCCESSFUL_STATUSES.includes(status); +exports.isSuccessful = isSuccessful; + + +/***/ }), + +/***/ 5460: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const config_1 = __nccwpck_require__(6373); +const apiClient_1 = __nccwpck_require__(7533); +const state_1 = __nccwpck_require__(9738); +const error_1 = __nccwpck_require__(9955); +const log_1 = __nccwpck_require__(8410); +const run = async () => { + try { + const config = (0, config_1.readConfig)(); + const client = (0, apiClient_1.apiClient)(config.api); + const runId = (0, state_1.getRunIdState)(); + const stopped = await client.abortRun(runId); + if (stopped) { + (0, log_1.log)("Successfully stopped ongoing run"); + } + else { + (0, log_1.log)("There was no ongoing run to stop"); + } + } + catch (error) { + (0, log_1.annotateError)("Failed attempt to clean up ongoing run, caused by: " + (0, error_1.formatErrorMessage)(error)); + } +}; +exports["default"] = run; + + +/***/ }), + +/***/ 5158: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const core = __importStar(__nccwpck_require__(2186)); +const config_1 = __nccwpck_require__(6373); +const apiClient_1 = __nccwpck_require__(7533); +const status_1 = __nccwpck_require__(1813); +const start_1 = __nccwpck_require__(9459); +const ongoing_1 = __nccwpck_require__(2811); +const error_1 = __nccwpck_require__(9955); +const state_1 = __nccwpck_require__(9738); +const log_1 = __nccwpck_require__(8410); +const run = async () => { + try { + const config = (0, config_1.readConfig)(); + const client = (0, apiClient_1.apiClient)(config.api); + await client.checkCloudCompatibility(); + const startedRun = await (0, start_1.startRun)(client, config); + (0, state_1.setRunIdState)(startedRun.runId); + (0, state_1.setPostStatusState)("post_cleanup"); // Run started, cleanup will be needed if interrupted now + logStart(config, startedRun); + core.setOutput("run_id", startedRun.runId); + core.setOutput("reports_url", startedRun.reportsUrl); + core.setOutput("runs_url", startedRun.runsUrl); + if (config.waitForRunEnd) { + const finishedRun = await (0, ongoing_1.waitForRunEnd)(client, startedRun); + (0, state_1.setPostStatusState)("post_noop"); // Run finished, no cleanup needed + logAssertionResults(finishedRun.assertions); + logResult(config, startedRun, finishedRun); + core.setOutput("run_status_code", finishedRun.statusCode); + core.setOutput("run_status_name", finishedRun.statusName); + core.setOutput("run_assertions", finishedRun.assertions); + // Should use run_status_code/run_status_name (without 's', this refers to only one run) + // runs_status_code/runs_status_name are kept for backward compatibility since 1.0, can be removed in 2.x + core.setOutput("runs_status_code", finishedRun.statusCode); + core.setOutput("runs_status_name", finishedRun.statusName); + } + else { + (0, state_1.setPostStatusState)("post_noop"); // Not waiting for run end, no cleanup needed + } + } + catch (error) { + (0, log_1.setFailed)((0, error_1.formatErrorMessage)(error)); + } +}; +const logStart = (config, startedRun) => { + (0, log_1.log)((0, log_1.bright)(`Started run ${startedRun.runId} for simulation ${config.run.simulationId}`)); + (0, log_1.annotateNotice)(`Run reports will be available at ${startedRun.reportsUrl}`, "Gatling Enterprise reports"); + (0, log_1.annotateNotice)(`Runs history is available at ${startedRun.runsUrl}`, "Gatling Enterprise runs history"); + (0, log_1.log)(""); +}; +const logAssertionResults = (assertions) => { + const assertionsCount = assertions.length; + if (assertionsCount > 0) { + (0, log_1.log)(""); + (0, log_1.log)((0, log_1.bright)("Assertion results:")); + for (const assertion of assertions) { + if (assertion.result) { + (0, log_1.log)((0, log_1.green)(`> ${assertion.message} succeeded with value ${assertion.actualValue}`)); + } + else { + (0, log_1.log)((0, log_1.red)(`> ${assertion.message} failed with value ${assertion.actualValue}`)); + } + } + const assertionErrorsCount = assertions.reduce((acc, assertion) => (assertion.result ? acc : acc + 1), 0); + if (assertionErrorsCount > 0) { + (0, log_1.annotateError)(`${assertionErrorsCount} out of ${assertionsCount} assertions failed`, "Gatling assertion failures"); + } + else { + (0, log_1.annotateNotice)(`All ${assertionsCount} assertions passed successfully`, "Gatling assertions passed"); + } + } +}; +const logResult = (config, startedRun, finishedRun) => { + (0, log_1.log)(""); + (0, log_1.log)((0, log_1.bright)("Simulation result:")); + if ((0, status_1.isSuccessful)(finishedRun.statusCode)) { + (0, log_1.log)((0, log_1.green)(`Run ${finishedRun.runId} finished with status ${finishedRun.statusName}`)); + } + else { + const errorMessage = `Run ${finishedRun.runId} failed with status ${finishedRun.statusName}`; + (0, log_1.annotateError)(errorMessage); + if (config.failActionOnRunFailure) { + process.exitCode = core.ExitCode.Failure; + } + } + (0, log_1.log)(""); + (0, log_1.log)((0, log_1.bright)(`See the run reports at ${startedRun.reportsUrl}`)); + (0, log_1.log)((0, log_1.bright)(`See the runs history at ${startedRun.runsUrl}`)); +}; +exports["default"] = run; + + +/***/ }), + +/***/ 9738: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getPostStatusState = exports.setPostStatusState = exports.getRunIdState = exports.setRunIdState = exports.POST_STATUS_KEY = exports.RUN_ID_KEY = void 0; +const core = __importStar(__nccwpck_require__(2186)); +exports.RUN_ID_KEY = "run_id"; +exports.POST_STATUS_KEY = "post_status"; +const setRunIdState = (runId) => core.saveState(exports.RUN_ID_KEY, runId); +exports.setRunIdState = setRunIdState; +const getRunIdState = () => core.getState(exports.RUN_ID_KEY); +exports.getRunIdState = getRunIdState; +const setPostStatusState = (status) => core.saveState(exports.POST_STATUS_KEY, status); +exports.setPostStatusState = setPostStatusState; +const getPostStatusState = () => { + const rawValue = core.getState(exports.POST_STATUS_KEY); + return rawValue === "post_noop" || rawValue === "post_cleanup" ? rawValue : undefined; +}; +exports.getPostStatusState = getPostStatusState; + + +/***/ }), + +/***/ 2627: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.formatDuration = void 0; +const assert_1 = __importDefault(__nccwpck_require__(9491)); +/** + * Formats duration with a format like "2h 25m 12s". + * @param start timestamp in milliseconds + * @param end timestamp in milliseconds + */ +const formatDuration = (start, end) => { + const totalSeconds = Math.floor((end - start) / 1000); + (0, assert_1.default)(totalSeconds >= 0, "Cannot format negative duration"); + let formattedStr = ""; + let remainder = totalSeconds; + const addFormattedValue = (lengthSeconds, symbol) => { + if (totalSeconds >= lengthSeconds) { + const value = Math.floor(remainder / lengthSeconds); + remainder = remainder % lengthSeconds; + formattedStr += value + symbol; + } + }; + addFormattedValue(86400, "d "); + addFormattedValue(3600, "h "); + addFormattedValue(60, "m "); + return formattedStr + remainder + "s"; +}; +exports.formatDuration = formatDuration; + + +/***/ }), + +/***/ 9955: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.formatErrorMessage = void 0; +const http_client_1 = __nccwpck_require__(6255); +const formatErrorMessage = (error) => { + if (error instanceof http_client_1.HttpClientError) { + return `HttpClientError ${error.statusCode}: ${error.message}`; + } + else if (error instanceof Error) { + return `${error.name}: ${error.message}`; + } + else { + return `Unknown error: ${error}`; + } +}; +exports.formatErrorMessage = formatErrorMessage; + + +/***/ }), + +/***/ 8410: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.red = exports.yellow = exports.green = exports.bright = exports.setFailed = exports.annotateError = exports.annotateWarning = exports.annotateNotice = exports.logGroup = exports.log = exports.logDebug = void 0; +const core = __importStar(__nccwpck_require__(2186)); +exports.logDebug = core.debug; +exports.log = core.info; +const logGroup = (title, message) => { + core.startGroup(title); + (0, exports.log)(message); + core.endGroup(); +}; +exports.logGroup = logGroup; +const annotateNotice = (message, title) => { + core.notice(message, { title }); +}; +exports.annotateNotice = annotateNotice; +const annotateWarning = (message, title) => { + core.warning(message, { title }); +}; +exports.annotateWarning = annotateWarning; +const annotateError = (message, title) => { + core.error(message, { title }); +}; +exports.annotateError = annotateError; +const setFailed = (message) => { + core.setFailed(message); +}; +exports.setFailed = setFailed; +const bright = (text) => "\u001b[37;1m" + text + "\u001b[0m"; +exports.bright = bright; +const green = (text) => "\u001b[32m" + text + "\u001b[0m"; +exports.green = green; +const yellow = (text) => "\u001b[33m" + text + "\u001b[0m"; +exports.yellow = yellow; +const red = (text) => "\u001b[31m" + text + "\u001b[0m"; +exports.red = red; + + +/***/ }), + +/***/ 9491: +/***/ ((module) => { + +"use strict"; +module.exports = require("assert"); + +/***/ }), + +/***/ 6113: +/***/ ((module) => { + +"use strict"; +module.exports = require("crypto"); + +/***/ }), + +/***/ 2361: +/***/ ((module) => { + +"use strict"; +module.exports = require("events"); + +/***/ }), + +/***/ 7147: +/***/ ((module) => { + +"use strict"; +module.exports = require("fs"); + +/***/ }), + +/***/ 3685: +/***/ ((module) => { + +"use strict"; +module.exports = require("http"); + +/***/ }), + +/***/ 5687: +/***/ ((module) => { + +"use strict"; +module.exports = require("https"); + +/***/ }), + +/***/ 1808: +/***/ ((module) => { + +"use strict"; +module.exports = require("net"); + +/***/ }), + +/***/ 2037: +/***/ ((module) => { + +"use strict"; +module.exports = require("os"); + +/***/ }), + +/***/ 1017: +/***/ ((module) => { + +"use strict"; +module.exports = require("path"); + +/***/ }), + +/***/ 8670: +/***/ ((module) => { + +"use strict"; +module.exports = require("timers/promises"); + +/***/ }), + +/***/ 4404: +/***/ ((module) => { + +"use strict"; +module.exports = require("tls"); + +/***/ }), + +/***/ 3837: +/***/ ((module) => { + +"use strict"; +module.exports = require("util"); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/"; +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module is referenced by other modules so it can't be inlined +/******/ var __webpack_exports__ = __nccwpck_require__(6144); +/******/ module.exports = __webpack_exports__; +/******/ +/******/ })() +; \ No newline at end of file diff --git a/jest.config.ts b/jest.config.ts deleted file mode 100644 index 47fd459..0000000 --- a/jest.config.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { JestConfigWithTsJest, pathsToModuleNameMapper } from "ts-jest"; -import { compilerOptions } from "./tsconfig.json"; - -const jestConfig: JestConfigWithTsJest = { - clearMocks: true, - moduleFileExtensions: ["js", "ts"], - testMatch: ["**/*.test.ts"], - transform: { - "^.+\\.ts$": "ts-jest" - }, - verbose: true, - roots: [""], - modulePaths: [compilerOptions.baseUrl], - moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths) -}; - -export default jestConfig; diff --git a/package.json b/package.json deleted file mode 100644 index f4d2661..0000000 --- a/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "gatling-enterprise-action", - "description": "Gatling Enterprise GitHub Action", - "repository": { - "type": "git", - "url": "git+https://github.com/gatling/enterprise-action.git" - }, - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/gatling/gatling/issues" - }, - "homepage": "https://gatling.io/", - "main": "dist/index.js", - "scripts": { - "ci": "yarn install --frozen-lockfile", - "format": "prettier --write '**/*.ts'", - "format-check": "prettier --check '**/*.ts'", - "package": "ncc build ./src/index.ts", - "start": "ncc run ./src/index.ts", - "test": "jest" - }, - "dependencies": { - "@actions/core": "1.10.0", - "@actions/http-client": "2.1.0", - "date-fns": "2.29.3", - "idonttrustlikethat": "2.1.0" - }, - "devDependencies": { - "@types/node": "16.18.18", - "@vercel/ncc": "0.36.1", - "jest": "29.5.0", - "js-yaml": "4.1.0", - "nock": "13.3.0", - "prettier": "2.8.4", - "ts-jest": "29.0.5", - "ts-node": "10.9.1", - "typescript": "5.0.2" - } -} diff --git a/src/client/apiClient.ts b/src/client/apiClient.ts deleted file mode 100644 index 120a2ae..0000000 --- a/src/client/apiClient.ts +++ /dev/null @@ -1,116 +0,0 @@ -import * as http from "@actions/http-client"; -import { StartSimulationRequest } from "./requests/startSimulationRequest"; -import { StartSimulationResponse } from "./responses/startSimulationResponse"; -import { TypedResponse } from "@actions/http-client/lib/interfaces"; -import { HttpClientError, HttpCodes } from "@actions/http-client"; -import { RunInformationResponse } from "./responses/runInformationResponse"; -import { SimulationResponse } from "./responses/simulationResponse"; -import { SeriesResponse } from "./responses/seriesResponse"; -import { RequestsSummaryResponse } from "./responses/requestsSummaryResponse"; -import { OutgoingHttpHeaders } from "http"; - -export interface ApiClientConfig { - baseUrl: string; - apiToken: string; -} - -export interface ApiClient { - startSimulation: (simulationId: string, options?: StartSimulationRequest) => Promise; - getRunInformation: (runId: string) => Promise; - getSimulations: () => Promise; - abortRun: (runId: string) => Promise; - getConcurrentUserMetric: (runId: string, scenario: string) => Promise; - getRequestsSummary: (runId: string) => Promise; - checkCloudCompatibility: () => Promise; -} - -export const apiClient = (conf: ApiClientConfig): ApiClient => { - const client = new http.HttpClient(); - return { - startSimulation: (simulationId, options) => - postJson(client, conf, "/simulations/start", options ?? {}, { simulation: simulationId }), - getRunInformation: (runId) => getJson(client, conf, "/run", { run: runId }), - getSimulations: () => getJson(client, conf, "/simulations"), - abortRun: (runId) => abortRun(client, conf, runId), - getConcurrentUserMetric: (runId, scenario) => getJson(client, conf, "/series", seriesParams(runId, scenario)), - getRequestsSummary: (runId) => getJson(client, conf, "/summaries/requests", { run: runId }), - checkCloudCompatibility: () => checkCloudCompatibility(client, conf) - }; -}; - -const seriesParams = (runId: string, scenario: string) => ({ - run: runId, - scenario: scenario, - group: "", - request: "", - node: "", - remote: "", - metric: "usrActive" -}); - -const abortRun = async (client: http.HttpClient, conf: ApiClientConfig, runId: string): Promise => { - try { - await postJson(client, conf, "/simulations/abort", {}, { run: runId }); - return true; - } catch (error) { - if ( - error instanceof HttpClientError && - (error.statusCode == HttpCodes.BadRequest || error.statusCode == HttpCodes.NotFound) - ) { - return false; - } else { - throw error; - } - } -}; - -const checkCloudCompatibility = async (client: http.HttpClient, conf: ApiClientConfig): Promise => { - const clientName = "gatling-enterprise-github-action"; - const version = "0.0.1"; - const response = await client.get(buildUrl(conf, "/compatibility", { clientName, version }), baseHeaders); - if (response.message.statusCode === HttpCodes.BadRequest) { - throw new Error( - `Plugin ${clientName} version ${version} is no longer supported; please upgrade to the latest version` - ); - } -}; - -const getJson = ( - client: http.HttpClient, - conf: ApiClientConfig, - path: string, - params?: Record -): Promise => client.getJson(buildUrl(conf, path, params), headers(conf)).then(handleJsonResponse); - -const postJson = ( - client: http.HttpClient, - conf: ApiClientConfig, - path: string, - payload: any, - params?: Record -): Promise => client.postJson(buildUrl(conf, path, params), payload, headers(conf)).then(handleJsonResponse); - -const headers = (conf: ApiClientConfig): OutgoingHttpHeaders => ({ - ...baseHeaders, - Authorization: conf.apiToken -}); - -const baseHeaders: OutgoingHttpHeaders = { "User-Agent": "GatlingEnterpriseGitHubAction/v1" }; - -const buildUrl = (conf: ApiClientConfig, path: string, queryParams?: Record): string => { - const resourceUrl = conf.baseUrl + path; - const url = new URL(resourceUrl); - if (queryParams) { - for (const [key, value] of Object.entries(queryParams)) { - url.searchParams.append(key, value); - } - } - return url.toString(); -}; - -const handleJsonResponse = (response: TypedResponse): T => { - if (response.statusCode === HttpCodes.NotFound || response.result === null) { - throw new HttpClientError("Unexpected empty response", HttpCodes.NotFound); - } - return response.result; -}; diff --git a/src/client/requests/startSimulationRequest.ts b/src/client/requests/startSimulationRequest.ts deleted file mode 100644 index 1a464aa..0000000 --- a/src/client/requests/startSimulationRequest.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface StartSimulationRequest { - extraSystemProperties?: Record; - extraEnvironmentVariables?: Record; - overrideHostsByPool?: Record; -} - -export interface StartHostConfigurationRequest { - size: number; - weight?: number; -} diff --git a/src/client/responses/requestsSummaryResponse.ts b/src/client/responses/requestsSummaryResponse.ts deleted file mode 100644 index d81b8e4..0000000 --- a/src/client/responses/requestsSummaryResponse.ts +++ /dev/null @@ -1,41 +0,0 @@ -export interface RequestsSummaryResponse { - name: string; - responseTime: ResponseTimeRequestsSummary; - in: InRequestsSummary; - out: OutRequestsSummary; - children?: RequestsSummaryChild[]; -} - -export interface RequestsSummaryChild { - name: string; - responseTime: ResponseTimeRequestsSummary; - in: InRequestsSummary; - out: OutRequestsSummary; - index?: number; - children?: RequestsSummaryChild[]; -} - -export interface ResponseTimeRequestsSummary { - mean: number; - stdDev: number; - percentiles: number[]; -} - -export interface InRequestsSummary { - counts: { - ok: number; - ko: number; - koPercent: number; - total: number; - }; - rps: { - ok: number; - ko: number; - total: number; - }; -} - -export interface OutRequestsSummary { - counts: { total: number }; - rps: { total: number }; -} diff --git a/src/client/responses/runInformationResponse.ts b/src/client/responses/runInformationResponse.ts deleted file mode 100644 index d7101ad..0000000 --- a/src/client/responses/runInformationResponse.ts +++ /dev/null @@ -1,40 +0,0 @@ -export interface RunInformationResponse { - incrementalId: number; - runId: string; - scenario: string; - group: string; - request: string; - buildStart: number; - buildEnd: number; - deployStart: number; - deployEnd: number; - injectStart: number; - injectEnd: number; - status: number; - assertions: Assertion[]; - error?: string; - comments: Comment; - runSnapshot: RunSnapshot; -} - -export interface Assertion { - message: string; - result: boolean; - actualValue?: number; -} - -export interface Comment { - title: string; - description: string; -} - -export interface RunSnapshot { - simulationName: string; - systemProperties: Record; - simulationClass: string; - poolSnapshots: PoolSnapshot[]; -} - -export interface PoolSnapshot { - poolName: string; -} diff --git a/src/client/responses/seriesResponse.ts b/src/client/responses/seriesResponse.ts deleted file mode 100644 index e0013d1..0000000 --- a/src/client/responses/seriesResponse.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface SeriesResponse { - values: number[]; -} diff --git a/src/client/responses/simulationResponse.ts b/src/client/responses/simulationResponse.ts deleted file mode 100644 index a49713a..0000000 --- a/src/client/responses/simulationResponse.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface SimulationResponse { - id: string; - name: string; -} diff --git a/src/client/responses/startSimulationResponse.ts b/src/client/responses/startSimulationResponse.ts deleted file mode 100644 index 4f3e7dc..0000000 --- a/src/client/responses/startSimulationResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface StartSimulationResponse { - className: string; - runId: string; - reportsPath?: string; - runsPath?: string; -} diff --git a/src/config.ts b/src/config.ts deleted file mode 100644 index 0d31d54..0000000 --- a/src/config.ts +++ /dev/null @@ -1,138 +0,0 @@ -import * as core from "@actions/core"; -import { ApiClientConfig } from "./client/apiClient"; -import { boolean, string, dictionary, object, number, union, Validator, Ok, Err, Result } from "idonttrustlikethat"; -import { logDebug } from "./utils/log"; - -export interface ActionConfig { - gatlingEnterpriseUrl: string; - api: ApiClientConfig; - run: RunConfig; - failActionOnRunFailure: boolean; - waitForRunEnd: boolean; -} - -export interface RunConfig { - simulationId: string; - extraSystemProperties?: Record; - extraEnvironmentVariables?: Record; - overrideLoadGenerators?: Record; -} - -export interface LoadGeneratorConfiguration { - size: number; - weight?: number; -} - -export const readConfig = (): ActionConfig => { - const gatlingEnterpriseUrl = getGatlingEnterpriseUrlConfig(); - const failActionOnRunFailure = getFailActionOnRunFailureConfig(); - const waitForRunEnd = getWaitForRunEnd(); - const config = { - gatlingEnterpriseUrl, - api: getApiConfig(gatlingEnterpriseUrl), - run: getRunConfig(), - failActionOnRunFailure, - waitForRunEnd - }; - logDebug("Parsed configuration: " + JSON.stringify({ api: { ...config.api, apiToken: "*****" }, run: config.run })); - return config; -}; - -const getGatlingEnterpriseUrlConfig = (): string => - getValidatedInput("gatling_enterprise_url", requiredInputValidation, "gatling_enterprise_url is required"); - -const getFailActionOnRunFailureConfig = (): boolean => - getValidatedInput("fail_action_on_run_failure", requiredBooleanValidation, "fail_action_on_run_failure is required"); - -const getWaitForRunEnd = (): boolean => - getValidatedInput("wait_for_run_end", requiredBooleanValidation, "wait_for_run_end is required"); - -const getApiConfig = (gatlingEnterpriseUrl: string): ApiClientConfig => { - const apiToken = getValidatedInput( - "api_token", - requiredInputValidation, - "api_token is required", - "GATLING_ENTERPRISE_API_TOKEN" - ); - return { - baseUrl: `${gatlingEnterpriseUrl}/api/public`, - apiToken - }; -}; - -const getRunConfig = (): RunConfig => { - const simulationId = getValidatedInput("simulation_id", uuidValidation, "simulation_id must be a valid UUID"); - const extraSystemProperties = getValidatedInput( - "extra_system_properties", - configKeysInputValidation, - "extra_system_properties must be a JSON object and only contain string, number, and boolean values (or omitted entirely)" - ); - const extraEnvironmentVariables = getValidatedInput( - "extra_environment_variables", - configKeysInputValidation, - "extra_environment_variables must be a JSON object and only contain string, number, and boolean values (or omitted entirely)" - ); - const overrideLoadGenerators = getValidatedInput( - "override_load_generators", - overrideLoadGeneratorsInputValidation, - "override_load_generators must be a valid configuration for overriding load generators" - ); - return { - simulationId, - extraSystemProperties, - extraEnvironmentVariables, - overrideLoadGenerators: overrideLoadGenerators - }; -}; - -const requiredInputValidation = string.filter((str) => str !== ""); -const optionalInputValidation = string.map((str) => (str === "" ? undefined : str)); -export const requiredBooleanValidation = requiredInputValidation.and((str) => { - const lowerCaseStr = str.toLowerCase(); - return lowerCaseStr === "true" - ? Ok(true) - : lowerCaseStr === "false" - ? Ok(false) - : Err(`Invalid boolean value: ${str}`); -}); -export const uuidValidation = string.filter((str) => - /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(str) -); -export const jsonValidation = string.and((str): Result => { - try { - return Ok(JSON.parse(str)); - } catch (e) { - if (e instanceof Error) { - return Err(`Invalid JSON. ${e.name}: ${e.message}`); - } - throw e; - } -}); - -const configKeyValueValidation = union(string, number, boolean).map((value) => - typeof value === "string" ? value : `${value}` -); -const configKeysValidation = jsonValidation.then(dictionary(string, configKeyValueValidation)); -export const configKeysInputValidation = optionalInputValidation.then(configKeysValidation.optional()); -const overrideLoadGeneratorsValidation = jsonValidation.then( - dictionary(uuidValidation, object({ size: number, weight: number.optional() })) -); -export const overrideLoadGeneratorsInputValidation = optionalInputValidation.then( - overrideLoadGeneratorsValidation.optional() -); - -const getValidatedInput = (name: string, validator: Validator, errorMessage: string, envVarName?: string) => { - const rawInput = core.getInput(name); - const inputWithFallback = rawInput === "" && envVarName ? getEnvVar(envVarName) : rawInput; - const result = validator.validate(inputWithFallback); - if (!result.ok) { - // TODO RND-10 use validation error result to give better error messages - throw new TypeError(errorMessage); - } - return result.value; -}; - -/** - * Returns an empty string if not found, to stay consistent with how GH Actions handles empty input values. - */ -const getEnvVar = (envVarName: string): string => process.env[envVarName] ?? ""; diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index d0feef2..0000000 --- a/src/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -import runMain from "./runMain"; -import runCleanup from "./runCleanup"; -import { getPostStatusState, setPostStatusState } from "./state"; -import { log } from "./utils/log"; - -const run = async () => { - switch (getPostStatusState()) { - case "post_noop": - log("Post-execution cleanup: no cleanup is required."); - break; - case "post_cleanup": - log("Post-execution cleanup: trying to stop simulation run if required."); - await runCleanup(); - break; - default: - // Do not re-run the main action when launched again later - setPostStatusState("post_noop"); - await runMain(); - break; - } -}; - -run(); diff --git a/src/run/metrics.ts b/src/run/metrics.ts deleted file mode 100644 index ae9e718..0000000 --- a/src/run/metrics.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { ApiClient } from "../client/apiClient"; -import { format } from "date-fns"; -import { RunInformationResponse } from "../client/responses/runInformationResponse"; -import { RequestsSummaryChild } from "../client/responses/requestsSummaryResponse"; -import { formatDuration } from "../utils/duration"; -import { logGroup } from "../utils/log"; - -export const getAndLogMetricsSummary = async (client: ApiClient, runInfo: RunInformationResponse) => { - const metricsSummary = await getMetricsSummary(client, runInfo); - logMetricsSummary(metricsSummary); -}; - -const getMetricsSummary = async (client: ApiClient, runInfo: RunInformationResponse): Promise => { - const [seriesResponse, requestsSummary] = await Promise.all([ - client.getConcurrentUserMetric(runInfo.runId, runInfo.scenario), - client.getRequestsSummary(runInfo.runId) - ]); - - const currentTimestamp = Date.now(); - const date = format(currentTimestamp, "yyyy-MM-dd HH:mm:ss"); - const duration = formatDuration(runInfo.injectStart, currentTimestamp); - - const nbUsers = seriesResponse - .map(({ values }) => (values.length === 0 ? 0.0 : values[values.length - 1])) - .reduce((acc, next) => acc + next, 0.0); - - const nbRequest = requestsSummary.out.counts.total; - const requestsSeconds = requestsSummary.out.rps.total; - const failureRatio = requestsSummary.in.counts.koPercent; - const listMetric = recursivelyGetChildren(requestsSummary.children ?? []); - - return { - date, - duration, - nbUsers, - nbRequest, - requestsSeconds, - failureRatio, - listMetric - }; -}; - -const recursivelyGetChildren = (children: RequestsSummaryChild[]): ChildMetric[] => - children.map((child) => - child.children - ? { name: child.name, children: recursivelyGetChildren(child.children) } - : { - name: child.name, - nbRequest: child.out.counts.total, - failureRatio: child.in.counts.koPercent, - requestsSeconds: child.out.rps.total - } - ); - -const logMetricsSummary = (summary: MetricsSummary) => { - logGroup( - `Time: ${summary.date}, ${summary.duration} elapsed\n`, - (summary.nbUsers > 0 ? `Number of concurrent users: ${summary.nbUsers}\n` : "") + - `Number of requests: ${summary.nbRequest}\n` + - `Number of requests per seconds: ${summary.requestsSeconds}\n` + - formatListMetrics(summary.listMetric) - ); -}; - -const formatListMetrics = (listMetric: ChildMetric[]): string => { - const recurs = (listMetric: ChildMetric[], level: number): string[] => { - const padding = " ".repeat(2 * level); - const formatNode = (node: ChildMetricNode): string => `${padding}> Group ${node.name}`; - const formatLeaf = (leaf: ChildMetricLeaf): string[] => [ - `${padding}> Request ${leaf.name}`, - `${padding} Counts: ${leaf.nbRequest}`, - `${padding} Requests per seconds: ${leaf.requestsSeconds}`, - `${padding} Failure ratio: ${leaf.failureRatio}%` - ]; - return listMetric.flatMap((child) => - isChildMetricLeaf(child) ? formatLeaf(child) : [formatNode(child), ...recurs(child.children, level + 1)] - ); - }; - return recurs(listMetric, 0).join("\n"); -}; - -interface MetricsSummary { - date: string; - duration: string; - nbUsers: number; - nbRequest: number; - requestsSeconds: number; - failureRatio: number; - listMetric: ChildMetric[]; -} - -type ChildMetric = ChildMetricLeaf | ChildMetricNode; - -interface ChildMetricLeaf { - name: string; - nbRequest: number; - failureRatio: number; - requestsSeconds: number; -} - -const isChildMetricLeaf = (o: ChildMetric): o is ChildMetricLeaf => !("children" in o); - -interface ChildMetricNode { - name: string; - children: ChildMetric[]; -} diff --git a/src/run/ongoing.ts b/src/run/ongoing.ts deleted file mode 100644 index 2f4a35a..0000000 --- a/src/run/ongoing.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { ApiClient } from "../client/apiClient"; -import { StartedRun } from "./start"; -import { Assertion, RunInformationResponse } from "../client/responses/runInformationResponse"; -import { setTimeout } from "timers/promises"; -import { isRunning, statusName } from "./status"; -import { getAndLogMetricsSummary } from "./metrics"; -import { formatErrorMessage } from "../utils/error"; -import { logDebug, log, yellow } from "../utils/log"; - -export interface FinishedRun { - runId: String; - statusCode: number; - statusName: string; - assertions: Assertion[]; -} - -const MAX_CONSECUTIVE_ERRORS = 5; - -export const waitForRunEnd = async (client: ApiClient, startedRun: StartedRun): Promise => { - let runInfo: RunInformationResponse | undefined; - let oldStatus: number = -1; - let consecutiveErrorsCount = 0; - do { - try { - await setTimeout(5000); // Initial delay even on first iteration because run duration might not be populated yet - runInfo = await client.getRunInformation(startedRun.runId); - const statusMsg = `Run status is now ${statusName(runInfo.status)} [${runInfo.status}]`; - runInfo.status !== oldStatus ? log(statusMsg) : logDebug(statusMsg); - oldStatus = runInfo.status; - if (runInfo.injectStart > 0) { - await getAndLogMetricsSummary(client, runInfo); - } - consecutiveErrorsCount = 0; - } catch (error) { - consecutiveErrorsCount++; - if (consecutiveErrorsCount < MAX_CONSECUTIVE_ERRORS) { - const msg = formatErrorMessage(error); - log( - yellow( - `Failed to retrieve current run information (attempt ${consecutiveErrorsCount}/${MAX_CONSECUTIVE_ERRORS}): ${msg}` - ) - ); - } else { - throw error; - } - } - } while (runInfo === undefined || isRunning(runInfo.status)); - return { - runId: runInfo.runId, - statusCode: runInfo.status, - statusName: statusName(runInfo.status), - assertions: runInfo.assertions - }; -}; diff --git a/src/run/start.ts b/src/run/start.ts deleted file mode 100644 index 876f288..0000000 --- a/src/run/start.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { ApiClient } from "../client/apiClient"; -import { ActionConfig } from "../config"; - -export interface StartedRun { - runId: string; - reportsUrl: string; - runsUrl: string; -} - -export const startRun = async (client: ApiClient, config: ActionConfig): Promise => { - const response = await client.startSimulation(config.run.simulationId, { - extraSystemProperties: config.run.extraSystemProperties, - extraEnvironmentVariables: config.run.extraEnvironmentVariables, - overrideHostsByPool: config.run.overrideLoadGenerators - }); - - // Fallback URLs for Gatling Enterprise Self-Hosted - const reportsPath = response.reportsPath ?? `/simulations/reports/${response.runId}`; - const runsPath = response.runsPath ?? `/simulations/runs/${config.run.simulationId}`; - - return { - runId: response.runId, - reportsUrl: webAppUrl(config, reportsPath), - runsUrl: webAppUrl(config, runsPath) - }; -}; - -const webAppUrl = (config: ActionConfig, path: string): string => config.gatlingEnterpriseUrl + path; diff --git a/src/run/status.ts b/src/run/status.ts deleted file mode 100644 index 2c41dac..0000000 --- a/src/run/status.ts +++ /dev/null @@ -1,34 +0,0 @@ -export enum RunStatus { - Building = 0, - Deploying = 1, - Deployed = 2, - Injecting = 3, - Successful = 4, - AssertionsSuccessful = 5, - AutomaticallyStopped = 6, - ManuallyStopped = 7, - AssertionsFailed = 8, - Timeout = 9, - BuildFailed = 10, - Broken = 11, - DeploymentFailed = 12, - InvalidLicense = 13, - Collected = 14, - KillRequested = 15 -} - -export const statusName = (status: number): string => RunStatus[status]; - -const RUNNING_STATUSES = [ - RunStatus.Building, - RunStatus.Deploying, - RunStatus.Deployed, - RunStatus.Injecting, - RunStatus.Collected, - RunStatus.KillRequested -]; -const SUCCESSFUL_STATUSES = [RunStatus.Successful, RunStatus.AssertionsSuccessful]; - -export const isRunning = (status: number): boolean => RUNNING_STATUSES.includes(status); - -export const isSuccessful = (status: number): boolean => SUCCESSFUL_STATUSES.includes(status); diff --git a/src/runCleanup.ts b/src/runCleanup.ts deleted file mode 100644 index 347e4cc..0000000 --- a/src/runCleanup.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { readConfig } from "./config"; -import { apiClient } from "./client/apiClient"; -import { getRunIdState } from "./state"; -import { formatErrorMessage } from "./utils/error"; -import { annotateError, log } from "./utils/log"; - -const run = async (): Promise => { - try { - const config = readConfig(); - const client = apiClient(config.api); - const runId = getRunIdState(); - const stopped = await client.abortRun(runId); - if (stopped) { - log("Successfully stopped ongoing run"); - } else { - log("There was no ongoing run to stop"); - } - } catch (error) { - annotateError("Failed attempt to clean up ongoing run, caused by: " + formatErrorMessage(error)); - } -}; - -export default run; diff --git a/src/runMain.ts b/src/runMain.ts deleted file mode 100644 index e903e92..0000000 --- a/src/runMain.ts +++ /dev/null @@ -1,100 +0,0 @@ -import * as core from "@actions/core"; -import { ActionConfig, readConfig } from "./config"; -import { apiClient } from "./client/apiClient"; -import { isSuccessful } from "./run/status"; -import { StartedRun, startRun } from "./run/start"; -import { FinishedRun, waitForRunEnd } from "./run/ongoing"; -import { formatErrorMessage } from "./utils/error"; -import { setPostStatusState, setRunIdState } from "./state"; -import { annotateError, annotateNotice, bright, green, log, red, setFailed } from "./utils/log"; -import { Assertion } from "./client/responses/runInformationResponse"; - -const run = async (): Promise => { - try { - const config = readConfig(); - const client = apiClient(config.api); - - await client.checkCloudCompatibility(); - - const startedRun = await startRun(client, config); - setRunIdState(startedRun.runId); - setPostStatusState("post_cleanup"); // Run started, cleanup will be needed if interrupted now - logStart(config, startedRun); - - core.setOutput("run_id", startedRun.runId); - core.setOutput("reports_url", startedRun.reportsUrl); - core.setOutput("runs_url", startedRun.runsUrl); - - if (config.waitForRunEnd) { - const finishedRun = await waitForRunEnd(client, startedRun); - setPostStatusState("post_noop"); // Run finished, no cleanup needed - logAssertionResults(finishedRun.assertions); - logResult(config, startedRun, finishedRun); - - core.setOutput("run_status_code", finishedRun.statusCode); - core.setOutput("run_status_name", finishedRun.statusName); - core.setOutput("run_assertions", finishedRun.assertions); - - // Should use run_status_code/run_status_name (without 's', this refers to only one run) - // runs_status_code/runs_status_name are kept for backward compatibility since 1.0, can be removed in 2.x - core.setOutput("runs_status_code", finishedRun.statusCode); - core.setOutput("runs_status_name", finishedRun.statusName); - } else { - setPostStatusState("post_noop"); // Not waiting for run end, no cleanup needed - } - } catch (error) { - setFailed(formatErrorMessage(error)); - } -}; - -const logStart = (config: ActionConfig, startedRun: StartedRun): void => { - log(bright(`Started run ${startedRun.runId} for simulation ${config.run.simulationId}`)); - annotateNotice(`Run reports will be available at ${startedRun.reportsUrl}`, "Gatling Enterprise reports"); - annotateNotice(`Runs history is available at ${startedRun.runsUrl}`, "Gatling Enterprise runs history"); - log(""); -}; - -const logAssertionResults = (assertions: Assertion[]): void => { - const assertionsCount = assertions.length; - if (assertionsCount > 0) { - log(""); - log(bright("Assertion results:")); - for (const assertion of assertions) { - if (assertion.result) { - log(green(`> ${assertion.message} succeeded with value ${assertion.actualValue}`)); - } else { - log(red(`> ${assertion.message} failed with value ${assertion.actualValue}`)); - } - } - - const assertionErrorsCount = assertions.reduce((acc, assertion) => (assertion.result ? acc : acc + 1), 0); - if (assertionErrorsCount > 0) { - annotateError( - `${assertionErrorsCount} out of ${assertionsCount} assertions failed`, - "Gatling assertion failures" - ); - } else { - annotateNotice(`All ${assertionsCount} assertions passed successfully`, "Gatling assertions passed"); - } - } -}; - -const logResult = (config: ActionConfig, startedRun: StartedRun, finishedRun: FinishedRun) => { - log(""); - log(bright("Simulation result:")); - if (isSuccessful(finishedRun.statusCode)) { - log(green(`Run ${finishedRun.runId} finished with status ${finishedRun.statusName}`)); - } else { - const errorMessage = `Run ${finishedRun.runId} failed with status ${finishedRun.statusName}`; - annotateError(errorMessage); - if (config.failActionOnRunFailure) { - process.exitCode = core.ExitCode.Failure; - } - } - - log(""); - log(bright(`See the run reports at ${startedRun.reportsUrl}`)); - log(bright(`See the runs history at ${startedRun.runsUrl}`)); -}; - -export default run; diff --git a/src/state.ts b/src/state.ts deleted file mode 100644 index 5845ccc..0000000 --- a/src/state.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as core from "@actions/core"; - -export const RUN_ID_KEY = "run_id"; -export const POST_STATUS_KEY = "post_status"; - -export const setRunIdState = (runId: string) => core.saveState(RUN_ID_KEY, runId); -export const getRunIdState = () => core.getState(RUN_ID_KEY); - -export type PostStatus = "post_noop" | "post_cleanup"; -export const setPostStatusState = (status: PostStatus) => core.saveState(POST_STATUS_KEY, status); -export const getPostStatusState = (): PostStatus | undefined => { - const rawValue = core.getState(POST_STATUS_KEY); - return rawValue === "post_noop" || rawValue === "post_cleanup" ? rawValue : undefined; -}; diff --git a/src/utils/duration.ts b/src/utils/duration.ts deleted file mode 100644 index bf74ce8..0000000 --- a/src/utils/duration.ts +++ /dev/null @@ -1,27 +0,0 @@ -import assert from "assert"; - -/** - * Formats duration with a format like "2h 25m 12s". - * @param start timestamp in milliseconds - * @param end timestamp in milliseconds - */ -export const formatDuration = (start: number, end: number): string => { - const totalSeconds = Math.floor((end - start) / 1000); - assert(totalSeconds >= 0, "Cannot format negative duration"); - - let formattedStr = ""; - let remainder = totalSeconds; - - const addFormattedValue = (lengthSeconds: number, symbol: string): void => { - if (totalSeconds >= lengthSeconds) { - const value = Math.floor(remainder / lengthSeconds); - remainder = remainder % lengthSeconds; - formattedStr += value + symbol; - } - }; - addFormattedValue(86400, "d "); - addFormattedValue(3600, "h "); - addFormattedValue(60, "m "); - - return formattedStr + remainder + "s"; -}; diff --git a/src/utils/error.ts b/src/utils/error.ts deleted file mode 100644 index b050781..0000000 --- a/src/utils/error.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { HttpClientError } from "@actions/http-client"; - -export const formatErrorMessage = (error: any): string => { - if (error instanceof HttpClientError) { - return `HttpClientError ${error.statusCode}: ${error.message}`; - } else if (error instanceof Error) { - return `${error.name}: ${error.message}`; - } else { - return `Unknown error: ${error}`; - } -}; diff --git a/src/utils/log.ts b/src/utils/log.ts deleted file mode 100644 index a0d5b0d..0000000 --- a/src/utils/log.ts +++ /dev/null @@ -1,35 +0,0 @@ -import * as core from "@actions/core"; - -export const logDebug: (message: string) => void = core.debug; - -export const log: (message: string) => void = core.info; - -export const logGroup = (title: string, message: string): void => { - core.startGroup(title); - log(message); - core.endGroup(); -}; - -export const annotateNotice = (message: string, title?: string): void => { - core.notice(message, { title }); -}; - -export const annotateWarning = (message: string, title?: string): void => { - core.warning(message, { title }); -}; - -export const annotateError = (message: string, title?: string): void => { - core.error(message, { title }); -}; - -export const setFailed = (message: string): void => { - core.setFailed(message); -}; - -export const bright = (text: string): string => "\u001b[37;1m" + text + "\u001b[0m"; - -export const green = (text: string): string => "\u001b[32m" + text + "\u001b[0m"; - -export const yellow = (text: string): string => "\u001b[33m" + text + "\u001b[0m"; - -export const red = (text: string): string => "\u001b[31m" + text + "\u001b[0m"; diff --git a/test/client/apiClient.test.ts b/test/client/apiClient.test.ts deleted file mode 100644 index 306a4b2..0000000 --- a/test/client/apiClient.test.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { apiClient, ApiClientConfig } from "@src/client/apiClient"; -import nock from "nock"; -import { expect, test } from "@jest/globals"; -import { StartSimulationResponse } from "@src/client/responses/startSimulationResponse"; -import { HttpClientError } from "@actions/http-client"; - -const config: ApiClientConfig = { - baseUrl: "https://cloud.gatling.io/api/public", - apiToken: "my-token" -}; -const client = apiClient(config); - -const simulation_id = "3e5d7e20-53c2-40ba-b0a2-0b0d93b33287"; -const simulation_start_expected_path = `/simulations/start?simulation=${simulation_id}`; -const check_compatibility_expected_path = "/compatibility?clientName=gatling-enterprise-github-action&version=0.0.1"; - -const successfulStartedSimulationResponse: StartSimulationResponse = { - className: "computerdatabase.ComputerDatabaseSimulation", - runId: "bd4e73bb-ac41-4786-ade6-6ce7f26e7fb2", - reportsPath: "/o/demo-environment/simulations/reports/bd4e73bb-ac41-4786-ade6-6ce7f26e7fb2", - runsPath: "/o/demo-environment/simulations/runs/3e5d7e20-53c2-40ba-b0a2-0b0d93b33287" -}; - -const unauthorizedResponse = { - error: "invalid_request", - error_description: "i.g.f.a.s.UnauthorizedException$: Access unauthorized" -}; - -test("startSimulation success", async () => { - nock(config.baseUrl).post(simulation_start_expected_path).reply(200, successfulStartedSimulationResponse); - - const actualResponse = await client.startSimulation(simulation_id); - expect(actualResponse).toStrictEqual(successfulStartedSimulationResponse); -}); - -test("startSimulation unauthorized error", async () => { - nock(config.baseUrl).post(simulation_start_expected_path).reply(401, unauthorizedResponse); - - const request = client.startSimulation(simulation_id); - await expect(request).rejects.toStrictEqual( - new HttpClientError( - '{"error":"invalid_request","error_description":"i.g.f.a.s.UnauthorizedException$: Access unauthorized"}', - 401 - ) - ); -}); - -test("startSimulation not found error", async () => { - nock(config.baseUrl).post(simulation_start_expected_path).reply(404); - - const request = client.startSimulation(simulation_id); - await expect(request).rejects.toStrictEqual(new HttpClientError("Unexpected empty response", 404)); -}); - -test("checkCloudCompatibility success", () => { - nock(config.baseUrl).get(check_compatibility_expected_path).reply(200); - return client.checkCloudCompatibility(); -}); - -test("checkCloudCompatibility not found error (ignored)", () => { - nock(config.baseUrl).get(check_compatibility_expected_path).reply(404); - return client.checkCloudCompatibility(); -}); - -test("checkCloudCompatibility error", async () => { - nock(config.baseUrl).get(check_compatibility_expected_path).reply(400); - - const request = client.checkCloudCompatibility(); - await expect(request).rejects.toBeDefined(); -}); diff --git a/test/config.test.ts b/test/config.test.ts deleted file mode 100644 index e5975a7..0000000 --- a/test/config.test.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { expect, test } from "@jest/globals"; -import { - configKeysInputValidation, - overrideLoadGeneratorsInputValidation, - requiredBooleanValidation, - uuidValidation -} from "../src/config"; - -test("requiredBooleanValidation", () => { - expect(requiredBooleanValidation.validate("").ok).toBe(false); - expect(requiredBooleanValidation.validate("Yes").ok).toBe(false); - expect(requiredBooleanValidation.validate("TrueFalse").ok).toBe(false); - - const res1 = requiredBooleanValidation.validate("true"); - expect(res1.ok && res1.value).toBe(true); - - const res2 = requiredBooleanValidation.validate("tRuE"); - expect(res2.ok && res2.value).toBe(true); - - const res3 = requiredBooleanValidation.validate("false"); - expect(res3.ok && res3.value).toBe(false); - - const res4 = requiredBooleanValidation.validate("FALSE"); - expect(res4.ok && res4.value).toBe(false); -}); - -test("uuidValidation", () => { - expect(uuidValidation.validate("").ok).toBe(false); - expect(uuidValidation.validate("08d34c91f86247f8b19d8e92eb1abe71").ok).toBe(false); - expect(uuidValidation.validate("08d34c91f-862-47f8-b19d-8e92eb1abe71").ok).toBe(false); - - const nullUuidRes = uuidValidation.validate("00000000-0000-0000-0000-000000000000"); - expect(nullUuidRes.ok && nullUuidRes.value).toBe("00000000-0000-0000-0000-000000000000"); - - const validUUidRes = uuidValidation.validate("08d34c91-f862-47f8-b19d-8e92eb1abe71"); - expect(validUUidRes.ok && validUUidRes.value).toBe("08d34c91-f862-47f8-b19d-8e92eb1abe71"); -}); - -test("configKeysInputValidation", () => { - const emptyRes = configKeysInputValidation.validate(""); - expect(emptyRes.ok && emptyRes.value).toBeUndefined(); - - const emptyObjectRes = configKeysInputValidation.validate("{}"); - expect(emptyObjectRes.ok && emptyObjectRes.value).toStrictEqual({}); - - const validObjectRes = configKeysInputValidation.validate('{"key_1": "First value", "key_2": "Second value"}'); - expect(validObjectRes.ok && validObjectRes.value).toStrictEqual({ key_1: "First value", key_2: "Second value" }); - - const validConversionsRes = configKeysInputValidation.validate( - '{"key_1": "First value", "key_2": 42, "key_3": false}' - ); - expect(validConversionsRes.ok && validConversionsRes.value).toStrictEqual({ - key_1: "First value", - key_2: "42", - key_3: "false" - }); - - expect(configKeysInputValidation.validate('"key_1": "First value"').ok).toBe(false); - expect(configKeysInputValidation.validate('"First value"').ok).toBe(false); - expect(configKeysInputValidation.validate('{"key_1": "First value", "key_2": ["a", "b"]}').ok).toBe(false); -}); - -test("hostsByPoolInputValidation", () => { - const emptyRes = overrideLoadGeneratorsInputValidation.validate(""); - expect(emptyRes.ok && emptyRes.value).toBeUndefined(); - - const emptyObjectRes = overrideLoadGeneratorsInputValidation.validate("{}"); - expect(emptyObjectRes.ok && emptyObjectRes.value).toStrictEqual({}); - - const validObjectRes = overrideLoadGeneratorsInputValidation.validate( - '{"bcf62ac8-90a0-4be7-acd0-d7e87e3cbd66":{"size":1},"a7eb1d17-27fd-4f12-902f-488f709e644e":{"size":2, "weight":50}}' - ); - expect(validObjectRes.ok && validObjectRes.value).toStrictEqual({ - "bcf62ac8-90a0-4be7-acd0-d7e87e3cbd66": { size: 1 }, - "a7eb1d17-27fd-4f12-902f-488f709e644e": { size: 2, weight: 50 } - }); - - expect(overrideLoadGeneratorsInputValidation.validate('{"bcf62ac8-90a0-4be7-acd0-d7e87e3cbd66":{}}').ok).toBe(false); - expect(overrideLoadGeneratorsInputValidation.validate('{"key_1":{"size":1}}').ok).toBe(false); - expect(overrideLoadGeneratorsInputValidation.validate('"bcf62ac8-90a0-4be7-acd0-d7e87e3cbd66":{"size":1}').ok).toBe( - false - ); - expect(overrideLoadGeneratorsInputValidation.validate('"bcf62ac8-90a0-4be7-acd0-d7e87e3cbd66"').ok).toBe(false); -}); diff --git a/test/utils/duration.test.ts b/test/utils/duration.test.ts deleted file mode 100644 index 8a90090..0000000 --- a/test/utils/duration.test.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { expect, test } from "@jest/globals"; -import { formatDuration } from "@src/utils/duration"; - -test("formatDuration d/h/m/s", () => { - const start = new Date(2022, 12, 14, 7, 52, 15, 0).getTime(); - const end = new Date(2022, 12, 16, 10, 13, 52, 12).getTime(); - expect(formatDuration(start, end)).toBe("2d 2h 21m 37s"); -}); - -test("formatDuration d/h/m/s with exact day", () => { - const start = new Date(2022, 12, 14, 7, 52, 15, 24).getTime(); - const end = new Date(2022, 12, 16, 7, 52, 15, 29).getTime(); - expect(formatDuration(start, end)).toBe("2d 0h 0m 0s"); -}); - -test("formatDuration h/m/s", () => { - const start = new Date(2022, 12, 14, 7, 52, 15, 0).getTime(); - const end = new Date(2022, 12, 15, 7, 13, 52, 12).getTime(); - expect(formatDuration(start, end)).toBe("23h 21m 37s"); -}); - -test("formatDuration h/m/s with exact hour", () => { - const start = new Date(2022, 12, 14, 7, 52, 15, 0).getTime(); - const end = new Date(2022, 12, 15, 5, 52, 15, 12).getTime(); - expect(formatDuration(start, end)).toBe("22h 0m 0s"); -}); - -test("formatDuration m/s", () => { - const start = new Date(2022, 12, 14, 7, 13, 52, 12).getTime(); - const end = new Date(2022, 12, 14, 7, 52, 15, 0).getTime(); - expect(formatDuration(start, end)).toBe("38m 22s"); -}); - -test("formatDuration m/s with exact minute", () => { - const start = new Date(2022, 12, 14, 7, 13, 25, 58).getTime(); - const end = new Date(2022, 12, 14, 7, 51, 26, 5).getTime(); - expect(formatDuration(start, end)).toBe("38m 0s"); -}); - -test("formatDuration s", () => { - const start = new Date(2022, 12, 14, 7, 51, 52, 12).getTime(); - const end = new Date(2022, 12, 14, 7, 52, 15, 0).getTime(); - expect(formatDuration(start, end)).toBe("22s"); -}); - -test("formatDuration zero duration", () => { - const start = new Date(2022, 12, 14, 7, 52, 15, 0).getTime(); - const end = new Date(2022, 12, 14, 7, 52, 15, 0).getTime(); - expect(formatDuration(start, end)).toBe("0s"); -}); - -test("formatDuration negative duration", () => { - const start = new Date(2022, 12, 14, 7, 52, 15, 0).getTime(); - const end = new Date(2022, 12, 14, 7, 52, 14, 0).getTime(); - expect(() => formatDuration(start, end)).toThrow(); -}); diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index ba83110..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": "./", - "outDir": "./lib", - "rootDir": "./src", - "paths": { - "@src/*": ["src/*"] - }, - "lib": ["ES2021"], - "module": "CommonJS", - "target": "ES2021", - "esModuleInterop": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true - }, - "exclude": ["node_modules", "**/*.test.ts", "jest.config.ts"] -} diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index da6fcd9..0000000 --- a/yarn.lock +++ /dev/null @@ -1,2348 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@actions/core@1.10.0": - version "1.10.0" - resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.10.0.tgz#44551c3c71163949a2f06e94d9ca2157a0cfac4f" - integrity sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug== - dependencies: - "@actions/http-client" "^2.0.1" - uuid "^8.3.2" - -"@actions/http-client@2.1.0", "@actions/http-client@^2.0.1": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-2.1.0.tgz#b6d8c3934727d6a50d10d19f00a711a964599a9f" - integrity sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw== - dependencies: - tunnel "^0.0.6" - -"@ampproject/remapping@^2.1.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" - integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== - dependencies: - "@jridgewell/gen-mapping" "^0.1.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" - integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== - dependencies: - "@babel/highlight" "^7.18.6" - -"@babel/compat-data@^7.20.0": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.1.tgz#f2e6ef7790d8c8dbf03d379502dcc246dcce0b30" - integrity sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ== - -"@babel/core@^7.11.6", "@babel/core@^7.12.3": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.2.tgz#8dc9b1620a673f92d3624bd926dc49a52cf25b92" - integrity sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g== - dependencies: - "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.2" - "@babel/helper-compilation-targets" "^7.20.0" - "@babel/helper-module-transforms" "^7.20.2" - "@babel/helpers" "^7.20.1" - "@babel/parser" "^7.20.2" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.1" - "@babel/types" "^7.20.2" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.1" - semver "^6.3.0" - -"@babel/generator@^7.20.1", "@babel/generator@^7.20.2", "@babel/generator@^7.7.2": - version "7.20.4" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.4.tgz#4d9f8f0c30be75fd90a0562099a26e5839602ab8" - integrity sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA== - dependencies: - "@babel/types" "^7.20.2" - "@jridgewell/gen-mapping" "^0.3.2" - jsesc "^2.5.1" - -"@babel/helper-compilation-targets@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz#6bf5374d424e1b3922822f1d9bdaa43b1a139d0a" - integrity sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ== - dependencies: - "@babel/compat-data" "^7.20.0" - "@babel/helper-validator-option" "^7.18.6" - browserslist "^4.21.3" - semver "^6.3.0" - -"@babel/helper-environment-visitor@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" - integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== - -"@babel/helper-function-name@^7.19.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" - integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== - dependencies: - "@babel/template" "^7.18.10" - "@babel/types" "^7.19.0" - -"@babel/helper-hoist-variables@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" - integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-module-imports@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" - integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-module-transforms@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz#ac53da669501edd37e658602a21ba14c08748712" - integrity sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-simple-access" "^7.20.2" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-validator-identifier" "^7.19.1" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.1" - "@babel/types" "^7.20.2" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.8.0": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629" - integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== - -"@babel/helper-simple-access@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9" - integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== - dependencies: - "@babel/types" "^7.20.2" - -"@babel/helper-split-export-declaration@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" - integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-string-parser@^7.19.4": - version "7.19.4" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" - integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== - -"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== - -"@babel/helper-validator-option@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" - integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== - -"@babel/helpers@^7.20.1": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.1.tgz#2ab7a0fcb0a03b5bf76629196ed63c2d7311f4c9" - integrity sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg== - dependencies: - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.1" - "@babel/types" "^7.20.0" - -"@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.20.1", "@babel/parser@^7.20.2": - version "7.20.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.3.tgz#5358cf62e380cf69efcb87a7bb922ff88bfac6e2" - integrity sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg== - -"@babel/plugin-syntax-async-generators@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" - integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-bigint@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" - integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.8.3": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" - integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-import-meta@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" - integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-json-strings@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" - integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-jsx@^7.7.2": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz#a8feef63b010150abd97f1649ec296e849943ca0" - integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-syntax-logical-assignment-operators@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" - integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" - integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-numeric-separator@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" - integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-object-rest-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" - integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" - integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" - integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-top-level-await@^7.8.3": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" - integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-typescript@^7.7.2": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz#4e9a0cfc769c85689b77a2e642d24e9f697fc8c7" - integrity sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.19.0" - -"@babel/template@^7.18.10", "@babel/template@^7.3.3": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" - integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.18.10" - "@babel/types" "^7.18.10" - -"@babel/traverse@^7.20.1", "@babel/traverse@^7.7.2": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.1.tgz#9b15ccbf882f6d107eeeecf263fbcdd208777ec8" - integrity sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.1" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.20.1" - "@babel/types" "^7.20.0" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.2.tgz#67ac09266606190f496322dbaff360fdaa5e7842" - integrity sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog== - dependencies: - "@babel/helper-string-parser" "^7.19.4" - "@babel/helper-validator-identifier" "^7.19.1" - to-fast-properties "^2.0.0" - -"@bcoe/v8-coverage@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" - integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== - -"@cspotcode/source-map-support@^0.8.0": - version "0.8.1" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" - integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== - dependencies: - "@jridgewell/trace-mapping" "0.3.9" - -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jest/console@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.5.0.tgz#593a6c5c0d3f75689835f1b3b4688c4f8544cb57" - integrity sha512-NEpkObxPwyw/XxZVLPmAGKE89IQRp4puc6IQRPru6JKd1M3fW9v1xM1AnzIJE65hbCkzQAdnL8P47e9hzhiYLQ== - dependencies: - "@jest/types" "^29.5.0" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^29.5.0" - jest-util "^29.5.0" - slash "^3.0.0" - -"@jest/core@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.5.0.tgz#76674b96904484e8214614d17261cc491e5f1f03" - integrity sha512-28UzQc7ulUrOQw1IsN/kv1QES3q2kkbl/wGslyhAclqZ/8cMdB5M68BffkIdSJgKBUt50d3hbwJ92XESlE7LiQ== - dependencies: - "@jest/console" "^29.5.0" - "@jest/reporters" "^29.5.0" - "@jest/test-result" "^29.5.0" - "@jest/transform" "^29.5.0" - "@jest/types" "^29.5.0" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - ci-info "^3.2.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-changed-files "^29.5.0" - jest-config "^29.5.0" - jest-haste-map "^29.5.0" - jest-message-util "^29.5.0" - jest-regex-util "^29.4.3" - jest-resolve "^29.5.0" - jest-resolve-dependencies "^29.5.0" - jest-runner "^29.5.0" - jest-runtime "^29.5.0" - jest-snapshot "^29.5.0" - jest-util "^29.5.0" - jest-validate "^29.5.0" - jest-watcher "^29.5.0" - micromatch "^4.0.4" - pretty-format "^29.5.0" - slash "^3.0.0" - strip-ansi "^6.0.0" - -"@jest/environment@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.5.0.tgz#9152d56317c1fdb1af389c46640ba74ef0bb4c65" - integrity sha512-5FXw2+wD29YU1d4I2htpRX7jYnAyTRjP2CsXQdo9SAM8g3ifxWPSV0HnClSn71xwctr0U3oZIIH+dtbfmnbXVQ== - dependencies: - "@jest/fake-timers" "^29.5.0" - "@jest/types" "^29.5.0" - "@types/node" "*" - jest-mock "^29.5.0" - -"@jest/expect-utils@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.5.0.tgz#f74fad6b6e20f924582dc8ecbf2cb800fe43a036" - integrity sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg== - dependencies: - jest-get-type "^29.4.3" - -"@jest/expect@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.5.0.tgz#80952f5316b23c483fbca4363ce822af79c38fba" - integrity sha512-PueDR2HGihN3ciUNGr4uelropW7rqUfTiOn+8u0leg/42UhblPxHkfoh0Ruu3I9Y1962P3u2DY4+h7GVTSVU6g== - dependencies: - expect "^29.5.0" - jest-snapshot "^29.5.0" - -"@jest/fake-timers@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.5.0.tgz#d4d09ec3286b3d90c60bdcd66ed28d35f1b4dc2c" - integrity sha512-9ARvuAAQcBwDAqOnglWq2zwNIRUDtk/SCkp/ToGEhFv5r86K21l+VEs0qNTaXtyiY0lEePl3kylijSYJQqdbDg== - dependencies: - "@jest/types" "^29.5.0" - "@sinonjs/fake-timers" "^10.0.2" - "@types/node" "*" - jest-message-util "^29.5.0" - jest-mock "^29.5.0" - jest-util "^29.5.0" - -"@jest/globals@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.5.0.tgz#6166c0bfc374c58268677539d0c181f9c1833298" - integrity sha512-S02y0qMWGihdzNbUiqSAiKSpSozSuHX5UYc7QbnHP+D9Lyw8DgGGCinrN9uSuHPeKgSSzvPom2q1nAtBvUsvPQ== - dependencies: - "@jest/environment" "^29.5.0" - "@jest/expect" "^29.5.0" - "@jest/types" "^29.5.0" - jest-mock "^29.5.0" - -"@jest/reporters@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.5.0.tgz#985dfd91290cd78ddae4914ba7921bcbabe8ac9b" - integrity sha512-D05STXqj/M8bP9hQNSICtPqz97u7ffGzZu+9XLucXhkOFBqKcXe04JLZOgIekOxdb73MAoBUFnqvf7MCpKk5OA== - dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^29.5.0" - "@jest/test-result" "^29.5.0" - "@jest/transform" "^29.5.0" - "@jest/types" "^29.5.0" - "@jridgewell/trace-mapping" "^0.3.15" - "@types/node" "*" - chalk "^4.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^5.1.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.1.3" - jest-message-util "^29.5.0" - jest-util "^29.5.0" - jest-worker "^29.5.0" - slash "^3.0.0" - string-length "^4.0.1" - strip-ansi "^6.0.0" - v8-to-istanbul "^9.0.1" - -"@jest/schemas@^29.4.3": - version "29.4.3" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.4.3.tgz#39cf1b8469afc40b6f5a2baaa146e332c4151788" - integrity sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg== - dependencies: - "@sinclair/typebox" "^0.25.16" - -"@jest/source-map@^29.4.3": - version "29.4.3" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.4.3.tgz#ff8d05cbfff875d4a791ab679b4333df47951d20" - integrity sha512-qyt/mb6rLyd9j1jUts4EQncvS6Yy3PM9HghnNv86QBlV+zdL2inCdK1tuVlL+J+lpiw2BI67qXOrX3UurBqQ1w== - dependencies: - "@jridgewell/trace-mapping" "^0.3.15" - callsites "^3.0.0" - graceful-fs "^4.2.9" - -"@jest/test-result@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.5.0.tgz#7c856a6ca84f45cc36926a4e9c6b57f1973f1408" - integrity sha512-fGl4rfitnbfLsrfx1uUpDEESS7zM8JdgZgOCQuxQvL1Sn/I6ijeAVQWGfXI9zb1i9Mzo495cIpVZhA0yr60PkQ== - dependencies: - "@jest/console" "^29.5.0" - "@jest/types" "^29.5.0" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - -"@jest/test-sequencer@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.5.0.tgz#34d7d82d3081abd523dbddc038a3ddcb9f6d3cc4" - integrity sha512-yPafQEcKjkSfDXyvtgiV4pevSeyuA6MQr6ZIdVkWJly9vkqjnFfcfhRQqpD5whjoU8EORki752xQmjaqoFjzMQ== - dependencies: - "@jest/test-result" "^29.5.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.5.0" - slash "^3.0.0" - -"@jest/transform@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.5.0.tgz#cf9c872d0965f0cbd32f1458aa44a2b1988b00f9" - integrity sha512-8vbeZWqLJOvHaDfeMuoHITGKSz5qWc9u04lnWrQE3VyuSw604PzQM824ZeX9XSjUCeDiE3GuxZe5UKa8J61NQw== - dependencies: - "@babel/core" "^7.11.6" - "@jest/types" "^29.5.0" - "@jridgewell/trace-mapping" "^0.3.15" - babel-plugin-istanbul "^6.1.1" - chalk "^4.0.0" - convert-source-map "^2.0.0" - fast-json-stable-stringify "^2.1.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.5.0" - jest-regex-util "^29.4.3" - jest-util "^29.5.0" - micromatch "^4.0.4" - pirates "^4.0.4" - slash "^3.0.0" - write-file-atomic "^4.0.2" - -"@jest/types@^29.3.1", "@jest/types@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.5.0.tgz#f59ef9b031ced83047c67032700d8c807d6e1593" - integrity sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog== - dependencies: - "@jest/schemas" "^29.4.3" - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^17.0.8" - chalk "^4.0.0" - -"@jridgewell/gen-mapping@^0.1.0": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" - integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== - dependencies: - "@jridgewell/set-array" "^1.0.0" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/gen-mapping@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/resolve-uri@3.1.0", "@jridgewell/resolve-uri@^3.0.3": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== - -"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - -"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/trace-mapping@0.3.9": - version "0.3.9" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" - integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.15", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.17" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985" - integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g== - dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" - -"@sinclair/typebox@^0.25.16": - version "0.25.21" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.25.21.tgz#763b05a4b472c93a8db29b2c3e359d55b29ce272" - integrity sha512-gFukHN4t8K4+wVC+ECqeqwzBDeFeTzBXroBTqE6vcWrQGbEUpHO7LYdG0f4xnvYq4VOEwITSlHlp0JBAIFMS/g== - -"@sinonjs/commons@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-2.0.0.tgz#fd4ca5b063554307e8327b4564bd56d3b73924a3" - integrity sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg== - dependencies: - type-detect "4.0.8" - -"@sinonjs/fake-timers@^10.0.2": - version "10.0.2" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.0.2.tgz#d10549ed1f423d80639c528b6c7f5a1017747d0c" - integrity sha512-SwUDyjWnah1AaNl7kxsa7cfLhlTYoiyhDAIgyh+El30YvXs/o7OLXpYH88Zdhyx9JExKrmHDJ+10bwIcY80Jmw== - dependencies: - "@sinonjs/commons" "^2.0.0" - -"@tsconfig/node10@^1.0.7": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" - integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== - -"@tsconfig/node12@^1.0.7": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" - integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== - -"@tsconfig/node14@^1.0.0": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" - integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== - -"@tsconfig/node16@^1.0.2": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" - integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== - -"@types/babel__core@^7.1.14": - version "7.1.20" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.20.tgz#e168cdd612c92a2d335029ed62ac94c95b362359" - integrity sha512-PVb6Bg2QuscZ30FvOU7z4guG6c926D9YRvOxEaelzndpMsvP+YM74Q/dAFASpg2l6+XLalxSGxcq/lrgYWZtyQ== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - "@types/babel__generator" "*" - "@types/babel__template" "*" - "@types/babel__traverse" "*" - -"@types/babel__generator@*": - version "7.6.4" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.4.tgz#1f20ce4c5b1990b37900b63f050182d28c2439b7" - integrity sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg== - dependencies: - "@babel/types" "^7.0.0" - -"@types/babel__template@*": - version "7.4.1" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.1.tgz#3d1a48fd9d6c0edfd56f2ff578daed48f36c8969" - integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.18.2" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.18.2.tgz#235bf339d17185bdec25e024ca19cce257cc7309" - integrity sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg== - dependencies: - "@babel/types" "^7.3.0" - -"@types/graceful-fs@^4.1.3": - version "4.1.5" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" - integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== - dependencies: - "@types/node" "*" - -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" - integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== - -"@types/istanbul-lib-report@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" - integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== - dependencies: - "@types/istanbul-lib-coverage" "*" - -"@types/istanbul-reports@^3.0.0": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" - integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== - dependencies: - "@types/istanbul-lib-report" "*" - -"@types/node@*": - version "18.11.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4" - integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg== - -"@types/node@16.18.18": - version "16.18.18" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.18.tgz#06cb0eeb5a0175d26d99b7acf4db613ca30cb07f" - integrity sha512-fwGw1uvQAzabxL1pyoknPlJIF2t7+K90uTqynleKRx24n3lYcxWa3+KByLhgkF8GEAK2c7hC8Ki0RkNM5H15jQ== - -"@types/prettier@^2.1.5": - version "2.7.1" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.1.tgz#dfd20e2dc35f027cdd6c1908e80a5ddc7499670e" - integrity sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow== - -"@types/stack-utils@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" - integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== - -"@types/yargs-parser@*": - version "21.0.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" - integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== - -"@types/yargs@^17.0.8": - version "17.0.13" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.13.tgz#34cced675ca1b1d51fcf4d34c3c6f0fa142a5c76" - integrity sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg== - dependencies: - "@types/yargs-parser" "*" - -"@vercel/ncc@0.36.1": - version "0.36.1" - resolved "https://registry.yarnpkg.com/@vercel/ncc/-/ncc-0.36.1.tgz#d4c01fdbbe909d128d1bf11c7f8b5431654c5b95" - integrity sha512-S4cL7Taa9yb5qbv+6wLgiKVZ03Qfkc4jGRuiUQMQ8HGBD5pcNRnHeYM33zBvJE4/zJGjJJ8GScB+WmTsn9mORw== - -acorn-walk@^8.1.1: - version "8.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== - -acorn@^8.4.1: - version "8.8.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" - integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== - -ansi-escapes@^4.2.1: - version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" - integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== - -anymatch@^3.0.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -arg@^4.1.0: - version "4.1.3" - resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" - integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -babel-jest@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.5.0.tgz#3fe3ddb109198e78b1c88f9ebdecd5e4fc2f50a5" - integrity sha512-mA4eCDh5mSo2EcA9xQjVTpmbbNk32Zb3Q3QFQsNhaK56Q+yoXowzFodLux30HRgyOho5rsQ6B0P9QpMkvvnJ0Q== - dependencies: - "@jest/transform" "^29.5.0" - "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^29.5.0" - chalk "^4.0.0" - graceful-fs "^4.2.9" - slash "^3.0.0" - -babel-plugin-istanbul@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" - integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^5.0.4" - test-exclude "^6.0.0" - -babel-plugin-jest-hoist@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.5.0.tgz#a97db437936f441ec196990c9738d4b88538618a" - integrity sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__core" "^7.1.14" - "@types/babel__traverse" "^7.0.6" - -babel-preset-current-node-syntax@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" - integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== - dependencies: - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.8.3" - "@babel/plugin-syntax-import-meta" "^7.8.3" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.8.3" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-top-level-await" "^7.8.3" - -babel-preset-jest@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.5.0.tgz#57bc8cc88097af7ff6a5ab59d1cd29d52a5916e2" - integrity sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg== - dependencies: - babel-plugin-jest-hoist "^29.5.0" - babel-preset-current-node-syntax "^1.0.0" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -browserslist@^4.21.3: - version "4.21.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987" - integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw== - dependencies: - caniuse-lite "^1.0.30001400" - electron-to-chromium "^1.4.251" - node-releases "^2.0.6" - update-browserslist-db "^1.0.9" - -bs-logger@0.x: - version "0.2.6" - resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" - integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== - dependencies: - fast-json-stable-stringify "2.x" - -bser@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" - integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== - dependencies: - node-int64 "^0.4.0" - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelcase@^6.2.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -caniuse-lite@^1.0.30001400: - version "1.0.30001434" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001434.tgz#ec1ec1cfb0a93a34a0600d37903853030520a4e5" - integrity sha512-aOBHrLmTQw//WFa2rcF1If9fa3ypkC1wzqqiKHgfdrXTWcU8C4gKVZT77eQAPWN1APys3+uQ0Df07rKauXGEYA== - -chalk@^2.0.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^4.0.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -char-regex@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" - integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== - -ci-info@^3.2.0: - version "3.6.1" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.6.1.tgz#7594f1c95cb7fdfddee7af95a13af7dbc67afdcf" - integrity sha512-up5ggbaDqOqJ4UqLKZ2naVkyqSJQgJi5lwD6b6mM748ysrghDBX0bx/qJTUHzw7zu6Mq4gycviSF5hJnwceD8w== - -cjs-module-lexer@^1.0.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" - integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== - -cliui@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" - integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.1" - wrap-ansi "^7.0.0" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== - -collect-v8-coverage@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" - integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg== - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -convert-source-map@^1.6.0, convert-source-map@^1.7.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" - integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== - -convert-source-map@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" - integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== - -create-require@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" - integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== - -cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -date-fns@2.29.3: - version "2.29.3" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.3.tgz#27402d2fc67eb442b511b70bbdf98e6411cd68a8" - integrity sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA== - -debug@^4.1.0, debug@^4.1.1: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -dedent@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" - integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== - -deepmerge@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" - integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== - -detect-newline@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" - integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== - -diff-sequences@^29.4.3: - version "29.4.3" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.4.3.tgz#9314bc1fabe09267ffeca9cbafc457d8499a13f2" - integrity sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA== - -diff@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - -electron-to-chromium@^1.4.251: - version "1.4.284" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz#61046d1e4cab3a25238f6bf7413795270f125592" - integrity sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA== - -emittery@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" - integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -execa@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== - -expect@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-29.5.0.tgz#68c0509156cb2a0adb8865d413b137eeaae682f7" - integrity sha512-yM7xqUrCO2JdpFo4XpM82t+PJBFybdqoQuJLDGeDX2ij8NZzqRHyu3Hp188/JX7SWqud+7t4MUdvcgGBICMHZg== - dependencies: - "@jest/expect-utils" "^29.5.0" - jest-get-type "^29.4.3" - jest-matcher-utils "^29.5.0" - jest-message-util "^29.5.0" - jest-util "^29.5.0" - -fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fb-watchman@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" - integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== - dependencies: - bser "2.1.1" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.5: - 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-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -glob@^7.1.3, glob@^7.1.4: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -graceful-fs@^4.2.9: - version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -idonttrustlikethat@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/idonttrustlikethat/-/idonttrustlikethat-2.1.0.tgz#657300b6838f1798ab74f79e72e1108d0304e5da" - integrity sha512-WXiWntC19mYSULxHkPiyA3mp2JLFKKmLYvUNyKwcYafgvH4tqQSeb5XfmN3IE4hTQNGzu1AViNnPt0Z8w5FEPQ== - -import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - -is-core-module@^2.9.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" - integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== - dependencies: - has "^1.0.3" - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-generator-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" - integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" - integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== - -istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" - integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^6.3.0" - -istanbul-lib-report@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" - integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^3.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.1.3: - version "3.1.5" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.5.tgz#cc9a6ab25cb25659810e4785ed9d9fb742578bae" - integrity sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - -jest-changed-files@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.5.0.tgz#e88786dca8bf2aa899ec4af7644e16d9dcf9b23e" - integrity sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag== - dependencies: - execa "^5.0.0" - p-limit "^3.1.0" - -jest-circus@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.5.0.tgz#b5926989449e75bff0d59944bae083c9d7fb7317" - integrity sha512-gq/ongqeQKAplVxqJmbeUOJJKkW3dDNPY8PjhJ5G0lBRvu0e3EWGxGy5cI4LAGA7gV2UHCtWBI4EMXK8c9nQKA== - dependencies: - "@jest/environment" "^29.5.0" - "@jest/expect" "^29.5.0" - "@jest/test-result" "^29.5.0" - "@jest/types" "^29.5.0" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - dedent "^0.7.0" - is-generator-fn "^2.0.0" - jest-each "^29.5.0" - jest-matcher-utils "^29.5.0" - jest-message-util "^29.5.0" - jest-runtime "^29.5.0" - jest-snapshot "^29.5.0" - jest-util "^29.5.0" - p-limit "^3.1.0" - pretty-format "^29.5.0" - pure-rand "^6.0.0" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-cli@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.5.0.tgz#b34c20a6d35968f3ee47a7437ff8e53e086b4a67" - integrity sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw== - dependencies: - "@jest/core" "^29.5.0" - "@jest/test-result" "^29.5.0" - "@jest/types" "^29.5.0" - chalk "^4.0.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - import-local "^3.0.2" - jest-config "^29.5.0" - jest-util "^29.5.0" - jest-validate "^29.5.0" - prompts "^2.0.1" - yargs "^17.3.1" - -jest-config@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.5.0.tgz#3cc972faec8c8aaea9ae158c694541b79f3748da" - integrity sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA== - dependencies: - "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^29.5.0" - "@jest/types" "^29.5.0" - babel-jest "^29.5.0" - chalk "^4.0.0" - ci-info "^3.2.0" - deepmerge "^4.2.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-circus "^29.5.0" - jest-environment-node "^29.5.0" - jest-get-type "^29.4.3" - jest-regex-util "^29.4.3" - jest-resolve "^29.5.0" - jest-runner "^29.5.0" - jest-util "^29.5.0" - jest-validate "^29.5.0" - micromatch "^4.0.4" - parse-json "^5.2.0" - pretty-format "^29.5.0" - slash "^3.0.0" - strip-json-comments "^3.1.1" - -jest-diff@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.5.0.tgz#e0d83a58eb5451dcc1fa61b1c3ee4e8f5a290d63" - integrity sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw== - dependencies: - chalk "^4.0.0" - diff-sequences "^29.4.3" - jest-get-type "^29.4.3" - pretty-format "^29.5.0" - -jest-docblock@^29.4.3: - version "29.4.3" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.4.3.tgz#90505aa89514a1c7dceeac1123df79e414636ea8" - integrity sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg== - dependencies: - detect-newline "^3.0.0" - -jest-each@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.5.0.tgz#fc6e7014f83eac68e22b7195598de8554c2e5c06" - integrity sha512-HM5kIJ1BTnVt+DQZ2ALp3rzXEl+g726csObrW/jpEGl+CDSSQpOJJX2KE/vEg8cxcMXdyEPu6U4QX5eruQv5hA== - dependencies: - "@jest/types" "^29.5.0" - chalk "^4.0.0" - jest-get-type "^29.4.3" - jest-util "^29.5.0" - pretty-format "^29.5.0" - -jest-environment-node@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.5.0.tgz#f17219d0f0cc0e68e0727c58b792c040e332c967" - integrity sha512-ExxuIK/+yQ+6PRGaHkKewYtg6hto2uGCgvKdb2nfJfKXgZ17DfXjvbZ+jA1Qt9A8EQSfPnt5FKIfnOO3u1h9qw== - dependencies: - "@jest/environment" "^29.5.0" - "@jest/fake-timers" "^29.5.0" - "@jest/types" "^29.5.0" - "@types/node" "*" - jest-mock "^29.5.0" - jest-util "^29.5.0" - -jest-get-type@^29.4.3: - version "29.4.3" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.4.3.tgz#1ab7a5207c995161100b5187159ca82dd48b3dd5" - integrity sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg== - -jest-haste-map@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.5.0.tgz#69bd67dc9012d6e2723f20a945099e972b2e94de" - integrity sha512-IspOPnnBro8YfVYSw6yDRKh/TiCdRngjxeacCps1cQ9cgVN6+10JUcuJ1EabrgYLOATsIAigxA0rLR9x/YlrSA== - dependencies: - "@jest/types" "^29.5.0" - "@types/graceful-fs" "^4.1.3" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.9" - jest-regex-util "^29.4.3" - jest-util "^29.5.0" - jest-worker "^29.5.0" - micromatch "^4.0.4" - walker "^1.0.8" - optionalDependencies: - fsevents "^2.3.2" - -jest-leak-detector@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.5.0.tgz#cf4bdea9615c72bac4a3a7ba7e7930f9c0610c8c" - integrity sha512-u9YdeeVnghBUtpN5mVxjID7KbkKE1QU4f6uUwuxiY0vYRi9BUCLKlPEZfDGR67ofdFmDz9oPAy2G92Ujrntmow== - dependencies: - jest-get-type "^29.4.3" - pretty-format "^29.5.0" - -jest-matcher-utils@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.5.0.tgz#d957af7f8c0692c5453666705621ad4abc2c59c5" - integrity sha512-lecRtgm/rjIK0CQ7LPQwzCs2VwW6WAahA55YBuI+xqmhm7LAaxokSB8C97yJeYyT+HvQkH741StzpU41wohhWw== - dependencies: - chalk "^4.0.0" - jest-diff "^29.5.0" - jest-get-type "^29.4.3" - pretty-format "^29.5.0" - -jest-message-util@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.5.0.tgz#1f776cac3aca332ab8dd2e3b41625435085c900e" - integrity sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA== - dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^29.5.0" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.9" - micromatch "^4.0.4" - pretty-format "^29.5.0" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-mock@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.5.0.tgz#26e2172bcc71d8b0195081ff1f146ac7e1518aed" - integrity sha512-GqOzvdWDE4fAV2bWQLQCkujxYWL7RxjCnj71b5VhDAGOevB3qj3Ovg26A5NI84ZpODxyzaozXLOh2NCgkbvyaw== - dependencies: - "@jest/types" "^29.5.0" - "@types/node" "*" - jest-util "^29.5.0" - -jest-pnp-resolver@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" - integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== - -jest-regex-util@^29.4.3: - version "29.4.3" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.4.3.tgz#a42616141e0cae052cfa32c169945d00c0aa0bb8" - integrity sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg== - -jest-resolve-dependencies@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.5.0.tgz#f0ea29955996f49788bf70996052aa98e7befee4" - integrity sha512-sjV3GFr0hDJMBpYeUuGduP+YeCRbd7S/ck6IvL3kQ9cpySYKqcqhdLLC2rFwrcL7tz5vYibomBrsFYWkIGGjOg== - dependencies: - jest-regex-util "^29.4.3" - jest-snapshot "^29.5.0" - -jest-resolve@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.5.0.tgz#b053cc95ad1d5f6327f0ac8aae9f98795475ecdc" - integrity sha512-1TzxJ37FQq7J10jPtQjcc+MkCkE3GBpBecsSUWJ0qZNJpmg6m0D9/7II03yJulm3H/fvVjgqLh/k2eYg+ui52w== - dependencies: - chalk "^4.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.5.0" - jest-pnp-resolver "^1.2.2" - jest-util "^29.5.0" - jest-validate "^29.5.0" - resolve "^1.20.0" - resolve.exports "^2.0.0" - slash "^3.0.0" - -jest-runner@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.5.0.tgz#6a57c282eb0ef749778d444c1d758c6a7693b6f8" - integrity sha512-m7b6ypERhFghJsslMLhydaXBiLf7+jXy8FwGRHO3BGV1mcQpPbwiqiKUR2zU2NJuNeMenJmlFZCsIqzJCTeGLQ== - dependencies: - "@jest/console" "^29.5.0" - "@jest/environment" "^29.5.0" - "@jest/test-result" "^29.5.0" - "@jest/transform" "^29.5.0" - "@jest/types" "^29.5.0" - "@types/node" "*" - chalk "^4.0.0" - emittery "^0.13.1" - graceful-fs "^4.2.9" - jest-docblock "^29.4.3" - jest-environment-node "^29.5.0" - jest-haste-map "^29.5.0" - jest-leak-detector "^29.5.0" - jest-message-util "^29.5.0" - jest-resolve "^29.5.0" - jest-runtime "^29.5.0" - jest-util "^29.5.0" - jest-watcher "^29.5.0" - jest-worker "^29.5.0" - p-limit "^3.1.0" - source-map-support "0.5.13" - -jest-runtime@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.5.0.tgz#c83f943ee0c1da7eb91fa181b0811ebd59b03420" - integrity sha512-1Hr6Hh7bAgXQP+pln3homOiEZtCDZFqwmle7Ew2j8OlbkIu6uE3Y/etJQG8MLQs3Zy90xrp2C0BRrtPHG4zryw== - dependencies: - "@jest/environment" "^29.5.0" - "@jest/fake-timers" "^29.5.0" - "@jest/globals" "^29.5.0" - "@jest/source-map" "^29.4.3" - "@jest/test-result" "^29.5.0" - "@jest/transform" "^29.5.0" - "@jest/types" "^29.5.0" - "@types/node" "*" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-haste-map "^29.5.0" - jest-message-util "^29.5.0" - jest-mock "^29.5.0" - jest-regex-util "^29.4.3" - jest-resolve "^29.5.0" - jest-snapshot "^29.5.0" - jest-util "^29.5.0" - slash "^3.0.0" - strip-bom "^4.0.0" - -jest-snapshot@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.5.0.tgz#c9c1ce0331e5b63cd444e2f95a55a73b84b1e8ce" - integrity sha512-x7Wolra5V0tt3wRs3/ts3S6ciSQVypgGQlJpz2rsdQYoUKxMxPNaoHMGJN6qAuPJqS+2iQ1ZUn5kl7HCyls84g== - dependencies: - "@babel/core" "^7.11.6" - "@babel/generator" "^7.7.2" - "@babel/plugin-syntax-jsx" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/traverse" "^7.7.2" - "@babel/types" "^7.3.3" - "@jest/expect-utils" "^29.5.0" - "@jest/transform" "^29.5.0" - "@jest/types" "^29.5.0" - "@types/babel__traverse" "^7.0.6" - "@types/prettier" "^2.1.5" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^29.5.0" - graceful-fs "^4.2.9" - jest-diff "^29.5.0" - jest-get-type "^29.4.3" - jest-matcher-utils "^29.5.0" - jest-message-util "^29.5.0" - jest-util "^29.5.0" - natural-compare "^1.4.0" - pretty-format "^29.5.0" - semver "^7.3.5" - -jest-util@^29.0.0: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.3.1.tgz#1dda51e378bbcb7e3bc9d8ab651445591ed373e1" - integrity sha512-7YOVZaiX7RJLv76ZfHt4nbNEzzTRiMW/IiOG7ZOKmTXmoGBxUDefgMAxQubu6WPVqP5zSzAdZG0FfLcC7HOIFQ== - dependencies: - "@jest/types" "^29.3.1" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - -jest-util@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.5.0.tgz#24a4d3d92fc39ce90425311b23c27a6e0ef16b8f" - integrity sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ== - dependencies: - "@jest/types" "^29.5.0" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - -jest-validate@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.5.0.tgz#8e5a8f36178d40e47138dc00866a5f3bd9916ffc" - integrity sha512-pC26etNIi+y3HV8A+tUGr/lph9B18GnzSRAkPaaZJIE1eFdiYm6/CewuiJQ8/RlfHd1u/8Ioi8/sJ+CmbA+zAQ== - dependencies: - "@jest/types" "^29.5.0" - camelcase "^6.2.0" - chalk "^4.0.0" - jest-get-type "^29.4.3" - leven "^3.1.0" - pretty-format "^29.5.0" - -jest-watcher@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.5.0.tgz#cf7f0f949828ba65ddbbb45c743a382a4d911363" - integrity sha512-KmTojKcapuqYrKDpRwfqcQ3zjMlwu27SYext9pt4GlF5FUgB+7XE1mcCnSm6a4uUpFyQIkb6ZhzZvHl+jiBCiA== - dependencies: - "@jest/test-result" "^29.5.0" - "@jest/types" "^29.5.0" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - emittery "^0.13.1" - jest-util "^29.5.0" - string-length "^4.0.1" - -jest-worker@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.5.0.tgz#bdaefb06811bd3384d93f009755014d8acb4615d" - integrity sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA== - dependencies: - "@types/node" "*" - jest-util "^29.5.0" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -jest@29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-29.5.0.tgz#f75157622f5ce7ad53028f2f8888ab53e1f1f24e" - integrity sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ== - dependencies: - "@jest/core" "^29.5.0" - "@jest/types" "^29.5.0" - import-local "^3.0.2" - jest-cli "^29.5.0" - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -json-parse-even-better-errors@^2.3.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json-stringify-safe@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== - -json5@^2.2.1, json5@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" - integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - -leven@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" - integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== - -lines-and-columns@^1.1.6: - version "1.2.4" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" - integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -lodash.memoize@4.x: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== - -lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -make-dir@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -make-error@1.x, make-error@^1.1.1: - version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - -makeerror@1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" - integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== - dependencies: - tmpl "1.0.5" - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -minimatch@^3.0.4, minimatch@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - -nock@13.3.0: - version "13.3.0" - resolved "https://registry.yarnpkg.com/nock/-/nock-13.3.0.tgz#b13069c1a03f1ad63120f994b04bfd2556925768" - integrity sha512-HHqYQ6mBeiMc+N038w8LkMpDCRquCHWeNmN3v6645P3NhN2+qXOBqvPqo7Rt1VyCMzKhJ733wZqw5B7cQVFNPg== - dependencies: - debug "^4.1.0" - json-stringify-safe "^5.0.1" - lodash "^4.17.21" - propagate "^2.0.0" - -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" - integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== - -node-releases@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" - integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== - -normalize-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -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== - -parse-json@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pirates@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" - integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== - -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -prettier@2.8.4: - version "2.8.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3" - integrity sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw== - -pretty-format@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.5.0.tgz#283134e74f70e2e3e7229336de0e4fce94ccde5a" - integrity sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw== - dependencies: - "@jest/schemas" "^29.4.3" - ansi-styles "^5.0.0" - react-is "^18.0.0" - -prompts@^2.0.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" - integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.5" - -propagate@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/propagate/-/propagate-2.0.1.tgz#40cdedab18085c792334e64f0ac17256d38f9a45" - integrity sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag== - -pure-rand@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.0.tgz#701996ceefa253507923a0e864c17ab421c04a7c" - integrity sha512-rLSBxJjP+4DQOgcJAx6RZHT2he2pkhQdSnofG5VWyVl6GRq/K02ISOuOLcsMOrtKDIJb8JN2zm3FFzWNbezdPw== - -react-is@^18.0.0: - version "18.2.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" - integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve.exports@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.0.tgz#c1a0028c2d166ec2fbf7d0644584927e76e7400e" - integrity sha512-6K/gDlqgQscOlg9fSRpWstA8sYe8rbELsSTNpx+3kTrsVCzvSl0zIvRErM7fdl9ERWDsKnrLnwB+Ne89918XOg== - -resolve@^1.20.0: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -semver@7.x, semver@^7.3.5: - version "7.3.8" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" - integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== - dependencies: - lru-cache "^6.0.0" - -semver@^6.0.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -signal-exit@^3.0.3, signal-exit@^3.0.7: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -sisteransi@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" - integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -source-map-support@0.5.13: - version "0.5.13" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" - integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0, source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== - -stack-utils@^2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" - integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== - dependencies: - escape-string-regexp "^2.0.0" - -string-length@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" - integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== - dependencies: - char-regex "^1.0.2" - strip-ansi "^6.0.0" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-bom@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" - integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -tmpl@1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" - integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -ts-jest@29.0.5: - version "29.0.5" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.0.5.tgz#c5557dcec8fe434fcb8b70c3e21c6b143bfce066" - integrity sha512-PL3UciSgIpQ7f6XjVOmbi96vmDHUqAyqDr8YxzopDqX3kfgYtX1cuNeBjP+L9sFXi6nzsGGA6R3fP3DDDJyrxA== - dependencies: - bs-logger "0.x" - fast-json-stable-stringify "2.x" - jest-util "^29.0.0" - json5 "^2.2.3" - lodash.memoize "4.x" - make-error "1.x" - semver "7.x" - yargs-parser "^21.0.1" - -ts-node@10.9.1: - version "10.9.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" - integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== - dependencies: - "@cspotcode/source-map-support" "^0.8.0" - "@tsconfig/node10" "^1.0.7" - "@tsconfig/node12" "^1.0.7" - "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.2" - acorn "^8.4.1" - acorn-walk "^8.1.1" - arg "^4.1.0" - create-require "^1.1.0" - diff "^4.0.1" - make-error "^1.1.1" - v8-compile-cache-lib "^3.0.1" - yn "3.1.1" - -tunnel@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" - integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== - -type-detect@4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -typescript@5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.2.tgz#891e1a90c5189d8506af64b9ef929fca99ba1ee5" - integrity sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw== - -update-browserslist-db@^1.0.9: - version "1.0.10" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" - integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ== - dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" - -uuid@^8.3.2: - version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - -v8-compile-cache-lib@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" - integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== - -v8-to-istanbul@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz#b6f994b0b5d4ef255e17a0d17dc444a9f5132fa4" - integrity sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w== - dependencies: - "@jridgewell/trace-mapping" "^0.3.12" - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^1.6.0" - -walker@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" - integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== - dependencies: - makeerror "1.0.12" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -write-file-atomic@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" - integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== - dependencies: - imurmurhash "^0.1.4" - signal-exit "^3.0.7" - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yargs-parser@^21.0.1, yargs-parser@^21.1.1: - version "21.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - -yargs@^17.3.1: - version "17.6.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.6.2.tgz#2e23f2944e976339a1ee00f18c77fedee8332541" - integrity sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - -yn@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" - integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==