From f2fb338539f6064562eef3a8eca77ce9c3ec1884 Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Sat, 18 Jan 2025 01:49:16 +0100 Subject: [PATCH] Release 2.28 (#5253) * fix year in dashboard * make batch actions accessible via javascript * bump packages * remove BOM from CSV * rebuild assets * fix duplicated automated-email warning --- .github/release-drafter.yml | 2 +- assets/js/plugins/KimaiMultiUpdateTable.js | 60 +- composer.json | 2 +- composer.lock | 683 +++++++++--------- package.json | 4 +- phpstan.neon | 5 - public/build/app-rtl.6669505e.js | 1 - public/build/app-rtl.7a875ca7.js | 1 + public/build/app.7719f352.js | 2 + ...ICENSE.txt => app.7719f352.js.LICENSE.txt} | 0 public/build/app.ea4d46bf.js | 2 - public/build/calendar.7415ab21.js | 2 + ...E.txt => calendar.7415ab21.js.LICENSE.txt} | 0 public/build/calendar.cf8275ae.js | 2 - public/build/chart.62631acc.js | 2 + ...ENSE.txt => chart.62631acc.js.LICENSE.txt} | 0 public/build/chart.7e725b75.js | 2 - public/build/dashboard.632f98fb.js | 2 + ....txt => dashboard.632f98fb.js.LICENSE.txt} | 0 public/build/dashboard.e3ce6fbb.js | 2 - public/build/entrypoints.json | 50 +- public/build/export-pdf.32b1a2d8.js | 1 - public/build/export-pdf.395749ab.js | 1 + public/build/invoice-pdf.26d98626.js | 1 + public/build/invoice-pdf.502e6e63.js | 1 - public/build/invoice.773af9c4.js | 1 + public/build/invoice.e9e8aa7d.js | 1 - public/build/manifest.json | 18 +- ...untime.74179306.js => runtime.6c399d29.js} | 2 +- src/Command/AbstractResetCommand.php | 2 +- src/Command/ResetTestCommand.php | 17 - src/Constants.php | 6 +- src/Export/Base/CsvRenderer.php | 6 +- src/Widget/Type/PaginatedWorkingTimeChart.php | 1 + templates/emails/confirmation.html.twig | 4 - templates/emails/default.html.twig | 4 - templates/emails/layout.html.twig | 2 +- ...widget-paginatedworkingtimechart.html.twig | 2 +- .../Type/PaginatedWorkingTimeChartTest.php | 7 +- yarn.lock | 4 +- 40 files changed, 459 insertions(+), 446 deletions(-) delete mode 100644 public/build/app-rtl.6669505e.js create mode 100644 public/build/app-rtl.7a875ca7.js create mode 100644 public/build/app.7719f352.js rename public/build/{app.ea4d46bf.js.LICENSE.txt => app.7719f352.js.LICENSE.txt} (100%) delete mode 100644 public/build/app.ea4d46bf.js create mode 100644 public/build/calendar.7415ab21.js rename public/build/{calendar.cf8275ae.js.LICENSE.txt => calendar.7415ab21.js.LICENSE.txt} (100%) delete mode 100644 public/build/calendar.cf8275ae.js create mode 100644 public/build/chart.62631acc.js rename public/build/{chart.7e725b75.js.LICENSE.txt => chart.62631acc.js.LICENSE.txt} (100%) delete mode 100644 public/build/chart.7e725b75.js create mode 100644 public/build/dashboard.632f98fb.js rename public/build/{dashboard.e3ce6fbb.js.LICENSE.txt => dashboard.632f98fb.js.LICENSE.txt} (100%) delete mode 100644 public/build/dashboard.e3ce6fbb.js delete mode 100644 public/build/export-pdf.32b1a2d8.js create mode 100644 public/build/export-pdf.395749ab.js create mode 100644 public/build/invoice-pdf.26d98626.js delete mode 100644 public/build/invoice-pdf.502e6e63.js create mode 100644 public/build/invoice.773af9c4.js delete mode 100644 public/build/invoice.e9e8aa7d.js rename public/build/{runtime.74179306.js => runtime.6c399d29.js} (92%) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 56d42f92..9763f761 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -21,7 +21,7 @@ version-resolver: - 'translation' default: patch template: | - **Compatible with PHP 8.1 to 8.3** + **Compatible with PHP 8.1 to 8.4** $CHANGES diff --git a/assets/js/plugins/KimaiMultiUpdateTable.js b/assets/js/plugins/KimaiMultiUpdateTable.js index 96cdb464..c8ee04a5 100644 --- a/assets/js/plugins/KimaiMultiUpdateTable.js +++ b/assets/js/plugins/KimaiMultiUpdateTable.js @@ -13,6 +13,11 @@ import KimaiPlugin from '../KimaiPlugin'; export default class KimaiMultiUpdateTable extends KimaiPlugin { + getId() + { + return 'datatable-batch-action'; + } + init() { if (document.getElementsByClassName('multi_update_all').length === 0) { @@ -24,17 +29,11 @@ export default class KimaiMultiUpdateTable extends KimaiPlugin { const element = document.querySelector('div.page-body'); element.addEventListener('change', (event) => { if (event.target.matches('.multi_update_all')) { - // the "check all" checkbox in the upper start corner of the table - const checked = event.target.checked; - const table = event.target.closest('table'); - for (const element of table.querySelectorAll('.multi_update_single')) { - element.checked = checked; - } - this._toggleForm(table); + this.toggle(event.target.checked, event.target.closest('table')); event.stopPropagation(); } else if (event.target.matches('.multi_update_single')) { // single checkboxes in front of each row - this._toggleForm(event.target.closest('table')); + this._toggleDatatable(event.target.closest('table')); event.stopPropagation(); } }); @@ -58,11 +57,54 @@ export default class KimaiMultiUpdateTable extends KimaiPlugin { }); } + /** + * @param {boolean} checked + * @param {HTMLTableElement} table + */ + toggle(checked, table) + { + for (const element of table.querySelectorAll('.multi_update_single')) { + element.checked = checked; + } + this._toggleDatatable(table); + } + + /** + * @param {boolean} checked + */ + toggleAll(checked) + { + for (const element of document.querySelectorAll('.multi_update_all')) { + this._toggleAll(checked, element); + } + } + + /** + * @param {boolean} checked + * @param {string} name + */ + toggleByName(checked, name) + { + for (const element of document.querySelectorAll('#multi_update_all_' + name)) { + this._toggleAll(checked, element); + } + } + + /** + * @param {boolean} checked + * @param {Element} name + */ + _toggleAll(checked, element) + { + element.checked = checked; + this.toggle(checked, element.closest('table')); + } + /** * @param {HTMLTableElement} table * @private */ - _toggleForm(table) + _toggleDatatable(table) { const card = table.closest('div.card.data_table'); diff --git a/composer.json b/composer.json index 353c7bb5..e5c7f1c8 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "azuyalabs/yasumi": "^2.6", "composer/semver": "^3.3", "doctrine/doctrine-bundle": "^2.7", - "doctrine/doctrine-migrations-bundle": "^3.0", + "doctrine/doctrine-migrations-bundle": "3.3.1", "doctrine/orm": "^2.8", "endroid/qr-code": "^4.8", "erusev/parsedown": "^1.6", diff --git a/composer.lock b/composer.lock index 0321a7d0..90f574bb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9f659b51f4e0278a3fc52665e4be66a5", + "content-hash": "347f163b20c45dcf0014dbf1fb339f4d", "packages": [ { "name": "azuyalabs/yasumi", @@ -494,20 +494,20 @@ }, { "name": "doctrine/common", - "version": "3.4.5", + "version": "3.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/common.git", - "reference": "6c8fef961f67b8bc802ce3e32e3ebd1022907286" + "reference": "d9ea4a54ca2586db781f0265d36bea731ac66ec5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/6c8fef961f67b8bc802ce3e32e3ebd1022907286", - "reference": "6c8fef961f67b8bc802ce3e32e3ebd1022907286", + "url": "https://api.github.com/repos/doctrine/common/zipball/d9ea4a54ca2586db781f0265d36bea731ac66ec5", + "reference": "d9ea4a54ca2586db781f0265d36bea731ac66ec5", "shasum": "" }, "require": { - "doctrine/persistence": "^2.0 || ^3.0", + "doctrine/persistence": "^2.0 || ^3.0 || ^4.0", "php": "^7.1 || ^8.0" }, "require-dev": { @@ -565,7 +565,7 @@ ], "support": { "issues": "https://github.com/doctrine/common/issues", - "source": "https://github.com/doctrine/common/tree/3.4.5" + "source": "https://github.com/doctrine/common/tree/3.5.0" }, "funding": [ { @@ -581,20 +581,20 @@ "type": "tidelift" } ], - "time": "2024-10-08T15:53:43+00:00" + "time": "2025-01-01T22:12:03+00:00" }, { "name": "doctrine/dbal", - "version": "3.9.3", + "version": "3.9.4", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "61446f07fcb522414d6cfd8b1c3e5f9e18c579ba" + "reference": "ec16c82f20be1a7224e65ac67144a29199f87959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/61446f07fcb522414d6cfd8b1c3e5f9e18c579ba", - "reference": "61446f07fcb522414d6cfd8b1c3e5f9e18c579ba", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/ec16c82f20be1a7224e65ac67144a29199f87959", + "reference": "ec16c82f20be1a7224e65ac67144a29199f87959", "shasum": "" }, "require": { @@ -610,15 +610,13 @@ "doctrine/coding-standard": "12.0.0", "fig/log-test": "^1", "jetbrains/phpstorm-stubs": "2023.1", - "phpstan/phpstan": "1.12.6", - "phpstan/phpstan-strict-rules": "^1.6", - "phpunit/phpunit": "9.6.20", - "psalm/plugin-phpunit": "0.18.4", + "phpstan/phpstan": "2.1.1", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "9.6.22", "slevomat/coding-standard": "8.13.1", "squizlabs/php_codesniffer": "3.10.2", "symfony/cache": "^5.4|^6.0|^7.0", - "symfony/console": "^4.4|^5.4|^6.0|^7.0", - "vimeo/psalm": "4.30.0" + "symfony/console": "^4.4|^5.4|^6.0|^7.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -678,7 +676,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.9.3" + "source": "https://github.com/doctrine/dbal/tree/3.9.4" }, "funding": [ { @@ -694,7 +692,7 @@ "type": "tidelift" } ], - "time": "2024-10-10T17:56:43+00:00" + "time": "2025-01-16T08:28:55+00:00" }, { "name": "doctrine/deprecations", @@ -743,16 +741,16 @@ }, { "name": "doctrine/doctrine-bundle", - "version": "2.13.1", + "version": "2.13.2", "source": { "type": "git", "url": "https://github.com/doctrine/DoctrineBundle.git", - "reference": "2740ad8b8739b39ab37d409c972b092f632b025a" + "reference": "2363c43d9815a11657e452625cd64172d5587486" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/2740ad8b8739b39ab37d409c972b092f632b025a", - "reference": "2740ad8b8739b39ab37d409c972b092f632b025a", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/2363c43d9815a11657e452625cd64172d5587486", + "reference": "2363c43d9815a11657e452625cd64172d5587486", "shasum": "" }, "require": { @@ -766,7 +764,7 @@ "symfony/console": "^5.4 || ^6.0 || ^7.0", "symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0", "symfony/deprecation-contracts": "^2.1 || ^3", - "symfony/doctrine-bridge": "^5.4.46 || ^6.4.3 || ^7.0.3", + "symfony/doctrine-bridge": "^5.4.46 || ~6.3.12 || ^6.4.3 || ^7.0.3", "symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0", "symfony/polyfill-php80": "^1.15", "symfony/service-contracts": "^1.1.1 || ^2.0 || ^3" @@ -782,13 +780,14 @@ "doctrine/deprecations": "^1.0", "doctrine/orm": "^2.17 || ^3.0", "friendsofphp/proxy-manager-lts": "^1.0", + "phpstan/phpstan": "2.1.1", + "phpstan/phpstan-phpunit": "2.0.3", + "phpstan/phpstan-strict-rules": "^2", "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "^0.18.4", - "psalm/plugin-symfony": "^5", "psr/log": "^1.1.4 || ^2.0 || ^3.0", "symfony/phpunit-bridge": "^6.1 || ^7.0", "symfony/property-info": "^5.4 || ^6.0 || ^7.0", - "symfony/proxy-manager-bridge": "^5.4 || ^6.0 || ^7.0", + "symfony/proxy-manager-bridge": "^5.4 || ^6.0", "symfony/security-bundle": "^5.4 || ^6.0 || ^7.0", "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0", "symfony/string": "^5.4 || ^6.0 || ^7.0", @@ -797,8 +796,7 @@ "symfony/var-exporter": "^5.4 || ^6.2 || ^7.0", "symfony/web-profiler-bundle": "^5.4 || ^6.0 || ^7.0", "symfony/yaml": "^5.4 || ^6.0 || ^7.0", - "twig/twig": "^1.34 || ^2.12 || ^3.0", - "vimeo/psalm": "^5.15" + "twig/twig": "^1.34 || ^2.12 || ^3.0" }, "suggest": { "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", @@ -843,7 +841,7 @@ ], "support": { "issues": "https://github.com/doctrine/DoctrineBundle/issues", - "source": "https://github.com/doctrine/DoctrineBundle/tree/2.13.1" + "source": "https://github.com/doctrine/DoctrineBundle/tree/2.13.2" }, "funding": [ { @@ -859,7 +857,7 @@ "type": "tidelift" } ], - "time": "2024-11-08T23:27:54+00:00" + "time": "2025-01-15T11:12:38+00:00" }, { "name": "doctrine/doctrine-migrations-bundle", @@ -1641,16 +1639,16 @@ }, { "name": "egulias/email-validator", - "version": "4.0.2", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e" + "reference": "b115554301161fa21467629f1e1391c1936de517" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ebaaf5be6c0286928352e054f2d5125608e5405e", - "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/b115554301161fa21467629f1e1391c1936de517", + "reference": "b115554301161fa21467629f1e1391c1936de517", "shasum": "" }, "require": { @@ -1696,7 +1694,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/4.0.2" + "source": "https://github.com/egulias/EmailValidator/tree/4.0.3" }, "funding": [ { @@ -1704,7 +1702,7 @@ "type": "github" } ], - "time": "2023-10-06T06:47:41+00:00" + "time": "2024-12-27T00:36:43+00:00" }, { "name": "endroid/qr-code", @@ -2133,16 +2131,16 @@ }, { "name": "jms/serializer", - "version": "3.32.1", + "version": "3.32.2", "source": { "type": "git", "url": "https://github.com/schmittjoh/serializer.git", - "reference": "b4285f4197a5b961d365e2c756b144d7af24a7fd" + "reference": "fa7ab39504c24d76107ba16c00aafa5da3605971" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/b4285f4197a5b961d365e2c756b144d7af24a7fd", - "reference": "b4285f4197a5b961d365e2c756b144d7af24a7fd", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/fa7ab39504c24d76107ba16c00aafa5da3605971", + "reference": "fa7ab39504c24d76107ba16c00aafa5da3605971", "shasum": "" }, "require": { @@ -2219,7 +2217,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/serializer/issues", - "source": "https://github.com/schmittjoh/serializer/tree/3.32.1" + "source": "https://github.com/schmittjoh/serializer/tree/3.32.2" }, "funding": [ { @@ -2227,7 +2225,7 @@ "type": "github" } ], - "time": "2024-12-03T22:30:06+00:00" + "time": "2025-01-03T22:43:29+00:00" }, { "name": "jms/serializer-bundle", @@ -2395,16 +2393,16 @@ }, { "name": "league/csv", - "version": "9.20.1", + "version": "9.21.0", "source": { "type": "git", "url": "https://github.com/thephpleague/csv.git", - "reference": "491d1e79e973a7370c7571dc0fe4a7241f4936ee" + "reference": "72196d11ebba22d868954cb39c0c7346207430cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/csv/zipball/491d1e79e973a7370c7571dc0fe4a7241f4936ee", - "reference": "491d1e79e973a7370c7571dc0fe4a7241f4936ee", + "url": "https://api.github.com/repos/thephpleague/csv/zipball/72196d11ebba22d868954cb39c0c7346207430cc", + "reference": "72196d11ebba22d868954cb39c0c7346207430cc", "shasum": "" }, "require": { @@ -2478,7 +2476,7 @@ "type": "github" } ], - "time": "2024-12-18T10:11:15+00:00" + "time": "2025-01-08T19:27:58+00:00" }, { "name": "lorenzo/pinky", @@ -3055,16 +3053,16 @@ }, { "name": "nelmio/api-doc-bundle", - "version": "v4.33.4", + "version": "v4.34.1", "source": { "type": "git", "url": "https://github.com/nelmio/NelmioApiDocBundle.git", - "reference": "c43171895161c8eb342bc5fc5eb21760dd91b646" + "reference": "a2497e108281f28f2d79a9ddc2d1795e6c2777e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nelmio/NelmioApiDocBundle/zipball/c43171895161c8eb342bc5fc5eb21760dd91b646", - "reference": "c43171895161c8eb342bc5fc5eb21760dd91b646", + "url": "https://api.github.com/repos/nelmio/NelmioApiDocBundle/zipball/a2497e108281f28f2d79a9ddc2d1795e6c2777e9", + "reference": "a2497e108281f28f2d79a9ddc2d1795e6c2777e9", "shasum": "" }, "require": { @@ -3075,17 +3073,17 @@ "psr/cache": "^1.0 || ^2.0 || ^3.0", "psr/container": "^1.0 || ^2.0", "psr/log": "^1.0 || ^2.0 || ^3.0", - "symfony/config": "^5.4 || ^6.4 || ^7.0", - "symfony/console": "^5.4 || ^6.4 || ^7.0", - "symfony/dependency-injection": "^5.4 || ^6.4 || ^7.0", + "symfony/config": "^5.4 || ^6.4 || ^7.1", + "symfony/console": "^5.4 || ^6.4 || ^7.1", + "symfony/dependency-injection": "^5.4 || ^6.4 || ^7.1", "symfony/deprecation-contracts": "^2.1 || ^3", - "symfony/framework-bundle": "^5.4.24 || ^6.4 || ^7.0", - "symfony/http-foundation": "^5.4 || ^6.4 || ^7.0", - "symfony/http-kernel": "^5.4 || ^6.4 || ^7.0", - "symfony/options-resolver": "^5.4 || ^6.4 || ^7.0", - "symfony/property-info": "^5.4.10 || ^6.4 || ^7.0", - "symfony/routing": "^5.4 || ^6.4 || ^7.0", - "zircote/swagger-php": "^4.6.1" + "symfony/framework-bundle": "^5.4.24 || ^6.4 || ^7.1", + "symfony/http-foundation": "^5.4 || ^6.4 || ^7.1", + "symfony/http-kernel": "^5.4 || ^6.4 || ^7.1", + "symfony/options-resolver": "^5.4 || ^6.4 || ^7.1", + "symfony/property-info": "^5.4.10 || ^6.4 || ^7.1", + "symfony/routing": "^5.4 || ^6.4 || ^7.1", + "zircote/swagger-php": "^4.11.1 || ^5.0" }, "conflict": { "zircote/swagger-php": "4.8.7" @@ -3103,21 +3101,21 @@ "phpstan/phpstan-strict-rules": "^1.5", "phpstan/phpstan-symfony": "^1.3", "phpunit/phpunit": "^9.6 || ^10.5", - "symfony/asset": "^5.4 || ^6.4 || ^7.0", - "symfony/browser-kit": "^5.4 || ^6.4 || ^7.0", - "symfony/cache": "^5.4 || ^6.4 || ^7.0", - "symfony/dom-crawler": "^5.4 || ^6.4 || ^7.0", - "symfony/expression-language": "^5.4 || ^6.4 || ^7.0", - "symfony/form": "^5.4 || ^6.4 || ^7.0", + "symfony/asset": "^5.4 || ^6.4 || ^7.1", + "symfony/browser-kit": "^5.4 || ^6.4 || ^7.1", + "symfony/cache": "^5.4 || ^6.4 || ^7.1", + "symfony/dom-crawler": "^5.4 || ^6.4 || ^7.1", + "symfony/expression-language": "^5.4 || ^6.4 || ^7.1", + "symfony/form": "^5.4 || ^6.4 || ^7.1", "symfony/phpunit-bridge": "^6.4", - "symfony/property-access": "^5.4 || ^6.4 || ^7.0", - "symfony/security-csrf": "^5.4 || ^6.4 || ^7.0", - "symfony/serializer": "^5.4 || ^6.4 || ^7.0", - "symfony/stopwatch": "^5.4 || ^6.4 || ^7.0", - "symfony/templating": "^5.4 || ^6.4 || ^7.0", - "symfony/twig-bundle": "^5.4 || ^6.4 || ^7.0", - "symfony/uid": "^5.4 || ^6.4 || ^7.0", - "symfony/validator": "^5.4 || ^6.4 || ^7.0", + "symfony/property-access": "^5.4 || ^6.4 || ^7.1", + "symfony/security-csrf": "^5.4 || ^6.4 || ^7.1", + "symfony/serializer": "^5.4 || ^6.4 || ^7.1", + "symfony/stopwatch": "^5.4 || ^6.4 || ^7.1", + "symfony/templating": "^5.4 || ^6.4 || ^7.1", + "symfony/twig-bundle": "^5.4 || ^6.4 || ^7.1", + "symfony/uid": "^5.4 || ^6.4 || ^7.1", + "symfony/validator": "^5.4 || ^6.4 || ^7.1", "willdurand/hateoas-bundle": "^1.0 || ^2.0" }, "suggest": { @@ -3165,7 +3163,7 @@ ], "support": { "issues": "https://github.com/nelmio/NelmioApiDocBundle/issues", - "source": "https://github.com/nelmio/NelmioApiDocBundle/tree/v4.33.4" + "source": "https://github.com/nelmio/NelmioApiDocBundle/tree/v4.34.1" }, "funding": [ { @@ -3173,7 +3171,7 @@ "type": "github" } ], - "time": "2024-11-08T15:00:51+00:00" + "time": "2025-01-17T12:19:57+00:00" }, { "name": "nelmio/cors-bundle", @@ -3237,6 +3235,64 @@ }, "time": "2024-06-24T21:25:28+00:00" }, + { + "name": "nikic/php-parser", + "version": "v5.4.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "447a020a1f875a434d62f2a401f53b82a396e494" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", + "reference": "447a020a1f875a434d62f2a401f53b82a396e494", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" + }, + "time": "2024-12-30T11:07:19+00:00" + }, { "name": "onelogin/php-saml", "version": "4.2.0", @@ -3843,16 +3899,16 @@ }, { "name": "phpoffice/phpspreadsheet", - "version": "2.3.4", + "version": "2.3.6", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "01c4122a12327378ab5d97a56a4cbab07e7fa70b" + "reference": "098b848ee6688cb9a252d9ce97889defc517ee88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/01c4122a12327378ab5d97a56a4cbab07e7fa70b", - "reference": "01c4122a12327378ab5d97a56a4cbab07e7fa70b", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/098b848ee6688cb9a252d9ce97889defc517ee88", + "reference": "098b848ee6688cb9a252d9ce97889defc517ee88", "shasum": "" }, "require": { @@ -3941,9 +3997,9 @@ ], "support": { "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/2.3.4" + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/2.3.6" }, - "time": "2024-12-08T15:43:45+00:00" + "time": "2025-01-12T03:22:26+00:00" }, { "name": "phpoffice/phpword", @@ -4606,20 +4662,20 @@ }, { "name": "scheb/2fa-backup-code", - "version": "v6.12.0", + "version": "v6.13.1", "source": { "type": "git", "url": "https://github.com/scheb/2fa-backup-code.git", - "reference": "1ad84e7eb26eb425c609e03097cac99387dde44c" + "reference": "6dceeb5be0f6339d76f8e380ee09631c8bbebc7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scheb/2fa-backup-code/zipball/1ad84e7eb26eb425c609e03097cac99387dde44c", - "reference": "1ad84e7eb26eb425c609e03097cac99387dde44c", + "url": "https://api.github.com/repos/scheb/2fa-backup-code/zipball/6dceeb5be0f6339d76f8e380ee09631c8bbebc7e", + "reference": "6dceeb5be0f6339d76f8e380ee09631c8bbebc7e", "shasum": "" }, "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "scheb/2fa-bundle": "self.version" }, "type": "library", @@ -4649,27 +4705,27 @@ "two-step" ], "support": { - "source": "https://github.com/scheb/2fa-backup-code/tree/v6.12.0" + "source": "https://github.com/scheb/2fa-backup-code/tree/v6.13.1" }, - "time": "2023-12-03T15:44:26+00:00" + "time": "2024-11-29T19:22:48+00:00" }, { "name": "scheb/2fa-bundle", - "version": "v6.12.0", + "version": "v6.13.1", "source": { "type": "git", "url": "https://github.com/scheb/2fa-bundle.git", - "reference": "6e51477c53070f27ac3e3d36be1a991870db415a" + "reference": "8eadd57ebc2078ef273dca72b1ac4bd283812346" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scheb/2fa-bundle/zipball/6e51477c53070f27ac3e3d36be1a991870db415a", - "reference": "6e51477c53070f27ac3e3d36be1a991870db415a", + "url": "https://api.github.com/repos/scheb/2fa-bundle/zipball/8eadd57ebc2078ef273dca72b1ac4bd283812346", + "reference": "8eadd57ebc2078ef273dca72b1ac4bd283812346", "shasum": "" }, "require": { "ext-json": "*", - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "symfony/config": "^5.4 || ^6.0", "symfony/dependency-injection": "^5.4 || ^6.0", "symfony/event-dispatcher": "^5.4 || ^6.0", @@ -4717,27 +4773,27 @@ "two-step" ], "support": { - "source": "https://github.com/scheb/2fa-bundle/tree/v6.12.0" + "source": "https://github.com/scheb/2fa-bundle/tree/v6.13.1" }, - "time": "2023-12-03T16:02:15+00:00" + "time": "2024-11-29T19:29:49+00:00" }, { "name": "scheb/2fa-totp", - "version": "v6.12.0", + "version": "v6.13.1", "source": { "type": "git", "url": "https://github.com/scheb/2fa-totp.git", - "reference": "a233f4638b75941e97f089c4c917f6101f2983e3" + "reference": "e72879c8e0aca5d21fdcfdecdaa98a1d1cad8612" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scheb/2fa-totp/zipball/a233f4638b75941e97f089c4c917f6101f2983e3", - "reference": "a233f4638b75941e97f089c4c917f6101f2983e3", + "url": "https://api.github.com/repos/scheb/2fa-totp/zipball/e72879c8e0aca5d21fdcfdecdaa98a1d1cad8612", + "reference": "e72879c8e0aca5d21fdcfdecdaa98a1d1cad8612", "shasum": "" }, "require": { "paragonie/constant_time_encoding": "^2.4", - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "scheb/2fa-bundle": "self.version", "spomky-labs/otphp": "^10.0 || ^11.0" }, @@ -4768,9 +4824,9 @@ "two-step" ], "support": { - "source": "https://github.com/scheb/2fa-totp/tree/v6.12.0" + "source": "https://github.com/scheb/2fa-totp/tree/v6.13.1" }, - "time": "2023-12-03T15:44:26+00:00" + "time": "2024-11-29T19:22:48+00:00" }, { "name": "setasign/fpdi", @@ -5111,12 +5167,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -5318,16 +5374,16 @@ }, { "name": "symfony/console", - "version": "v6.4.15", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f1fc6f47283e27336e7cebb9e8946c8de7bff9bd" + "reference": "799445db3f15768ecc382ac5699e6da0520a0a04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f1fc6f47283e27336e7cebb9e8946c8de7bff9bd", - "reference": "f1fc6f47283e27336e7cebb9e8946c8de7bff9bd", + "url": "https://api.github.com/repos/symfony/console/zipball/799445db3f15768ecc382ac5699e6da0520a0a04", + "reference": "799445db3f15768ecc382ac5699e6da0520a0a04", "shasum": "" }, "require": { @@ -5392,7 +5448,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.15" + "source": "https://github.com/symfony/console/tree/v6.4.17" }, "funding": [ { @@ -5408,7 +5464,7 @@ "type": "tidelift" } ], - "time": "2024-11-06T14:19:14+00:00" + "time": "2024-12-07T12:07:30+00:00" }, { "name": "symfony/css-selector", @@ -5575,12 +5631,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -5625,16 +5681,16 @@ }, { "name": "symfony/doctrine-bridge", - "version": "v6.4.16", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/doctrine-bridge.git", - "reference": "429a4b6786901afcc085ee16dc3f2be621f33488" + "reference": "2ba7e747a944b69f9f583c35173560afebbff995" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/429a4b6786901afcc085ee16dc3f2be621f33488", - "reference": "429a4b6786901afcc085ee16dc3f2be621f33488", + "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/2ba7e747a944b69f9f583c35173560afebbff995", + "reference": "2ba7e747a944b69f9f583c35173560afebbff995", "shasum": "" }, "require": { @@ -5713,7 +5769,7 @@ "description": "Provides integration for Doctrine with various Symfony components", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/doctrine-bridge/tree/v6.4.16" + "source": "https://github.com/symfony/doctrine-bridge/tree/v6.4.17" }, "funding": [ { @@ -5729,7 +5785,7 @@ "type": "tidelift" } ], - "time": "2024-11-25T12:00:20+00:00" + "time": "2024-12-18T10:42:42+00:00" }, { "name": "symfony/dotenv", @@ -5807,16 +5863,16 @@ }, { "name": "symfony/error-handler", - "version": "v6.4.14", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "9e024324511eeb00983ee76b9aedc3e6ecd993d9" + "reference": "37ad2380e8c1a8cf62a1200a5c10080b679b446c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/9e024324511eeb00983ee76b9aedc3e6ecd993d9", - "reference": "9e024324511eeb00983ee76b9aedc3e6ecd993d9", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/37ad2380e8c1a8cf62a1200a5c10080b679b446c", + "reference": "37ad2380e8c1a8cf62a1200a5c10080b679b446c", "shasum": "" }, "require": { @@ -5862,7 +5918,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.4.14" + "source": "https://github.com/symfony/error-handler/tree/v6.4.17" }, "funding": [ { @@ -5878,7 +5934,7 @@ "type": "tidelift" } ], - "time": "2024-11-05T15:34:40+00:00" + "time": "2024-12-06T13:30:51+00:00" }, { "name": "symfony/event-dispatcher", @@ -5980,12 +6036,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -6168,16 +6224,16 @@ }, { "name": "symfony/finder", - "version": "v6.4.13", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "daea9eca0b08d0ed1dc9ab702a46128fd1be4958" + "reference": "1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/daea9eca0b08d0ed1dc9ab702a46128fd1be4958", - "reference": "daea9eca0b08d0ed1dc9ab702a46128fd1be4958", + "url": "https://api.github.com/repos/symfony/finder/zipball/1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7", + "reference": "1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7", "shasum": "" }, "require": { @@ -6212,7 +6268,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.4.13" + "source": "https://github.com/symfony/finder/tree/v6.4.17" }, "funding": [ { @@ -6228,7 +6284,7 @@ "type": "tidelift" } ], - "time": "2024-10-01T08:30:56+00:00" + "time": "2024-12-29T13:51:37+00:00" }, { "name": "symfony/flex", @@ -6397,16 +6453,16 @@ }, { "name": "symfony/framework-bundle", - "version": "v6.4.13", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/framework-bundle.git", - "reference": "e8b0bd921f9bd35ea4d1508067c3f3f6e2036418" + "reference": "17d8ae2e7aa77154f942e8ac48849ac718b0963f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/e8b0bd921f9bd35ea4d1508067c3f3f6e2036418", - "reference": "e8b0bd921f9bd35ea4d1508067c3f3f6e2036418", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/17d8ae2e7aa77154f942e8ac48849ac718b0963f", + "reference": "17d8ae2e7aa77154f942e8ac48849ac718b0963f", "shasum": "" }, "require": { @@ -6526,7 +6582,7 @@ "description": "Provides a tight integration between Symfony components and the Symfony full-stack framework", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/framework-bundle/tree/v6.4.13" + "source": "https://github.com/symfony/framework-bundle/tree/v6.4.17" }, "funding": [ { @@ -6542,27 +6598,27 @@ "type": "tidelift" } ], - "time": "2024-10-25T15:07:50+00:00" + "time": "2024-12-19T14:08:41+00:00" }, { "name": "symfony/http-client", - "version": "v6.4.16", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "60a113666fa67e598abace38e5f46a0954d8833d" + "reference": "88898d842eb29d7e1a903724c94e90a6ca9c0509" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/60a113666fa67e598abace38e5f46a0954d8833d", - "reference": "60a113666fa67e598abace38e5f46a0954d8833d", + "url": "https://api.github.com/repos/symfony/http-client/zipball/88898d842eb29d7e1a903724c94e90a6ca9c0509", + "reference": "88898d842eb29d7e1a903724c94e90a6ca9c0509", "shasum": "" }, "require": { "php": ">=8.1", "psr/log": "^1|^2|^3", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/http-client-contracts": "~3.4.3|^3.5.1", + "symfony/http-client-contracts": "~3.4.4|^3.5.2", "symfony/service-contracts": "^2.5|^3" }, "conflict": { @@ -6619,7 +6675,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v6.4.16" + "source": "https://github.com/symfony/http-client/tree/v6.4.17" }, "funding": [ { @@ -6635,7 +6691,7 @@ "type": "tidelift" } ], - "time": "2024-11-27T11:52:33+00:00" + "time": "2024-12-18T12:18:31+00:00" }, { "name": "symfony/http-client-contracts", @@ -6794,16 +6850,16 @@ }, { "name": "symfony/http-kernel", - "version": "v6.4.16", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "8838b5b21d807923b893ccbfc2cbeda0f1bc00f0" + "reference": "c5647393c5ce11833d13e4b70fff4b571d4ac710" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/8838b5b21d807923b893ccbfc2cbeda0f1bc00f0", - "reference": "8838b5b21d807923b893ccbfc2cbeda0f1bc00f0", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/c5647393c5ce11833d13e4b70fff4b571d4ac710", + "reference": "c5647393c5ce11833d13e4b70fff4b571d4ac710", "shasum": "" }, "require": { @@ -6888,7 +6944,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.4.16" + "source": "https://github.com/symfony/http-kernel/tree/v6.4.17" }, "funding": [ { @@ -6904,7 +6960,7 @@ "type": "tidelift" } ], - "time": "2024-11-27T12:49:36+00:00" + "time": "2024-12-31T14:49:31+00:00" }, { "name": "symfony/intl", @@ -7071,16 +7127,16 @@ }, { "name": "symfony/mime", - "version": "v6.4.13", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "1de1cf14d99b12c7ebbb850491ec6ae3ed468855" + "reference": "ea87c8850a54ff039d3e0ab4ae5586dd4e6c0232" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/1de1cf14d99b12c7ebbb850491ec6ae3ed468855", - "reference": "1de1cf14d99b12c7ebbb850491ec6ae3ed468855", + "url": "https://api.github.com/repos/symfony/mime/zipball/ea87c8850a54ff039d3e0ab4ae5586dd4e6c0232", + "reference": "ea87c8850a54ff039d3e0ab4ae5586dd4e6c0232", "shasum": "" }, "require": { @@ -7136,7 +7192,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.4.13" + "source": "https://github.com/symfony/mime/tree/v6.4.17" }, "funding": [ { @@ -7152,7 +7208,7 @@ "type": "tidelift" } ], - "time": "2024-10-25T15:07:50+00:00" + "time": "2024-12-02T11:09:41+00:00" }, { "name": "symfony/monolog-bridge", @@ -7669,16 +7725,16 @@ }, { "name": "symfony/property-info", - "version": "v6.4.16", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/property-info.git", - "reference": "e4782ec1c2b6896e820896357f6a3d02249e63eb" + "reference": "38b125d78e67668159f75383a293ec0c5d3f2963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-info/zipball/e4782ec1c2b6896e820896357f6a3d02249e63eb", - "reference": "e4782ec1c2b6896e820896357f6a3d02249e63eb", + "url": "https://api.github.com/repos/symfony/property-info/zipball/38b125d78e67668159f75383a293ec0c5d3f2963", + "reference": "38b125d78e67668159f75383a293ec0c5d3f2963", "shasum": "" }, "require": { @@ -7733,7 +7789,7 @@ "validator" ], "support": { - "source": "https://github.com/symfony/property-info/tree/v6.4.16" + "source": "https://github.com/symfony/property-info/tree/v6.4.17" }, "funding": [ { @@ -7749,7 +7805,7 @@ "type": "tidelift" } ], - "time": "2024-11-27T10:18:02+00:00" + "time": "2024-12-26T19:01:29+00:00" }, { "name": "symfony/rate-limiter", @@ -8460,12 +8516,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -8781,12 +8837,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -8842,16 +8898,16 @@ }, { "name": "symfony/twig-bridge", - "version": "v6.4.16", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/twig-bridge.git", - "reference": "32ec012ed4f6426441a66014471bdb26674744be" + "reference": "238e1aac992b5231c66faf10131ace7bdba97065" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/32ec012ed4f6426441a66014471bdb26674744be", - "reference": "32ec012ed4f6426441a66014471bdb26674744be", + "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/238e1aac992b5231c66faf10131ace7bdba97065", + "reference": "238e1aac992b5231c66faf10131ace7bdba97065", "shasum": "" }, "require": { @@ -8931,7 +8987,7 @@ "description": "Provides integration for Twig with various Symfony components", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/twig-bridge/tree/v6.4.16" + "source": "https://github.com/symfony/twig-bridge/tree/v6.4.17" }, "funding": [ { @@ -8947,7 +9003,7 @@ "type": "tidelift" } ], - "time": "2024-11-25T11:59:11+00:00" + "time": "2024-12-19T14:08:41+00:00" }, { "name": "symfony/twig-bundle", @@ -9035,16 +9091,16 @@ }, { "name": "symfony/validator", - "version": "v6.4.16", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "9b0d1988b56511706bc91d96ead39acd77aaf34d" + "reference": "a3c19a0e542d427c207e22242043ef35b5b99a2c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/9b0d1988b56511706bc91d96ead39acd77aaf34d", - "reference": "9b0d1988b56511706bc91d96ead39acd77aaf34d", + "url": "https://api.github.com/repos/symfony/validator/zipball/a3c19a0e542d427c207e22242043ef35b5b99a2c", + "reference": "a3c19a0e542d427c207e22242043ef35b5b99a2c", "shasum": "" }, "require": { @@ -9112,7 +9168,7 @@ "description": "Provides tools to validate values", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/validator/tree/v6.4.16" + "source": "https://github.com/symfony/validator/tree/v6.4.17" }, "funding": [ { @@ -9128,7 +9184,7 @@ "type": "tidelift" } ], - "time": "2024-11-27T09:48:51+00:00" + "time": "2024-12-29T12:50:19+00:00" }, { "name": "symfony/var-dumper", @@ -9493,7 +9549,7 @@ }, { "name": "twig/cssinliner-extra", - "version": "v3.17.0", + "version": "v3.18.0", "source": { "type": "git", "url": "https://github.com/twigphp/cssinliner-extra.git", @@ -9546,7 +9602,7 @@ "twig" ], "support": { - "source": "https://github.com/twigphp/cssinliner-extra/tree/v3.17.0" + "source": "https://github.com/twigphp/cssinliner-extra/tree/v3.18.0" }, "funding": [ { @@ -9562,7 +9618,7 @@ }, { "name": "twig/extra-bundle", - "version": "v3.17.0", + "version": "v3.18.0", "source": { "type": "git", "url": "https://github.com/twigphp/twig-extra-bundle.git", @@ -9620,7 +9676,7 @@ "twig" ], "support": { - "source": "https://github.com/twigphp/twig-extra-bundle/tree/v3.17.0" + "source": "https://github.com/twigphp/twig-extra-bundle/tree/v3.18.0" }, "funding": [ { @@ -9636,7 +9692,7 @@ }, { "name": "twig/inky-extra", - "version": "v3.17.0", + "version": "v3.18.0", "source": { "type": "git", "url": "https://github.com/twigphp/inky-extra.git", @@ -9690,7 +9746,7 @@ "twig" ], "support": { - "source": "https://github.com/twigphp/inky-extra/tree/v3.17.0" + "source": "https://github.com/twigphp/inky-extra/tree/v3.18.0" }, "funding": [ { @@ -9706,7 +9762,7 @@ }, { "name": "twig/intl-extra", - "version": "v3.17.0", + "version": "v3.18.0", "source": { "type": "git", "url": "https://github.com/twigphp/intl-extra.git", @@ -9754,7 +9810,7 @@ "twig" ], "support": { - "source": "https://github.com/twigphp/intl-extra/tree/v3.17.0" + "source": "https://github.com/twigphp/intl-extra/tree/v3.18.0" }, "funding": [ { @@ -9770,7 +9826,7 @@ }, { "name": "twig/string-extra", - "version": "v3.17.0", + "version": "v3.18.0", "source": { "type": "git", "url": "https://github.com/twigphp/string-extra.git", @@ -9821,7 +9877,7 @@ "unicode" ], "support": { - "source": "https://github.com/twigphp/string-extra/tree/v3.17.0" + "source": "https://github.com/twigphp/string-extra/tree/v3.18.0" }, "funding": [ { @@ -9837,16 +9893,16 @@ }, { "name": "twig/twig", - "version": "v3.17.1", + "version": "v3.18.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "677ef8da6497a03048192aeeb5aa3018e379ac71" + "reference": "acffa88cc2b40dbe42eaf3a5025d6c0d4600cc50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/677ef8da6497a03048192aeeb5aa3018e379ac71", - "reference": "677ef8da6497a03048192aeeb5aa3018e379ac71", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/acffa88cc2b40dbe42eaf3a5025d6c0d4600cc50", + "reference": "acffa88cc2b40dbe42eaf3a5025d6c0d4600cc50", "shasum": "" }, "require": { @@ -9901,7 +9957,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.17.1" + "source": "https://github.com/twigphp/Twig/tree/v3.18.0" }, "funding": [ { @@ -9913,7 +9969,7 @@ "type": "tidelift" } ], - "time": "2024-12-12T09:58:10+00:00" + "time": "2024-12-29T10:51:50+00:00" }, { "name": "webmozart/assert", @@ -10074,36 +10130,41 @@ }, { "name": "zircote/swagger-php", - "version": "4.11.1", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/zircote/swagger-php.git", - "reference": "7df10e8ec47db07c031db317a25bef962b4e5de1" + "reference": "7708510b17502a416214148edaa8c9958b23b6cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zircote/swagger-php/zipball/7df10e8ec47db07c031db317a25bef962b4e5de1", - "reference": "7df10e8ec47db07c031db317a25bef962b4e5de1", + "url": "https://api.github.com/repos/zircote/swagger-php/zipball/7708510b17502a416214148edaa8c9958b23b6cd", + "reference": "7708510b17502a416214148edaa8c9958b23b6cd", "shasum": "" }, "require": { "ext-json": "*", - "php": ">=7.2", + "nikic/php-parser": "^4.19 || ^5.0", + "php": ">=7.4", "psr/log": "^1.1 || ^2.0 || ^3.0", "symfony/deprecation-contracts": "^2 || ^3", - "symfony/finder": ">=2.2", - "symfony/yaml": ">=3.3" + "symfony/finder": "^5.0 || ^6.0 || ^7.0", + "symfony/yaml": "^5.0 || ^6.0 || ^7.0" + }, + "conflict": { + "symfony/process": ">=6, <6.4.14" }, "require-dev": { "composer/package-versions-deprecated": "^1.11", - "doctrine/annotations": "^1.7 || ^2.0", - "friendsofphp/php-cs-fixer": "^2.17 || 3.62.0", - "phpstan/phpstan": "^1.6", - "phpunit/phpunit": ">=8", - "vimeo/psalm": "^4.23" + "doctrine/annotations": "^2.0", + "friendsofphp/php-cs-fixer": "^3.62.0", + "phpstan/phpstan": "^1.6 || ^2.0", + "phpunit/phpunit": "^9.0", + "rector/rector": "^1.0 || ^2.0", + "vimeo/psalm": "^4.30 || ^5.0" }, "suggest": { - "doctrine/annotations": "^1.7 || ^2.0" + "doctrine/annotations": "^2.0" }, "bin": [ "bin/openapi" @@ -10111,7 +10172,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { @@ -10149,9 +10210,9 @@ ], "support": { "issues": "https://github.com/zircote/swagger-php/issues", - "source": "https://github.com/zircote/swagger-php/tree/4.11.1" + "source": "https://github.com/zircote/swagger-php/tree/5.0.3" }, - "time": "2024-10-15T19:20:02+00:00" + "time": "2025-01-15T21:02:43+00:00" } ], "packages-dev": [ @@ -10774,16 +10835,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.65.0", + "version": "v3.68.1", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "79d4f3e77b250a7d8043d76c6af8f0695e8a469f" + "reference": "b9db2b2ea3cdba7201067acee46f984ef2397cff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/79d4f3e77b250a7d8043d76c6af8f0695e8a469f", - "reference": "79d4f3e77b250a7d8043d76c6af8f0695e8a469f", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/b9db2b2ea3cdba7201067acee46f984ef2397cff", + "reference": "b9db2b2ea3cdba7201067acee46f984ef2397cff", "shasum": "" }, "require": { @@ -10800,17 +10861,17 @@ "react/promise": "^2.0 || ^3.0", "react/socket": "^1.0", "react/stream": "^1.0", - "sebastian/diff": "^4.0 || ^5.0 || ^6.0", - "symfony/console": "^5.4 || ^6.0 || ^7.0", - "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", - "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", - "symfony/finder": "^5.4 || ^6.0 || ^7.0", - "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", - "symfony/polyfill-mbstring": "^1.28", - "symfony/polyfill-php80": "^1.28", - "symfony/polyfill-php81": "^1.28", - "symfony/process": "^5.4 || ^6.0 || ^7.0", - "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" + "sebastian/diff": "^4.0 || ^5.1 || ^6.0", + "symfony/console": "^5.4 || ^6.4 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.4 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.4 || ^7.0", + "symfony/finder": "^5.4 || ^6.4 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.4 || ^7.0", + "symfony/polyfill-mbstring": "^1.31", + "symfony/polyfill-php80": "^1.31", + "symfony/polyfill-php81": "^1.31", + "symfony/process": "^5.4 || ^6.4 || ^7.2", + "symfony/stopwatch": "^5.4 || ^6.4 || ^7.0" }, "require-dev": { "facile-it/paraunit": "^1.3.1 || ^2.4", @@ -10822,9 +10883,9 @@ "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5", - "phpunit/phpunit": "^9.6.21 || ^10.5.38 || ^11.4.3", - "symfony/var-dumper": "^5.4.47 || ^6.4.15 || ^7.1.8", - "symfony/yaml": "^5.4.45 || ^6.4.13 || ^7.1.6" + "phpunit/phpunit": "^9.6.22 || ^10.5.40 || ^11.5.2", + "symfony/var-dumper": "^5.4.48 || ^6.4.15 || ^7.2.0", + "symfony/yaml": "^5.4.45 || ^6.4.13 || ^7.2.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -10865,7 +10926,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.65.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.68.1" }, "funding": [ { @@ -10873,7 +10934,7 @@ "type": "github" } ], - "time": "2024-11-25T00:39:24+00:00" + "time": "2025-01-17T09:20:36+00:00" }, { "name": "masterminds/html5", @@ -10942,64 +11003,6 @@ }, "time": "2024-03-31T07:05:07+00:00" }, - { - "name": "nikic/php-parser", - "version": "v5.3.1", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-json": "*", - "ext-tokenizer": "*", - "php": ">=7.4" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" - }, - "time": "2024-10-08T18:51:32+00:00" - }, { "name": "phar-io/manifest", "version": "2.0.4", @@ -11120,16 +11123,16 @@ }, { "name": "phpstan/phpstan", - "version": "2.0.4", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "50d276fc3bf1430ec315f2f109bbde2769821524" + "reference": "cd6e973e04b4c2b94c86e8612b5a65f0da0e08e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/50d276fc3bf1430ec315f2f109bbde2769821524", - "reference": "50d276fc3bf1430ec315f2f109bbde2769821524", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/cd6e973e04b4c2b94c86e8612b5a65f0da0e08e7", + "reference": "cd6e973e04b4c2b94c86e8612b5a65f0da0e08e7", "shasum": "" }, "require": { @@ -11174,7 +11177,7 @@ "type": "github" } ], - "time": "2024-12-17T17:14:01+00:00" + "time": "2025-01-05T16:43:48+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -11395,16 +11398,16 @@ }, { "name": "phpstan/phpstan-symfony", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-symfony.git", - "reference": "1ef4dce2baabd464c2dd3109d051bad94efa1e79" + "reference": "c08cd8e54a08d651bc402d304cfa161c3c3766c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/1ef4dce2baabd464c2dd3109d051bad94efa1e79", - "reference": "1ef4dce2baabd464c2dd3109d051bad94efa1e79", + "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/c08cd8e54a08d651bc402d304cfa161c3c3766c4", + "reference": "c08cd8e54a08d651bc402d304cfa161c3c3766c4", "shasum": "" }, "require": { @@ -11460,9 +11463,9 @@ "description": "Symfony Framework extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-symfony/issues", - "source": "https://github.com/phpstan/phpstan-symfony/tree/2.0.0" + "source": "https://github.com/phpstan/phpstan-symfony/tree/2.0.1" }, - "time": "2024-11-06T10:13:40+00:00" + "time": "2025-01-04T13:58:15+00:00" }, { "name": "phpunit/php-code-coverage", @@ -11787,16 +11790,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.40", + "version": "10.5.41", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e6ddda95af52f69c1e0c7b4f977cccb58048798c" + "reference": "e76586fa3d49714f230221734b44892e384109d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e6ddda95af52f69c1e0c7b4f977cccb58048798c", - "reference": "e6ddda95af52f69c1e0c7b4f977cccb58048798c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e76586fa3d49714f230221734b44892e384109d7", + "reference": "e76586fa3d49714f230221734b44892e384109d7", "shasum": "" }, "require": { @@ -11868,7 +11871,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.40" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.41" }, "funding": [ { @@ -11884,7 +11887,7 @@ "type": "tidelift" } ], - "time": "2024-12-21T05:49:06+00:00" + "time": "2025-01-13T09:33:05+00:00" }, { "name": "react/cache", @@ -11960,33 +11963,33 @@ }, { "name": "react/child-process", - "version": "v0.6.5", + "version": "v0.6.6", "source": { "type": "git", "url": "https://github.com/reactphp/child-process.git", - "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43" + "reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/child-process/zipball/e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", - "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", + "url": "https://api.github.com/repos/reactphp/child-process/zipball/1721e2b93d89b745664353b9cfc8f155ba8a6159", + "reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159", "shasum": "" }, "require": { "evenement/evenement": "^3.0 || ^2.0 || ^1.0", "php": ">=5.3.0", "react/event-loop": "^1.2", - "react/stream": "^1.2" + "react/stream": "^1.4" }, "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", - "react/socket": "^1.8", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/socket": "^1.16", "sebastian/environment": "^5.0 || ^3.0 || ^2.0 || ^1.0" }, "type": "library", "autoload": { "psr-4": { - "React\\ChildProcess\\": "src" + "React\\ChildProcess\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -12023,19 +12026,15 @@ ], "support": { "issues": "https://github.com/reactphp/child-process/issues", - "source": "https://github.com/reactphp/child-process/tree/v0.6.5" + "source": "https://github.com/reactphp/child-process/tree/v0.6.6" }, "funding": [ { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2022-09-16T13:41:56+00:00" + "time": "2025-01-01T16:37:48+00:00" }, { "name": "react/dns", @@ -13625,16 +13624,16 @@ }, { "name": "symfony/web-profiler-bundle", - "version": "v6.4.16", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/web-profiler-bundle.git", - "reference": "2d58fd04ac0d3c6279cadd0105959083ef1d7f5b" + "reference": "979f8ee1a4f2464c20f3fef0d2111827fef2e97e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/web-profiler-bundle/zipball/2d58fd04ac0d3c6279cadd0105959083ef1d7f5b", - "reference": "2d58fd04ac0d3c6279cadd0105959083ef1d7f5b", + "url": "https://api.github.com/repos/symfony/web-profiler-bundle/zipball/979f8ee1a4f2464c20f3fef0d2111827fef2e97e", + "reference": "979f8ee1a4f2464c20f3fef0d2111827fef2e97e", "shasum": "" }, "require": { @@ -13687,7 +13686,7 @@ "dev" ], "support": { - "source": "https://github.com/symfony/web-profiler-bundle/tree/v6.4.16" + "source": "https://github.com/symfony/web-profiler-bundle/tree/v6.4.17" }, "funding": [ { @@ -13703,7 +13702,7 @@ "type": "tidelift" } ], - "time": "2024-11-19T10:11:25+00:00" + "time": "2024-12-08T23:00:41+00:00" }, { "name": "theseer/tokenizer", diff --git a/package.json b/package.json index c708bed7..61c8f83f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "kimai2", + "name": "kimai", "homepage": "https://github.com/kimai/kimai", - "license": "MIT", + "license": "AGPL", "maintainers": [ { "name": "Kevin Papst", diff --git a/phpstan.neon b/phpstan.neon index 17926fc7..996d18a7 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -452,11 +452,6 @@ parameters: count: 1 path: src/Command/ResetDevelopmentCommand.php - - - message: "#^Cannot call method find\\(\\) on Symfony\\\\Component\\\\Console\\\\Application\\|null\\.$#" - count: 1 - path: src/Command/ResetTestCommand.php - - message: "#^Access to an undefined property SimpleXMLElement\\|false\\:\\:\\$file\\.$#" count: 1 diff --git a/public/build/app-rtl.6669505e.js b/public/build/app-rtl.6669505e.js deleted file mode 100644 index 72ecdf35..00000000 --- a/public/build/app-rtl.6669505e.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkkimai2=self.webpackChunkkimai2||[]).push([[113],{2395:function(i,n,u){u(876)},876:function(i,n,u){"use strict";u.r(n)}},function(i){var n;n=2395,i(i.s=n)}]); \ No newline at end of file diff --git a/public/build/app-rtl.7a875ca7.js b/public/build/app-rtl.7a875ca7.js new file mode 100644 index 00000000..93d3c365 --- /dev/null +++ b/public/build/app-rtl.7a875ca7.js @@ -0,0 +1 @@ +(self.webpackChunkkimai=self.webpackChunkkimai||[]).push([[113],{2395:function(i,n,u){u(876)},876:function(i,n,u){"use strict";u.r(n)}},function(i){var n;n=2395,i(i.s=n)}]); \ No newline at end of file diff --git a/public/build/app.7719f352.js b/public/build/app.7719f352.js new file mode 100644 index 00000000..c4dd0825 --- /dev/null +++ b/public/build/app.7719f352.js @@ -0,0 +1,2 @@ +/*! For license information please see app.7719f352.js.LICENSE.txt */ +(self.webpackChunkkimai=self.webpackChunkkimai||[]).push([[524],{4028:function(t,e,n){n(4975),n(9828),n.g.KimaiPaginatedBoxWidget=n(4100).A,n.g.KimaiReloadPageWidget=n(5170).A,n.g.KimaiColor=n(9997).A,n.g.KimaiStorage=n(5247).A},9828:function(t,e,n){"use strict";class i extends Error{}class s extends i{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class r extends i{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class o extends i{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class a extends i{}class l extends i{constructor(t){super(`Invalid unit ${t}`)}}class c extends i{}class u extends i{constructor(){super("Zone is an abstract class")}}const d="numeric",h="short",p="long",m={year:d,month:d,day:d},f={year:d,month:h,day:d},g={year:d,month:h,day:d,weekday:h},v={year:d,month:p,day:d},y={year:d,month:p,day:d,weekday:p},b={hour:d,minute:d},_={hour:d,minute:d,second:d},w={hour:d,minute:d,second:d,timeZoneName:h},k={hour:d,minute:d,second:d,timeZoneName:p},T={hour:d,minute:d,hourCycle:"h23"},x={hour:d,minute:d,second:d,hourCycle:"h23"},E={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:h},D={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:p},S={year:d,month:d,day:d,hour:d,minute:d},O={year:d,month:d,day:d,hour:d,minute:d,second:d},L={year:d,month:h,day:d,hour:d,minute:d},C={year:d,month:h,day:d,hour:d,minute:d,second:d},M={year:d,month:h,day:d,weekday:h,hour:d,minute:d},A={year:d,month:p,day:d,hour:d,minute:d,timeZoneName:h},I={year:d,month:p,day:d,hour:d,minute:d,second:d,timeZoneName:h},N={year:d,month:p,day:d,weekday:p,hour:d,minute:d,timeZoneName:p},F={year:d,month:p,day:d,weekday:p,hour:d,minute:d,second:d,timeZoneName:p};class P{get type(){throw new u}get name(){throw new u}get ianaName(){return this.name}get isUniversal(){throw new u}offsetName(t,e){throw new u}formatOffset(t,e){throw new u}offset(t){throw new u}equals(t){throw new u}get isValid(){throw new u}}let j=null;class q extends P{static get instance(){return null===j&&(j=new q),j}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:e,locale:n}){return ne(t,e,n)}formatOffset(t,e){return oe(this.offset(t),e)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return"system"===t.type}get isValid(){return!0}}let H={};const V={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let $={};class R extends P{static create(t){return $[t]||($[t]=new R(t)),$[t]}static resetCache(){$={},H={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch(t){return!1}}constructor(t){super(),this.zoneName=t,this.valid=R.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:e,locale:n}){return ne(t,e,n,this.name)}formatOffset(t,e){return oe(this.offset(t),e)}offset(t){const e=new Date(t);if(isNaN(e))return NaN;const n=(i=this.name,H[i]||(H[i]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:i,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),H[i]);var i;let[s,r,o,a,l,c,u]=n.formatToParts?function(t,e){const n=t.formatToParts(e),i=[];for(let t=0;t=0?h:1e3+h,(Qt({year:s,month:r,day:o,hour:24===l?0:l,minute:c,second:u,millisecond:0})-d)/6e4}equals(t){return"iana"===t.type&&t.name===this.name}get isValid(){return this.valid}}let W={};let B={};function z(t,e={}){const n=JSON.stringify([t,e]);let i=B[n];return i||(i=new Intl.DateTimeFormat(t,e),B[n]=i),i}let Y={};let U={};let Z=null;let J={};function K(t,e,n,i){const s=t.listingMode();return"error"===s?null:"en"===s?n(e):i(e)}class G{constructor(t,e,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:i,floor:s,...r}=n;if(!e||Object.keys(r).length>0){const e={useGrouping:!1,...n};n.padTo>0&&(e.minimumIntegerDigits=n.padTo),this.inf=function(t,e={}){const n=JSON.stringify([t,e]);let i=Y[n];return i||(i=new Intl.NumberFormat(t,e),Y[n]=i),i}(t,e)}}format(t){if(this.inf){const e=this.floor?Math.floor(t):t;return this.inf.format(e)}return Bt(this.floor?Math.floor(t):Zt(t,3),this.padTo)}}class Q{constructor(t,e,n){let i;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=t;else if("fixed"===t.zone.type){const e=t.offset/60*-1,n=e>=0?`Etc/GMT+${e}`:`Etc/GMT${e}`;0!==t.offset&&R.create(n).valid?(i=n,this.dt=t):(i="UTC",this.dt=0===t.offset?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else"system"===t.zone.type?this.dt=t:"iana"===t.zone.type?(this.dt=t,i=t.zone.name):(i="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const s={...this.opts};s.timeZone=s.timeZone||i,this.dtf=z(e,s)}format(){return this.originalZone?this.formatToParts().map((({value:t})=>t)).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map((t=>{if("timeZoneName"===t.type){const e=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:e}}return t})):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class X{constructor(t,e,n){this.opts={style:"long",...n},!e&&qt()&&(this.rtf=function(t,e={}){const{base:n,...i}=e,s=JSON.stringify([t,i]);let r=U[s];return r||(r=new Intl.RelativeTimeFormat(t,e),U[s]=r),r}(t,n))}format(t,e){return this.rtf?this.rtf.format(t,e):function(t,e,n="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},r=-1===["hours","minutes","seconds"].indexOf(t);if("auto"===n&&r){const n="days"===t;switch(e){case 1:return n?"tomorrow":`next ${s[t][0]}`;case-1:return n?"yesterday":`last ${s[t][0]}`;case 0:return n?"today":`this ${s[t][0]}`}}const o=Object.is(e,-0)||e<0,a=Math.abs(e),l=1===a,c=s[t],u=i?l?c[1]:c[2]||c[1]:l?s[t][0]:t;return o?`${a} ${u} ago`:`in ${a} ${u}`}(e,t,this.opts.numeric,"long"!==this.opts.style)}formatToParts(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]}}const tt={firstDay:1,minimalDays:4,weekend:[6,7]};class et{static fromOpts(t){return et.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,e,n,i,s=!1){const r=t||bt.defaultLocale,o=r||(s?"en-US":Z||(Z=(new Intl.DateTimeFormat).resolvedOptions().locale,Z)),a=e||bt.defaultNumberingSystem,l=n||bt.defaultOutputCalendar,c=Rt(i)||bt.defaultWeekSettings;return new et(o,a,l,c,r)}static resetCache(){Z=null,B={},Y={},U={}}static fromObject({locale:t,numberingSystem:e,outputCalendar:n,weekSettings:i}={}){return et.create(t,e,n,i)}constructor(t,e,n,i,s){const[r,o,a]=function(t){const e=t.indexOf("-x-");-1!==e&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(-1===n)return[t];{let e,i;try{e=z(t).resolvedOptions(),i=t}catch(s){const r=t.substring(0,n);e=z(r).resolvedOptions(),i=r}const{numberingSystem:s,calendar:r}=e;return[i,s,r]}}(t);this.locale=r,this.numberingSystem=e||o||null,this.outputCalendar=n||a||null,this.weekSettings=i,this.intl=function(t,e,n){return n||e?(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`),t):t}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){var t;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(t=this).numberingSystem||"latn"===t.numberingSystem)&&("latn"===t.numberingSystem||!t.locale||t.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),e=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t&&e?"en":"intl"}clone(t){return t&&0!==Object.getOwnPropertyNames(t).length?et.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Rt(t.weekSettings)||this.weekSettings,t.defaultToEN||!1):this}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,e=!1){return K(this,t,de,(()=>{const n=e?{month:t,day:"numeric"}:{month:t},i=e?"format":"standalone";return this.monthsCache[i][t]||(this.monthsCache[i][t]=function(t){const e=[];for(let n=1;n<=12;n++){const i=fi.utc(2009,n,1);e.push(t(i))}return e}((t=>this.extract(t,n,"month")))),this.monthsCache[i][t]}))}weekdays(t,e=!1){return K(this,t,fe,(()=>{const n=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},i=e?"format":"standalone";return this.weekdaysCache[i][t]||(this.weekdaysCache[i][t]=function(t){const e=[];for(let n=1;n<=7;n++){const i=fi.utc(2016,11,13+n);e.push(t(i))}return e}((t=>this.extract(t,n,"weekday")))),this.weekdaysCache[i][t]}))}meridiems(){return K(this,void 0,(()=>ge),(()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[fi.utc(2016,11,13,9),fi.utc(2016,11,13,19)].map((e=>this.extract(e,t,"dayperiod")))}return this.meridiemCache}))}eras(t){return K(this,t,_e,(()=>{const e={era:t};return this.eraCache[t]||(this.eraCache[t]=[fi.utc(-40,1,1),fi.utc(2017,1,1)].map((t=>this.extract(t,e,"era")))),this.eraCache[t]}))}extract(t,e,n){const i=this.dtFormatter(t,e).formatToParts().find((t=>t.type.toLowerCase()===n));return i?i.value:null}numberFormatter(t={}){return new G(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,e={}){return new Q(t,this.intl,e)}relFormatter(t={}){return new X(this.intl,this.isEnglish(),t)}listFormatter(t={}){return function(t,e={}){const n=JSON.stringify([t,e]);let i=W[n];return i||(i=new Intl.ListFormat(t,e),W[n]=i),i}(this.intl,t)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Ht()?function(t){let e=J[t];if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,J[t]=e}return e}(this.locale):tt}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let nt=null;class it extends P{static get utcInstance(){return null===nt&&(nt=new it(0)),nt}static instance(t){return 0===t?it.utcInstance:new it(t)}static parseSpecifier(t){if(t){const e=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new it(ie(e[1],e[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${oe(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${oe(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,e){return oe(this.fixed,e)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return"fixed"===t.type&&t.fixed===this.fixed}get isValid(){return!0}}class st extends P{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function rt(t,e){if(Ft(t)||null===t)return e;if(t instanceof P)return t;if("string"==typeof t){const n=t.toLowerCase();return"default"===n?e:"local"===n||"system"===n?q.instance:"utc"===n||"gmt"===n?it.utcInstance:it.parseSpecifier(n)||R.create(t)}return Pt(t)?it.instance(t):"object"==typeof t&&"offset"in t&&"function"==typeof t.offset?t:new st(t)}const ot={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},at={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},lt=ot.hanidec.replace(/[\[|\]]/g,"").split("");let ct={};function ut({numberingSystem:t},e=""){const n=t||"latn";return ct[n]||(ct[n]={}),ct[n][e]||(ct[n][e]=new RegExp(`${ot[n]}${e}`)),ct[n][e]}let dt,ht=()=>Date.now(),pt="system",mt=null,ft=null,gt=null,vt=60,yt=null;class bt{static get now(){return ht}static set now(t){ht=t}static set defaultZone(t){pt=t}static get defaultZone(){return rt(pt,q.instance)}static get defaultLocale(){return mt}static set defaultLocale(t){mt=t}static get defaultNumberingSystem(){return ft}static set defaultNumberingSystem(t){ft=t}static get defaultOutputCalendar(){return gt}static set defaultOutputCalendar(t){gt=t}static get defaultWeekSettings(){return yt}static set defaultWeekSettings(t){yt=Rt(t)}static get twoDigitCutoffYear(){return vt}static set twoDigitCutoffYear(t){vt=t%100}static get throwOnInvalid(){return dt}static set throwOnInvalid(t){dt=t}static resetCaches(){et.resetCache(),R.resetCache(),fi.resetCache(),ct={}}}class _t{constructor(t,e){this.reason=t,this.explanation=e}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const wt=[0,31,59,90,120,151,181,212,243,273,304,334],kt=[0,31,60,91,121,152,182,213,244,274,305,335];function Tt(t,e){return new _t("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function xt(t,e,n){const i=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return 0===s?7:s}function Et(t,e,n){return n+(Jt(t)?kt:wt)[e-1]}function Dt(t,e){const n=Jt(t)?kt:wt,i=n.findIndex((t=>tte(i,e,n)?(l=i+1,c=1):l=i,{weekYear:l,weekNumber:c,weekday:a,...ae(t)}}function Lt(t,e=4,n=1){const{weekYear:i,weekNumber:s,weekday:r}=t,o=St(xt(i,1,e),n),a=Kt(i);let l,c=7*s+r-o-7+e;c<1?(l=i-1,c+=Kt(l)):c>a?(l=i+1,c-=Kt(i)):l=i;const{month:u,day:d}=Dt(l,c);return{year:l,month:u,day:d,...ae(t)}}function Ct(t){const{year:e,month:n,day:i}=t;return{year:e,ordinal:Et(e,n,i),...ae(t)}}function Mt(t){const{year:e,ordinal:n}=t,{month:i,day:s}=Dt(e,n);return{year:e,month:i,day:s,...ae(t)}}function At(t,e){if(!Ft(t.localWeekday)||!Ft(t.localWeekNumber)||!Ft(t.localWeekYear)){if(!Ft(t.weekday)||!Ft(t.weekNumber)||!Ft(t.weekYear))throw new a("Cannot mix locale-based week fields with ISO-based week fields");return Ft(t.localWeekday)||(t.weekday=t.localWeekday),Ft(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),Ft(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function It(t){const e=jt(t.year),n=Wt(t.month,1,12),i=Wt(t.day,1,Gt(t.year,t.month));return e?n?!i&&Tt("day",t.day):Tt("month",t.month):Tt("year",t.year)}function Nt(t){const{hour:e,minute:n,second:i,millisecond:s}=t,r=Wt(e,0,23)||24===e&&0===n&&0===i&&0===s,o=Wt(n,0,59),a=Wt(i,0,59),l=Wt(s,0,999);return r?o?a?!l&&Tt("millisecond",s):Tt("second",i):Tt("minute",n):Tt("hour",e)}function Ft(t){return void 0===t}function Pt(t){return"number"==typeof t}function jt(t){return"number"==typeof t&&t%1==0}function qt(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function Ht(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(t){return!1}}function Vt(t,e,n){if(0!==t.length)return t.reduce(((t,i)=>{const s=[e(i),i];return t&&n(t[0],s[0])===t[0]?t:s}),null)[1]}function $t(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Rt(t){if(null==t)return null;if("object"!=typeof t)throw new c("Week settings must be an object");if(!Wt(t.firstDay,1,7)||!Wt(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some((t=>!Wt(t,1,7))))throw new c("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function Wt(t,e,n){return jt(t)&&t>=e&&t<=n}function Bt(t,e=2){let n;return n=t<0?"-"+(""+-t).padStart(e,"0"):(""+t).padStart(e,"0"),n}function zt(t){return Ft(t)||null===t||""===t?void 0:parseInt(t,10)}function Yt(t){return Ft(t)||null===t||""===t?void 0:parseFloat(t)}function Ut(t){if(!Ft(t)&&null!==t&&""!==t){const e=1e3*parseFloat("0."+t);return Math.floor(e)}}function Zt(t,e,n=!1){const i=10**e;return(n?Math.trunc:Math.round)(t*i)/i}function Jt(t){return t%4==0&&(t%100!=0||t%400==0)}function Kt(t){return Jt(t)?366:365}function Gt(t,e){const n=function(t,e){return t-e*Math.floor(t/e)}(e-1,12)+1;return 2===n?Jt(t+(e-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Qt(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function Xt(t,e,n){return-St(xt(t,1,e),n)+e-1}function te(t,e=4,n=1){const i=Xt(t,e,n),s=Xt(t+1,e,n);return(Kt(t)-i+s)/7}function ee(t){return t>99?t:t>bt.twoDigitCutoffYear?1900+t:2e3+t}function ne(t,e,n,i=null){const s=new Date(t),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(r.timeZone=i);const o={timeZoneName:e,...r},a=new Intl.DateTimeFormat(n,o).formatToParts(s).find((t=>"timezonename"===t.type.toLowerCase()));return a?a.value:null}function ie(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const i=parseInt(e,10)||0;return 60*n+(n<0||Object.is(n,-0)?-i:i)}function se(t){const e=Number(t);if("boolean"==typeof t||""===t||Number.isNaN(e))throw new c(`Invalid unit value ${t}`);return e}function re(t,e){const n={};for(const i in t)if($t(t,i)){const s=t[i];if(null==s)continue;n[e(i)]=se(s)}return n}function oe(t,e){const n=Math.trunc(Math.abs(t/60)),i=Math.trunc(Math.abs(t%60)),s=t>=0?"+":"-";switch(e){case"short":return`${s}${Bt(n,2)}:${Bt(i,2)}`;case"narrow":return`${s}${n}${i>0?`:${i}`:""}`;case"techie":return`${s}${Bt(n,2)}${Bt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function ae(t){return function(t,e){return e.reduce(((e,n)=>(e[n]=t[n],e)),{})}(t,["hour","minute","second","millisecond"])}const le=["January","February","March","April","May","June","July","August","September","October","November","December"],ce=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ue=["J","F","M","A","M","J","J","A","S","O","N","D"];function de(t){switch(t){case"narrow":return[...ue];case"short":return[...ce];case"long":return[...le];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const he=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pe=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],me=["M","T","W","T","F","S","S"];function fe(t){switch(t){case"narrow":return[...me];case"short":return[...pe];case"long":return[...he];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const ge=["AM","PM"],ve=["Before Christ","Anno Domini"],ye=["BC","AD"],be=["B","A"];function _e(t){switch(t){case"narrow":return[...be];case"short":return[...ye];case"long":return[...ve];default:return null}}function we(t,e){let n="";for(const i of t)i.literal?n+=i.val:n+=e(i.val);return n}const ke={D:m,DD:f,DDD:v,DDDD:y,t:b,tt:_,ttt:w,tttt:k,T:T,TT:x,TTT:E,TTTT:D,f:S,ff:L,fff:A,ffff:N,F:O,FF:C,FFF:I,FFFF:F};class Te{static create(t,e={}){return new Te(t,e)}static parseFormat(t){let e=null,n="",i=!1;const s=[];for(let r=0;r0&&s.push({literal:i||/^\s+$/.test(n),val:n}),e=null,n="",i=!i):i||o===e?n+=o:(n.length>0&&s.push({literal:/^\s+$/.test(n),val:n}),n=o,e=o)}return n.length>0&&s.push({literal:i||/^\s+$/.test(n),val:n}),s}static macroTokenToFormatOpts(t){return ke[t]}constructor(t,e){this.opts=e,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,e){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(t,{...this.opts,...e}).format()}dtFormatter(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e})}formatDateTime(t,e){return this.dtFormatter(t,e).format()}formatDateTimeParts(t,e){return this.dtFormatter(t,e).formatToParts()}formatInterval(t,e){return this.dtFormatter(t.start,e).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,e){return this.dtFormatter(t,e).resolvedOptions()}num(t,e=0){if(this.opts.forceSimple)return Bt(t,e);const n={...this.opts};return e>0&&(n.padTo=e),this.loc.numberFormatter(n).format(t)}formatDateTimeFromString(t,e){const n="en"===this.loc.listingMode(),i=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,s=(e,n)=>this.loc.extract(t,e,n),r=e=>t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):"",o=()=>n?function(t){return ge[t.hour<12?0:1]}(t):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(e,i)=>n?function(t,e){return de(e)[t.month-1]}(t,e):s(i?{month:e}:{month:e,day:"numeric"},"month"),l=(e,i)=>n?function(t,e){return fe(e)[t.weekday-1]}(t,e):s(i?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday"),c=e=>{const n=Te.macroTokenToFormatOpts(e);return n?this.formatWithSystemDefault(t,n):e},u=e=>n?function(t,e){return _e(e)[t.year<0?0:1]}(t,e):s({era:e},"era");return we(Te.parseFormat(e),(e=>{switch(e){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12==0?12:t.hour%12);case"hh":return this.num(t.hour%12==0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return o();case"d":return i?s({day:"numeric"},"day"):this.num(t.day);case"dd":return i?s({day:"2-digit"},"day"):this.num(t.day,2);case"c":case"E":return this.num(t.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return i?s({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return i?s({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return i?s({month:"numeric"},"month"):this.num(t.month);case"MM":return i?s({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return i?s({year:"numeric"},"year"):this.num(t.year);case"yy":return i?s({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return i?s({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return i?s({year:"numeric"},"year"):this.num(t.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return c(e)}}))}formatDurationFromString(t,e){const n=t=>{switch(t[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=Te.parseFormat(e),s=i.reduce(((t,{literal:e,val:n})=>e?t:t.concat(n)),[]);return we(i,(t=>e=>{const i=n(e);return i?this.num(t.get(i),e.length):e})(t.shiftTo(...s.map(n).filter((t=>t)))))}}const xe=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ee(...t){const e=t.reduce(((t,e)=>t+e.source),"");return RegExp(`^${e}$`)}function De(...t){return e=>t.reduce((([t,n,i],s)=>{const[r,o,a]=s(e,i);return[{...t,...r},o||n,a]}),[{},null,1]).slice(0,2)}function Se(t,...e){if(null==t)return[null,null];for(const[n,i]of e){const e=n.exec(t);if(e)return i(e)}return[null,null]}function Oe(...t){return(e,n)=>{const i={};let s;for(s=0;svoid 0!==t&&(e||t&&u)?-t:t;return[{years:h(Yt(n)),months:h(Yt(i)),weeks:h(Yt(s)),days:h(Yt(r)),hours:h(Yt(o)),minutes:h(Yt(a)),seconds:h(Yt(l),"-0"===l),milliseconds:h(Ut(c),d)}]}const Be={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ze(t,e,n,i,s,r,o){const a={year:2===e.length?ee(zt(e)):zt(e),month:ce.indexOf(n)+1,day:zt(i),hour:zt(s),minute:zt(r)};return o&&(a.second=zt(o)),t&&(a.weekday=t.length>3?he.indexOf(t)+1:pe.indexOf(t)+1),a}const Ye=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ue(t){const[,e,n,i,s,r,o,a,l,c,u,d]=t,h=ze(e,s,i,n,r,o,a);let p;return p=l?Be[l]:c?0:ie(u,d),[h,new it(p)]}const Ze=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Je=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Ke=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Ge(t){const[,e,n,i,s,r,o,a]=t;return[ze(e,s,i,n,r,o,a),it.utcInstance]}function Qe(t){const[,e,n,i,s,r,o,a]=t;return[ze(e,a,n,i,s,r,o),it.utcInstance]}const Xe=Ee(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ae),tn=Ee(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Ae),en=Ee(/(\d{4})-?(\d{3})/,Ae),nn=Ee(Me),sn=De((function(t,e){return[{year:je(t,e),month:je(t,e+1,1),day:je(t,e+2,1)},null,e+3]}),qe,He,Ve),rn=De(Ie,qe,He,Ve),on=De(Ne,qe,He,Ve),an=De(qe,He,Ve);const ln=De(qe);const cn=Ee(/(\d{4})-(\d\d)-(\d\d)/,Pe),un=Ee(Fe),dn=De(qe,He,Ve);const hn="Invalid Duration",pn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},mn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...pn},fn=365.2425,gn=30.436875,vn={years:{quarters:4,months:12,weeks:52.1775,days:fn,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:gn,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...pn},yn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],bn=yn.slice(0).reverse();function _n(t,e,n=!1){const i={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Tn(i)}function wn(t,e){let n=e.milliseconds??0;for(const i of bn.slice(1))e[i]&&(n+=e[i]*t[i].milliseconds);return n}function kn(t,e){const n=wn(t,e)<0?-1:1;yn.reduceRight(((i,s)=>{if(Ft(e[s]))return i;if(i){const r=e[i]*n,o=t[s][i],a=Math.floor(r/o);e[s]+=a*n,e[i]-=a*o*n}return s}),null),yn.reduce(((n,i)=>{if(Ft(e[i]))return n;if(n){const s=e[n]%1;e[n]-=s,e[i]+=s*t[n][i]}return i}),null)}class Tn{constructor(t){const e="longterm"===t.conversionAccuracy||!1;let n=e?vn:mn;t.matrix&&(n=t.matrix),this.values=t.values,this.loc=t.loc||et.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(t,e){return Tn.fromObject({milliseconds:t},e)}static fromObject(t,e={}){if(null==t||"object"!=typeof t)throw new c("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new Tn({values:re(t,Tn.normalizeUnit),loc:et.fromObject(e),conversionAccuracy:e.conversionAccuracy,matrix:e.matrix})}static fromDurationLike(t){if(Pt(t))return Tn.fromMillis(t);if(Tn.isDuration(t))return t;if("object"==typeof t)return Tn.fromObject(t);throw new c(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,e){const[n]=function(t){return Se(t,[Re,We])}(t);return n?Tn.fromObject(n,e):Tn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,e){const[n]=function(t){return Se(t,[$e,ln])}(t);return n?Tn.fromObject(n,e):Tn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,e=null){if(!t)throw new c("need to specify a reason the Duration is invalid");const n=t instanceof _t?t:new _t(t,e);if(bt.throwOnInvalid)throw new o(n);return new Tn({invalid:n})}static normalizeUnit(t){const e={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t?t.toLowerCase():t];if(!e)throw new l(t);return e}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,e={}){const n={...e,floor:!1!==e.round&&!1!==e.floor};return this.isValid?Te.create(this.loc,n).formatDurationFromString(this,t):hn}toHuman(t={}){if(!this.isValid)return hn;const e=yn.map((e=>{const n=this.values[e];return Ft(n)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:e.slice(0,-1)}).format(n)})).filter((t=>t));return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(e)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return 0!==this.years&&(t+=this.years+"Y"),0===this.months&&0===this.quarters||(t+=this.months+3*this.quarters+"M"),0!==this.weeks&&(t+=this.weeks+"W"),0!==this.days&&(t+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(t+="T"),0!==this.hours&&(t+=this.hours+"H"),0!==this.minutes&&(t+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(t+=Zt(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===t&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const e=this.toMillis();if(e<0||e>=864e5)return null;t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1};return fi.fromMillis(e,{zone:"UTC"}).toISOTime(t)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?wn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const e=Tn.fromDurationLike(t),n={};for(const t of yn)($t(e.values,t)||$t(this.values,t))&&(n[t]=e.get(t)+this.get(t));return _n(this,{values:n},!0)}minus(t){if(!this.isValid)return this;const e=Tn.fromDurationLike(t);return this.plus(e.negate())}mapUnits(t){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=se(t(this.values[n],n));return _n(this,{values:e},!0)}get(t){return this[Tn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;return _n(this,{values:{...this.values,...re(t,Tn.normalizeUnit)}})}reconfigure({locale:t,numberingSystem:e,conversionAccuracy:n,matrix:i}={}){return _n(this,{loc:this.loc.clone({locale:t,numberingSystem:e}),matrix:i,conversionAccuracy:n})}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return kn(this.matrix,t),_n(this,{values:t},!0)}rescale(){if(!this.isValid)return this;return _n(this,{values:function(t){const e={};for(const[n,i]of Object.entries(t))0!==i&&(e[n]=i);return e}(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...t){if(!this.isValid)return this;if(0===t.length)return this;t=t.map((t=>Tn.normalizeUnit(t)));const e={},n={},i=this.toObject();let s;for(const r of yn)if(t.indexOf(r)>=0){s=r;let t=0;for(const e in n)t+=this.matrix[e][r]*n[e],n[e]=0;Pt(i[r])&&(t+=i[r]);const o=Math.trunc(t);e[r]=o,n[r]=(1e3*t-1e3*o)/1e3}else Pt(i[r])&&(n[r]=i[r]);for(const t in n)0!==n[t]&&(e[s]+=t===s?n[t]:n[t]/this.matrix[s][t]);return kn(this.matrix,e),_n(this,{values:e},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const e of Object.keys(this.values))t[e]=0===this.values[e]?0:-this.values[e];return _n(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid)return!1;if(!this.loc.equals(t.loc))return!1;for(const i of yn)if(e=this.values[i],n=t.values[i],!(void 0===e||0===e?void 0===n||0===n:e===n))return!1;var e,n;return!0}}const xn="Invalid Interval";class En{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,e=null){if(!t)throw new c("need to specify a reason the Interval is invalid");const n=t instanceof _t?t:new _t(t,e);if(bt.throwOnInvalid)throw new r(n);return new En({invalid:n})}static fromDateTimes(t,e){const n=gi(t),i=gi(e),s=function(t,e){return t&&t.isValid?e&&e.isValid?et}isBefore(t){return!!this.isValid&&this.e<=t}contains(t){return!!this.isValid&&(this.s<=t&&this.e>t)}set({start:t,end:e}={}){return this.isValid?En.fromDateTimes(t||this.s,e||this.e):this}splitAt(...t){if(!this.isValid)return[];const e=t.map(gi).filter((t=>this.contains(t))).sort(((t,e)=>t.toMillis()-e.toMillis())),n=[];let{s:i}=this,s=0;for(;i+this.e?this.e:t;n.push(En.fromDateTimes(i,r)),i=r,s+=1}return n}splitBy(t){const e=Tn.fromDurationLike(t);if(!this.isValid||!e.isValid||0===e.as("milliseconds"))return[];let n,{s:i}=this,s=1;const r=[];for(;it*s)));n=+t>+this.e?this.e:t,r.push(En.fromDateTimes(i,n)),i=n,s+=1}return r}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s=t.e)}equals(t){return!(!this.isValid||!t.isValid)&&(this.s.equals(t.s)&&this.e.equals(t.e))}intersection(t){if(!this.isValid)return this;const e=this.s>t.s?this.s:t.s,n=this.e=n?null:En.fromDateTimes(e,n)}union(t){if(!this.isValid)return this;const e=this.st.e?this.e:t.e;return En.fromDateTimes(e,n)}static merge(t){const[e,n]=t.sort(((t,e)=>t.s-e.s)).reduce((([t,e],n)=>e?e.overlaps(n)||e.abutsStart(n)?[t,e.union(n)]:[t.concat([e]),n]:[t,n]),[[],null]);return n&&e.push(n),e}static xor(t){let e=null,n=0;const i=[],s=t.map((t=>[{time:t.s,type:"s"},{time:t.e,type:"e"}])),r=Array.prototype.concat(...s).sort(((t,e)=>t.time-e.time));for(const t of r)n+="s"===t.type?1:-1,1===n?e=t.time:(e&&+e!=+t.time&&i.push(En.fromDateTimes(e,t.time)),e=null);return En.merge(i)}difference(...t){return En.xor([this].concat(t)).map((t=>this.intersection(t))).filter((t=>t&&!t.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:xn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=m,e={}){return this.isValid?Te.create(this.s.loc.clone(e),t).formatInterval(this):xn}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:xn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:xn}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:xn}toFormat(t,{separator:e=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${e}${this.e.toFormat(t)}`:xn}toDuration(t,e){return this.isValid?this.e.diff(this.s,t,e):Tn.invalid(this.invalidReason)}mapEndpoints(t){return En.fromDateTimes(t(this.s),t(this.e))}}class Dn{static hasDST(t=bt.defaultZone){const e=fi.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(t){return R.isValidZone(t)}static normalizeZone(t){return rt(t,bt.defaultZone)}static getStartOfWeek({locale:t=null,locObj:e=null}={}){return(e||et.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:e=null}={}){return(e||et.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:e=null}={}){return(e||et.create(t)).getWeekendDays().slice()}static months(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||et.create(e,n,s)).months(t)}static monthsFormat(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||et.create(e,n,s)).months(t,!0)}static weekdays(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null}={}){return(i||et.create(e,n,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null}={}){return(i||et.create(e,n,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return et.create(t).meridiems()}static eras(t="short",{locale:e=null}={}){return et.create(e,null,"gregory").eras(t)}static features(){return{relative:qt(),localeWeek:Ht()}}}function Sn(t,e){const n=t=>t.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(e)-n(t);return Math.floor(Tn.fromMillis(i).as("days"))}function On(t,e,n,i){let[s,r,o,a]=function(t,e,n){const i=[["years",(t,e)=>e.year-t.year],["quarters",(t,e)=>e.quarter-t.quarter+4*(e.year-t.year)],["months",(t,e)=>e.month-t.month+12*(e.year-t.year)],["weeks",(t,e)=>{const n=Sn(t,e);return(n-n%7)/7}],["days",Sn]],s={},r=t;let o,a;for(const[l,c]of i)n.indexOf(l)>=0&&(o=l,s[l]=c(t,e),a=r.plus(s),a>e?(s[l]--,(t=r.plus(s))>e&&(a=t,s[l]--,t=r.plus(s))):t=a);return[t,s,a,o]}(t,e,n);const l=e-s,c=n.filter((t=>["hours","minutes","seconds","milliseconds"].indexOf(t)>=0));0===c.length&&(o0?Tn.fromMillis(l,i).shiftTo(...c).plus(u):u}function Ln(t,e=(t=>t)){return{regex:t,deser:([t])=>e(function(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n=n&&i<=s&&(e+=i-n)}}return parseInt(e,10)}return e}(t))}}const Cn=`[ ${String.fromCharCode(160)}]`,Mn=new RegExp(Cn,"g");function An(t){return t.replace(/\./g,"\\.?").replace(Mn,Cn)}function In(t){return t.replace(/\./g,"").replace(Mn," ").toLowerCase()}function Nn(t,e){return null===t?null:{regex:RegExp(t.map(An).join("|")),deser:([n])=>t.findIndex((t=>In(n)===In(t)))+e}}function Fn(t,e){return{regex:t,deser:([,t,e])=>ie(t,e),groups:e}}function Pn(t){return{regex:t,deser:([t])=>t}}const jn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let qn=null;function Hn(t,e){return Array.prototype.concat(...t.map((t=>function(t,e){if(t.literal)return t;const n=Rn(Te.macroTokenToFormatOpts(t.val),e);return null==n||n.includes(void 0)?t:n}(t,e))))}class Vn{constructor(t,e){if(this.locale=t,this.format=e,this.tokens=Hn(Te.parseFormat(e),t),this.units=this.tokens.map((e=>function(t,e){const n=ut(e),i=ut(e,"{2}"),s=ut(e,"{3}"),r=ut(e,"{4}"),o=ut(e,"{6}"),a=ut(e,"{1,2}"),l=ut(e,"{1,3}"),c=ut(e,"{1,6}"),u=ut(e,"{1,9}"),d=ut(e,"{2,4}"),h=ut(e,"{4,6}"),p=t=>{return{regex:RegExp((e=t.val,e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([t])=>t,literal:!0};var e},m=(m=>{if(t.literal)return p(m);switch(m.val){case"G":return Nn(e.eras("short"),0);case"GG":return Nn(e.eras("long"),0);case"y":return Ln(c);case"yy":case"kk":return Ln(d,ee);case"yyyy":case"kkkk":return Ln(r);case"yyyyy":return Ln(h);case"yyyyyy":return Ln(o);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Ln(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Ln(i);case"MMM":return Nn(e.months("short",!0),1);case"MMMM":return Nn(e.months("long",!0),1);case"LLL":return Nn(e.months("short",!1),1);case"LLLL":return Nn(e.months("long",!1),1);case"o":case"S":return Ln(l);case"ooo":case"SSS":return Ln(s);case"u":return Pn(u);case"uu":return Pn(a);case"uuu":case"E":case"c":return Ln(n);case"a":return Nn(e.meridiems(),0);case"EEE":return Nn(e.weekdays("short",!1),1);case"EEEE":return Nn(e.weekdays("long",!1),1);case"ccc":return Nn(e.weekdays("short",!0),1);case"cccc":return Nn(e.weekdays("long",!0),1);case"Z":case"ZZ":return Fn(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return Fn(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return Pn(/[a-z_+-/]{1,256}?/i);case" ":return Pn(/[^\S\n\r]/);default:return p(m)}})(t)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return m.token=t,m}(e,t))),this.disqualifyingUnit=this.units.find((t=>t.invalidReason)),!this.disqualifyingUnit){const[t,e]=[`^${(n=this.units).map((t=>t.regex)).reduce(((t,e)=>`${t}(${e.source})`),"")}$`,n];this.regex=RegExp(t,"i"),this.handlers=e}var n}explainFromTokens(t){if(this.isValid){const[e,n]=function(t,e,n){const i=t.match(e);if(i){const t={};let e=1;for(const s in n)if($t(n,s)){const r=n[s],o=r.groups?r.groups+1:1;!r.literal&&r.token&&(t[r.token.val[0]]=r.deser(i.slice(e,e+o))),e+=o}return[i,t]}return[i,{}]}(t,this.regex,this.handlers),[i,s,r]=n?function(t){let e,n=null;return Ft(t.z)||(n=R.create(t.z)),Ft(t.Z)||(n||(n=new it(t.Z)),e=t.Z),Ft(t.q)||(t.M=3*(t.q-1)+1),Ft(t.h)||(t.h<12&&1===t.a?t.h+=12:12===t.h&&0===t.a&&(t.h=0)),0===t.G&&t.y&&(t.y=-t.y),Ft(t.u)||(t.S=Ut(t.u)),[Object.keys(t).reduce(((e,n)=>{const i=(t=>{switch(t){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return i&&(e[i]=t[n]),e}),{}),n,e]}(n):[null,null,void 0];if($t(n,"a")&&$t(n,"H"))throw new a("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:e,matches:n,result:i,zone:s,specificOffset:r}}return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function $n(t,e,n){return new Vn(t,n).explainFromTokens(e)}function Rn(t,e){if(!t)return null;const n=Te.create(e,t).dtFormatter((qn||(qn=fi.fromMillis(1555555555555)),qn)),i=n.formatToParts(),s=n.resolvedOptions();return i.map((e=>function(t,e,n){const{type:i,value:s}=t;if("literal"===i){const t=/^\s+$/.test(s);return{literal:!t,val:t?" ":s}}const r=e[i];let o=i;"hour"===i&&(o=null!=e.hour12?e.hour12?"hour12":"hour24":null!=e.hourCycle?"h11"===e.hourCycle||"h12"===e.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let a=jn[o];if("object"==typeof a&&(a=a[r]),a)return{literal:!1,val:a}}(e,t,s)))}const Wn="Invalid DateTime",Bn=864e13;function zn(t){return new _t("unsupported zone",`the zone "${t.name}" is not supported`)}function Yn(t){return null===t.weekData&&(t.weekData=Ot(t.c)),t.weekData}function Un(t){return null===t.localWeekData&&(t.localWeekData=Ot(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Zn(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new fi({...n,...e,old:n})}function Jn(t,e,n){let i=t-60*e*1e3;const s=n.offset(i);if(e===s)return[i,e];i-=60*(s-e)*1e3;const r=n.offset(i);return s===r?[i,s]:[t-60*Math.min(s,r)*1e3,Math.max(s,r)]}function Kn(t,e){const n=new Date(t+=60*e*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Gn(t,e,n){return Jn(Qt(t),e,n)}function Qn(t,e){const n=t.o,i=t.c.year+Math.trunc(e.years),s=t.c.month+Math.trunc(e.months)+3*Math.trunc(e.quarters),r={...t.c,year:i,month:s,day:Math.min(t.c.day,Gt(i,s))+Math.trunc(e.days)+7*Math.trunc(e.weeks)},o=Tn.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=Qt(r);let[l,c]=Jn(a,n,t.zone);return 0!==o&&(l+=o,c=t.zone.offset(l)),{ts:l,o:c}}function Xn(t,e,n,i,s,r){const{setZone:o,zone:a}=n;if(t&&0!==Object.keys(t).length||e){const i=e||a,s=fi.fromObject(t,{...n,zone:i,specificOffset:r});return o?s:s.setZone(a)}return fi.invalid(new _t("unparsable",`the input "${s}" can't be parsed as ${i}`))}function ti(t,e,n=!0){return t.isValid?Te.create(et.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function ei(t,e){const n=t.c.year>9999||t.c.year<0;let i="";return n&&t.c.year>=0&&(i+="+"),i+=Bt(t.c.year,n?6:4),e?(i+="-",i+=Bt(t.c.month),i+="-",i+=Bt(t.c.day)):(i+=Bt(t.c.month),i+=Bt(t.c.day)),i}function ni(t,e,n,i,s,r){let o=Bt(t.c.hour);return e?(o+=":",o+=Bt(t.c.minute),0===t.c.millisecond&&0===t.c.second&&n||(o+=":")):o+=Bt(t.c.minute),0===t.c.millisecond&&0===t.c.second&&n||(o+=Bt(t.c.second),0===t.c.millisecond&&i||(o+=".",o+=Bt(t.c.millisecond,3))),s&&(t.isOffsetFixed&&0===t.offset&&!r?o+="Z":t.o<0?(o+="-",o+=Bt(Math.trunc(-t.o/60)),o+=":",o+=Bt(Math.trunc(-t.o%60))):(o+="+",o+=Bt(Math.trunc(t.o/60)),o+=":",o+=Bt(Math.trunc(t.o%60)))),r&&(o+="["+t.zone.ianaName+"]"),o}const ii={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},si={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ri={ordinal:1,hour:0,minute:0,second:0,millisecond:0},oi=["year","month","day","hour","minute","second","millisecond"],ai=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],li=["year","ordinal","hour","minute","second","millisecond"];function ci(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return function(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new l(t);return e}(t)}}function ui(t,e){const n=rt(e.zone,bt.defaultZone);if(!n.isValid)return fi.invalid(zn(n));const i=et.fromObject(e);let s,r;if(Ft(t.year))s=bt.now();else{for(const e of oi)Ft(t[e])&&(t[e]=ii[e]);const e=It(t)||Nt(t);if(e)return fi.invalid(e);const i=function(t){return mi[t]||(void 0===pi&&(pi=bt.now()),mi[t]=t.offset(pi)),mi[t]}(n);[s,r]=Gn(t,i,n)}return new fi({ts:s,zone:n,loc:i,o:r})}function di(t,e,n){const i=!!Ft(n.round)||n.round,s=(t,s)=>{t=Zt(t,i||n.calendary?0:2,!0);return e.loc.clone(n).relFormatter(n).format(t,s)},r=i=>n.calendary?e.hasSame(t,i)?0:e.startOf(i).diff(t.startOf(i),i).get(i):e.diff(t,i).get(i);if(n.unit)return s(r(n.unit),n.unit);for(const t of n.units){const e=r(t);if(Math.abs(e)>=1)return s(e,t)}return s(t>e?-0:0,n.units[n.units.length-1])}function hi(t){let e,n={};return t.length>0&&"object"==typeof t[t.length-1]?(n=t[t.length-1],e=Array.from(t).slice(0,t.length-1)):e=Array.from(t),[n,e]}let pi,mi={};class fi{constructor(t){const e=t.zone||bt.defaultZone;let n=t.invalid||(Number.isNaN(t.ts)?new _t("invalid input"):null)||(e.isValid?null:zn(e));this.ts=Ft(t.ts)?bt.now():t.ts;let i=null,s=null;if(!n){if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e))[i,s]=[t.old.c,t.old.o];else{const r=Pt(t.o)&&!t.old?t.o:e.offset(this.ts);i=Kn(this.ts,r),n=Number.isNaN(i.year)?new _t("invalid input"):null,i=n?null:i,s=n?null:r}}this._zone=e,this.loc=t.loc||et.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=s,this.isLuxonDateTime=!0}static now(){return new fi({})}static local(){const[t,e]=hi(arguments),[n,i,s,r,o,a,l]=e;return ui({year:n,month:i,day:s,hour:r,minute:o,second:a,millisecond:l},t)}static utc(){const[t,e]=hi(arguments),[n,i,s,r,o,a,l]=e;return t.zone=it.utcInstance,ui({year:n,month:i,day:s,hour:r,minute:o,second:a,millisecond:l},t)}static fromJSDate(t,e={}){const n=(i=t,"[object Date]"===Object.prototype.toString.call(i)?t.valueOf():NaN);var i;if(Number.isNaN(n))return fi.invalid("invalid input");const s=rt(e.zone,bt.defaultZone);return s.isValid?new fi({ts:n,zone:s,loc:et.fromObject(e)}):fi.invalid(zn(s))}static fromMillis(t,e={}){if(Pt(t))return t<-Bn||t>Bn?fi.invalid("Timestamp out of range"):new fi({ts:t,zone:rt(e.zone,bt.defaultZone),loc:et.fromObject(e)});throw new c(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,e={}){if(Pt(t))return new fi({ts:1e3*t,zone:rt(e.zone,bt.defaultZone),loc:et.fromObject(e)});throw new c("fromSeconds requires a numerical input")}static fromObject(t,e={}){t=t||{};const n=rt(e.zone,bt.defaultZone);if(!n.isValid)return fi.invalid(zn(n));const i=et.fromObject(e),s=re(t,ci),{minDaysInFirstWeek:r,startOfWeek:o}=At(s,i),l=bt.now(),c=Ft(e.specificOffset)?n.offset(l):e.specificOffset,u=!Ft(s.ordinal),d=!Ft(s.year),h=!Ft(s.month)||!Ft(s.day),p=d||h,m=s.weekYear||s.weekNumber;if((p||u)&&m)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&u)throw new a("Can't mix ordinal dates with month/day");const f=m||s.weekday&&!p;let g,v,y=Kn(l,c);f?(g=ai,v=si,y=Ot(y,r,o)):u?(g=li,v=ri,y=Ct(y)):(g=oi,v=ii);let b=!1;for(const t of g){Ft(s[t])?s[t]=b?v[t]:y[t]:b=!0}const _=f?function(t,e=4,n=1){const i=jt(t.weekYear),s=Wt(t.weekNumber,1,te(t.weekYear,e,n)),r=Wt(t.weekday,1,7);return i?s?!r&&Tt("weekday",t.weekday):Tt("week",t.weekNumber):Tt("weekYear",t.weekYear)}(s,r,o):u?function(t){const e=jt(t.year),n=Wt(t.ordinal,1,Kt(t.year));return e?!n&&Tt("ordinal",t.ordinal):Tt("year",t.year)}(s):It(s),w=_||Nt(s);if(w)return fi.invalid(w);const k=f?Lt(s,r,o):u?Mt(s):s,[T,x]=Gn(k,c,n),E=new fi({ts:T,zone:n,o:x,loc:i});return s.weekday&&p&&t.weekday!==E.weekday?fi.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${E.toISO()}`):E.isValid?E:fi.invalid(E.invalid)}static fromISO(t,e={}){const[n,i]=function(t){return Se(t,[Xe,sn],[tn,rn],[en,on],[nn,an])}(t);return Xn(n,i,e,"ISO 8601",t)}static fromRFC2822(t,e={}){const[n,i]=function(t){return Se(function(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(t),[Ye,Ue])}(t);return Xn(n,i,e,"RFC 2822",t)}static fromHTTP(t,e={}){const[n,i]=function(t){return Se(t,[Ze,Ge],[Je,Ge],[Ke,Qe])}(t);return Xn(n,i,e,"HTTP",e)}static fromFormat(t,e,n={}){if(Ft(t)||Ft(e))throw new c("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:s=null}=n,r=et.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),[o,a,l,u]=function(t,e,n){const{result:i,zone:s,specificOffset:r,invalidReason:o}=$n(t,e,n);return[i,s,r,o]}(r,t,e);return u?fi.invalid(u):Xn(o,a,n,`format ${e}`,t,l)}static fromString(t,e,n={}){return fi.fromFormat(t,e,n)}static fromSQL(t,e={}){const[n,i]=function(t){return Se(t,[cn,sn],[un,dn])}(t);return Xn(n,i,e,"SQL",t)}static invalid(t,e=null){if(!t)throw new c("need to specify a reason the DateTime is invalid");const n=t instanceof _t?t:new _t(t,e);if(bt.throwOnInvalid)throw new s(n);return new fi({invalid:n})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,e={}){const n=Rn(t,et.fromObject(e));return n?n.map((t=>t?t.val:null)).join(""):null}static expandFormat(t,e={}){return Hn(Te.parseFormat(t),et.fromObject(e)).map((t=>t.val)).join("")}static resetCache(){pi=void 0,mi={}}get(t){return this[t]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Yn(this).weekYear:NaN}get weekNumber(){return this.isValid?Yn(this).weekNumber:NaN}get weekday(){return this.isValid?Yn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Un(this).weekday:NaN}get localWeekNumber(){return this.isValid?Un(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Un(this).weekYear:NaN}get ordinal(){return this.isValid?Ct(this.c).ordinal:NaN}get monthShort(){return this.isValid?Dn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Dn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Dn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Dn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,e=6e4,n=Qt(this.c),i=this.zone.offset(n-t),s=this.zone.offset(n+t),r=this.zone.offset(n-i*e),o=this.zone.offset(n-s*e);if(r===o)return[this];const a=n-r*e,l=n-o*e,c=Kn(a,r),u=Kn(l,o);return c.hour===u.hour&&c.minute===u.minute&&c.second===u.second&&c.millisecond===u.millisecond?[Zn(this,{ts:a}),Zn(this,{ts:l})]:[this]}get isInLeapYear(){return Jt(this.year)}get daysInMonth(){return Gt(this.year,this.month)}get daysInYear(){return this.isValid?Kt(this.year):NaN}get weeksInWeekYear(){return this.isValid?te(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?te(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:e,numberingSystem:n,calendar:i}=Te.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e,numberingSystem:n,outputCalendar:i}}toUTC(t=0,e={}){return this.setZone(it.instance(t),e)}toLocal(){return this.setZone(bt.defaultZone)}setZone(t,{keepLocalTime:e=!1,keepCalendarTime:n=!1}={}){if((t=rt(t,bt.defaultZone)).equals(this.zone))return this;if(t.isValid){let i=this.ts;if(e||n){const e=t.offset(this.ts),n=this.toObject();[i]=Gn(n,e,t)}return Zn(this,{ts:i,zone:t})}return fi.invalid(zn(t))}reconfigure({locale:t,numberingSystem:e,outputCalendar:n}={}){return Zn(this,{loc:this.loc.clone({locale:t,numberingSystem:e,outputCalendar:n})})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const e=re(t,ci),{minDaysInFirstWeek:n,startOfWeek:i}=At(e,this.loc),s=!Ft(e.weekYear)||!Ft(e.weekNumber)||!Ft(e.weekday),r=!Ft(e.ordinal),o=!Ft(e.year),l=!Ft(e.month)||!Ft(e.day),c=o||l,u=e.weekYear||e.weekNumber;if((c||r)&&u)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new a("Can't mix ordinal dates with month/day");let d;s?d=Lt({...Ot(this.c,n,i),...e},n,i):Ft(e.ordinal)?(d={...this.toObject(),...e},Ft(e.day)&&(d.day=Math.min(Gt(d.year,d.month),d.day))):d=Mt({...Ct(this.c),...e});const[h,p]=Gn(d,this.o,this.zone);return Zn(this,{ts:h,o:p})}plus(t){if(!this.isValid)return this;return Zn(this,Qn(this,Tn.fromDurationLike(t)))}minus(t){if(!this.isValid)return this;return Zn(this,Qn(this,Tn.fromDurationLike(t).negate()))}startOf(t,{useLocaleWeeks:e=!1}={}){if(!this.isValid)return this;const n={},i=Tn.normalizeUnit(t);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===i)if(e){const t=this.loc.getStartOfWeek(),{weekday:e}=this;ethis.valueOf(),o=On(r?this:t,r?t:this,s,i);var a;return r?o.negate():o}diffNow(t="milliseconds",e={}){return this.diff(fi.now(),t,e)}until(t){return this.isValid?En.fromDateTimes(this,t):this}hasSame(t,e,n){if(!this.isValid)return!1;const i=t.valueOf(),s=this.setZone(t.zone,{keepLocalTime:!0});return s.startOf(e,n)<=i&&i<=s.endOf(e,n)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const e=t.base||fi.fromObject({},{zone:this.zone}),n=t.padding?thist.valueOf()),Math.min)}static max(...t){if(!t.every(fi.isDateTime))throw new c("max requires all arguments be DateTimes");return Vt(t,(t=>t.valueOf()),Math.max)}static fromFormatExplain(t,e,n={}){const{locale:i=null,numberingSystem:s=null}=n;return $n(et.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),t,e)}static fromStringExplain(t,e,n={}){return fi.fromFormatExplain(t,e,n)}static buildFormatParser(t,e={}){const{locale:n=null,numberingSystem:i=null}=e,s=et.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new Vn(s,t)}static fromFormatParser(t,e,n={}){if(Ft(t)||Ft(e))throw new c("fromFormatParser requires an input string and a format parser");const{locale:i=null,numberingSystem:s=null}=n,r=et.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});if(!r.equals(e.locale))throw new c(`fromFormatParser called with a locale of ${r}, but the format parser was created for ${e.locale}`);const{result:o,zone:a,specificOffset:l,invalidReason:u}=e.explainFromTokens(t);return u?fi.invalid(u):Xn(o,a,n,`format ${e.format}`,t,l)}static get DATE_SHORT(){return m}static get DATE_MED(){return f}static get DATE_MED_WITH_WEEKDAY(){return g}static get DATE_FULL(){return v}static get DATE_HUGE(){return y}static get TIME_SIMPLE(){return b}static get TIME_WITH_SECONDS(){return _}static get TIME_WITH_SHORT_OFFSET(){return w}static get TIME_WITH_LONG_OFFSET(){return k}static get TIME_24_SIMPLE(){return T}static get TIME_24_WITH_SECONDS(){return x}static get TIME_24_WITH_SHORT_OFFSET(){return E}static get TIME_24_WITH_LONG_OFFSET(){return D}static get DATETIME_SHORT(){return S}static get DATETIME_SHORT_WITH_SECONDS(){return O}static get DATETIME_MED(){return L}static get DATETIME_MED_WITH_SECONDS(){return C}static get DATETIME_MED_WITH_WEEKDAY(){return M}static get DATETIME_FULL(){return A}static get DATETIME_FULL_WITH_SECONDS(){return I}static get DATETIME_HUGE(){return N}static get DATETIME_HUGE_WITH_SECONDS(){return F}}function gi(t){if(fi.isDateTime(t))return t;if(t&&t.valueOf&&Pt(t.valueOf()))return fi.fromJSDate(t);if(t&&"object"==typeof t)return fi.fromObject(t);throw new c(`Unknown datetime argument: ${t}, of type ${typeof t}`)}class vi{constructor(t){this._translations=t}get(t){return this._translations[t]}has(t){return t in this._translations}}class yi{constructor(t){this._configurations=t}get(t){return this._configurations[t]}has(t){return t in this._configurations}isRTL(){return"rtl"===this.get("direction")}getLanguage(){return this.get("locale").replace("_","-")}is24Hours(){return!!this.get("twentyFourHours")}getFirstDayOfWeek(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];void 0===t&&(t=!0);let e=this.get("first_dow_iso");return t||(e%=7),e}}class bi{init(){}getId(){return null}setContainer(t){if(!(t instanceof _i))throw new Error("Plugin was given an invalid KimaiContainer");this._core=t}getContainer(){return this._core}getConfiguration(t){return this.getContainer().getConfiguration().get(t)}getConfigurations(){return this.getContainer().getConfiguration()}getDateUtils(){return this.getPlugin("date")}getPlugin(t){return this.getContainer().getPlugin(t)}getTranslation(){return this.getContainer().getTranslation()}translate(t){return this.getTranslation().get(t)}escape(t){return this.getPlugin("escape").escapeForHtml(t)}trigger(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.getPlugin("event").trigger(t,e)}fetch(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getPlugin("fetch").fetch(t,e)}fetchForm(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;n=n||t.getAttribute("action");const i=t.getAttribute("method").toUpperCase();if("GET"===i){const i=this.getPlugin("form").convertFormDataToQueryString(t,{},!0);n=n+(n.includes("?")?"&":"?")+i,e={method:"GET",...e}}else"POST"===i&&(e={method:"POST",body:new FormData(t),...e});return this.fetch(n,e)}isMobile(){return Math.max(document.documentElement.clientWidth,window.innerWidth||0)<576}}class _i{constructor(t,e){if(!(t instanceof yi))throw new Error("Configuration needs to a KimaiConfiguration instance");if(this._configuration=t,!(e instanceof vi))throw new Error("Configuration needs to a KimaiTranslation instance");this._translation=e,this._plugins=[]}registerPlugin(t){if(!(t instanceof bi))throw new Error("Invalid plugin given, needs to be a KimaiPlugin instance");return t.setContainer(this),this._plugins.push(t),t}getPlugin(t){for(let e of this._plugins)if(null!==e.getId()&&e.getId()===t)return e;throw new Error("Unknown plugin: "+t)}getPlugins(){return this._plugins}getTranslation(){return this._translation}getConfiguration(){return this._configuration}getUser(){return this.getPlugin("user")}}class wi extends bi{constructor(t){super(),this.dataAttribute=t}getId(){return"datatable-column-visibility"}init(){let t=document.querySelector("["+this.dataAttribute+"]");if(null!==t){this._id=t.getAttribute(this.dataAttribute),this._modal=document.getElementById("modal_"+this._id),this._modal.addEventListener("show.bs.modal",(()=>{this._evaluateCheckboxes()})),this._modal.querySelector("button[data-type=save]").addEventListener("click",(()=>{this._saveVisibility()})),this._modal.querySelector("button[data-type=reset]").addEventListener("click",(t=>{this._resetVisibility(t.currentTarget)})),this._modal.querySelectorAll("input[name=datatable_profile]").forEach((t=>{t.addEventListener("change",(()=>{const e=this._modal.getElementsByTagName("form")[0];this.fetchForm(e,{},t.getAttribute("data-href")).then((()=>{localStorage.setItem("kimai_profile",t.getAttribute("value")),document.location.reload()})).catch((()=>{e.setAttribute("action",t.getAttribute("data-href")),e.submit()}))}))}));for(let t of this._modal.querySelectorAll("form input[type=checkbox]"))t.addEventListener("change",(()=>{this._changeVisibility(t.getAttribute("name"),t.checked)}))}}_evaluateCheckboxes(){const t=this._modal.getElementsByTagName("form")[0],e=document.getElementsByClassName("datatable_"+this._id)[0];for(let n of e.getElementsByTagName("th")){const e=n.getAttribute("data-field");if(null===e)continue;const i=t.querySelector("input[name="+e+"]");null!==i&&(i.checked="none"!==window.getComputedStyle(n).display)}}_saveVisibility(){const t=this._modal.getElementsByTagName("form")[0];this.fetchForm(t).then((()=>{document.location.reload()})).catch((()=>{t.submit()}))}_resetVisibility(t){const e=this._modal.getElementsByTagName("form")[0];this.fetchForm(e,{},t.getAttribute("formaction")).then((()=>{document.location.reload()})).catch((()=>{e.setAttribute("action",t.getAttribute("formaction")),e.submit()}))}_changeVisibility(t,e){for(const n of document.getElementsByClassName("datatable_"+this._id)){let i=null;for(let s of n.getElementsByClassName("col_"+t)){if(null===i){let t="-none",n="d-table-cell";e||(t="-table-cell",n="d-none"),i="",s.classList.forEach((function(e,n,s){-1===e.indexOf(t)&&(i+=" "+e)})),-1===i.indexOf(n)&&(i+=" "+n)}s.className=i}}}}var ki=n(9336);class Ti extends bi{init(){[].slice.call(document.querySelectorAll('[data-toggle="tooltip"]')).map((function(t){return new ki.m_(t)}));[...document.querySelectorAll(".offcanvas")].map((t=>new ki.go(t)));this.getContainer().getPlugin("form").activateForm("div.page-wrapper form"),this._registerModalAutofocus("#remote_form_modal"),this.overlay=null,document.addEventListener("kimai.reloadContent",(t=>{if(null!==this.overlay)return;let e="body";void 0!==t.detail&&null!==t.detail&&(e=t.detail);const n=document.createElement("div");n.innerHTML='
',this.overlay=n.firstElementChild,document.querySelector(e).append(this.overlay)})),document.addEventListener("kimai.reloadedContent",(()=>{null!==this.overlay&&(this.overlay.remove(),this.overlay=null)}))}_registerModalAutofocus(t){if(this.isMobile())return;const e=document.querySelector(t);null!==e&&e.addEventListener("shown.bs.modal",(()=>{const t=e.querySelector("form");let n=t.querySelectorAll("[autofocus]");n.length<1&&(n=t.querySelectorAll("input[type=text],input[type=date],textarea,select")),n.length>0&&n[0].focus()}))}}var xi=n(424);n(8214);class Ei extends bi{supportsForm(t){return!1}activateForm(t){}destroyForm(t){}}class Di extends Ei{constructor(t){super(),this._selector=t}init(){window.disableLitepickerStyles=!0,this._pickers=[]}supportsForm(t){return!0}activateForm(t){const e=this.getConfigurations().getFirstDayOfWeek(!1),n=this.getConfigurations().getLanguage();let i={buttonText:{previousMonth:'',nextMonth:'',apply:this.translate("confirm"),cancel:this.translate("cancel")}};const s=[].slice.call(t.querySelectorAll(this._selector)).map((t=>(void 0===t.dataset.format&&console.log("Trying to bind litepicker to an element without data-format attribute"),void 0!==t.hasAttribute("min")&&(i={...i,minDate:t.getAttribute("min")}),void 0!==t.hasAttribute("max")&&(i={...i,maxDate:t.getAttribute("max")}),i={...i,format:t.dataset.format,showTooltip:!1,element:t,lang:n,autoRefresh:!0,firstDay:e,setup:e=>{e.on("preselect",((t,n)=>{e._wasPreselected=!0})),e.on("selected",((n,i)=>{void 0!==e._wasPreselected&&(t.dispatchEvent(new Event("change",{bubbles:!0})),delete e._wasPreselected)})),void 0!==e.backdrop&&document.body.appendChild(e.backdrop)}},[t,new xi.Litepicker(this.prepareOptions(i))])));this._pickers=this._pickers.concat(s)}prepareOptions(t){return{...t,plugins:["mobilefriendly"]}}destroyForm(t){[].slice.call(t.querySelectorAll(this._selector)).map((t=>{for(let e=0;e{this.reloadDatatable()};for(let t of e.split(" "))document.addEventListener(t,n);document.addEventListener("pagination-change",n),document.addEventListener("filter-change",n)}registerContextMenu(t){Oi.A.createForDataTable(t)}reloadDatatable(){const t=this.getContainer().getPlugin("toolbar").getSelector(),e=document.querySelector(t),n=t=>{const e=document.createElement("div");e.innerHTML=t;const n=e.querySelector(this._contentArea);document.querySelector(this._contentArea).replaceWith(n),this.registerContextMenu(this._selector),document.dispatchEvent(new Event("kimai.reloadedContent"))};document.dispatchEvent(new CustomEvent("kimai.reloadContent",{detail:this._contentArea})),null!==e?this.fetchForm(e).then((t=>{t.text().then(n)})).catch((()=>{e.submit()})):this.fetch(document.location).then((t=>{t.text().then(n)})).catch((()=>{document.location.reload()}))}}class Ci extends bi{constructor(t,e){super(),this._formSelector=t,this._actionClass=e}getId(){return"toolbar"}init(){const t=this.getSelector();this._registerPagination(t),this._registerSortableTables(t),this._registerAlternativeSubmitActions(t,this._actionClass),[].slice.call(document.querySelectorAll(t+" input")).map((e=>{e.addEventListener("change",(e=>{switch(e.target.id){case"order":case"orderBy":case"page":break;default:document.querySelector(t+" input#page").value=1}})),this.triggerChange()})),[].slice.call(document.querySelectorAll(t+" select")).map((e=>{e.addEventListener("change",(e=>{let n=!0;switch(e.target.id){case"customer":null!==document.querySelector(t+" select#project")&&(n=!1);break;case"project":null!==document.querySelector(t+" select#activity")&&(n=!1)}document.querySelector(t+" input#page").value=1,n&&this.triggerChange()}))}))}_registerAlternativeSubmitActions(t,e){document.addEventListener("click",(function(n){let i=n.target;for(;null!==i&&"function"==typeof i.matches&&!i.matches("body");){if(i.classList.contains(e)){const e=document.querySelector(t);if(null===e)return;const s=e.getAttribute("action"),r=e.getAttribute("method");void 0!==i.dataset.target&&(e.target=i.dataset.target),e.action=i.href,void 0!==i.dataset.method&&(e.method=i.dataset.method),e.submit(),e.target="",e.action=s,e.method=r,n.preventDefault(),n.stopPropagation()}i=i.parentNode}}))}_registerSortableTables(t){document.body.addEventListener("click",(e=>{if(!e.target.matches("th.sortable"))return;let n="DESC",i=e.target.dataset.order;e.target.classList.contains("sorting_desc")&&(n="ASC"),document.querySelector(t+" #orderBy").value=i,document.querySelector(t+" #order").value=n,document.querySelector(t+" #orderBy").dispatchEvent(new Event("change")),document.querySelector(t+" #order").dispatchEvent(new Event("change")),document.dispatchEvent(new Event("filter-change"))}))}_registerPagination(t){document.body.addEventListener("click",(e=>{if(!(e.target.matches("ul.pagination li a")||null!==e.target.parentNode&&e.target.parentNode.matches("ul.pagination li a")))return;let n=document.querySelector(t+" input#page");if(null===n)return;let i=e.target;i.matches("a")||(i=i.parentNode),e.preventDefault(),e.stopPropagation();let s=i.href.split("/"),r=s[s.length-1];return/\d/.test(r)||(r=1),n.value=r,n.dispatchEvent(new Event("change")),document.dispatchEvent(new Event("pagination-change")),!1}))}triggerChange(){document.dispatchEvent(new Event("toolbar-change"))}getSelector(){return this._formSelector}}class Mi extends bi{getId(){return"api"}_headers(){const t=new Headers;return t.append("Content-Type","application/json"),t}get(t,e,n,i){if(void 0!==e){const n=new URLSearchParams(e).toString();""!==n&&(t=t+(t.includes("?")?"&":"?")+n)}void 0===i&&(i=t=>{this.handleError("An error occurred",t)}),this.fetch(t,{method:"GET",headers:this._headers()}).then((t=>{t.json().then((t=>{n(t)}))})).catch((t=>{i(t)}))}post(t,e,n,i){void 0===i&&(i=t=>{this.handleError("action.update.error",t)}),this.fetch(t,{method:"POST",body:this._parseData(e),headers:this._headers()}).then((t=>{t.json().then((t=>{n(t)}))})).catch((t=>{i(t)}))}patch(t,e,n,i){void 0===i&&(i=t=>{this.handleError("action.update.error",t)}),this.fetch(t,{method:"PATCH",body:this._parseData(e),headers:this._headers()}).then((t=>{204===t.statusCode?n():t.json().then((t=>{n(t)}))})).catch((t=>{i(t)}))}delete(t,e,n){void 0===n&&(n=t=>{this.handleError("action.delete.error",t)}),this.fetch(t,{method:"DELETE",headers:this._headers()}).then((()=>{e()})).catch((t=>{n(t)}))}_parseData(t){return"object"==typeof t?JSON.stringify(t):t}handleError(t,e){if(void 0===e.headers)return;const n=e.headers.get("content-type");n&&-1!==n.indexOf("application/json")?e.json().then((n=>{let i=n.message;if(400===e.status&&n.errors){let t=[""+i+""];if(n.errors.errors)for(let e of n.errors.errors)t.push(e);if(n.errors.children)for(let e in n.errors.children){let i=n.errors.children[e];if(void 0!==i.errors&&i.errors.length>0)for(let e of i.errors)t.push(e)}t.length>0&&(i=t)}this.getPlugin("alert").error(t,i)})):e.text().then((()=>{const n="["+e.statusCode+"] "+e.statusText;this.getPlugin("alert").error(t,n)}))}}class Ai extends bi{addClickHandler(t,e,n){document.body.addEventListener("click",(i=>{let s=i.target;for(;null!==s;){const e=s.tagName.toUpperCase();if("BODY"===e)return;if(s.matches(t))break;if("A"===e||"BUTTON"===e||"INPUT"===e||"LABEL"===e)return;for(let t of n)if(s.matches(t))return;s=s.parentNode}if(null===s)return;if(s.isContentEditable||s.parentNode.isContentEditable)return;if(!s.matches(t))return;for(let t of n)if(s.matches(t))return;i.preventDefault(),i.stopPropagation();let r=s.dataset.href;null==r&&(r=s.href),null!=r&&""!==r&&e(r)}))}}class Ii extends Ai{constructor(t){super(),this._selector=t}init(){this.addClickHandler(this._selector,(function(t){window.location=t}),[])}}class Ni extends Ai{constructor(t,e){super(),this._selector=t,this._stopSelector=e}getId(){return"modal"}init(){this._isDirty=!1;const t=this._getModalElement();null!==t&&(t.addEventListener("hide.bs.modal",(e=>{if(this._isDirty){if(null===t.querySelector(".modal-body .remote_modal_is_dirty_warning")){const e=this.translate("modal.dirty"),n=document.createElement("div");n.innerHTML='

'+e+"

",t.querySelector(".modal-body").prepend(n.firstElementChild)}e.preventDefault()}else this._isDirty=!1,document.dispatchEvent(new Event("modal-hide"))})),t.addEventListener("hidden.bs.modal",(()=>{this.getContainer().getPlugin("form").destroyForm(this._getFormIdentifier()),t.querySelector(".modal-body").replaceWith("")})),t.addEventListener("show.bs.modal",(()=>{document.dispatchEvent(new Event("modal-show"))})),this.addClickHandler(this._selector,(t=>{this.openUrlInModal(t)}),this._stopSelector))}_getModal(){return ki.aF.getOrCreateInstance(this._getModalElement())}openUrlInModal(t,e){const n=new Headers;n.append("X-Requested-With","Kimai-Modal"),this.fetch(t,{method:"GET",redirect:"follow",headers:n}).then((e=>{if(e.ok)return e.text().then((t=>{this._openFormInModal(t)}));window.location=t})).catch((n=>{null==e?window.location=t:e(n)}))}_getFormIdentifier(){return"#remote_form_modal .modal-content form"}_getModalElement(){return document.getElementById("remote_form_modal")}_makeScriptExecutable(t){if(void 0!==t.tagName&&"SCRIPT"===t.tagName){const e=document.createElement("script");e.text=t.innerHTML,t.parentNode.replaceChild(e,t)}else for(const e of t.childNodes)this._makeScriptExecutable(e);return t}_openFormInModal(t){const e=this._getFormIdentifier();let n=this._getModalElement();const i=document.createElement("div");i.innerHTML=t;const s=this._makeScriptExecutable(i.querySelector("#form_modal .modal-content"));if(null!==s){let t=n.querySelector(".modal-dialog"),r=i.querySelector(".modal-dialog").classList.contains("modal-lg");r&&!t.classList.contains("modal-lg")&&t.classList.toggle("modal-lg"),!r&&t.classList.contains("modal-lg")&&t.classList.toggle("modal-lg"),n.querySelector(".modal-content").replaceWith(s),[].slice.call(n.querySelectorAll('[data-bs-dismiss="modal"]')).map((t=>{t.addEventListener("click",(()=>{this._isDirty=!1,this._getModal().hide()}))})),this.getContainer().getPlugin("form").activateForm(e)}let r=i.querySelector("div.alert");null!==r&&n.querySelector(".modal-body").prepend(r);const o=document.querySelector(e);o.addEventListener("change",(()=>{this._isDirty=!0})),o.addEventListener("submit",this._getEventHandler()),this._getModal().show()}_getEventHandler(){return void 0===this.eventHandler&&(this.eventHandler=t=>{const e=t.target;if(void 0!==e.target&&""!==e.target)return!0;const n=document.querySelector(this._getFormIdentifier()+" button[type=submit]");n.textContent=n.textContent+" …",n.disabled=!0;const i=e.dataset.formEvent,s=this.getContainer().getPlugin("event"),r=this.getContainer().getPlugin("alert");t.preventDefault(),t.stopPropagation();const o=new Headers;o.append("X-Requested-With","Kimai-Modal");const a={headers:o};this.fetchForm(e,a).then((t=>{t.text().then((t=>{const o=document.createElement("div");o.innerHTML=t;let a=!1,l=!1,c=!1;n.textContent=n.textContent.replace(" …",""),n.disabled=!1;const u=o.querySelector("#form_modal .modal-content");if(null!==u&&(a=null!==u.querySelector(".is-invalid"),a||(a=null!==u.querySelector(".invalid-feedback")),l=null!==u.querySelector("ul.list-unstyled li.text-danger"),c=null!==o.querySelector("div.alert-danger")),a||l||c)this._openFormInModal(t);else{s.trigger(i);let t=e.dataset.msgSuccess;null!=t&&""!==t||(t="action.update.success"),this._isDirty=!1,this._getModal().hide(),r.success(t)}}))})).catch((t=>{let i=e.dataset.msgError;null!=i&&""!==i||(i="action.update.error"),r.error(i,t.message),setTimeout((()=>{n.textContent=n.textContent.replace(" …",""),n.disabled=!1}),1500)}))}),this.eventHandler}}class Fi extends bi{constructor(){super(),this._selector=".ticktac-menu",this._selectorEmpty=".ticktac-menu-empty",this._favIconUrl=null}getId(){return"active-records"}init(){if(null===document.querySelector(this._selector))return;const t=()=>{this.reloadActiveRecords()};document.addEventListener("kimai.timesheetUpdate",t),document.addEventListener("kimai.timesheetDelete",t),document.addEventListener("kimai.activityUpdate",t),document.addEventListener("kimai.activityDelete",t),document.addEventListener("kimai.projectUpdate",t),document.addEventListener("kimai.projectDelete",t),document.addEventListener("kimai.customerUpdate",t),document.addEventListener("kimai.customerDelete",t),this._updateBrowserTitle=!!this.getConfiguration("updateBrowserTitle");const e=()=>{this._updateDuration()};this._updatesHandler=setInterval(e,1e4),document.addEventListener("kimai.timesheetUpdate",e),document.addEventListener("kimai.reloadedContent",e)}_updateDuration(){const t=document.querySelectorAll('[data-since]:not([data-since=""])');if(this._updateBrowserTitle&&this._changeFavicon(t.length>0),0===t.length)return void(this._updateBrowserTitle&&(void 0===document.body.dataset.title?this._updateBrowserTitle=!1:document.title=document.body.dataset.title));const e=this.getDateUtils();let n=[];for(const i of t){const t=e.formatDuration(i.dataset.since);void 0!==i.dataset.replacer&&null!==i.dataset.title&&"?"!==t&&n.push(t),i.textContent=t}0!==n.length&&this._updateBrowserTitle&&(document.title=n.shift())}_setEntries(t){const e=t.length>0;for(let t of document.querySelectorAll(this._selectorEmpty))t.style.display=e?"none":"inline-block";for(let n of document.querySelectorAll(this._selector)){if(n.style.display=e?"inline-block":"none",!e)for(let t of n.querySelectorAll("[data-since]"))t.dataset.since="";const i=n.querySelector(".ticktac-stop");e?(i&&(i.accesskey="s"),this._replaceInNode(n,t[0])):i&&(i.accesskey=null)}this._updateDuration()}_replaceInNode(t,e){const n=this.getDateUtils(),i=t.querySelectorAll("[data-replacer]");for(let s of i){const i=s.dataset.replacer;"url"===i?s.dataset.href=t.dataset.href.replace("000",e.id):"activity"===i?s.innerText=e.activity.name:"project"===i?s.innerText=e.project.name:"customer"===i?s.innerText=e.project.customer.name:"duration"===i&&(s.dataset.since=e.begin,s.innerText=n.formatDuration(e.duration))}}reloadActiveRecords(){const t=this.getContainer().getPlugin("api"),e=document.querySelector(this._selector).dataset.api;t.get(e,{},(t=>{this._setEntries(t)}))}_changeFavicon(t){const e=document.createElement("canvas"),n=document.getElementById("favicon");null===this._favIconUrl&&(this._favIconUrl=n.href);const i=n.cloneNode(!0);if(e.getContext&&i){const s=window.devicePixelRatio,r=document.createElement("img");e.height=e.width=16*s,r.onload=function(){const r=e.getContext("2d");if(r.drawImage(this,0,0,e.width,e.height),t){const t=5.5*s;r.fillStyle="rgb(182,57,57)",r.fillRect(e.width/2-t/2,e.height/2-t/2,t,t)}i.href=e.toDataURL("image/png"),n.remove(),document.head.appendChild(i)},r.src=this._favIconUrl}}}class Pi extends bi{getId(){return"event"}trigger(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(""!==t)for(const n of t.split(" ")){let t=new Event(n);null!==e&&(t=new CustomEvent(n,{detail:e})),document.dispatchEvent(t)}}}class ji extends bi{constructor(t){super(),this._selector=t}init(){document.addEventListener("click",(t=>{let e=t.target;for(;null!==e&&"function"==typeof e.matches&&!e.matches("body");){if(e.classList.contains(this._selector)){const n=e.dataset;let i=n.href;i||(i=e.getAttribute("href")),void 0!==n.question?this.getContainer().getPlugin("alert").question(n.question,(t=>{t&&this._callApi(i,n)})):this._callApi(i,n),t.preventDefault(),t.stopPropagation()}e=e.parentNode}}))}_callApi(t,e){const n=e.method,i=e.event,s=this.getContainer().getPlugin("api"),r=this.getContainer().getPlugin("event"),o=this.getContainer().getPlugin("alert"),a=()=>{r.trigger(i),void 0!==e.msgSuccess&&o.success(e.msgSuccess)},l=t=>{let n="action.update.error";void 0!==e.msgError&&(n=e.msgError),s.handleError(n,t)};let c={};if(void 0!==e.payload&&(c=e.payload),"PATCH"===n)s.patch(t,c,a,l);else if("POST"===n){let e={};s.post(t,e,a,l)}else"DELETE"===n?s.delete(t,a,l):"GET"===n&&s.get(t,c,a,l)}}class qi extends bi{getId(){return"alert"}error(t,e){const n=this.getTranslation();n.has(t)&&(t=n.get(t)),t=t.replace("%reason%",""),void 0===e&&(e=null),null!==e&&(n.has(e)&&(e=n.get(e)),Array.isArray(e)&&(e=e.join("
")));const i="alert_global_error",s=document.getElementById(i);null!==s&&ki.aF.getOrCreateInstance(s).hide();const r='\n \n ";this._showModal(r)}warning(t){this._show("warning",t)}success(t){this._toast("success",t)}info(t){this._show("info",t)}_showModal(t){const e=document.body,n=document.createElement("template");n.innerHTML=t.trim();const i=n.content.firstChild;e.appendChild(i);const s=new ki.aF(i);i.addEventListener("hidden.bs.modal",(function(){e.removeChild(i)})),s.show()}_show(t,e){const n=this.getTranslation();n.has(e)&&(e=n.get(e));const i='\n \n ";this._showModal(i)}_mapClass(t){return"info"===t||"success"===t||"warning"===t||"danger"===t?t:"error"===t?"danger":"primary"}_toast(t,e){const n=this.getTranslation();n.has(e)&&(e=n.get(e));let i='';"success"===t?i='':"warning"===t?i='':"danger"!==t&&"error"!==t||(i='');const s='',r=document.getElementById("toast-container"),o=document.createElement("template");o.innerHTML=s.trim();const a=o.content.firstChild;r.appendChild(a);const l=new ki.y8(a);a.addEventListener("hidden.bs.toast",(function(){r.removeChild(a)})),l.show()}question(t,e){const n=this.getTranslation();n.has(t)&&(t=n.get(t));const i=this._mapClass("info"),s='\n \n ",r=document.body,o=document.createElement("template");o.innerHTML=s.trim();const a=o.content.firstChild;r.appendChild(a),a.querySelector(".question-confirm").addEventListener("click",(()=>{e(!0)})),a.querySelector(".question-cancel").addEventListener("click",(()=>{e(!1)}));const l=new ki.aF(a);a.addEventListener("hidden.bs.modal",(()=>{r.removeChild(a)})),l.show()}}function Hi(t,e){t.split(/\s+/).forEach((t=>{e(t)}))}class Vi{constructor(){this._events={}}on(t,e){Hi(t,(t=>{const n=this._events[t]||[];n.push(e),this._events[t]=n}))}off(t,e){var n=arguments.length;0!==n?Hi(t,(t=>{if(1===n)return void delete this._events[t];const i=this._events[t];void 0!==i&&(i.splice(i.indexOf(e),1),this._events[t]=i)})):this._events={}}trigger(t,...e){var n=this;Hi(t,(t=>{const i=n._events[t];void 0!==i&&i.forEach((t=>{t.apply(n,e)}))}))}}const $i=t=>(t=t.filter(Boolean)).length<2?t[0]||"":1==Yi(t)?"["+t.join("")+"]":"(?:"+t.join("|")+")",Ri=t=>{if(!Bi(t))return t.join("");let e="",n=0;const i=()=>{n>1&&(e+="{"+n+"}")};return t.forEach(((s,r)=>{s!==t[r-1]?(i(),e+=s,n=1):n++})),i(),e},Wi=t=>{let e=Array.from(t);return $i(e)},Bi=t=>new Set(t).size!==t.length,zi=t=>(t+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),Yi=t=>t.reduce(((t,e)=>Math.max(t,Ui(e))),0),Ui=t=>Array.from(t).length,Zi=t=>{if(1===t.length)return[[t]];let e=[];const n=t.substring(1);return Zi(n).forEach((function(n){let i=n.slice(0);i[0]=t.charAt(0)+i[0],e.push(i),i=n.slice(0),i.unshift(t.charAt(0)),e.push(i)})),e},Ji=[[0,65535]];let Ki,Gi;const Qi={},Xi={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"};for(let t in Xi){let e=Xi[t]||"";for(let n=0;nt.normalize(e),ns=t=>Array.from(t).reduce(((t,e)=>t+is(e)),""),is=t=>(t=es(t).toLowerCase().replace(ts,(t=>Qi[t]||"")),es(t,"NFC"));const ss=t=>{const e={},n=(t,n)=>{const i=e[t]||new Set,s=new RegExp("^"+Wi(i)+"$","iu");n.match(s)||(i.add(zi(n)),e[t]=i)};for(let e of function*(t){for(const[e,n]of t)for(let t=e;t<=n;t++){let e=String.fromCharCode(t),n=ns(e);n!=e.toLowerCase()&&(n.length>3||0!=n.length&&(yield{folded:n,composed:e,code_point:t}))}}(t))n(e.folded,e.folded),n(e.folded,e.composed);return e},rs=t=>{const e=ss(t),n={};let i=[];for(let t in e){let s=e[t];s&&(n[t]=Wi(s)),t.length>1&&i.push(zi(t))}i.sort(((t,e)=>e.length-t.length));const s=$i(i);return Gi=new RegExp("^"+s,"u"),n},os=(t,e=1)=>(e=Math.max(e,t.length-1),$i(Zi(t).map((t=>((t,e=1)=>{let n=0;return t=t.map((t=>(Ki[t]&&(n+=t.length),Ki[t]||t))),n>=e?Ri(t):""})(t,e))))),as=(t,e=!0)=>{let n=t.length>1?1:0;return $i(t.map((t=>{let i=[];const s=e?t.length():t.length()-1;for(let e=0;e{for(const n of e){if(n.start!=t.start||n.end!=t.end)continue;if(n.substrs.join("")!==t.substrs.join(""))continue;let e=t.parts;const i=t=>{for(const n of e){if(n.start===t.start&&n.substr===t.substr)return!1;if(1!=t.length&&1!=n.length){if(t.startn.start)return!0;if(n.startt.start)return!0}}return!1};if(!(n.parts.filter(i).length>0))return!0}return!1};class cs{parts;substrs;start;end;constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(t){t&&(this.parts.push(t),this.substrs.push(t.substr),this.start=Math.min(t.start,this.start),this.end=Math.max(t.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(t,e){let n=new cs,i=JSON.parse(JSON.stringify(this.parts)),s=i.pop();for(const t of i)n.add(t);let r=e.substr.substring(0,t-s.start),o=r.length;return n.add({start:s.start,end:s.start+o,length:o,substr:r}),n}}const us=t=>{var e;void 0===Ki&&(Ki=rs(e||Ji)),t=ns(t);let n="",i=[new cs];for(let e=0;e0){a=a.sort(((t,e)=>t.length()-e.length()));for(let t of a)ls(t,i)||i.push(t)}else if(e>0&&1==l.size&&!l.has("3")){n+=as(i,!1);let t=new cs;const e=i[0];e&&t.add(e.last()),i=[t]}}return n+=as(i,!0),n},ds=(t,e)=>{if(t)return t[e]},hs=(t,e)=>{if(t){for(var n,i=e.split(".");(n=i.shift())&&(t=t[n]););return t}},ps=(t,e,n)=>{var i,s;return t?(t+="",null==e.regex||-1===(s=t.search(e.regex))?0:(i=e.string.length/t.length,0===s&&(i+=.5),i*n)):0},ms=(t,e)=>{var n=t[e];if("function"==typeof n)return n;n&&!Array.isArray(n)&&(t[e]=[n])},fs=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},gs=(t,e)=>"number"==typeof t&&"number"==typeof e?t>e?1:t(e=ns(e+"").toLowerCase())?1:e>t?-1:0;class vs{items;settings;constructor(t,e){this.items=t,this.settings=e||{diacritics:!0}}tokenize(t,e,n){if(!t||!t.length)return[];const i=[],s=t.split(/\s+/);var r;return n&&(r=new RegExp("^("+Object.keys(n).map(zi).join("|")+"):(.*)$")),s.forEach((t=>{let n,s=null,o=null;r&&(n=t.match(r))&&(s=n[1],t=n[2]),t.length>0&&(o=this.settings.diacritics?us(t)||null:zi(t),o&&e&&(o="\\b"+o)),i.push({string:t,regex:o?new RegExp(o,"iu"):null,field:s})})),i}getScoreFunction(t,e){var n=this.prepareSearch(t,e);return this._getScoreFunction(n)}_getScoreFunction(t){const e=t.tokens,n=e.length;if(!n)return function(){return 0};const i=t.options.fields,s=t.weights,r=i.length,o=t.getAttrFn;if(!r)return function(){return 1};const a=1===r?function(t,e){const n=i[0].field;return ps(o(e,n),t,s[n]||1)}:function(t,e){var n=0;if(t.field){const i=o(e,t.field);!t.regex&&i?n+=1/r:n+=ps(i,t,1)}else fs(s,((i,s)=>{n+=ps(o(e,s),t,i)}));return n/r};return 1===n?function(t){return a(e[0],t)}:"and"===t.options.conjunction?function(t){var i,s=0;for(let n of e){if((i=a(n,t))<=0)return 0;s+=i}return s/n}:function(t){var i=0;return fs(e,(e=>{i+=a(e,t)})),i/n}}getSortFunction(t,e){var n=this.prepareSearch(t,e);return this._getSortFunction(n)}_getSortFunction(t){var e,n=[];const i=this,s=t.options,r=!t.query&&s.sort_empty?s.sort_empty:s.sort;if("function"==typeof r)return r.bind(this);const o=function(e,n){return"$score"===e?n.score:t.getAttrFn(i.items[n.id],e)};if(r)for(let e of r)(t.query||"$score"!==e.field)&&n.push(e);if(t.query){e=!0;for(let t of n)if("$score"===t.field){e=!1;break}e&&n.unshift({field:"$score",direction:"desc"})}else n=n.filter((t=>"$score"!==t.field));return n.length?function(t,e){var i,s;for(let r of n){if(s=r.field,i=("desc"===r.direction?-1:1)*gs(o(s,t),o(s,e)))return i}return 0}:null}prepareSearch(t,e){const n={};var i=Object.assign({},e);if(ms(i,"sort"),ms(i,"sort_empty"),i.fields){ms(i,"fields");const t=[];i.fields.forEach((e=>{"string"==typeof e&&(e={field:e,weight:1}),t.push(e),n[e.field]="weight"in e?e.weight:1})),i.fields=t}return{options:i,query:t.toLowerCase().trim(),tokens:this.tokenize(t,i.respect_word_boundaries,n),total:0,items:[],weights:n,getAttrFn:i.nesting?hs:ds}}search(t,e){var n,i,s=this;i=this.prepareSearch(t,e),e=i.options,t=i.query;const r=e.score||s._getScoreFunction(i);t.length?fs(s.items,((t,s)=>{n=r(t),(!1===e.filter||n>0)&&i.items.push({score:n,id:s})})):fs(s.items,((t,e)=>{i.items.push({score:1,id:e})}));const o=s._getSortFunction(i);return o&&i.items.sort(o),i.total=i.items.length,"number"==typeof e.limit&&(i.items=i.items.slice(0,e.limit)),i}}const ys=t=>null==t?null:bs(t),bs=t=>"boolean"==typeof t?t?"1":"0":t+"",_s=t=>(t+"").replace(/&/g,"&").replace(//g,">").replace(/"/g,"""),ws=(t,e)=>{var n;return function(i,s){var r=this;n&&(r.loading=Math.max(r.loading-1,0),clearTimeout(n)),n=setTimeout((function(){n=null,r.loadedSearches[i]=!0,t.call(r,i,s)}),e)}},ks=(t,e,n)=>{var i,s=t.trigger,r={};for(i of(t.trigger=function(){var n=arguments[0];if(-1===e.indexOf(n))return s.apply(t,arguments);r[n]=arguments},n.apply(t,[]),t.trigger=s,e))i in r&&s.apply(t,r[i])},Ts=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},xs=(t,e,n,i)=>{t.addEventListener(e,n,i)},Es=(t,e)=>!!e&&(!!e[t]&&1===(e.altKey?1:0)+(e.ctrlKey?1:0)+(e.shiftKey?1:0)+(e.metaKey?1:0)),Ds=(t,e)=>{const n=t.getAttribute("id");return n||(t.setAttribute("id",e),e)},Ss=t=>t.replace(/[\\"']/g,"\\$&"),Os=(t,e)=>{e&&t.append(e)},Ls=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},Cs=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(Ms(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},Ms=t=>"string"==typeof t&&t.indexOf("<")>-1,As=(t,e)=>{var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!1),t.dispatchEvent(n)},Is=(t,e)=>{Object.assign(t.style,e)},Ns=(t,...e)=>{var n=Ps(e);(t=js(t)).map((t=>{n.map((e=>{t.classList.add(e)}))}))},Fs=(t,...e)=>{var n=Ps(e);(t=js(t)).map((t=>{n.map((e=>{t.classList.remove(e)}))}))},Ps=t=>{var e=[];return Ls(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},js=t=>(Array.isArray(t)||(t=[t]),t),qs=(t,e,n)=>{if(!n||n.contains(t))for(;t&&t.matches;){if(t.matches(e))return t;t=t.parentNode}},Hs=(t,e=0)=>e>0?t[t.length-1]:t[0],Vs=(t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var n=0;t=t.previousElementSibling;)t.matches(e)&&n++;return n},$s=(t,e)=>{Ls(e,((e,n)=>{null==e?t.removeAttribute(n):t.setAttribute(n,""+e)}))},Rs=(t,e)=>{t.parentNode&&t.parentNode.replaceChild(e,t)},Ws=(t,e)=>{if(null===e)return;if("string"==typeof e){if(!e.length)return;e=new RegExp(e,"i")}const n=t=>3===t.nodeType?(t=>{var n=t.data.match(e);if(n&&t.data.length>0){var i=document.createElement("span");i.className="highlight";var s=t.splitText(n.index);s.splitText(n[0].length);var r=s.cloneNode(!0);return i.appendChild(r),Rs(s,i),1}return 0})(t):((t=>{1!==t.nodeType||!t.childNodes||/(script|style)/i.test(t.tagName)||"highlight"===t.className&&"SPAN"===t.tagName||Array.from(t.childNodes).forEach((t=>{n(t)}))})(t),0);n(t)},Bs="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey";var zs={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,refreshThrottle:300,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(t){return t.length>0},render:{}};function Ys(t,e){var n=Object.assign({},zs,e),i=n.dataAttr,s=n.labelField,r=n.valueField,o=n.disabledField,a=n.optgroupField,l=n.optgroupLabelField,c=n.optgroupValueField,u=t.tagName.toLowerCase(),d=t.getAttribute("placeholder")||t.getAttribute("data-placeholder");if(!d&&!n.allowEmptyOption){let e=t.querySelector('option[value=""]');e&&(d=e.textContent)}var h={placeholder:d,options:[],optgroups:[],items:[],maxItems:null};return"select"===u?(()=>{var e,u=h.options,d={},p=1;let m=0;var f=t=>{var e=Object.assign({},t.dataset),n=i&&e[i];return"string"==typeof n&&n.length&&(e=Object.assign(e,JSON.parse(n))),e},g=(t,e)=>{var i=ys(t.value);if(null!=i&&(i||n.allowEmptyOption)){if(d.hasOwnProperty(i)){if(e){var l=d[i][a];l?Array.isArray(l)?l.push(e):d[i][a]=[l,e]:d[i][a]=e}}else{var c=f(t);c[s]=c[s]||t.textContent,c[r]=c[r]||i,c[o]=c[o]||t.disabled,c[a]=c[a]||e,c.$option=t,c.$order=c.$order||++m,d[i]=c,u.push(c)}t.selected&&h.items.push(i)}};h.maxItems=t.hasAttribute("multiple")?null:1,Ls(t.children,(t=>{var n,i,s;"optgroup"===(e=t.tagName.toLowerCase())?((s=f(n=t))[l]=s[l]||n.getAttribute("label")||"",s[c]=s[c]||p++,s[o]=s[o]||n.disabled,s.$order=s.$order||++m,h.optgroups.push(s),i=s[c],Ls(n.children,(t=>{g(t,i)}))):"option"===e&&g(t)}))})():(()=>{const e=t.getAttribute(i);if(e)h.options=JSON.parse(e),Ls(h.options,(t=>{h.items.push(t[r])}));else{var o=t.value.trim()||"";if(!n.allowEmptyOption&&!o.length)return;const e=o.split(n.delimiter);Ls(e,(t=>{const e={};e[s]=t,e[r]=t,h.options.push(e)})),h.items=e}})(),Object.assign({},zs,h,e)}var Us=0;class Zs extends(function(t){return t.plugins={},class extends t{constructor(){super(...arguments),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(e,n){t.plugins[e]={name:e,fn:n}}initializePlugins(t){var e,n;const i=this,s=[];if(Array.isArray(t))t.forEach((t=>{"string"==typeof t?s.push(t):(i.plugins.settings[t.name]=t.options,s.push(t.name))}));else if(t)for(e in t)t.hasOwnProperty(e)&&(i.plugins.settings[e]=t[e],s.push(e));for(;n=s.shift();)i.require(n)}loadPlugin(e){var n=this,i=n.plugins,s=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin');i.requested[e]=!0,i.loaded[e]=s.fn.apply(n,[n.plugins.settings[e]||{}]),i.names.push(e)}require(t){var e=this,n=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(n.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return n.loaded[t]}}}(Vi)){constructor(t,e){var n;super(),this.order=0,this.isOpen=!1,this.isDisabled=!1,this.isReadOnly=!1,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],this.refreshTimeout=null,Us++;var i=Cs(t);if(i.tomselect)throw new Error("Tom Select already initialized on this element");i.tomselect=this,n=(window.getComputedStyle&&window.getComputedStyle(i,null)).getPropertyValue("direction");const s=Ys(i,e);this.settings=s,this.input=i,this.tabIndex=i.tabIndex||0,this.is_select_tag="select"===i.tagName.toLowerCase(),this.rtl=/rtl/i.test(n),this.inputId=Ds(i,"tomselect-"+Us),this.isRequired=i.required,this.sifter=new vs(this.options,{diacritics:s.diacritics}),s.mode=s.mode||(1===s.maxItems?"single":"multi"),"boolean"!=typeof s.hideSelected&&(s.hideSelected="multi"===s.mode),"boolean"!=typeof s.hidePlaceholder&&(s.hidePlaceholder="multi"!==s.mode);var r=s.createFilter;"function"!=typeof r&&("string"==typeof r&&(r=new RegExp(r)),r instanceof RegExp?s.createFilter=t=>r.test(t):s.createFilter=t=>this.settings.duplicates||!this.options[t]),this.initializePlugins(s.plugins),this.setupCallbacks(),this.setupTemplates();const o=Cs("
"),a=Cs("
"),l=this._render("dropdown"),c=Cs('
'),u=this.input.getAttribute("class")||"",d=s.mode;var h;if(Ns(o,s.wrapperClass,u,d),Ns(a,s.controlClass),Os(o,a),Ns(l,s.dropdownClass,d),s.copyClassesToDropdown&&Ns(l,u),Ns(c,s.dropdownContentClass),Os(l,c),Cs(s.dropdownParent||o).appendChild(l),Ms(s.controlInput)){h=Cs(s.controlInput);Ls(["autocorrect","autocapitalize","autocomplete","spellcheck"],(t=>{i.getAttribute(t)&&$s(h,{[t]:i.getAttribute(t)})})),h.tabIndex=-1,a.appendChild(h),this.focus_node=h}else s.controlInput?(h=Cs(s.controlInput),this.focus_node=h):(h=Cs(""),this.focus_node=a);this.wrapper=o,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=h,this.setup()}setup(){const t=this,e=t.settings,n=t.control_input,i=t.dropdown,s=t.dropdown_content,r=t.wrapper,o=t.control,a=t.input,l=t.focus_node,c={passive:!0},u=t.inputId+"-ts-dropdown";$s(s,{id:u}),$s(l,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":u});const d=Ds(l,t.inputId+"-ts-control"),h="label[for='"+(t=>t.replace(/['"\\]/g,"\\$&"))(t.inputId)+"']",p=document.querySelector(h),m=t.focus.bind(t);if(p){xs(p,"click",m),$s(p,{for:d});const e=Ds(p,t.inputId+"-ts-label");$s(l,{"aria-labelledby":e}),$s(s,{"aria-labelledby":e})}if(r.style.width=a.style.width,t.plugins.names.length){const e="plugin-"+t.plugins.names.join(" plugin-");Ns([r,i],e)}(null===e.maxItems||e.maxItems>1)&&t.is_select_tag&&$s(a,{multiple:"multiple"}),e.placeholder&&$s(n,{placeholder:e.placeholder}),!e.splitOn&&e.delimiter&&(e.splitOn=new RegExp("\\s*"+zi(e.delimiter)+"+\\s*")),e.load&&e.loadThrottle&&(e.load=ws(e.load,e.loadThrottle)),xs(i,"mousemove",(()=>{t.ignoreHover=!1})),xs(i,"mouseenter",(e=>{var n=qs(e.target,"[data-selectable]",i);n&&t.onOptionHover(e,n)}),{capture:!0}),xs(i,"click",(e=>{const n=qs(e.target,"[data-selectable]");n&&(t.onOptionSelect(e,n),Ts(e,!0))})),xs(o,"click",(e=>{var i=qs(e.target,"[data-ts-item]",o);i&&t.onItemSelect(e,i)?Ts(e,!0):""==n.value&&(t.onClick(),Ts(e,!0))})),xs(l,"keydown",(e=>t.onKeyDown(e))),xs(n,"keypress",(e=>t.onKeyPress(e))),xs(n,"input",(e=>t.onInput(e))),xs(l,"blur",(e=>t.onBlur(e))),xs(l,"focus",(e=>t.onFocus(e))),xs(n,"paste",(e=>t.onPaste(e)));const f=e=>{const s=e.composedPath()[0];if(!r.contains(s)&&!i.contains(s))return t.isFocused&&t.blur(),void t.inputState();s==n&&t.isOpen?e.stopPropagation():Ts(e,!0)},g=()=>{t.isOpen&&t.positionDropdown()};xs(document,"mousedown",f),xs(window,"scroll",g,c),xs(window,"resize",g,c),this._destroy=()=>{document.removeEventListener("mousedown",f),window.removeEventListener("scroll",g),window.removeEventListener("resize",g),p&&p.removeEventListener("click",m)},this.revertSettings={innerHTML:a.innerHTML,tabIndex:a.tabIndex},a.tabIndex=-1,a.insertAdjacentElement("afterend",t.wrapper),t.sync(!1),e.items=[],delete e.optgroups,delete e.options,xs(a,"invalid",(()=>{t.isValid&&(t.isValid=!1,t.isInvalid=!0,t.refreshState())})),t.updateOriginalInput(),t.refreshItems(),t.close(!1),t.inputState(),t.isSetup=!0,a.disabled?t.disable():a.readOnly?t.setReadOnly(!0):t.enable(),t.on("change",this.onChange),Ns(a,"tomselected","ts-hidden-accessible"),t.trigger("initialize"),!0===e.preload&&t.preload()}setupOptions(t=[],e=[]){this.addOptions(t),Ls(e,(t=>{this.registerOptionGroup(t)}))}setupTemplates(){var t=this,e=t.settings.labelField,n=t.settings.optgroupLabelField,i={optgroup:t=>{let e=document.createElement("div");return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,e)=>'
'+e(t[n])+"
",option:(t,n)=>"
"+n(t[e])+"
",item:(t,n)=>"
"+n(t[e])+"
",option_create:(t,e)=>'
Add '+e(t.input)+"
",no_results:()=>'
No results found
',loading:()=>'
',not_loading:()=>{},dropdown:()=>"
"};t.settings.render=Object.assign({},i,t.settings.render)}setupCallbacks(){var t,e,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in n)(e=this.settings[n[t]])&&this.on(t,e)}sync(t=!0){const e=this,n=t?Ys(e.input,{delimiter:e.settings.delimiter}):e.settings;e.setupOptions(n.options,n.optgroups),e.setValue(n.items||[],!0),e.lastQuery=null}onClick(){var t=this;if(t.activeItems.length>0)return t.clearActiveItems(),void t.focus();t.isFocused&&t.isOpen?t.blur():t.focus()}onMouseDown(){}onChange(){As(this.input,"input"),As(this.input,"change")}onPaste(t){var e=this;e.isInputHidden||e.isLocked?Ts(t):e.settings.splitOn&&setTimeout((()=>{var t=e.inputValue();if(t.match(e.settings.splitOn)){var n=t.trim().split(e.settings.splitOn);Ls(n,(t=>{ys(t)&&(this.options[t]?e.addItem(t):e.createItem(t))}))}}),0)}onKeyPress(t){var e=this;if(!e.isLocked){var n=String.fromCharCode(t.keyCode||t.which);return e.settings.create&&"multi"===e.settings.mode&&n===e.settings.delimiter?(e.createItem(),void Ts(t)):void 0}Ts(t)}onKeyDown(t){var e=this;if(e.ignoreHover=!0,e.isLocked)9!==t.keyCode&&Ts(t);else{switch(t.keyCode){case 65:if(Es(Bs,t)&&""==e.control_input.value)return Ts(t),void e.selectAll();break;case 27:return e.isOpen&&(Ts(t,!0),e.close()),void e.clearActiveItems();case 40:if(!e.isOpen&&e.hasOptions)e.open();else if(e.activeOption){let t=e.getAdjacent(e.activeOption,1);t&&e.setActiveOption(t)}return void Ts(t);case 38:if(e.activeOption){let t=e.getAdjacent(e.activeOption,-1);t&&e.setActiveOption(t)}return void Ts(t);case 13:return void(e.canSelect(e.activeOption)?(e.onOptionSelect(t,e.activeOption),Ts(t)):(e.settings.create&&e.createItem()||document.activeElement==e.control_input&&e.isOpen)&&Ts(t));case 37:return void e.advanceSelection(-1,t);case 39:return void e.advanceSelection(1,t);case 9:return void(e.settings.selectOnTab&&(e.canSelect(e.activeOption)&&(e.onOptionSelect(t,e.activeOption),Ts(t)),e.settings.create&&e.createItem()&&Ts(t)));case 8:case 46:return void e.deleteSelection(t)}e.isInputHidden&&!Es(Bs,t)&&Ts(t)}}onInput(t){if(this.isLocked)return;const e=this.inputValue();this.lastValue!==e&&(this.lastValue=e,""!=e?(this.refreshTimeout&&window.clearTimeout(this.refreshTimeout),this.refreshTimeout=((t,e)=>e>0?window.setTimeout(t,e):(t.call(null),null))((()=>{this.refreshTimeout=null,this._onInput()}),this.settings.refreshThrottle)):this._onInput())}_onInput(){const t=this.lastValue;this.settings.shouldLoad.call(this,t)&&this.load(t),this.refreshOptions(),this.trigger("type",t)}onOptionHover(t,e){this.ignoreHover||this.setActiveOption(e,!1)}onFocus(t){var e=this,n=e.isFocused;if(e.isDisabled||e.isReadOnly)return e.blur(),void Ts(t);e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.preload(),n||e.trigger("focus"),e.activeItems.length||(e.inputState(),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())}onBlur(t){if(!1!==document.hasFocus()){var e=this;if(e.isFocused){e.isFocused=!1,e.ignoreFocus=!1;var n=()=>{e.close(),e.setActiveItem(),e.setCaret(e.items.length),e.trigger("blur")};e.settings.create&&e.settings.createOnBlur?e.createItem(null,n):n()}}}onOptionSelect(t,e){var n,i=this;e.parentElement&&e.parentElement.matches("[data-disabled]")||(e.classList.contains("create")?i.createItem(null,(()=>{i.settings.closeAfterSelect&&i.close()})):void 0!==(n=e.dataset.value)&&(i.lastQuery=null,i.addItem(n),i.settings.closeAfterSelect&&i.close(),!i.settings.hideSelected&&t.type&&/click/.test(t.type)&&i.setActiveOption(e)))}canSelect(t){return!!(this.isOpen&&t&&this.dropdown_content.contains(t))}onItemSelect(t,e){var n=this;return!n.isLocked&&"multi"===n.settings.mode&&(Ts(t),n.setActiveItem(e,t),!0)}canLoad(t){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(t)}load(t){const e=this;if(!e.canLoad(t))return;Ns(e.wrapper,e.settings.loadingClass),e.loading++;const n=e.loadCallback.bind(e);e.settings.load.call(e,t,n)}loadCallback(t,e){const n=this;n.loading=Math.max(n.loading-1,0),n.lastQuery=null,n.clearActiveOption(),n.setupOptions(t,e),n.refreshOptions(n.isFocused&&!n.isInputHidden),n.loading||Fs(n.wrapper,n.settings.loadingClass),n.trigger("load",t,e)}preload(){var t=this.wrapper.classList;t.contains("preloaded")||(t.add("preloaded"),this.load(""))}setTextboxValue(t=""){var e=this.control_input;e.value!==t&&(e.value=t,As(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){ks(this,e?[]:["change"],(()=>{this.clear(e),this.addItems(t,e)}))}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var n,i,s,r,o,a,l=this;if("single"!==l.settings.mode){if(!t)return l.clearActiveItems(),void(l.isFocused&&l.inputState());if("click"===(n=e&&e.type.toLowerCase())&&Es("shiftKey",e)&&l.activeItems.length){for(a=l.getLastActive(),(s=Array.prototype.indexOf.call(l.control.children,a))>(r=Array.prototype.indexOf.call(l.control.children,t))&&(o=s,s=r,r=o),i=s;i<=r;i++)t=l.control.children[i],-1===l.activeItems.indexOf(t)&&l.setActiveItemClass(t);Ts(e)}else"click"===n&&Es(Bs,e)||"keydown"===n&&Es("shiftKey",e)?t.classList.contains("active")?l.removeActiveItem(t):l.setActiveItemClass(t):(l.clearActiveItems(),l.setActiveItemClass(t));l.inputState(),l.isFocused||l.focus()}}setActiveItemClass(t){const e=this,n=e.control.querySelector(".last-active");n&&Fs(n,"last-active"),Ns(t,"active last-active"),e.trigger("item_select",t),-1==e.activeItems.indexOf(t)&&e.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t);this.activeItems.splice(e,1),Fs(t,"active")}clearActiveItems(){Fs(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t,e=!0){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,$s(this.focus_node,{"aria-activedescendant":t.getAttribute("id")}),$s(t,{"aria-selected":"true"}),Ns(t,"active"),e&&this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return;const n=this.dropdown_content,i=n.clientHeight,s=n.scrollTop||0,r=t.offsetHeight,o=t.getBoundingClientRect().top-n.getBoundingClientRect().top+s;o+r>i+s?this.scroll(o-i+r,e):o{t.setActiveItemClass(e)})))}inputState(){var t=this;t.control.contains(t.control_input)&&($s(t.control_input,{placeholder:t.settings.placeholder}),t.activeItems.length>0||!t.isFocused&&t.settings.hidePlaceholder&&t.items.length>0?(t.setTextboxValue(),t.isInputHidden=!0):(t.settings.hidePlaceholder&&t.items.length>0&&$s(t.control_input,{placeholder:""}),t.isInputHidden=!1),t.wrapper.classList.toggle("input-hidden",t.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var t=this;t.isDisabled||t.isReadOnly||(t.ignoreFocus=!0,t.control_input.offsetWidth?t.control_input.focus():t.focus_node.focus(),setTimeout((()=>{t.ignoreFocus=!1,t.onFocus()}),0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField;return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,n,i=this,s=this.getSearchOptions();if(i.settings.score&&"function"!=typeof(n=i.settings.score.call(i,t)))throw new Error('Tom Select "score" setting must be a function that returns a function');return t!==i.lastQuery?(i.lastQuery=t,e=i.sifter.search(t,Object.assign(s,{score:n})),i.currentResults=e):e=Object.assign({},i.currentResults),i.settings.hideSelected&&(e.items=e.items.filter((t=>{let e=ys(t.id);return!(e&&-1!==i.items.indexOf(e))}))),e}refreshOptions(t=!0){var e,n,i,s,r,o,a,l,c,u;const d={},h=[];var p=this,m=p.inputValue();const f=m===p.lastQuery||""==m&&null==p.lastQuery;var g=p.search(m),v=null,y=p.settings.shouldOpen||!1,b=p.dropdown_content;f&&(v=p.activeOption)&&(c=v.closest("[data-group]")),s=g.items.length,"number"==typeof p.settings.maxOptions&&(s=Math.min(s,p.settings.maxOptions)),s>0&&(y=!0);const _=(t,e)=>{let n=d[t];if(void 0!==n){let t=h[n];if(void 0!==t)return[n,t.fragment]}let i=document.createDocumentFragment();return n=h.length,h.push({fragment:i,order:e,optgroup:t}),[n,i]};for(e=0;e0&&(u=u.cloneNode(!0),$s(u,{id:a.$id+"-clone-"+n,"aria-selected":null}),u.classList.add("ts-cloned"),Fs(u,"active"),p.activeOption&&p.activeOption.dataset.value==s&&c&&c.dataset.group===r.toString()&&(v=u)),l.appendChild(u),""!=r&&(d[r]=i)}}var w;p.settings.lockOptgroupOrder&&h.sort(((t,e)=>t.order-e.order)),a=document.createDocumentFragment(),Ls(h,(t=>{let e=t.fragment,n=t.optgroup;if(!e||!e.children.length)return;let i=p.optgroups[n];if(void 0!==i){let t=document.createDocumentFragment(),n=p.render("optgroup_header",i);Os(t,n),Os(t,e);let s=p.render("optgroup",{group:i,options:t});Os(a,s)}else Os(a,e)})),b.innerHTML="",Os(b,a),p.settings.highlight&&(w=b.querySelectorAll("span.highlight"),Array.prototype.forEach.call(w,(function(t){var e=t.parentNode;e.replaceChild(t.firstChild,t),e.normalize()})),g.query.length&&g.tokens.length&&Ls(g.tokens,(t=>{Ws(b,t.regex)})));var k=t=>{let e=p.render(t,{input:m});return e&&(y=!0,b.insertBefore(e,b.firstChild)),e};if(p.loading?k("loading"):p.settings.shouldLoad.call(p,m)?0===g.items.length&&k("no_results"):k("not_loading"),(l=p.canCreate(m))&&(u=k("option_create")),p.hasOptions=g.items.length>0||l,y){if(g.items.length>0){if(v||"single"!==p.settings.mode||null==p.items[0]||(v=p.getOption(p.items[0])),!b.contains(v)){let t=0;u&&!p.settings.addPrecedence&&(t=1),v=p.selectable()[t]}}else u&&(v=u);t&&!p.isOpen&&(p.open(),p.scrollToOption(v,"auto")),p.setActiveOption(v)}else p.clearActiveOption(),t&&p.isOpen&&p.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t,e=!1){const n=this;if(Array.isArray(t))return n.addOptions(t,e),!1;const i=ys(t[n.settings.valueField]);return null!==i&&!n.options.hasOwnProperty(i)&&(t.$order=t.$order||++n.order,t.$id=n.inputId+"-opt-"+t.$order,n.options[i]=t,n.lastQuery=null,e&&(n.userOptions[i]=e,n.trigger("option_add",i,t)),i)}addOptions(t,e=!1){Ls(t,(t=>{this.addOption(t,e)}))}registerOption(t){return this.addOption(t)}registerOptionGroup(t){var e=ys(t[this.settings.optgroupValueField]);return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var n;e[this.settings.optgroupValueField]=t,(n=this.registerOptionGroup(e))&&this.trigger("optgroup_add",n,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){const n=this;var i,s;const r=ys(t),o=ys(e[n.settings.valueField]);if(null===r)return;const a=n.options[r];if(null==a)return;if("string"!=typeof o)throw new Error("Value must be set in option data");const l=n.getOption(r),c=n.getItem(r);if(e.$order=e.$order||a.$order,delete n.options[r],n.uncacheValue(o),n.options[o]=e,l){if(n.dropdown_content.contains(l)){const t=n._render("option",e);Rs(l,t),n.activeOption===l&&n.setActiveOption(t)}l.remove()}c&&(-1!==(s=n.items.indexOf(r))&&n.items.splice(s,1,o),i=n._render("item",e),c.classList.contains("active")&&Ns(i,"active"),Rs(c,i)),n.lastQuery=null}removeOption(t,e){const n=this;t=bs(t),n.uncacheValue(t),delete n.userOptions[t],delete n.options[t],n.lastQuery=null,n.trigger("option_remove",t),n.removeItem(t,e)}clearOptions(t){const e=(t||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const n={};Ls(this.options,((t,i)=>{e(t,i)&&(n[i]=t)})),this.options=this.sifter.items=n,this.lastQuery=null,this.trigger("option_clear")}clearFilter(t,e){return this.items.indexOf(e)>=0}getOption(t,e=!1){const n=ys(t);if(null===n)return null;const i=this.options[n];if(null!=i){if(i.$div)return i.$div;if(e)return this._render("option",i)}return null}getAdjacent(t,e,n="option"){var i;if(!t)return null;i="item"==n?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let n=0;n0?i[n+1]:i[n-1];return null}getItem(t){if("object"==typeof t)return t;var e=ys(t);return null!==e?this.control.querySelector(`[data-value="${Ss(e)}"]`):null}addItems(t,e){var n=this,i=Array.isArray(t)?t:[t];const s=(i=i.filter((t=>-1===n.items.indexOf(t))))[i.length-1];i.forEach((t=>{n.isPending=t!==s,n.addItem(t,e)}))}addItem(t,e){ks(this,e?[]:["change","dropdown_close"],(()=>{var n,i;const s=this,r=s.settings.mode,o=ys(t);if((!o||-1===s.items.indexOf(o)||("single"===r&&s.close(),"single"!==r&&s.settings.duplicates))&&null!==o&&s.options.hasOwnProperty(o)&&("single"===r&&s.clear(e),"multi"!==r||!s.isFull())){if(n=s._render("item",s.options[o]),s.control.contains(n)&&(n=n.cloneNode(!0)),i=s.isFull(),s.items.splice(s.caretPos,0,o),s.insertAtCaret(n),s.isSetup){if(!s.isPending&&s.settings.hideSelected){let t=s.getOption(o),e=s.getAdjacent(t,1);e&&s.setActiveOption(e)}s.isPending||s.settings.closeAfterSelect||s.refreshOptions(s.isFocused&&"single"!==r),0!=s.settings.closeAfterSelect&&s.isFull()?s.close():s.isPending||s.positionDropdown(),s.trigger("item_add",o,n),s.isPending||s.updateOriginalInput({silent:e})}(!s.isPending||!i&&s.isFull())&&(s.inputState(),s.refreshState())}}))}removeItem(t=null,e){const n=this;if(!(t=n.getItem(t)))return;var i,s;const r=t.dataset.value;i=Vs(t),t.remove(),t.classList.contains("active")&&(s=n.activeItems.indexOf(t),n.activeItems.splice(s,1),Fs(t,"active")),n.items.splice(i,1),n.lastQuery=null,!n.settings.persist&&n.userOptions.hasOwnProperty(r)&&n.removeOption(r,e),i{})){3===arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{});var n,i=this,s=i.caretPos;if(t=t||i.inputValue(),!i.canCreate(t))return e(),!1;i.lock();var r=!1,o=t=>{if(i.unlock(),!t||"object"!=typeof t)return e();var n=ys(t[i.settings.valueField]);if("string"!=typeof n)return e();i.setTextboxValue(),i.addOption(t,!0),i.setCaret(s),i.addItem(n),e(t),r=!0};return n="function"==typeof i.settings.create?i.settings.create.call(this,t,o):{[i.settings.labelField]:t,[i.settings.valueField]:t},r||o(n),!0}refreshItems(){var t=this;t.lastQuery=null,t.isSetup&&t.addItems(t.items),t.updateOriginalInput(),t.refreshState()}refreshState(){const t=this;t.refreshValidityState();const e=t.isFull(),n=t.isLocked;t.wrapper.classList.toggle("rtl",t.rtl);const i=t.wrapper.classList;var s;i.toggle("focus",t.isFocused),i.toggle("disabled",t.isDisabled),i.toggle("readonly",t.isReadOnly),i.toggle("required",t.isRequired),i.toggle("invalid",!t.isValid),i.toggle("locked",n),i.toggle("full",e),i.toggle("input-active",t.isFocused&&!t.isInputHidden),i.toggle("dropdown-active",t.isOpen),i.toggle("has-options",(s=t.options,0===Object.keys(s).length)),i.toggle("has-items",t.items.length>0)}refreshValidityState(){var t=this;t.input.validity&&(t.isValid=t.input.validity.valid,t.isInvalid=!t.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){const e=this;var n,i;const s=e.input.querySelector('option[value=""]');if(e.is_select_tag){const r=[],o=e.input.querySelectorAll("option:checked").length;function a(t,n,i){return t||(t=Cs('")),t!=s&&e.input.append(t),r.push(t),(t!=s||o>0)&&(t.selected=!0),t}e.input.querySelectorAll("option:checked").forEach((t=>{t.selected=!1})),0==e.items.length&&"single"==e.settings.mode?a(s,"",""):e.items.forEach((t=>{if(n=e.options[t],i=n[e.settings.labelField]||"",r.includes(n.$option)){a(e.input.querySelector(`option[value="${Ss(t)}"]:not(:checked)`),t,i)}else n.$option=a(n.$option,t,i)}))}else e.input.value=e.getValue();e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,$s(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),Is(t.dropdown,{visibility:"hidden",display:"block"}),t.positionDropdown(),Is(t.dropdown,{visibility:"visible",display:"block"}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,n=e.isOpen;t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&e.inputState()),e.isOpen=!1,$s(e.focus_node,{"aria-expanded":"false"}),Is(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),n&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),n=t.offsetHeight+e.top+window.scrollY,i=e.left+window.scrollX;Is(this.dropdown,{width:e.width+"px",top:n+"px",left:i+"px"})}}clear(t){var e=this;if(e.items.length){var n=e.controlChildren();Ls(n,(t=>{e.removeItem(t,!0)})),e.inputState(),t||e.updateOriginalInput(),e.trigger("clear")}}insertAtCaret(t){const e=this,n=e.caretPos,i=e.control;i.insertBefore(t,i.children[n]||null),e.setCaret(n+1)}deleteSelection(t){var e,n,i,s,r,o=this;e=t&&8===t.keyCode?-1:1,n={start:(r=o.control_input).selectionStart||0,length:(r.selectionEnd||0)-(r.selectionStart||0)};const a=[];if(o.activeItems.length)s=Hs(o.activeItems,e),i=Vs(s),e>0&&i++,Ls(o.activeItems,(t=>a.push(t)));else if((o.isFocused||"single"===o.settings.mode)&&o.items.length){const t=o.controlChildren();let i;e<0&&0===n.start&&0===n.length?i=t[o.caretPos-1]:e>0&&n.start===o.inputValue().length&&(i=t[o.caretPos]),void 0!==i&&a.push(i)}if(!o.shouldDelete(a,t))return!1;for(Ts(t,!0),void 0!==i&&o.setCaret(i);a.length;)o.removeItem(a.pop());return o.inputState(),o.positionDropdown(),o.refreshOptions(!1),!0}shouldDelete(t,e){const n=t.map((t=>t.dataset.value));return!(!n.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(n,e))}advanceSelection(t,e){var n,i,s=this;s.rtl&&(t*=-1),s.inputValue().length||(Es(Bs,e)||Es("shiftKey",e)?(i=(n=s.getLastActive(t))?n.classList.contains("active")?s.getAdjacent(n,t,"item"):n:t>0?s.control_input.nextElementSibling:s.control_input.previousElementSibling)&&(i.classList.contains("active")&&s.removeActiveItem(n),s.setActiveItemClass(i)):s.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active");if(e)return e;var n=this.control.querySelectorAll(".active");return n?Hs(n,t):void 0}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(t=this.isReadOnly||this.isDisabled){this.isLocked=t,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(t){this.focus_node.tabIndex=t?-1:this.tabIndex,this.isDisabled=t,this.input.disabled=t,this.control_input.disabled=t,this.setLocked()}setReadOnly(t){this.isReadOnly=t,this.input.readOnly=t,this.control_input.readOnly=t,this.setLocked()}destroy(){var t=this,e=t.revertSettings;t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,Fs(t.input,"tomselected","ts-hidden-accessible"),t._destroy(),delete t.input.tomselect}render(t,e){var n,i;const s=this;if("function"!=typeof this.settings.render[t])return null;if(!(i=s.settings.render[t].call(this,e,_s)))return null;if(i=Cs(i),"option"===t||"option_create"===t?e[s.settings.disabledField]?$s(i,{"aria-disabled":"true"}):$s(i,{"data-selectable":""}):"optgroup"===t&&(n=e.group[s.settings.optgroupValueField],$s(i,{"data-group":n}),e.group[s.settings.disabledField]&&$s(i,{"data-disabled":""})),"option"===t||"item"===t){const n=bs(e[s.settings.valueField]);$s(i,{"data-value":n}),"item"===t?(Ns(i,s.settings.itemClass),$s(i,{"data-ts-item":""})):(Ns(i,s.settings.optionClass),$s(i,{role:"option",id:e.$id}),e.$div=i,s.options[n]=e)}return i}_render(t,e){const n=this.render(t,e);if(null==n)throw"HTMLElement expected";return n}clearCache(){Ls(this.options,(t=>{t.$div&&(t.$div.remove(),delete t.$div)}))}uncacheValue(t){const e=this.getOption(t);e&&e.remove()}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,n){var i=this,s=i[e];i[e]=function(){var e,r;return"after"===t&&(e=s.apply(i,arguments)),r=n.apply(i,arguments),"instead"===t?r:("before"===t&&(e=s.apply(i,arguments)),e)}}}const Js=t=>"boolean"==typeof t?t?"1":"0":t+"",Ks=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},Gs=t=>"string"==typeof t&&t.indexOf("<")>-1;const Qs=t=>"string"==typeof t&&t.indexOf("<")>-1;const Xs=(t,e,n,i)=>{t.addEventListener(e,n,i)},tr=t=>"string"==typeof t&&t.indexOf("<")>-1,er=(t,e)=>{((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(e,((e,n)=>{null==e?t.removeAttribute(n):t.setAttribute(n,""+e)}))};const nr=t=>"string"==typeof t&&t.indexOf("<")>-1;const ir=t=>{var e=[];return((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},sr=t=>(Array.isArray(t)||(t=[t]),t);const rr=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(or(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},or=t=>"string"==typeof t&&t.indexOf("<")>-1,ar=t=>{var e=[];return((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},lr=t=>(Array.isArray(t)||(t=[t]),t);const cr=(t,e,n,i)=>{t.addEventListener(e,n,i)};const ur=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},dr=(t,e,n,i)=>{t.addEventListener(e,n,i)},hr=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(pr(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},pr=t=>"string"==typeof t&&t.indexOf("<")>-1;const mr=t=>{var e=[];return((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},fr=t=>(Array.isArray(t)||(t=[t]),t);Zs.define("change_listener",(function(){var t,e,n,i;t=this.input,e="change",n=()=>{this.sync()},t.addEventListener(e,n,i)})),Zs.define("checkbox_options",(function(t){var e=this,n=e.onOptionSelect;e.settings.hideSelected=!1;const i=Object.assign({className:"tomselect-checkbox",checkedClassNames:void 0,uncheckedClassNames:void 0},t);var s=function(t,e){e?(t.checked=!0,i.uncheckedClassNames&&t.classList.remove(...i.uncheckedClassNames),i.checkedClassNames&&t.classList.add(...i.checkedClassNames)):(t.checked=!1,i.checkedClassNames&&t.classList.remove(...i.checkedClassNames),i.uncheckedClassNames&&t.classList.add(...i.uncheckedClassNames))},r=function(t){setTimeout((()=>{var e=t.querySelector("input."+i.className);e instanceof HTMLInputElement&&s(e,t.classList.contains("selected"))}),1)};e.hook("after","setupTemplates",(()=>{var t=e.settings.render.option;e.settings.render.option=(n,r)=>{var o=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(Gs(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(t.call(e,n,r)),a=document.createElement("input");i.className&&a.classList.add(i.className),a.addEventListener("click",(function(t){Ks(t)})),a.type="checkbox";const l=null==(c=n[e.settings.valueField])?null:Js(c);var c;return s(a,!!(l&&e.items.indexOf(l)>-1)),o.prepend(a),o}})),e.on("item_remove",(t=>{var n=e.getOption(t);n&&(n.classList.remove("selected"),r(n))})),e.on("item_add",(t=>{var n=e.getOption(t);n&&r(n)})),e.hook("instead","onOptionSelect",((t,i)=>{if(i.classList.contains("selected"))return i.classList.remove("selected"),e.removeItem(i.dataset.value),e.refreshOptions(),void Ks(t,!0);n.call(e,t,i),r(i)}))})),Zs.define("clear_button",(function(t){const e=this,n=Object.assign({className:"clear-button",title:"Clear All",html:t=>`
`},t);e.on("initialize",(()=>{var t=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(Qs(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(n.html(n));t.addEventListener("click",(t=>{e.isLocked||(e.clear(),"single"===e.settings.mode&&e.settings.allowEmptyOption&&e.addItem(""),t.preventDefault(),t.stopPropagation())})),e.control.appendChild(t)}))})),Zs.define("drag_drop",(function(){var t=this;if("multi"!==t.settings.mode)return;var e=t.lock,n=t.unlock;let i,s=!0;t.hook("after","setupTemplates",(()=>{var e=t.settings.render.item;t.settings.render.item=(n,r)=>{const o=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(tr(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(e.call(t,n,r));er(o,{draggable:"true"});const a=t=>{t.preventDefault(),o.classList.add("ts-drag-over"),l(o,i)},l=(t,e)=>{var n,i,s;void 0!==e&&(((t,e)=>{do{var n;if(t==(e=null==(n=e)?void 0:n.previousElementSibling))return!0}while(e&&e.previousElementSibling);return!1})(e,o)?(i=e,null==(s=(n=t).parentNode)||s.insertBefore(i,n.nextSibling)):((t,e)=>{var n;null==(n=t.parentNode)||n.insertBefore(e,t)})(t,e))};return Xs(o,"mousedown",(t=>{s||((t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())})(t),t.stopPropagation()})),Xs(o,"dragstart",(t=>{i=o,setTimeout((()=>{o.classList.add("ts-dragging")}),0)})),Xs(o,"dragenter",a),Xs(o,"dragover",a),Xs(o,"dragleave",(()=>{o.classList.remove("ts-drag-over")})),Xs(o,"dragend",(()=>{var e;document.querySelectorAll(".ts-drag-over").forEach((t=>t.classList.remove("ts-drag-over"))),null==(e=i)||e.classList.remove("ts-dragging"),i=void 0;var n=[];t.control.querySelectorAll("[data-value]").forEach((t=>{if(t.dataset.value){let e=t.dataset.value;e&&n.push(e)}})),t.setValue(n)})),o}})),t.hook("instead","lock",(()=>(s=!1,e.call(t)))),t.hook("instead","unlock",(()=>(s=!0,n.call(t))))})),Zs.define("dropdown_header",(function(t){const e=this,n=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:t=>'
'+t.title+'×
'},t);e.on("initialize",(()=>{var t=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(nr(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(n.html(n)),i=t.querySelector("."+n.closeClass);i&&i.addEventListener("click",(t=>{((t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())})(t,!0),e.close()})),e.dropdown.insertBefore(t,e.dropdown.firstChild)}))})),Zs.define("caret_position",(function(){var t=this;t.hook("instead","setCaret",(e=>{"single"!==t.settings.mode&&t.control.contains(t.control_input)?(e=Math.max(0,Math.min(t.items.length,e)))==t.caretPos||t.isPending||t.controlChildren().forEach(((n,i)=>{i{if(!t.isFocused)return;const n=t.getLastActive(e);if(n){const i=((t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var n=0;t=t.previousElementSibling;)t.matches(e)&&n++;return n})(n);t.setCaret(e>0?i+1:i),t.setActiveItem(),((t,...e)=>{var n=ir(e);(t=sr(t)).map((t=>{n.map((e=>{t.classList.remove(e)}))}))})(n,"last-active")}else t.setCaret(t.caretPos+e)}))})),Zs.define("dropdown_input",(function(){const t=this;t.settings.shouldOpen=!0,t.hook("before","setup",(()=>{t.focus_node=t.control,((t,...e)=>{var n=ar(e);(t=lr(t)).map((t=>{n.map((e=>{t.classList.add(e)}))}))})(t.control_input,"dropdown-input");const e=rr('");for(var E=1;E<=7;E+=1){var D=3+this.options.firstDay+E,S=document.createElement("div");S.innerHTML=this.weekdayName(D),S.title=this.weekdayName(D,"long"),x.appendChild(S)}var O=document.createElement("div");O.className=a.containerDays;var L=this.calcSkipDays(i);this.options.showWeekNumbers&&L&&O.appendChild(this.renderWeekNumber(i));for(var C=0;C1&&1===this.datePicked.length){var s=this.options.minDays-1,r=this.datePicked[0].clone().subtract(s,"day"),c=this.datePicked[0].clone().add(s,"day");t.isBetween(r,this.datePicked[0],"(]")&&e.classList.add(a.isLocked),t.isBetween(this.datePicked[0],c,"[)")&&e.classList.add(a.isLocked)}if(this.options.maxDays&&1===this.datePicked.length){var u=this.options.maxDays;r=this.datePicked[0].clone().subtract(u,"day"),c=this.datePicked[0].clone().add(u,"day"),t.isSameOrBefore(r)&&e.classList.add(a.isLocked),t.isSameOrAfter(c)&&e.classList.add(a.isLocked)}return this.options.selectForward&&1===this.datePicked.length&&t.isBefore(this.datePicked[0])&&e.classList.add(a.isLocked),this.options.selectBackward&&1===this.datePicked.length&&t.isAfter(this.datePicked[0])&&e.classList.add(a.isLocked),l.dateIsLocked(t,this.options,this.datePicked)&&e.classList.add(a.isLocked),this.options.highlightedDays.length&&this.options.highlightedDays.filter((function(e){return e instanceof Array?t.isBetween(e[0],e[1],"[]"):e.isSame(t,"day")})).length&&e.classList.add(a.isHighlighted),e.tabIndex=e.classList.contains("is-locked")?-1:0,this.emit("render:day",e,t),e},e.prototype.renderFooter=function(){var t=document.createElement("div");if(t.className=a.containerFooter,this.options.footerHTML?t.innerHTML=this.options.footerHTML:t.innerHTML='\n \n \n \n ",this.options.singleMode){if(1===this.datePicked.length){var e=this.datePicked[0].format(this.options.format,this.options.lang);t.querySelector("."+a.previewDateRange).innerHTML=e}}else if(1===this.datePicked.length&&t.querySelector("."+a.buttonApply).setAttribute("disabled",""),2===this.datePicked.length){e=this.datePicked[0].format(this.options.format,this.options.lang);var n=this.datePicked[1].format(this.options.format,this.options.lang);t.querySelector("."+a.previewDateRange).innerHTML=""+e+this.options.delimiter+n}return this.emit("render:footer",t),t},e.prototype.renderWeekNumber=function(t){var e=document.createElement("div"),n=t.getWeek(this.options.firstDay);return e.className=a.weekNumber,e.innerHTML=53===n&&0===t.getMonth()?"53 / 1":n,e},e.prototype.renderTooltip=function(){var t=document.createElement("div");return t.className=a.containerTooltip,t},e.prototype.weekdayName=function(t,e){return void 0===e&&(e="short"),new Date(1970,0,t,12,0,0,0).toLocaleString(this.options.lang,{weekday:e})},e.prototype.calcSkipDays=function(t){var e=t.getDay()-this.options.firstDay;return e<0&&(e+=7),e},e}(r.LPCore);e.Calendar=c},function(t,e,n){"use strict";var i,s=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,i=arguments.length;n',nextMonth:'',reset:'\n \n \n '},tooltipText:{one:"day",other:"days"}},n.options=r(r({},n.options),e.element.dataset),Object.keys(n.options).forEach((function(t){"true"!==n.options[t]&&"false"!==n.options[t]||(n.options[t]="true"===n.options[t])}));var i=r(r({},n.options.dropdowns),e.dropdowns),s=r(r({},n.options.buttonText),e.buttonText),o=r(r({},n.options.tooltipText),e.tooltipText);n.options=r(r({},n.options),e),n.options.dropdowns=r({},i),n.options.buttonText=r({},s),n.options.tooltipText=r({},o),n.options.elementEnd||(n.options.allowRepick=!1),n.options.lockDays.length&&(n.options.lockDays=a.DateTime.convertArray(n.options.lockDays,n.options.lockDaysFormat)),n.options.highlightedDays.length&&(n.options.highlightedDays=a.DateTime.convertArray(n.options.highlightedDays,n.options.highlightedDaysFormat));var l=n.parseInput(),c=l[0],u=l[1];n.options.startDate&&(n.options.singleMode||n.options.endDate)&&(c=new a.DateTime(n.options.startDate,n.options.format,n.options.lang)),c&&n.options.endDate&&(u=new a.DateTime(n.options.endDate,n.options.format,n.options.lang)),c instanceof a.DateTime&&!isNaN(c.getTime())&&(n.options.startDate=c),n.options.startDate&&u instanceof a.DateTime&&!isNaN(u.getTime())&&(n.options.endDate=u),!n.options.singleMode||n.options.startDate instanceof a.DateTime||(n.options.startDate=null),n.options.singleMode||n.options.startDate instanceof a.DateTime&&n.options.endDate instanceof a.DateTime||(n.options.startDate=null,n.options.endDate=null);for(var d=0;dwindow.innerHeight,c=e.top+r-n.height>=n.height;l&&c&&(o=e.top+r-n.height)}if(/left|right/.test(i[0])||i[1]&&"auto"!==i[1]&&/left|right/.test(i[1]))a=/left|right/.test(i[0])?e[i[0]]+s:e[i[1]]+s,"right"!==i[0]&&"right"!==i[1]||(a-=n.width);else{a=e.left+s,l=e.left+n.width>window.innerWidth;var u=e.right+s-n.width>=0;l&&u&&(a=e.right+s-n.width)}return{left:a,top:o}},e}(o.EventEmitter);e.LPCore=c},function(t,e,n){"use strict";var i,s="object"==typeof Reflect?Reflect:null,r=s&&"function"==typeof s.apply?s.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};i=s&&"function"==typeof s.ownKeys?s.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function c(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function u(t,e,n,i){var s,r,o,a;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(r=t._events)?(r=t._events=Object.create(null),t._eventsCount=0):(void 0!==r.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),r=t._events),o=r[e]),void 0===o)o=r[e]=n,++t._eventsCount;else if("function"==typeof o?o=r[e]=i?[n,o]:[o,n]:i?o.unshift(n):o.push(n),(s=c(t))>0&&o.length>s&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=o.length,a=l,console&&console.warn&&console.warn(a)}return t}function d(){for(var t=[],e=0;e0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=s[t];if(void 0===l)return!1;if("function"==typeof l)r(l,this,e);else{var c=l.length,u=f(l,c);for(n=0;n=0;r--)if(n[r]===e||n[r].listener===e){o=n[r].listener,s=r;break}if(s<0)return this;0===s?n.shift():function(t,e){for(;e+1=0;i--)this.removeListener(t,e[i]);return this},a.prototype.listeners=function(t){return p(this,t,!0)},a.prototype.rawListeners=function(t){return p(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(t,e,n){(e=n(9)(!1)).push([t.i,':root{--litepicker-container-months-color-bg: #fff;--litepicker-container-months-box-shadow-color: #ddd;--litepicker-footer-color-bg: #fafafa;--litepicker-footer-box-shadow-color: #ddd;--litepicker-tooltip-color-bg: #fff;--litepicker-month-header-color: #333;--litepicker-button-prev-month-color: #9e9e9e;--litepicker-button-next-month-color: #9e9e9e;--litepicker-button-prev-month-color-hover: #2196f3;--litepicker-button-next-month-color-hover: #2196f3;--litepicker-month-width: calc(var(--litepicker-day-width) * 7);--litepicker-month-weekday-color: #9e9e9e;--litepicker-month-week-number-color: #9e9e9e;--litepicker-day-width: 38px;--litepicker-day-color: #333;--litepicker-day-color-hover: #2196f3;--litepicker-is-today-color: #f44336;--litepicker-is-in-range-color: #bbdefb;--litepicker-is-locked-color: #9e9e9e;--litepicker-is-start-color: #fff;--litepicker-is-start-color-bg: #2196f3;--litepicker-is-end-color: #fff;--litepicker-is-end-color-bg: #2196f3;--litepicker-button-cancel-color: #fff;--litepicker-button-cancel-color-bg: #9e9e9e;--litepicker-button-apply-color: #fff;--litepicker-button-apply-color-bg: #2196f3;--litepicker-button-reset-color: #909090;--litepicker-button-reset-color-hover: #2196f3;--litepicker-highlighted-day-color: #333;--litepicker-highlighted-day-color-bg: #ffeb3b}.show-week-numbers{--litepicker-month-width: calc(var(--litepicker-day-width) * 8)}.litepicker{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;font-size:0.8em;display:none}.litepicker button{border:none;background:none}.litepicker .container__main{display:-webkit-box;display:-ms-flexbox;display:flex}.litepicker .container__months{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;background-color:var(--litepicker-container-months-color-bg);border-radius:5px;-webkit-box-shadow:0 0 5px var(--litepicker-container-months-box-shadow-color);box-shadow:0 0 5px var(--litepicker-container-months-box-shadow-color);width:calc(var(--litepicker-month-width) + 10px);-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__months.columns-2{width:calc((var(--litepicker-month-width) * 2) + 20px)}.litepicker .container__months.columns-3{width:calc((var(--litepicker-month-width) * 3) + 30px)}.litepicker .container__months.columns-4{width:calc((var(--litepicker-month-width) * 4) + 40px)}.litepicker .container__months.split-view .month-item-header .button-previous-month,.litepicker .container__months.split-view .month-item-header .button-next-month{visibility:visible}.litepicker .container__months .month-item{padding:5px;width:var(--litepicker-month-width);-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__months .month-item-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-weight:500;padding:10px 5px;text-align:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--litepicker-month-header-color)}.litepicker .container__months .month-item-header div{-webkit-box-flex:1;-ms-flex:1;flex:1}.litepicker .container__months .month-item-header div>.month-item-name{margin-right:5px}.litepicker .container__months .month-item-header div>.month-item-year{padding:0}.litepicker .container__months .month-item-header .reset-button{color:var(--litepicker-button-reset-color)}.litepicker .container__months .month-item-header .reset-button>svg{fill:var(--litepicker-button-reset-color)}.litepicker .container__months .month-item-header .reset-button *{pointer-events:none}.litepicker .container__months .month-item-header .reset-button:hover{color:var(--litepicker-button-reset-color-hover)}.litepicker .container__months .month-item-header .reset-button:hover>svg{fill:var(--litepicker-button-reset-color-hover)}.litepicker .container__months .month-item-header .button-previous-month,.litepicker .container__months .month-item-header .button-next-month{visibility:hidden;text-decoration:none;padding:3px 5px;border-radius:3px;-webkit-transition:color 0.3s, border 0.3s;transition:color 0.3s, border 0.3s;cursor:default}.litepicker .container__months .month-item-header .button-previous-month *,.litepicker .container__months .month-item-header .button-next-month *{pointer-events:none}.litepicker .container__months .month-item-header .button-previous-month{color:var(--litepicker-button-prev-month-color)}.litepicker .container__months .month-item-header .button-previous-month>svg,.litepicker .container__months .month-item-header .button-previous-month>img{fill:var(--litepicker-button-prev-month-color)}.litepicker .container__months .month-item-header .button-previous-month:hover{color:var(--litepicker-button-prev-month-color-hover)}.litepicker .container__months .month-item-header .button-previous-month:hover>svg{fill:var(--litepicker-button-prev-month-color-hover)}.litepicker .container__months .month-item-header .button-next-month{color:var(--litepicker-button-next-month-color)}.litepicker .container__months .month-item-header .button-next-month>svg,.litepicker .container__months .month-item-header .button-next-month>img{fill:var(--litepicker-button-next-month-color)}.litepicker .container__months .month-item-header .button-next-month:hover{color:var(--litepicker-button-next-month-color-hover)}.litepicker .container__months .month-item-header .button-next-month:hover>svg{fill:var(--litepicker-button-next-month-color-hover)}.litepicker .container__months .month-item-weekdays-row{display:-webkit-box;display:-ms-flexbox;display:flex;justify-self:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;color:var(--litepicker-month-weekday-color)}.litepicker .container__months .month-item-weekdays-row>div{padding:5px 0;font-size:85%;-webkit-box-flex:1;-ms-flex:1;flex:1;width:var(--litepicker-day-width);text-align:center}.litepicker .container__months .month-item:first-child .button-previous-month{visibility:visible}.litepicker .container__months .month-item:last-child .button-next-month{visibility:visible}.litepicker .container__months .month-item.no-previous-month .button-previous-month{visibility:hidden}.litepicker .container__months .month-item.no-next-month .button-next-month{visibility:hidden}.litepicker .container__days{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-self:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:center;-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__days>div,.litepicker .container__days>a{padding:5px 0;width:var(--litepicker-day-width)}.litepicker .container__days .day-item{color:var(--litepicker-day-color);text-align:center;text-decoration:none;border-radius:3px;-webkit-transition:color 0.3s, border 0.3s;transition:color 0.3s, border 0.3s;cursor:default}.litepicker .container__days .day-item:hover{color:var(--litepicker-day-color-hover);-webkit-box-shadow:inset 0 0 0 1px var(--litepicker-day-color-hover);box-shadow:inset 0 0 0 1px var(--litepicker-day-color-hover)}.litepicker .container__days .day-item.is-today{color:var(--litepicker-is-today-color)}.litepicker .container__days .day-item.is-locked{color:var(--litepicker-is-locked-color)}.litepicker .container__days .day-item.is-locked:hover{color:var(--litepicker-is-locked-color);-webkit-box-shadow:none;box-shadow:none;cursor:default}.litepicker .container__days .day-item.is-in-range{background-color:var(--litepicker-is-in-range-color);border-radius:0}.litepicker .container__days .day-item.is-start-date{color:var(--litepicker-is-start-color);background-color:var(--litepicker-is-start-color-bg);border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:0;border-bottom-right-radius:0}.litepicker .container__days .day-item.is-start-date.is-flipped{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-end-date{color:var(--litepicker-is-end-color);background-color:var(--litepicker-is-end-color-bg);border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-end-date.is-flipped{border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:0;border-bottom-right-radius:0}.litepicker .container__days .day-item.is-start-date.is-end-date{border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-highlighted{color:var(--litepicker-highlighted-day-color);background-color:var(--litepicker-highlighted-day-color-bg)}.litepicker .container__days .week-number{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:var(--litepicker-month-week-number-color);font-size:85%}.litepicker .container__footer{text-align:right;padding:10px 5px;margin:0 5px;background-color:var(--litepicker-footer-color-bg);-webkit-box-shadow:inset 0px 3px 3px 0px var(--litepicker-footer-box-shadow-color);box-shadow:inset 0px 3px 3px 0px var(--litepicker-footer-box-shadow-color);border-bottom-left-radius:5px;border-bottom-right-radius:5px}.litepicker .container__footer .preview-date-range{margin-right:10px;font-size:90%}.litepicker .container__footer .button-cancel{background-color:var(--litepicker-button-cancel-color-bg);color:var(--litepicker-button-cancel-color);border:0;padding:3px 7px 4px;border-radius:3px}.litepicker .container__footer .button-cancel *{pointer-events:none}.litepicker .container__footer .button-apply{background-color:var(--litepicker-button-apply-color-bg);color:var(--litepicker-button-apply-color);border:0;padding:3px 7px 4px;border-radius:3px;margin-left:10px;margin-right:10px}.litepicker .container__footer .button-apply:disabled{opacity:0.7}.litepicker .container__footer .button-apply *{pointer-events:none}.litepicker .container__tooltip{position:absolute;margin-top:-4px;padding:4px 8px;border-radius:4px;background-color:var(--litepicker-tooltip-color-bg);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.25);box-shadow:0 1px 3px rgba(0,0,0,0.25);white-space:nowrap;font-size:11px;pointer-events:none;visibility:hidden}.litepicker .container__tooltip:before{position:absolute;bottom:-5px;left:calc(50% - 5px);border-top:5px solid rgba(0,0,0,0.12);border-right:5px solid transparent;border-left:5px solid transparent;content:""}.litepicker .container__tooltip:after{position:absolute;bottom:-4px;left:calc(50% - 4px);border-top:4px solid var(--litepicker-tooltip-color-bg);border-right:4px solid transparent;border-left:4px solid transparent;content:""}\n',""]),e.locals={showWeekNumbers:"show-week-numbers",litepicker:"litepicker",containerMain:"container__main",containerMonths:"container__months",columns2:"columns-2",columns3:"columns-3",columns4:"columns-4",splitView:"split-view",monthItemHeader:"month-item-header",buttonPreviousMonth:"button-previous-month",buttonNextMonth:"button-next-month",monthItem:"month-item",monthItemName:"month-item-name",monthItemYear:"month-item-year",resetButton:"reset-button",monthItemWeekdaysRow:"month-item-weekdays-row",noPreviousMonth:"no-previous-month",noNextMonth:"no-next-month",containerDays:"container__days",dayItem:"day-item",isToday:"is-today",isLocked:"is-locked",isInRange:"is-in-range",isStartDate:"is-start-date",isFlipped:"is-flipped",isEndDate:"is-end-date",isHighlighted:"is-highlighted",weekNumber:"week-number",containerFooter:"container__footer",previewDateRange:"preview-date-range",buttonCancel:"button-cancel",buttonApply:"button-apply",containerTooltip:"container__tooltip"},t.exports=e},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,i,s,r=t[1]||"",o=t[3];if(!o)return r;if(e&&"function"==typeof btoa){var a=(n=o,i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),"/*# ".concat(s," */")),l=o.sources.map((function(t){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(t," */")}));return[r].concat(l).concat([a]).join("\n")}return[r].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var s={};if(i)for(var r=0;rthis.options.endDate.getTime()&&(this.options.endDate=this.options.startDate.clone(),this.options.startDate=new s.DateTime(t,this.options.format,this.options.lang)),this.updateInput())},r.Litepicker.prototype.setDateRange=function(t,e,n){void 0===n&&(n=!1),this.triggerElement=void 0;var i=new s.DateTime(t,this.options.format,this.options.lang),r=new s.DateTime(e,this.options.format,this.options.lang);(this.options.disallowLockDaysInRange?o.rangeIsLocked([i,r],this.options):o.dateIsLocked(i,this.options,[i,r])||o.dateIsLocked(r,this.options,[i,r]))&&!n?this.emit("error:range",[i,r]):(this.setStartDate(i),this.setEndDate(r),this.options.inlineMode&&this.render(),this.updateInput(),this.emit("selected",this.getStartDate(),this.getEndDate()))},r.Litepicker.prototype.gotoDate=function(t,e){void 0===e&&(e=0);var n=new s.DateTime(t);n.setDate(1),this.calendars[e]=n.clone(),this.render()},r.Litepicker.prototype.setLockDays=function(t){this.options.lockDays=s.DateTime.convertArray(t,this.options.lockDaysFormat),this.render()},r.Litepicker.prototype.setHighlightedDays=function(t){this.options.highlightedDays=s.DateTime.convertArray(t,this.options.highlightedDaysFormat),this.render()},r.Litepicker.prototype.setOptions=function(t){delete t.element,delete t.elementEnd,delete t.parentEl,t.startDate&&(t.startDate=new s.DateTime(t.startDate,this.options.format,this.options.lang)),t.endDate&&(t.endDate=new s.DateTime(t.endDate,this.options.format,this.options.lang));var e=i(i({},this.options.dropdowns),t.dropdowns),n=i(i({},this.options.buttonText),t.buttonText),r=i(i({},this.options.tooltipText),t.tooltipText);this.options=i(i({},this.options),t),this.options.dropdowns=i({},e),this.options.buttonText=i({},n),this.options.tooltipText=i({},r),!this.options.singleMode||this.options.startDate instanceof s.DateTime||(this.options.startDate=null,this.options.endDate=null),this.options.singleMode||this.options.startDate instanceof s.DateTime&&this.options.endDate instanceof s.DateTime||(this.options.startDate=null,this.options.endDate=null);for(var o=0;oMath.abs(r),a=t.options.numberOfMonths,l=null,c=!1,u="",d=Array.from(t.ui.querySelectorAll(".month-item"));if(o){var h=t.DateTime(t.ui.querySelector(".day-item").dataset.time),p=Number("".concat(1-Math.abs(s)/100)),m=0;if(s>0){m=-Math.abs(s),l=h.clone().add(a,"month");var f=t.options.maxDate;c=!f||l.isSameOrBefore(t.DateTime(f),"month"),u="next"}else{m=Math.abs(s),l=h.clone().subtract(a,"month");var g=t.options.minDate;c=!g||l.isSameOrAfter(t.DateTime(g),"month"),u="prev"}c&&d.map((function(t){t.style.opacity=p,t.style.transform="translateX(".concat(m,"px)")}))}Math.abs(s)+Math.abs(r)>100&&o&&l&&c&&(t.touchTargetMonth=u,t.gotoDate(l))}}),!!n&&{passive:!0}),t.ui.addEventListener("touchend",(function(e){t.touchTargetMonth||Array.from(t.ui.querySelectorAll(".month-item")).map((function(t){t.style.transform="translateX(0px)",t.style.opacity=1})),t.xTouchDown=null,t.yTouchDown=null}),!!n&&{passive:!0})}})},function(t,e,n){var i=n(7);"string"==typeof i&&(i=[[t.i,i,""]]);var s={insert:function(t){var e=document.querySelector("head"),n=window._lastElementInsertedByStyleLoader;window.disableLitepickerStyles||(n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),window._lastElementInsertedByStyleLoader=t)},singleton:!1};n(1)(i,s),i.locals&&(t.exports=i.locals)},function(t,e,n){(e=n(0)(!1)).push([t.i,':root {\n --litepicker-mobilefriendly-backdrop-color-bg: #000;\n}\n\n.litepicker-backdrop {\n display: none;\n background-color: var(--litepicker-mobilefriendly-backdrop-color-bg);\n opacity: 0.3;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n.litepicker-open {\n overflow: hidden;\n}\n\n.litepicker.mobilefriendly[data-plugins*="mobilefriendly"] {\n transform: translate(-50%, -50%);\n font-size: 1.1rem;\n --litepicker-container-months-box-shadow-color: #616161;\n}\n.litepicker.mobilefriendly-portrait {\n --litepicker-day-width: 13.5vw;\n --litepicker-month-width: calc(var(--litepicker-day-width) * 7);\n}\n.litepicker.mobilefriendly-landscape {\n --litepicker-day-width: 5.5vw;\n --litepicker-month-width: calc(var(--litepicker-day-width) * 7);\n}\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months {\n overflow: hidden;\n}\n\n.litepicker.mobilefriendly[data-plugins*="mobilefriendly"] .container__months .month-item-header {\n height: var(--litepicker-day-width);\n}\n\n.litepicker.mobilefriendly[data-plugins*="mobilefriendly"] .container__days > div {\n height: var(--litepicker-day-width);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months .month-item {\n transform-origin: center;\n}\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months .month-item.touch-target-next {\n animation-name: lp-bounce-target-next;\n animation-duration: .5s;\n animation-timing-function: ease;\n}\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months .month-item.touch-target-prev {\n animation-name: lp-bounce-target-prev;\n animation-duration: .5s;\n animation-timing-function: ease;\n}\n\n@keyframes lp-bounce-target-next {\n from {\n transform: translateX(100px) scale(0.5);\n }\n to {\n transform: translateX(0px) scale(1);\n }\n}\n\n@keyframes lp-bounce-target-prev {\n from {\n transform: translateX(-100px) scale(0.5);\n }\n to {\n transform: translateX(0px) scale(1);\n }\n}',""]),t.exports=e}])},4975:function(t,e,n){"use strict";n.r(e)}},function(t){var e;e=4028,t(t.s=e)}]); \ No newline at end of file diff --git a/public/build/app.ea4d46bf.js.LICENSE.txt b/public/build/app.7719f352.js.LICENSE.txt similarity index 100% rename from public/build/app.ea4d46bf.js.LICENSE.txt rename to public/build/app.7719f352.js.LICENSE.txt diff --git a/public/build/app.ea4d46bf.js b/public/build/app.ea4d46bf.js deleted file mode 100644 index 046eaf62..00000000 --- a/public/build/app.ea4d46bf.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see app.ea4d46bf.js.LICENSE.txt */ -(self.webpackChunkkimai2=self.webpackChunkkimai2||[]).push([[524],{4028:function(t,e,n){n(4975),n(9828),n.g.KimaiPaginatedBoxWidget=n(4100).A,n.g.KimaiReloadPageWidget=n(5170).A,n.g.KimaiColor=n(9997).A,n.g.KimaiStorage=n(5247).A},9828:function(t,e,n){"use strict";class i extends Error{}class s extends i{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class r extends i{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class o extends i{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class a extends i{}class l extends i{constructor(t){super(`Invalid unit ${t}`)}}class c extends i{}class u extends i{constructor(){super("Zone is an abstract class")}}const d="numeric",h="short",p="long",m={year:d,month:d,day:d},f={year:d,month:h,day:d},g={year:d,month:h,day:d,weekday:h},v={year:d,month:p,day:d},y={year:d,month:p,day:d,weekday:p},b={hour:d,minute:d},_={hour:d,minute:d,second:d},w={hour:d,minute:d,second:d,timeZoneName:h},k={hour:d,minute:d,second:d,timeZoneName:p},T={hour:d,minute:d,hourCycle:"h23"},x={hour:d,minute:d,second:d,hourCycle:"h23"},E={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:h},D={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:p},S={year:d,month:d,day:d,hour:d,minute:d},O={year:d,month:d,day:d,hour:d,minute:d,second:d},L={year:d,month:h,day:d,hour:d,minute:d},C={year:d,month:h,day:d,hour:d,minute:d,second:d},M={year:d,month:h,day:d,weekday:h,hour:d,minute:d},A={year:d,month:p,day:d,hour:d,minute:d,timeZoneName:h},I={year:d,month:p,day:d,hour:d,minute:d,second:d,timeZoneName:h},N={year:d,month:p,day:d,weekday:p,hour:d,minute:d,timeZoneName:p},F={year:d,month:p,day:d,weekday:p,hour:d,minute:d,second:d,timeZoneName:p};class P{get type(){throw new u}get name(){throw new u}get ianaName(){return this.name}get isUniversal(){throw new u}offsetName(t,e){throw new u}formatOffset(t,e){throw new u}offset(t){throw new u}equals(t){throw new u}get isValid(){throw new u}}let j=null;class q extends P{static get instance(){return null===j&&(j=new q),j}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:e,locale:n}){return ne(t,e,n)}formatOffset(t,e){return oe(this.offset(t),e)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return"system"===t.type}get isValid(){return!0}}let H={};const V={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let $={};class R extends P{static create(t){return $[t]||($[t]=new R(t)),$[t]}static resetCache(){$={},H={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch(t){return!1}}constructor(t){super(),this.zoneName=t,this.valid=R.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:e,locale:n}){return ne(t,e,n,this.name)}formatOffset(t,e){return oe(this.offset(t),e)}offset(t){const e=new Date(t);if(isNaN(e))return NaN;const n=(i=this.name,H[i]||(H[i]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:i,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),H[i]);var i;let[s,r,o,a,l,c,u]=n.formatToParts?function(t,e){const n=t.formatToParts(e),i=[];for(let t=0;t=0?h:1e3+h,(Qt({year:s,month:r,day:o,hour:24===l?0:l,minute:c,second:u,millisecond:0})-d)/6e4}equals(t){return"iana"===t.type&&t.name===this.name}get isValid(){return this.valid}}let W={};let B={};function z(t,e={}){const n=JSON.stringify([t,e]);let i=B[n];return i||(i=new Intl.DateTimeFormat(t,e),B[n]=i),i}let Y={};let U={};let Z=null;let J={};function K(t,e,n,i){const s=t.listingMode();return"error"===s?null:"en"===s?n(e):i(e)}class G{constructor(t,e,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:i,floor:s,...r}=n;if(!e||Object.keys(r).length>0){const e={useGrouping:!1,...n};n.padTo>0&&(e.minimumIntegerDigits=n.padTo),this.inf=function(t,e={}){const n=JSON.stringify([t,e]);let i=Y[n];return i||(i=new Intl.NumberFormat(t,e),Y[n]=i),i}(t,e)}}format(t){if(this.inf){const e=this.floor?Math.floor(t):t;return this.inf.format(e)}return Bt(this.floor?Math.floor(t):Zt(t,3),this.padTo)}}class Q{constructor(t,e,n){let i;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=t;else if("fixed"===t.zone.type){const e=t.offset/60*-1,n=e>=0?`Etc/GMT+${e}`:`Etc/GMT${e}`;0!==t.offset&&R.create(n).valid?(i=n,this.dt=t):(i="UTC",this.dt=0===t.offset?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else"system"===t.zone.type?this.dt=t:"iana"===t.zone.type?(this.dt=t,i=t.zone.name):(i="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const s={...this.opts};s.timeZone=s.timeZone||i,this.dtf=z(e,s)}format(){return this.originalZone?this.formatToParts().map((({value:t})=>t)).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map((t=>{if("timeZoneName"===t.type){const e=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:e}}return t})):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class X{constructor(t,e,n){this.opts={style:"long",...n},!e&&qt()&&(this.rtf=function(t,e={}){const{base:n,...i}=e,s=JSON.stringify([t,i]);let r=U[s];return r||(r=new Intl.RelativeTimeFormat(t,e),U[s]=r),r}(t,n))}format(t,e){return this.rtf?this.rtf.format(t,e):function(t,e,n="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},r=-1===["hours","minutes","seconds"].indexOf(t);if("auto"===n&&r){const n="days"===t;switch(e){case 1:return n?"tomorrow":`next ${s[t][0]}`;case-1:return n?"yesterday":`last ${s[t][0]}`;case 0:return n?"today":`this ${s[t][0]}`}}const o=Object.is(e,-0)||e<0,a=Math.abs(e),l=1===a,c=s[t],u=i?l?c[1]:c[2]||c[1]:l?s[t][0]:t;return o?`${a} ${u} ago`:`in ${a} ${u}`}(e,t,this.opts.numeric,"long"!==this.opts.style)}formatToParts(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]}}const tt={firstDay:1,minimalDays:4,weekend:[6,7]};class et{static fromOpts(t){return et.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,e,n,i,s=!1){const r=t||bt.defaultLocale,o=r||(s?"en-US":Z||(Z=(new Intl.DateTimeFormat).resolvedOptions().locale,Z)),a=e||bt.defaultNumberingSystem,l=n||bt.defaultOutputCalendar,c=Rt(i)||bt.defaultWeekSettings;return new et(o,a,l,c,r)}static resetCache(){Z=null,B={},Y={},U={}}static fromObject({locale:t,numberingSystem:e,outputCalendar:n,weekSettings:i}={}){return et.create(t,e,n,i)}constructor(t,e,n,i,s){const[r,o,a]=function(t){const e=t.indexOf("-x-");-1!==e&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(-1===n)return[t];{let e,i;try{e=z(t).resolvedOptions(),i=t}catch(s){const r=t.substring(0,n);e=z(r).resolvedOptions(),i=r}const{numberingSystem:s,calendar:r}=e;return[i,s,r]}}(t);this.locale=r,this.numberingSystem=e||o||null,this.outputCalendar=n||a||null,this.weekSettings=i,this.intl=function(t,e,n){return n||e?(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`),t):t}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){var t;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(t=this).numberingSystem||"latn"===t.numberingSystem)&&("latn"===t.numberingSystem||!t.locale||t.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),e=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t&&e?"en":"intl"}clone(t){return t&&0!==Object.getOwnPropertyNames(t).length?et.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Rt(t.weekSettings)||this.weekSettings,t.defaultToEN||!1):this}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,e=!1){return K(this,t,de,(()=>{const n=e?{month:t,day:"numeric"}:{month:t},i=e?"format":"standalone";return this.monthsCache[i][t]||(this.monthsCache[i][t]=function(t){const e=[];for(let n=1;n<=12;n++){const i=fi.utc(2009,n,1);e.push(t(i))}return e}((t=>this.extract(t,n,"month")))),this.monthsCache[i][t]}))}weekdays(t,e=!1){return K(this,t,fe,(()=>{const n=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},i=e?"format":"standalone";return this.weekdaysCache[i][t]||(this.weekdaysCache[i][t]=function(t){const e=[];for(let n=1;n<=7;n++){const i=fi.utc(2016,11,13+n);e.push(t(i))}return e}((t=>this.extract(t,n,"weekday")))),this.weekdaysCache[i][t]}))}meridiems(){return K(this,void 0,(()=>ge),(()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[fi.utc(2016,11,13,9),fi.utc(2016,11,13,19)].map((e=>this.extract(e,t,"dayperiod")))}return this.meridiemCache}))}eras(t){return K(this,t,_e,(()=>{const e={era:t};return this.eraCache[t]||(this.eraCache[t]=[fi.utc(-40,1,1),fi.utc(2017,1,1)].map((t=>this.extract(t,e,"era")))),this.eraCache[t]}))}extract(t,e,n){const i=this.dtFormatter(t,e).formatToParts().find((t=>t.type.toLowerCase()===n));return i?i.value:null}numberFormatter(t={}){return new G(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,e={}){return new Q(t,this.intl,e)}relFormatter(t={}){return new X(this.intl,this.isEnglish(),t)}listFormatter(t={}){return function(t,e={}){const n=JSON.stringify([t,e]);let i=W[n];return i||(i=new Intl.ListFormat(t,e),W[n]=i),i}(this.intl,t)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Ht()?function(t){let e=J[t];if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,J[t]=e}return e}(this.locale):tt}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let nt=null;class it extends P{static get utcInstance(){return null===nt&&(nt=new it(0)),nt}static instance(t){return 0===t?it.utcInstance:new it(t)}static parseSpecifier(t){if(t){const e=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new it(ie(e[1],e[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${oe(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${oe(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,e){return oe(this.fixed,e)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return"fixed"===t.type&&t.fixed===this.fixed}get isValid(){return!0}}class st extends P{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function rt(t,e){if(Ft(t)||null===t)return e;if(t instanceof P)return t;if("string"==typeof t){const n=t.toLowerCase();return"default"===n?e:"local"===n||"system"===n?q.instance:"utc"===n||"gmt"===n?it.utcInstance:it.parseSpecifier(n)||R.create(t)}return Pt(t)?it.instance(t):"object"==typeof t&&"offset"in t&&"function"==typeof t.offset?t:new st(t)}const ot={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},at={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},lt=ot.hanidec.replace(/[\[|\]]/g,"").split("");let ct={};function ut({numberingSystem:t},e=""){const n=t||"latn";return ct[n]||(ct[n]={}),ct[n][e]||(ct[n][e]=new RegExp(`${ot[n]}${e}`)),ct[n][e]}let dt,ht=()=>Date.now(),pt="system",mt=null,ft=null,gt=null,vt=60,yt=null;class bt{static get now(){return ht}static set now(t){ht=t}static set defaultZone(t){pt=t}static get defaultZone(){return rt(pt,q.instance)}static get defaultLocale(){return mt}static set defaultLocale(t){mt=t}static get defaultNumberingSystem(){return ft}static set defaultNumberingSystem(t){ft=t}static get defaultOutputCalendar(){return gt}static set defaultOutputCalendar(t){gt=t}static get defaultWeekSettings(){return yt}static set defaultWeekSettings(t){yt=Rt(t)}static get twoDigitCutoffYear(){return vt}static set twoDigitCutoffYear(t){vt=t%100}static get throwOnInvalid(){return dt}static set throwOnInvalid(t){dt=t}static resetCaches(){et.resetCache(),R.resetCache(),fi.resetCache(),ct={}}}class _t{constructor(t,e){this.reason=t,this.explanation=e}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const wt=[0,31,59,90,120,151,181,212,243,273,304,334],kt=[0,31,60,91,121,152,182,213,244,274,305,335];function Tt(t,e){return new _t("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function xt(t,e,n){const i=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return 0===s?7:s}function Et(t,e,n){return n+(Jt(t)?kt:wt)[e-1]}function Dt(t,e){const n=Jt(t)?kt:wt,i=n.findIndex((t=>tte(i,e,n)?(l=i+1,c=1):l=i,{weekYear:l,weekNumber:c,weekday:a,...ae(t)}}function Lt(t,e=4,n=1){const{weekYear:i,weekNumber:s,weekday:r}=t,o=St(xt(i,1,e),n),a=Kt(i);let l,c=7*s+r-o-7+e;c<1?(l=i-1,c+=Kt(l)):c>a?(l=i+1,c-=Kt(i)):l=i;const{month:u,day:d}=Dt(l,c);return{year:l,month:u,day:d,...ae(t)}}function Ct(t){const{year:e,month:n,day:i}=t;return{year:e,ordinal:Et(e,n,i),...ae(t)}}function Mt(t){const{year:e,ordinal:n}=t,{month:i,day:s}=Dt(e,n);return{year:e,month:i,day:s,...ae(t)}}function At(t,e){if(!Ft(t.localWeekday)||!Ft(t.localWeekNumber)||!Ft(t.localWeekYear)){if(!Ft(t.weekday)||!Ft(t.weekNumber)||!Ft(t.weekYear))throw new a("Cannot mix locale-based week fields with ISO-based week fields");return Ft(t.localWeekday)||(t.weekday=t.localWeekday),Ft(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),Ft(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function It(t){const e=jt(t.year),n=Wt(t.month,1,12),i=Wt(t.day,1,Gt(t.year,t.month));return e?n?!i&&Tt("day",t.day):Tt("month",t.month):Tt("year",t.year)}function Nt(t){const{hour:e,minute:n,second:i,millisecond:s}=t,r=Wt(e,0,23)||24===e&&0===n&&0===i&&0===s,o=Wt(n,0,59),a=Wt(i,0,59),l=Wt(s,0,999);return r?o?a?!l&&Tt("millisecond",s):Tt("second",i):Tt("minute",n):Tt("hour",e)}function Ft(t){return void 0===t}function Pt(t){return"number"==typeof t}function jt(t){return"number"==typeof t&&t%1==0}function qt(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function Ht(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(t){return!1}}function Vt(t,e,n){if(0!==t.length)return t.reduce(((t,i)=>{const s=[e(i),i];return t&&n(t[0],s[0])===t[0]?t:s}),null)[1]}function $t(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Rt(t){if(null==t)return null;if("object"!=typeof t)throw new c("Week settings must be an object");if(!Wt(t.firstDay,1,7)||!Wt(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some((t=>!Wt(t,1,7))))throw new c("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function Wt(t,e,n){return jt(t)&&t>=e&&t<=n}function Bt(t,e=2){let n;return n=t<0?"-"+(""+-t).padStart(e,"0"):(""+t).padStart(e,"0"),n}function zt(t){return Ft(t)||null===t||""===t?void 0:parseInt(t,10)}function Yt(t){return Ft(t)||null===t||""===t?void 0:parseFloat(t)}function Ut(t){if(!Ft(t)&&null!==t&&""!==t){const e=1e3*parseFloat("0."+t);return Math.floor(e)}}function Zt(t,e,n=!1){const i=10**e;return(n?Math.trunc:Math.round)(t*i)/i}function Jt(t){return t%4==0&&(t%100!=0||t%400==0)}function Kt(t){return Jt(t)?366:365}function Gt(t,e){const n=function(t,e){return t-e*Math.floor(t/e)}(e-1,12)+1;return 2===n?Jt(t+(e-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Qt(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function Xt(t,e,n){return-St(xt(t,1,e),n)+e-1}function te(t,e=4,n=1){const i=Xt(t,e,n),s=Xt(t+1,e,n);return(Kt(t)-i+s)/7}function ee(t){return t>99?t:t>bt.twoDigitCutoffYear?1900+t:2e3+t}function ne(t,e,n,i=null){const s=new Date(t),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(r.timeZone=i);const o={timeZoneName:e,...r},a=new Intl.DateTimeFormat(n,o).formatToParts(s).find((t=>"timezonename"===t.type.toLowerCase()));return a?a.value:null}function ie(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const i=parseInt(e,10)||0;return 60*n+(n<0||Object.is(n,-0)?-i:i)}function se(t){const e=Number(t);if("boolean"==typeof t||""===t||Number.isNaN(e))throw new c(`Invalid unit value ${t}`);return e}function re(t,e){const n={};for(const i in t)if($t(t,i)){const s=t[i];if(null==s)continue;n[e(i)]=se(s)}return n}function oe(t,e){const n=Math.trunc(Math.abs(t/60)),i=Math.trunc(Math.abs(t%60)),s=t>=0?"+":"-";switch(e){case"short":return`${s}${Bt(n,2)}:${Bt(i,2)}`;case"narrow":return`${s}${n}${i>0?`:${i}`:""}`;case"techie":return`${s}${Bt(n,2)}${Bt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function ae(t){return function(t,e){return e.reduce(((e,n)=>(e[n]=t[n],e)),{})}(t,["hour","minute","second","millisecond"])}const le=["January","February","March","April","May","June","July","August","September","October","November","December"],ce=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ue=["J","F","M","A","M","J","J","A","S","O","N","D"];function de(t){switch(t){case"narrow":return[...ue];case"short":return[...ce];case"long":return[...le];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const he=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pe=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],me=["M","T","W","T","F","S","S"];function fe(t){switch(t){case"narrow":return[...me];case"short":return[...pe];case"long":return[...he];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const ge=["AM","PM"],ve=["Before Christ","Anno Domini"],ye=["BC","AD"],be=["B","A"];function _e(t){switch(t){case"narrow":return[...be];case"short":return[...ye];case"long":return[...ve];default:return null}}function we(t,e){let n="";for(const i of t)i.literal?n+=i.val:n+=e(i.val);return n}const ke={D:m,DD:f,DDD:v,DDDD:y,t:b,tt:_,ttt:w,tttt:k,T:T,TT:x,TTT:E,TTTT:D,f:S,ff:L,fff:A,ffff:N,F:O,FF:C,FFF:I,FFFF:F};class Te{static create(t,e={}){return new Te(t,e)}static parseFormat(t){let e=null,n="",i=!1;const s=[];for(let r=0;r0&&s.push({literal:i||/^\s+$/.test(n),val:n}),e=null,n="",i=!i):i||o===e?n+=o:(n.length>0&&s.push({literal:/^\s+$/.test(n),val:n}),n=o,e=o)}return n.length>0&&s.push({literal:i||/^\s+$/.test(n),val:n}),s}static macroTokenToFormatOpts(t){return ke[t]}constructor(t,e){this.opts=e,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,e){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(t,{...this.opts,...e}).format()}dtFormatter(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e})}formatDateTime(t,e){return this.dtFormatter(t,e).format()}formatDateTimeParts(t,e){return this.dtFormatter(t,e).formatToParts()}formatInterval(t,e){return this.dtFormatter(t.start,e).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,e){return this.dtFormatter(t,e).resolvedOptions()}num(t,e=0){if(this.opts.forceSimple)return Bt(t,e);const n={...this.opts};return e>0&&(n.padTo=e),this.loc.numberFormatter(n).format(t)}formatDateTimeFromString(t,e){const n="en"===this.loc.listingMode(),i=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,s=(e,n)=>this.loc.extract(t,e,n),r=e=>t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):"",o=()=>n?function(t){return ge[t.hour<12?0:1]}(t):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(e,i)=>n?function(t,e){return de(e)[t.month-1]}(t,e):s(i?{month:e}:{month:e,day:"numeric"},"month"),l=(e,i)=>n?function(t,e){return fe(e)[t.weekday-1]}(t,e):s(i?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday"),c=e=>{const n=Te.macroTokenToFormatOpts(e);return n?this.formatWithSystemDefault(t,n):e},u=e=>n?function(t,e){return _e(e)[t.year<0?0:1]}(t,e):s({era:e},"era");return we(Te.parseFormat(e),(e=>{switch(e){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12==0?12:t.hour%12);case"hh":return this.num(t.hour%12==0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return o();case"d":return i?s({day:"numeric"},"day"):this.num(t.day);case"dd":return i?s({day:"2-digit"},"day"):this.num(t.day,2);case"c":case"E":return this.num(t.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return i?s({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return i?s({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return i?s({month:"numeric"},"month"):this.num(t.month);case"MM":return i?s({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return i?s({year:"numeric"},"year"):this.num(t.year);case"yy":return i?s({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return i?s({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return i?s({year:"numeric"},"year"):this.num(t.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return c(e)}}))}formatDurationFromString(t,e){const n=t=>{switch(t[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=Te.parseFormat(e),s=i.reduce(((t,{literal:e,val:n})=>e?t:t.concat(n)),[]);return we(i,(t=>e=>{const i=n(e);return i?this.num(t.get(i),e.length):e})(t.shiftTo(...s.map(n).filter((t=>t)))))}}const xe=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ee(...t){const e=t.reduce(((t,e)=>t+e.source),"");return RegExp(`^${e}$`)}function De(...t){return e=>t.reduce((([t,n,i],s)=>{const[r,o,a]=s(e,i);return[{...t,...r},o||n,a]}),[{},null,1]).slice(0,2)}function Se(t,...e){if(null==t)return[null,null];for(const[n,i]of e){const e=n.exec(t);if(e)return i(e)}return[null,null]}function Oe(...t){return(e,n)=>{const i={};let s;for(s=0;svoid 0!==t&&(e||t&&u)?-t:t;return[{years:h(Yt(n)),months:h(Yt(i)),weeks:h(Yt(s)),days:h(Yt(r)),hours:h(Yt(o)),minutes:h(Yt(a)),seconds:h(Yt(l),"-0"===l),milliseconds:h(Ut(c),d)}]}const Be={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ze(t,e,n,i,s,r,o){const a={year:2===e.length?ee(zt(e)):zt(e),month:ce.indexOf(n)+1,day:zt(i),hour:zt(s),minute:zt(r)};return o&&(a.second=zt(o)),t&&(a.weekday=t.length>3?he.indexOf(t)+1:pe.indexOf(t)+1),a}const Ye=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ue(t){const[,e,n,i,s,r,o,a,l,c,u,d]=t,h=ze(e,s,i,n,r,o,a);let p;return p=l?Be[l]:c?0:ie(u,d),[h,new it(p)]}const Ze=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Je=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Ke=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Ge(t){const[,e,n,i,s,r,o,a]=t;return[ze(e,s,i,n,r,o,a),it.utcInstance]}function Qe(t){const[,e,n,i,s,r,o,a]=t;return[ze(e,a,n,i,s,r,o),it.utcInstance]}const Xe=Ee(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ae),tn=Ee(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Ae),en=Ee(/(\d{4})-?(\d{3})/,Ae),nn=Ee(Me),sn=De((function(t,e){return[{year:je(t,e),month:je(t,e+1,1),day:je(t,e+2,1)},null,e+3]}),qe,He,Ve),rn=De(Ie,qe,He,Ve),on=De(Ne,qe,He,Ve),an=De(qe,He,Ve);const ln=De(qe);const cn=Ee(/(\d{4})-(\d\d)-(\d\d)/,Pe),un=Ee(Fe),dn=De(qe,He,Ve);const hn="Invalid Duration",pn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},mn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...pn},fn=365.2425,gn=30.436875,vn={years:{quarters:4,months:12,weeks:52.1775,days:fn,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:gn,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...pn},yn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],bn=yn.slice(0).reverse();function _n(t,e,n=!1){const i={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Tn(i)}function wn(t,e){let n=e.milliseconds??0;for(const i of bn.slice(1))e[i]&&(n+=e[i]*t[i].milliseconds);return n}function kn(t,e){const n=wn(t,e)<0?-1:1;yn.reduceRight(((i,s)=>{if(Ft(e[s]))return i;if(i){const r=e[i]*n,o=t[s][i],a=Math.floor(r/o);e[s]+=a*n,e[i]-=a*o*n}return s}),null),yn.reduce(((n,i)=>{if(Ft(e[i]))return n;if(n){const s=e[n]%1;e[n]-=s,e[i]+=s*t[n][i]}return i}),null)}class Tn{constructor(t){const e="longterm"===t.conversionAccuracy||!1;let n=e?vn:mn;t.matrix&&(n=t.matrix),this.values=t.values,this.loc=t.loc||et.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(t,e){return Tn.fromObject({milliseconds:t},e)}static fromObject(t,e={}){if(null==t||"object"!=typeof t)throw new c("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new Tn({values:re(t,Tn.normalizeUnit),loc:et.fromObject(e),conversionAccuracy:e.conversionAccuracy,matrix:e.matrix})}static fromDurationLike(t){if(Pt(t))return Tn.fromMillis(t);if(Tn.isDuration(t))return t;if("object"==typeof t)return Tn.fromObject(t);throw new c(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,e){const[n]=function(t){return Se(t,[Re,We])}(t);return n?Tn.fromObject(n,e):Tn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,e){const[n]=function(t){return Se(t,[$e,ln])}(t);return n?Tn.fromObject(n,e):Tn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,e=null){if(!t)throw new c("need to specify a reason the Duration is invalid");const n=t instanceof _t?t:new _t(t,e);if(bt.throwOnInvalid)throw new o(n);return new Tn({invalid:n})}static normalizeUnit(t){const e={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t?t.toLowerCase():t];if(!e)throw new l(t);return e}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,e={}){const n={...e,floor:!1!==e.round&&!1!==e.floor};return this.isValid?Te.create(this.loc,n).formatDurationFromString(this,t):hn}toHuman(t={}){if(!this.isValid)return hn;const e=yn.map((e=>{const n=this.values[e];return Ft(n)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:e.slice(0,-1)}).format(n)})).filter((t=>t));return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(e)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return 0!==this.years&&(t+=this.years+"Y"),0===this.months&&0===this.quarters||(t+=this.months+3*this.quarters+"M"),0!==this.weeks&&(t+=this.weeks+"W"),0!==this.days&&(t+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(t+="T"),0!==this.hours&&(t+=this.hours+"H"),0!==this.minutes&&(t+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(t+=Zt(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===t&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const e=this.toMillis();if(e<0||e>=864e5)return null;t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1};return fi.fromMillis(e,{zone:"UTC"}).toISOTime(t)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?wn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const e=Tn.fromDurationLike(t),n={};for(const t of yn)($t(e.values,t)||$t(this.values,t))&&(n[t]=e.get(t)+this.get(t));return _n(this,{values:n},!0)}minus(t){if(!this.isValid)return this;const e=Tn.fromDurationLike(t);return this.plus(e.negate())}mapUnits(t){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=se(t(this.values[n],n));return _n(this,{values:e},!0)}get(t){return this[Tn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;return _n(this,{values:{...this.values,...re(t,Tn.normalizeUnit)}})}reconfigure({locale:t,numberingSystem:e,conversionAccuracy:n,matrix:i}={}){return _n(this,{loc:this.loc.clone({locale:t,numberingSystem:e}),matrix:i,conversionAccuracy:n})}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return kn(this.matrix,t),_n(this,{values:t},!0)}rescale(){if(!this.isValid)return this;return _n(this,{values:function(t){const e={};for(const[n,i]of Object.entries(t))0!==i&&(e[n]=i);return e}(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...t){if(!this.isValid)return this;if(0===t.length)return this;t=t.map((t=>Tn.normalizeUnit(t)));const e={},n={},i=this.toObject();let s;for(const r of yn)if(t.indexOf(r)>=0){s=r;let t=0;for(const e in n)t+=this.matrix[e][r]*n[e],n[e]=0;Pt(i[r])&&(t+=i[r]);const o=Math.trunc(t);e[r]=o,n[r]=(1e3*t-1e3*o)/1e3}else Pt(i[r])&&(n[r]=i[r]);for(const t in n)0!==n[t]&&(e[s]+=t===s?n[t]:n[t]/this.matrix[s][t]);return kn(this.matrix,e),_n(this,{values:e},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const e of Object.keys(this.values))t[e]=0===this.values[e]?0:-this.values[e];return _n(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid)return!1;if(!this.loc.equals(t.loc))return!1;for(const i of yn)if(e=this.values[i],n=t.values[i],!(void 0===e||0===e?void 0===n||0===n:e===n))return!1;var e,n;return!0}}const xn="Invalid Interval";class En{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,e=null){if(!t)throw new c("need to specify a reason the Interval is invalid");const n=t instanceof _t?t:new _t(t,e);if(bt.throwOnInvalid)throw new r(n);return new En({invalid:n})}static fromDateTimes(t,e){const n=gi(t),i=gi(e),s=function(t,e){return t&&t.isValid?e&&e.isValid?et}isBefore(t){return!!this.isValid&&this.e<=t}contains(t){return!!this.isValid&&(this.s<=t&&this.e>t)}set({start:t,end:e}={}){return this.isValid?En.fromDateTimes(t||this.s,e||this.e):this}splitAt(...t){if(!this.isValid)return[];const e=t.map(gi).filter((t=>this.contains(t))).sort(((t,e)=>t.toMillis()-e.toMillis())),n=[];let{s:i}=this,s=0;for(;i+this.e?this.e:t;n.push(En.fromDateTimes(i,r)),i=r,s+=1}return n}splitBy(t){const e=Tn.fromDurationLike(t);if(!this.isValid||!e.isValid||0===e.as("milliseconds"))return[];let n,{s:i}=this,s=1;const r=[];for(;it*s)));n=+t>+this.e?this.e:t,r.push(En.fromDateTimes(i,n)),i=n,s+=1}return r}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s=t.e)}equals(t){return!(!this.isValid||!t.isValid)&&(this.s.equals(t.s)&&this.e.equals(t.e))}intersection(t){if(!this.isValid)return this;const e=this.s>t.s?this.s:t.s,n=this.e=n?null:En.fromDateTimes(e,n)}union(t){if(!this.isValid)return this;const e=this.st.e?this.e:t.e;return En.fromDateTimes(e,n)}static merge(t){const[e,n]=t.sort(((t,e)=>t.s-e.s)).reduce((([t,e],n)=>e?e.overlaps(n)||e.abutsStart(n)?[t,e.union(n)]:[t.concat([e]),n]:[t,n]),[[],null]);return n&&e.push(n),e}static xor(t){let e=null,n=0;const i=[],s=t.map((t=>[{time:t.s,type:"s"},{time:t.e,type:"e"}])),r=Array.prototype.concat(...s).sort(((t,e)=>t.time-e.time));for(const t of r)n+="s"===t.type?1:-1,1===n?e=t.time:(e&&+e!=+t.time&&i.push(En.fromDateTimes(e,t.time)),e=null);return En.merge(i)}difference(...t){return En.xor([this].concat(t)).map((t=>this.intersection(t))).filter((t=>t&&!t.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:xn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=m,e={}){return this.isValid?Te.create(this.s.loc.clone(e),t).formatInterval(this):xn}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:xn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:xn}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:xn}toFormat(t,{separator:e=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${e}${this.e.toFormat(t)}`:xn}toDuration(t,e){return this.isValid?this.e.diff(this.s,t,e):Tn.invalid(this.invalidReason)}mapEndpoints(t){return En.fromDateTimes(t(this.s),t(this.e))}}class Dn{static hasDST(t=bt.defaultZone){const e=fi.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(t){return R.isValidZone(t)}static normalizeZone(t){return rt(t,bt.defaultZone)}static getStartOfWeek({locale:t=null,locObj:e=null}={}){return(e||et.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:e=null}={}){return(e||et.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:e=null}={}){return(e||et.create(t)).getWeekendDays().slice()}static months(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||et.create(e,n,s)).months(t)}static monthsFormat(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||et.create(e,n,s)).months(t,!0)}static weekdays(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null}={}){return(i||et.create(e,n,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null}={}){return(i||et.create(e,n,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return et.create(t).meridiems()}static eras(t="short",{locale:e=null}={}){return et.create(e,null,"gregory").eras(t)}static features(){return{relative:qt(),localeWeek:Ht()}}}function Sn(t,e){const n=t=>t.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(e)-n(t);return Math.floor(Tn.fromMillis(i).as("days"))}function On(t,e,n,i){let[s,r,o,a]=function(t,e,n){const i=[["years",(t,e)=>e.year-t.year],["quarters",(t,e)=>e.quarter-t.quarter+4*(e.year-t.year)],["months",(t,e)=>e.month-t.month+12*(e.year-t.year)],["weeks",(t,e)=>{const n=Sn(t,e);return(n-n%7)/7}],["days",Sn]],s={},r=t;let o,a;for(const[l,c]of i)n.indexOf(l)>=0&&(o=l,s[l]=c(t,e),a=r.plus(s),a>e?(s[l]--,(t=r.plus(s))>e&&(a=t,s[l]--,t=r.plus(s))):t=a);return[t,s,a,o]}(t,e,n);const l=e-s,c=n.filter((t=>["hours","minutes","seconds","milliseconds"].indexOf(t)>=0));0===c.length&&(o0?Tn.fromMillis(l,i).shiftTo(...c).plus(u):u}function Ln(t,e=(t=>t)){return{regex:t,deser:([t])=>e(function(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n=n&&i<=s&&(e+=i-n)}}return parseInt(e,10)}return e}(t))}}const Cn=`[ ${String.fromCharCode(160)}]`,Mn=new RegExp(Cn,"g");function An(t){return t.replace(/\./g,"\\.?").replace(Mn,Cn)}function In(t){return t.replace(/\./g,"").replace(Mn," ").toLowerCase()}function Nn(t,e){return null===t?null:{regex:RegExp(t.map(An).join("|")),deser:([n])=>t.findIndex((t=>In(n)===In(t)))+e}}function Fn(t,e){return{regex:t,deser:([,t,e])=>ie(t,e),groups:e}}function Pn(t){return{regex:t,deser:([t])=>t}}const jn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let qn=null;function Hn(t,e){return Array.prototype.concat(...t.map((t=>function(t,e){if(t.literal)return t;const n=Rn(Te.macroTokenToFormatOpts(t.val),e);return null==n||n.includes(void 0)?t:n}(t,e))))}class Vn{constructor(t,e){if(this.locale=t,this.format=e,this.tokens=Hn(Te.parseFormat(e),t),this.units=this.tokens.map((e=>function(t,e){const n=ut(e),i=ut(e,"{2}"),s=ut(e,"{3}"),r=ut(e,"{4}"),o=ut(e,"{6}"),a=ut(e,"{1,2}"),l=ut(e,"{1,3}"),c=ut(e,"{1,6}"),u=ut(e,"{1,9}"),d=ut(e,"{2,4}"),h=ut(e,"{4,6}"),p=t=>{return{regex:RegExp((e=t.val,e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([t])=>t,literal:!0};var e},m=(m=>{if(t.literal)return p(m);switch(m.val){case"G":return Nn(e.eras("short"),0);case"GG":return Nn(e.eras("long"),0);case"y":return Ln(c);case"yy":case"kk":return Ln(d,ee);case"yyyy":case"kkkk":return Ln(r);case"yyyyy":return Ln(h);case"yyyyyy":return Ln(o);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Ln(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Ln(i);case"MMM":return Nn(e.months("short",!0),1);case"MMMM":return Nn(e.months("long",!0),1);case"LLL":return Nn(e.months("short",!1),1);case"LLLL":return Nn(e.months("long",!1),1);case"o":case"S":return Ln(l);case"ooo":case"SSS":return Ln(s);case"u":return Pn(u);case"uu":return Pn(a);case"uuu":case"E":case"c":return Ln(n);case"a":return Nn(e.meridiems(),0);case"EEE":return Nn(e.weekdays("short",!1),1);case"EEEE":return Nn(e.weekdays("long",!1),1);case"ccc":return Nn(e.weekdays("short",!0),1);case"cccc":return Nn(e.weekdays("long",!0),1);case"Z":case"ZZ":return Fn(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return Fn(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return Pn(/[a-z_+-/]{1,256}?/i);case" ":return Pn(/[^\S\n\r]/);default:return p(m)}})(t)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return m.token=t,m}(e,t))),this.disqualifyingUnit=this.units.find((t=>t.invalidReason)),!this.disqualifyingUnit){const[t,e]=[`^${(n=this.units).map((t=>t.regex)).reduce(((t,e)=>`${t}(${e.source})`),"")}$`,n];this.regex=RegExp(t,"i"),this.handlers=e}var n}explainFromTokens(t){if(this.isValid){const[e,n]=function(t,e,n){const i=t.match(e);if(i){const t={};let e=1;for(const s in n)if($t(n,s)){const r=n[s],o=r.groups?r.groups+1:1;!r.literal&&r.token&&(t[r.token.val[0]]=r.deser(i.slice(e,e+o))),e+=o}return[i,t]}return[i,{}]}(t,this.regex,this.handlers),[i,s,r]=n?function(t){let e,n=null;return Ft(t.z)||(n=R.create(t.z)),Ft(t.Z)||(n||(n=new it(t.Z)),e=t.Z),Ft(t.q)||(t.M=3*(t.q-1)+1),Ft(t.h)||(t.h<12&&1===t.a?t.h+=12:12===t.h&&0===t.a&&(t.h=0)),0===t.G&&t.y&&(t.y=-t.y),Ft(t.u)||(t.S=Ut(t.u)),[Object.keys(t).reduce(((e,n)=>{const i=(t=>{switch(t){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return i&&(e[i]=t[n]),e}),{}),n,e]}(n):[null,null,void 0];if($t(n,"a")&&$t(n,"H"))throw new a("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:e,matches:n,result:i,zone:s,specificOffset:r}}return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function $n(t,e,n){return new Vn(t,n).explainFromTokens(e)}function Rn(t,e){if(!t)return null;const n=Te.create(e,t).dtFormatter((qn||(qn=fi.fromMillis(1555555555555)),qn)),i=n.formatToParts(),s=n.resolvedOptions();return i.map((e=>function(t,e,n){const{type:i,value:s}=t;if("literal"===i){const t=/^\s+$/.test(s);return{literal:!t,val:t?" ":s}}const r=e[i];let o=i;"hour"===i&&(o=null!=e.hour12?e.hour12?"hour12":"hour24":null!=e.hourCycle?"h11"===e.hourCycle||"h12"===e.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let a=jn[o];if("object"==typeof a&&(a=a[r]),a)return{literal:!1,val:a}}(e,t,s)))}const Wn="Invalid DateTime",Bn=864e13;function zn(t){return new _t("unsupported zone",`the zone "${t.name}" is not supported`)}function Yn(t){return null===t.weekData&&(t.weekData=Ot(t.c)),t.weekData}function Un(t){return null===t.localWeekData&&(t.localWeekData=Ot(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Zn(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new fi({...n,...e,old:n})}function Jn(t,e,n){let i=t-60*e*1e3;const s=n.offset(i);if(e===s)return[i,e];i-=60*(s-e)*1e3;const r=n.offset(i);return s===r?[i,s]:[t-60*Math.min(s,r)*1e3,Math.max(s,r)]}function Kn(t,e){const n=new Date(t+=60*e*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Gn(t,e,n){return Jn(Qt(t),e,n)}function Qn(t,e){const n=t.o,i=t.c.year+Math.trunc(e.years),s=t.c.month+Math.trunc(e.months)+3*Math.trunc(e.quarters),r={...t.c,year:i,month:s,day:Math.min(t.c.day,Gt(i,s))+Math.trunc(e.days)+7*Math.trunc(e.weeks)},o=Tn.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=Qt(r);let[l,c]=Jn(a,n,t.zone);return 0!==o&&(l+=o,c=t.zone.offset(l)),{ts:l,o:c}}function Xn(t,e,n,i,s,r){const{setZone:o,zone:a}=n;if(t&&0!==Object.keys(t).length||e){const i=e||a,s=fi.fromObject(t,{...n,zone:i,specificOffset:r});return o?s:s.setZone(a)}return fi.invalid(new _t("unparsable",`the input "${s}" can't be parsed as ${i}`))}function ti(t,e,n=!0){return t.isValid?Te.create(et.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function ei(t,e){const n=t.c.year>9999||t.c.year<0;let i="";return n&&t.c.year>=0&&(i+="+"),i+=Bt(t.c.year,n?6:4),e?(i+="-",i+=Bt(t.c.month),i+="-",i+=Bt(t.c.day)):(i+=Bt(t.c.month),i+=Bt(t.c.day)),i}function ni(t,e,n,i,s,r){let o=Bt(t.c.hour);return e?(o+=":",o+=Bt(t.c.minute),0===t.c.millisecond&&0===t.c.second&&n||(o+=":")):o+=Bt(t.c.minute),0===t.c.millisecond&&0===t.c.second&&n||(o+=Bt(t.c.second),0===t.c.millisecond&&i||(o+=".",o+=Bt(t.c.millisecond,3))),s&&(t.isOffsetFixed&&0===t.offset&&!r?o+="Z":t.o<0?(o+="-",o+=Bt(Math.trunc(-t.o/60)),o+=":",o+=Bt(Math.trunc(-t.o%60))):(o+="+",o+=Bt(Math.trunc(t.o/60)),o+=":",o+=Bt(Math.trunc(t.o%60)))),r&&(o+="["+t.zone.ianaName+"]"),o}const ii={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},si={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ri={ordinal:1,hour:0,minute:0,second:0,millisecond:0},oi=["year","month","day","hour","minute","second","millisecond"],ai=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],li=["year","ordinal","hour","minute","second","millisecond"];function ci(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return function(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new l(t);return e}(t)}}function ui(t,e){const n=rt(e.zone,bt.defaultZone);if(!n.isValid)return fi.invalid(zn(n));const i=et.fromObject(e);let s,r;if(Ft(t.year))s=bt.now();else{for(const e of oi)Ft(t[e])&&(t[e]=ii[e]);const e=It(t)||Nt(t);if(e)return fi.invalid(e);const i=function(t){return mi[t]||(void 0===pi&&(pi=bt.now()),mi[t]=t.offset(pi)),mi[t]}(n);[s,r]=Gn(t,i,n)}return new fi({ts:s,zone:n,loc:i,o:r})}function di(t,e,n){const i=!!Ft(n.round)||n.round,s=(t,s)=>{t=Zt(t,i||n.calendary?0:2,!0);return e.loc.clone(n).relFormatter(n).format(t,s)},r=i=>n.calendary?e.hasSame(t,i)?0:e.startOf(i).diff(t.startOf(i),i).get(i):e.diff(t,i).get(i);if(n.unit)return s(r(n.unit),n.unit);for(const t of n.units){const e=r(t);if(Math.abs(e)>=1)return s(e,t)}return s(t>e?-0:0,n.units[n.units.length-1])}function hi(t){let e,n={};return t.length>0&&"object"==typeof t[t.length-1]?(n=t[t.length-1],e=Array.from(t).slice(0,t.length-1)):e=Array.from(t),[n,e]}let pi,mi={};class fi{constructor(t){const e=t.zone||bt.defaultZone;let n=t.invalid||(Number.isNaN(t.ts)?new _t("invalid input"):null)||(e.isValid?null:zn(e));this.ts=Ft(t.ts)?bt.now():t.ts;let i=null,s=null;if(!n){if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e))[i,s]=[t.old.c,t.old.o];else{const r=Pt(t.o)&&!t.old?t.o:e.offset(this.ts);i=Kn(this.ts,r),n=Number.isNaN(i.year)?new _t("invalid input"):null,i=n?null:i,s=n?null:r}}this._zone=e,this.loc=t.loc||et.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=s,this.isLuxonDateTime=!0}static now(){return new fi({})}static local(){const[t,e]=hi(arguments),[n,i,s,r,o,a,l]=e;return ui({year:n,month:i,day:s,hour:r,minute:o,second:a,millisecond:l},t)}static utc(){const[t,e]=hi(arguments),[n,i,s,r,o,a,l]=e;return t.zone=it.utcInstance,ui({year:n,month:i,day:s,hour:r,minute:o,second:a,millisecond:l},t)}static fromJSDate(t,e={}){const n=(i=t,"[object Date]"===Object.prototype.toString.call(i)?t.valueOf():NaN);var i;if(Number.isNaN(n))return fi.invalid("invalid input");const s=rt(e.zone,bt.defaultZone);return s.isValid?new fi({ts:n,zone:s,loc:et.fromObject(e)}):fi.invalid(zn(s))}static fromMillis(t,e={}){if(Pt(t))return t<-Bn||t>Bn?fi.invalid("Timestamp out of range"):new fi({ts:t,zone:rt(e.zone,bt.defaultZone),loc:et.fromObject(e)});throw new c(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,e={}){if(Pt(t))return new fi({ts:1e3*t,zone:rt(e.zone,bt.defaultZone),loc:et.fromObject(e)});throw new c("fromSeconds requires a numerical input")}static fromObject(t,e={}){t=t||{};const n=rt(e.zone,bt.defaultZone);if(!n.isValid)return fi.invalid(zn(n));const i=et.fromObject(e),s=re(t,ci),{minDaysInFirstWeek:r,startOfWeek:o}=At(s,i),l=bt.now(),c=Ft(e.specificOffset)?n.offset(l):e.specificOffset,u=!Ft(s.ordinal),d=!Ft(s.year),h=!Ft(s.month)||!Ft(s.day),p=d||h,m=s.weekYear||s.weekNumber;if((p||u)&&m)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&u)throw new a("Can't mix ordinal dates with month/day");const f=m||s.weekday&&!p;let g,v,y=Kn(l,c);f?(g=ai,v=si,y=Ot(y,r,o)):u?(g=li,v=ri,y=Ct(y)):(g=oi,v=ii);let b=!1;for(const t of g){Ft(s[t])?s[t]=b?v[t]:y[t]:b=!0}const _=f?function(t,e=4,n=1){const i=jt(t.weekYear),s=Wt(t.weekNumber,1,te(t.weekYear,e,n)),r=Wt(t.weekday,1,7);return i?s?!r&&Tt("weekday",t.weekday):Tt("week",t.weekNumber):Tt("weekYear",t.weekYear)}(s,r,o):u?function(t){const e=jt(t.year),n=Wt(t.ordinal,1,Kt(t.year));return e?!n&&Tt("ordinal",t.ordinal):Tt("year",t.year)}(s):It(s),w=_||Nt(s);if(w)return fi.invalid(w);const k=f?Lt(s,r,o):u?Mt(s):s,[T,x]=Gn(k,c,n),E=new fi({ts:T,zone:n,o:x,loc:i});return s.weekday&&p&&t.weekday!==E.weekday?fi.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${E.toISO()}`):E.isValid?E:fi.invalid(E.invalid)}static fromISO(t,e={}){const[n,i]=function(t){return Se(t,[Xe,sn],[tn,rn],[en,on],[nn,an])}(t);return Xn(n,i,e,"ISO 8601",t)}static fromRFC2822(t,e={}){const[n,i]=function(t){return Se(function(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(t),[Ye,Ue])}(t);return Xn(n,i,e,"RFC 2822",t)}static fromHTTP(t,e={}){const[n,i]=function(t){return Se(t,[Ze,Ge],[Je,Ge],[Ke,Qe])}(t);return Xn(n,i,e,"HTTP",e)}static fromFormat(t,e,n={}){if(Ft(t)||Ft(e))throw new c("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:s=null}=n,r=et.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),[o,a,l,u]=function(t,e,n){const{result:i,zone:s,specificOffset:r,invalidReason:o}=$n(t,e,n);return[i,s,r,o]}(r,t,e);return u?fi.invalid(u):Xn(o,a,n,`format ${e}`,t,l)}static fromString(t,e,n={}){return fi.fromFormat(t,e,n)}static fromSQL(t,e={}){const[n,i]=function(t){return Se(t,[cn,sn],[un,dn])}(t);return Xn(n,i,e,"SQL",t)}static invalid(t,e=null){if(!t)throw new c("need to specify a reason the DateTime is invalid");const n=t instanceof _t?t:new _t(t,e);if(bt.throwOnInvalid)throw new s(n);return new fi({invalid:n})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,e={}){const n=Rn(t,et.fromObject(e));return n?n.map((t=>t?t.val:null)).join(""):null}static expandFormat(t,e={}){return Hn(Te.parseFormat(t),et.fromObject(e)).map((t=>t.val)).join("")}static resetCache(){pi=void 0,mi={}}get(t){return this[t]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Yn(this).weekYear:NaN}get weekNumber(){return this.isValid?Yn(this).weekNumber:NaN}get weekday(){return this.isValid?Yn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Un(this).weekday:NaN}get localWeekNumber(){return this.isValid?Un(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Un(this).weekYear:NaN}get ordinal(){return this.isValid?Ct(this.c).ordinal:NaN}get monthShort(){return this.isValid?Dn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Dn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Dn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Dn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,e=6e4,n=Qt(this.c),i=this.zone.offset(n-t),s=this.zone.offset(n+t),r=this.zone.offset(n-i*e),o=this.zone.offset(n-s*e);if(r===o)return[this];const a=n-r*e,l=n-o*e,c=Kn(a,r),u=Kn(l,o);return c.hour===u.hour&&c.minute===u.minute&&c.second===u.second&&c.millisecond===u.millisecond?[Zn(this,{ts:a}),Zn(this,{ts:l})]:[this]}get isInLeapYear(){return Jt(this.year)}get daysInMonth(){return Gt(this.year,this.month)}get daysInYear(){return this.isValid?Kt(this.year):NaN}get weeksInWeekYear(){return this.isValid?te(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?te(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:e,numberingSystem:n,calendar:i}=Te.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e,numberingSystem:n,outputCalendar:i}}toUTC(t=0,e={}){return this.setZone(it.instance(t),e)}toLocal(){return this.setZone(bt.defaultZone)}setZone(t,{keepLocalTime:e=!1,keepCalendarTime:n=!1}={}){if((t=rt(t,bt.defaultZone)).equals(this.zone))return this;if(t.isValid){let i=this.ts;if(e||n){const e=t.offset(this.ts),n=this.toObject();[i]=Gn(n,e,t)}return Zn(this,{ts:i,zone:t})}return fi.invalid(zn(t))}reconfigure({locale:t,numberingSystem:e,outputCalendar:n}={}){return Zn(this,{loc:this.loc.clone({locale:t,numberingSystem:e,outputCalendar:n})})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const e=re(t,ci),{minDaysInFirstWeek:n,startOfWeek:i}=At(e,this.loc),s=!Ft(e.weekYear)||!Ft(e.weekNumber)||!Ft(e.weekday),r=!Ft(e.ordinal),o=!Ft(e.year),l=!Ft(e.month)||!Ft(e.day),c=o||l,u=e.weekYear||e.weekNumber;if((c||r)&&u)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new a("Can't mix ordinal dates with month/day");let d;s?d=Lt({...Ot(this.c,n,i),...e},n,i):Ft(e.ordinal)?(d={...this.toObject(),...e},Ft(e.day)&&(d.day=Math.min(Gt(d.year,d.month),d.day))):d=Mt({...Ct(this.c),...e});const[h,p]=Gn(d,this.o,this.zone);return Zn(this,{ts:h,o:p})}plus(t){if(!this.isValid)return this;return Zn(this,Qn(this,Tn.fromDurationLike(t)))}minus(t){if(!this.isValid)return this;return Zn(this,Qn(this,Tn.fromDurationLike(t).negate()))}startOf(t,{useLocaleWeeks:e=!1}={}){if(!this.isValid)return this;const n={},i=Tn.normalizeUnit(t);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===i)if(e){const t=this.loc.getStartOfWeek(),{weekday:e}=this;ethis.valueOf(),o=On(r?this:t,r?t:this,s,i);var a;return r?o.negate():o}diffNow(t="milliseconds",e={}){return this.diff(fi.now(),t,e)}until(t){return this.isValid?En.fromDateTimes(this,t):this}hasSame(t,e,n){if(!this.isValid)return!1;const i=t.valueOf(),s=this.setZone(t.zone,{keepLocalTime:!0});return s.startOf(e,n)<=i&&i<=s.endOf(e,n)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const e=t.base||fi.fromObject({},{zone:this.zone}),n=t.padding?thist.valueOf()),Math.min)}static max(...t){if(!t.every(fi.isDateTime))throw new c("max requires all arguments be DateTimes");return Vt(t,(t=>t.valueOf()),Math.max)}static fromFormatExplain(t,e,n={}){const{locale:i=null,numberingSystem:s=null}=n;return $n(et.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),t,e)}static fromStringExplain(t,e,n={}){return fi.fromFormatExplain(t,e,n)}static buildFormatParser(t,e={}){const{locale:n=null,numberingSystem:i=null}=e,s=et.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new Vn(s,t)}static fromFormatParser(t,e,n={}){if(Ft(t)||Ft(e))throw new c("fromFormatParser requires an input string and a format parser");const{locale:i=null,numberingSystem:s=null}=n,r=et.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});if(!r.equals(e.locale))throw new c(`fromFormatParser called with a locale of ${r}, but the format parser was created for ${e.locale}`);const{result:o,zone:a,specificOffset:l,invalidReason:u}=e.explainFromTokens(t);return u?fi.invalid(u):Xn(o,a,n,`format ${e.format}`,t,l)}static get DATE_SHORT(){return m}static get DATE_MED(){return f}static get DATE_MED_WITH_WEEKDAY(){return g}static get DATE_FULL(){return v}static get DATE_HUGE(){return y}static get TIME_SIMPLE(){return b}static get TIME_WITH_SECONDS(){return _}static get TIME_WITH_SHORT_OFFSET(){return w}static get TIME_WITH_LONG_OFFSET(){return k}static get TIME_24_SIMPLE(){return T}static get TIME_24_WITH_SECONDS(){return x}static get TIME_24_WITH_SHORT_OFFSET(){return E}static get TIME_24_WITH_LONG_OFFSET(){return D}static get DATETIME_SHORT(){return S}static get DATETIME_SHORT_WITH_SECONDS(){return O}static get DATETIME_MED(){return L}static get DATETIME_MED_WITH_SECONDS(){return C}static get DATETIME_MED_WITH_WEEKDAY(){return M}static get DATETIME_FULL(){return A}static get DATETIME_FULL_WITH_SECONDS(){return I}static get DATETIME_HUGE(){return N}static get DATETIME_HUGE_WITH_SECONDS(){return F}}function gi(t){if(fi.isDateTime(t))return t;if(t&&t.valueOf&&Pt(t.valueOf()))return fi.fromJSDate(t);if(t&&"object"==typeof t)return fi.fromObject(t);throw new c(`Unknown datetime argument: ${t}, of type ${typeof t}`)}class vi{constructor(t){this._translations=t}get(t){return this._translations[t]}has(t){return t in this._translations}}class yi{constructor(t){this._configurations=t}get(t){return this._configurations[t]}has(t){return t in this._configurations}isRTL(){return"rtl"===this.get("direction")}getLanguage(){return this.get("locale").replace("_","-")}is24Hours(){return!!this.get("twentyFourHours")}getFirstDayOfWeek(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];void 0===t&&(t=!0);let e=this.get("first_dow_iso");return t||(e%=7),e}}class bi{init(){}getId(){return null}setContainer(t){if(!(t instanceof _i))throw new Error("Plugin was given an invalid KimaiContainer");this._core=t}getContainer(){return this._core}getConfiguration(t){return this.getContainer().getConfiguration().get(t)}getConfigurations(){return this.getContainer().getConfiguration()}getDateUtils(){return this.getPlugin("date")}getPlugin(t){return this.getContainer().getPlugin(t)}getTranslation(){return this.getContainer().getTranslation()}translate(t){return this.getTranslation().get(t)}escape(t){return this.getPlugin("escape").escapeForHtml(t)}trigger(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.getPlugin("event").trigger(t,e)}fetch(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getPlugin("fetch").fetch(t,e)}fetchForm(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;n=n||t.getAttribute("action");const i=t.getAttribute("method").toUpperCase();if("GET"===i){const i=this.getPlugin("form").convertFormDataToQueryString(t,{},!0);n=n+(n.includes("?")?"&":"?")+i,e={method:"GET",...e}}else"POST"===i&&(e={method:"POST",body:new FormData(t),...e});return this.fetch(n,e)}isMobile(){return Math.max(document.documentElement.clientWidth,window.innerWidth||0)<576}}class _i{constructor(t,e){if(!(t instanceof yi))throw new Error("Configuration needs to a KimaiConfiguration instance");if(this._configuration=t,!(e instanceof vi))throw new Error("Configuration needs to a KimaiTranslation instance");this._translation=e,this._plugins=[]}registerPlugin(t){if(!(t instanceof bi))throw new Error("Invalid plugin given, needs to be a KimaiPlugin instance");return t.setContainer(this),this._plugins.push(t),t}getPlugin(t){for(let e of this._plugins)if(null!==e.getId()&&e.getId()===t)return e;throw new Error("Unknown plugin: "+t)}getPlugins(){return this._plugins}getTranslation(){return this._translation}getConfiguration(){return this._configuration}getUser(){return this.getPlugin("user")}}class wi extends bi{constructor(t){super(),this.dataAttribute=t}getId(){return"datatable-column-visibility"}init(){let t=document.querySelector("["+this.dataAttribute+"]");if(null!==t){this._id=t.getAttribute(this.dataAttribute),this._modal=document.getElementById("modal_"+this._id),this._modal.addEventListener("show.bs.modal",(()=>{this._evaluateCheckboxes()})),this._modal.querySelector("button[data-type=save]").addEventListener("click",(()=>{this._saveVisibility()})),this._modal.querySelector("button[data-type=reset]").addEventListener("click",(t=>{this._resetVisibility(t.currentTarget)})),this._modal.querySelectorAll("input[name=datatable_profile]").forEach((t=>{t.addEventListener("change",(()=>{const e=this._modal.getElementsByTagName("form")[0];this.fetchForm(e,{},t.getAttribute("data-href")).then((()=>{localStorage.setItem("kimai_profile",t.getAttribute("value")),document.location.reload()})).catch((()=>{e.setAttribute("action",t.getAttribute("data-href")),e.submit()}))}))}));for(let t of this._modal.querySelectorAll("form input[type=checkbox]"))t.addEventListener("change",(()=>{this._changeVisibility(t.getAttribute("name"),t.checked)}))}}_evaluateCheckboxes(){const t=this._modal.getElementsByTagName("form")[0],e=document.getElementsByClassName("datatable_"+this._id)[0];for(let n of e.getElementsByTagName("th")){const e=n.getAttribute("data-field");if(null===e)continue;const i=t.querySelector("input[name="+e+"]");null!==i&&(i.checked="none"!==window.getComputedStyle(n).display)}}_saveVisibility(){const t=this._modal.getElementsByTagName("form")[0];this.fetchForm(t).then((()=>{document.location.reload()})).catch((()=>{t.submit()}))}_resetVisibility(t){const e=this._modal.getElementsByTagName("form")[0];this.fetchForm(e,{},t.getAttribute("formaction")).then((()=>{document.location.reload()})).catch((()=>{e.setAttribute("action",t.getAttribute("formaction")),e.submit()}))}_changeVisibility(t,e){for(const n of document.getElementsByClassName("datatable_"+this._id)){let i=null;for(let s of n.getElementsByClassName("col_"+t)){if(null===i){let t="-none",n="d-table-cell";e||(t="-table-cell",n="d-none"),i="",s.classList.forEach((function(e,n,s){-1===e.indexOf(t)&&(i+=" "+e)})),-1===i.indexOf(n)&&(i+=" "+n)}s.className=i}}}}var ki=n(9336);class Ti extends bi{init(){[].slice.call(document.querySelectorAll('[data-toggle="tooltip"]')).map((function(t){return new ki.m_(t)}));[...document.querySelectorAll(".offcanvas")].map((t=>new ki.go(t)));this.getContainer().getPlugin("form").activateForm("div.page-wrapper form"),this._registerModalAutofocus("#remote_form_modal"),this.overlay=null,document.addEventListener("kimai.reloadContent",(t=>{if(null!==this.overlay)return;let e="body";void 0!==t.detail&&null!==t.detail&&(e=t.detail);const n=document.createElement("div");n.innerHTML='
',this.overlay=n.firstElementChild,document.querySelector(e).append(this.overlay)})),document.addEventListener("kimai.reloadedContent",(()=>{null!==this.overlay&&(this.overlay.remove(),this.overlay=null)}))}_registerModalAutofocus(t){if(this.isMobile())return;const e=document.querySelector(t);null!==e&&e.addEventListener("shown.bs.modal",(()=>{const t=e.querySelector("form");let n=t.querySelectorAll("[autofocus]");n.length<1&&(n=t.querySelectorAll("input[type=text],input[type=date],textarea,select")),n.length>0&&n[0].focus()}))}}var xi=n(424);n(8214);class Ei extends bi{supportsForm(t){return!1}activateForm(t){}destroyForm(t){}}class Di extends Ei{constructor(t){super(),this._selector=t}init(){window.disableLitepickerStyles=!0,this._pickers=[]}supportsForm(t){return!0}activateForm(t){const e=this.getConfigurations().getFirstDayOfWeek(!1),n=this.getConfigurations().getLanguage();let i={buttonText:{previousMonth:'',nextMonth:'',apply:this.translate("confirm"),cancel:this.translate("cancel")}};const s=[].slice.call(t.querySelectorAll(this._selector)).map((t=>(void 0===t.dataset.format&&console.log("Trying to bind litepicker to an element without data-format attribute"),void 0!==t.hasAttribute("min")&&(i={...i,minDate:t.getAttribute("min")}),void 0!==t.hasAttribute("max")&&(i={...i,maxDate:t.getAttribute("max")}),i={...i,format:t.dataset.format,showTooltip:!1,element:t,lang:n,autoRefresh:!0,firstDay:e,setup:e=>{e.on("preselect",((t,n)=>{e._wasPreselected=!0})),e.on("selected",((n,i)=>{void 0!==e._wasPreselected&&(t.dispatchEvent(new Event("change",{bubbles:!0})),delete e._wasPreselected)})),void 0!==e.backdrop&&document.body.appendChild(e.backdrop)}},[t,new xi.Litepicker(this.prepareOptions(i))])));this._pickers=this._pickers.concat(s)}prepareOptions(t){return{...t,plugins:["mobilefriendly"]}}destroyForm(t){[].slice.call(t.querySelectorAll(this._selector)).map((t=>{for(let e=0;e{this.reloadDatatable()};for(let t of e.split(" "))document.addEventListener(t,n);document.addEventListener("pagination-change",n),document.addEventListener("filter-change",n)}registerContextMenu(t){Oi.A.createForDataTable(t)}reloadDatatable(){const t=this.getContainer().getPlugin("toolbar").getSelector(),e=document.querySelector(t),n=t=>{const e=document.createElement("div");e.innerHTML=t;const n=e.querySelector(this._contentArea);document.querySelector(this._contentArea).replaceWith(n),this.registerContextMenu(this._selector),document.dispatchEvent(new Event("kimai.reloadedContent"))};document.dispatchEvent(new CustomEvent("kimai.reloadContent",{detail:this._contentArea})),null!==e?this.fetchForm(e).then((t=>{t.text().then(n)})).catch((()=>{e.submit()})):this.fetch(document.location).then((t=>{t.text().then(n)})).catch((()=>{document.location.reload()}))}}class Ci extends bi{constructor(t,e){super(),this._formSelector=t,this._actionClass=e}getId(){return"toolbar"}init(){const t=this.getSelector();this._registerPagination(t),this._registerSortableTables(t),this._registerAlternativeSubmitActions(t,this._actionClass),[].slice.call(document.querySelectorAll(t+" input")).map((e=>{e.addEventListener("change",(e=>{switch(e.target.id){case"order":case"orderBy":case"page":break;default:document.querySelector(t+" input#page").value=1}})),this.triggerChange()})),[].slice.call(document.querySelectorAll(t+" select")).map((e=>{e.addEventListener("change",(e=>{let n=!0;switch(e.target.id){case"customer":null!==document.querySelector(t+" select#project")&&(n=!1);break;case"project":null!==document.querySelector(t+" select#activity")&&(n=!1)}document.querySelector(t+" input#page").value=1,n&&this.triggerChange()}))}))}_registerAlternativeSubmitActions(t,e){document.addEventListener("click",(function(n){let i=n.target;for(;null!==i&&"function"==typeof i.matches&&!i.matches("body");){if(i.classList.contains(e)){const e=document.querySelector(t);if(null===e)return;const s=e.getAttribute("action"),r=e.getAttribute("method");void 0!==i.dataset.target&&(e.target=i.dataset.target),e.action=i.href,void 0!==i.dataset.method&&(e.method=i.dataset.method),e.submit(),e.target="",e.action=s,e.method=r,n.preventDefault(),n.stopPropagation()}i=i.parentNode}}))}_registerSortableTables(t){document.body.addEventListener("click",(e=>{if(!e.target.matches("th.sortable"))return;let n="DESC",i=e.target.dataset.order;e.target.classList.contains("sorting_desc")&&(n="ASC"),document.querySelector(t+" #orderBy").value=i,document.querySelector(t+" #order").value=n,document.querySelector(t+" #orderBy").dispatchEvent(new Event("change")),document.querySelector(t+" #order").dispatchEvent(new Event("change")),document.dispatchEvent(new Event("filter-change"))}))}_registerPagination(t){document.body.addEventListener("click",(e=>{if(!(e.target.matches("ul.pagination li a")||null!==e.target.parentNode&&e.target.parentNode.matches("ul.pagination li a")))return;let n=document.querySelector(t+" input#page");if(null===n)return;let i=e.target;i.matches("a")||(i=i.parentNode),e.preventDefault(),e.stopPropagation();let s=i.href.split("/"),r=s[s.length-1];return/\d/.test(r)||(r=1),n.value=r,n.dispatchEvent(new Event("change")),document.dispatchEvent(new Event("pagination-change")),!1}))}triggerChange(){document.dispatchEvent(new Event("toolbar-change"))}getSelector(){return this._formSelector}}class Mi extends bi{getId(){return"api"}_headers(){const t=new Headers;return t.append("Content-Type","application/json"),t}get(t,e,n,i){if(void 0!==e){const n=new URLSearchParams(e).toString();""!==n&&(t=t+(t.includes("?")?"&":"?")+n)}void 0===i&&(i=t=>{this.handleError("An error occurred",t)}),this.fetch(t,{method:"GET",headers:this._headers()}).then((t=>{t.json().then((t=>{n(t)}))})).catch((t=>{i(t)}))}post(t,e,n,i){void 0===i&&(i=t=>{this.handleError("action.update.error",t)}),this.fetch(t,{method:"POST",body:this._parseData(e),headers:this._headers()}).then((t=>{t.json().then((t=>{n(t)}))})).catch((t=>{i(t)}))}patch(t,e,n,i){void 0===i&&(i=t=>{this.handleError("action.update.error",t)}),this.fetch(t,{method:"PATCH",body:this._parseData(e),headers:this._headers()}).then((t=>{204===t.statusCode?n():t.json().then((t=>{n(t)}))})).catch((t=>{i(t)}))}delete(t,e,n){void 0===n&&(n=t=>{this.handleError("action.delete.error",t)}),this.fetch(t,{method:"DELETE",headers:this._headers()}).then((()=>{e()})).catch((t=>{n(t)}))}_parseData(t){return"object"==typeof t?JSON.stringify(t):t}handleError(t,e){if(void 0===e.headers)return;const n=e.headers.get("content-type");n&&-1!==n.indexOf("application/json")?e.json().then((n=>{let i=n.message;if(400===e.status&&n.errors){let t=[""+i+""];if(n.errors.errors)for(let e of n.errors.errors)t.push(e);if(n.errors.children)for(let e in n.errors.children){let i=n.errors.children[e];if(void 0!==i.errors&&i.errors.length>0)for(let e of i.errors)t.push(e)}t.length>0&&(i=t)}this.getPlugin("alert").error(t,i)})):e.text().then((()=>{const n="["+e.statusCode+"] "+e.statusText;this.getPlugin("alert").error(t,n)}))}}class Ai extends bi{addClickHandler(t,e,n){document.body.addEventListener("click",(i=>{let s=i.target;for(;null!==s;){const e=s.tagName.toUpperCase();if("BODY"===e)return;if(s.matches(t))break;if("A"===e||"BUTTON"===e||"INPUT"===e||"LABEL"===e)return;for(let t of n)if(s.matches(t))return;s=s.parentNode}if(null===s)return;if(s.isContentEditable||s.parentNode.isContentEditable)return;if(!s.matches(t))return;for(let t of n)if(s.matches(t))return;i.preventDefault(),i.stopPropagation();let r=s.dataset.href;null==r&&(r=s.href),null!=r&&""!==r&&e(r)}))}}class Ii extends Ai{constructor(t){super(),this._selector=t}init(){this.addClickHandler(this._selector,(function(t){window.location=t}),[])}}class Ni extends Ai{constructor(t,e){super(),this._selector=t,this._stopSelector=e}getId(){return"modal"}init(){this._isDirty=!1;const t=this._getModalElement();null!==t&&(t.addEventListener("hide.bs.modal",(e=>{if(this._isDirty){if(null===t.querySelector(".modal-body .remote_modal_is_dirty_warning")){const e=this.translate("modal.dirty"),n=document.createElement("div");n.innerHTML='

'+e+"

",t.querySelector(".modal-body").prepend(n.firstElementChild)}e.preventDefault()}else this._isDirty=!1,document.dispatchEvent(new Event("modal-hide"))})),t.addEventListener("hidden.bs.modal",(()=>{this.getContainer().getPlugin("form").destroyForm(this._getFormIdentifier()),t.querySelector(".modal-body").replaceWith("")})),t.addEventListener("show.bs.modal",(()=>{document.dispatchEvent(new Event("modal-show"))})),this.addClickHandler(this._selector,(t=>{this.openUrlInModal(t)}),this._stopSelector))}_getModal(){return ki.aF.getOrCreateInstance(this._getModalElement())}openUrlInModal(t,e){const n=new Headers;n.append("X-Requested-With","Kimai-Modal"),this.fetch(t,{method:"GET",redirect:"follow",headers:n}).then((e=>{if(e.ok)return e.text().then((t=>{this._openFormInModal(t)}));window.location=t})).catch((n=>{null==e?window.location=t:e(n)}))}_getFormIdentifier(){return"#remote_form_modal .modal-content form"}_getModalElement(){return document.getElementById("remote_form_modal")}_makeScriptExecutable(t){if(void 0!==t.tagName&&"SCRIPT"===t.tagName){const e=document.createElement("script");e.text=t.innerHTML,t.parentNode.replaceChild(e,t)}else for(const e of t.childNodes)this._makeScriptExecutable(e);return t}_openFormInModal(t){const e=this._getFormIdentifier();let n=this._getModalElement();const i=document.createElement("div");i.innerHTML=t;const s=this._makeScriptExecutable(i.querySelector("#form_modal .modal-content"));if(null!==s){let t=n.querySelector(".modal-dialog"),r=i.querySelector(".modal-dialog").classList.contains("modal-lg");r&&!t.classList.contains("modal-lg")&&t.classList.toggle("modal-lg"),!r&&t.classList.contains("modal-lg")&&t.classList.toggle("modal-lg"),n.querySelector(".modal-content").replaceWith(s),[].slice.call(n.querySelectorAll('[data-bs-dismiss="modal"]')).map((t=>{t.addEventListener("click",(()=>{this._isDirty=!1,this._getModal().hide()}))})),this.getContainer().getPlugin("form").activateForm(e)}let r=i.querySelector("div.alert");null!==r&&n.querySelector(".modal-body").prepend(r);const o=document.querySelector(e);o.addEventListener("change",(()=>{this._isDirty=!0})),o.addEventListener("submit",this._getEventHandler()),this._getModal().show()}_getEventHandler(){return void 0===this.eventHandler&&(this.eventHandler=t=>{const e=t.target;if(void 0!==e.target&&""!==e.target)return!0;const n=document.querySelector(this._getFormIdentifier()+" button[type=submit]");n.textContent=n.textContent+" …",n.disabled=!0;const i=e.dataset.formEvent,s=this.getContainer().getPlugin("event"),r=this.getContainer().getPlugin("alert");t.preventDefault(),t.stopPropagation();const o=new Headers;o.append("X-Requested-With","Kimai-Modal");const a={headers:o};this.fetchForm(e,a).then((t=>{t.text().then((t=>{const o=document.createElement("div");o.innerHTML=t;let a=!1,l=!1,c=!1;n.textContent=n.textContent.replace(" …",""),n.disabled=!1;const u=o.querySelector("#form_modal .modal-content");if(null!==u&&(a=null!==u.querySelector(".is-invalid"),a||(a=null!==u.querySelector(".invalid-feedback")),l=null!==u.querySelector("ul.list-unstyled li.text-danger"),c=null!==o.querySelector("div.alert-danger")),a||l||c)this._openFormInModal(t);else{s.trigger(i);let t=e.dataset.msgSuccess;null!=t&&""!==t||(t="action.update.success"),this._isDirty=!1,this._getModal().hide(),r.success(t)}}))})).catch((t=>{let i=e.dataset.msgError;null!=i&&""!==i||(i="action.update.error"),r.error(i,t.message),setTimeout((()=>{n.textContent=n.textContent.replace(" …",""),n.disabled=!1}),1500)}))}),this.eventHandler}}class Fi extends bi{constructor(){super(),this._selector=".ticktac-menu",this._selectorEmpty=".ticktac-menu-empty",this._favIconUrl=null}getId(){return"active-records"}init(){if(null===document.querySelector(this._selector))return;const t=()=>{this.reloadActiveRecords()};document.addEventListener("kimai.timesheetUpdate",t),document.addEventListener("kimai.timesheetDelete",t),document.addEventListener("kimai.activityUpdate",t),document.addEventListener("kimai.activityDelete",t),document.addEventListener("kimai.projectUpdate",t),document.addEventListener("kimai.projectDelete",t),document.addEventListener("kimai.customerUpdate",t),document.addEventListener("kimai.customerDelete",t),this._updateBrowserTitle=!!this.getConfiguration("updateBrowserTitle");const e=()=>{this._updateDuration()};this._updatesHandler=setInterval(e,1e4),document.addEventListener("kimai.timesheetUpdate",e),document.addEventListener("kimai.reloadedContent",e)}_updateDuration(){const t=document.querySelectorAll('[data-since]:not([data-since=""])');if(this._updateBrowserTitle&&this._changeFavicon(t.length>0),0===t.length)return void(this._updateBrowserTitle&&(void 0===document.body.dataset.title?this._updateBrowserTitle=!1:document.title=document.body.dataset.title));const e=this.getDateUtils();let n=[];for(const i of t){const t=e.formatDuration(i.dataset.since);void 0!==i.dataset.replacer&&null!==i.dataset.title&&"?"!==t&&n.push(t),i.textContent=t}0!==n.length&&this._updateBrowserTitle&&(document.title=n.shift())}_setEntries(t){const e=t.length>0;for(let t of document.querySelectorAll(this._selectorEmpty))t.style.display=e?"none":"inline-block";for(let n of document.querySelectorAll(this._selector)){if(n.style.display=e?"inline-block":"none",!e)for(let t of n.querySelectorAll("[data-since]"))t.dataset.since="";const i=n.querySelector(".ticktac-stop");e?(i&&(i.accesskey="s"),this._replaceInNode(n,t[0])):i&&(i.accesskey=null)}this._updateDuration()}_replaceInNode(t,e){const n=this.getDateUtils(),i=t.querySelectorAll("[data-replacer]");for(let s of i){const i=s.dataset.replacer;"url"===i?s.dataset.href=t.dataset.href.replace("000",e.id):"activity"===i?s.innerText=e.activity.name:"project"===i?s.innerText=e.project.name:"customer"===i?s.innerText=e.project.customer.name:"duration"===i&&(s.dataset.since=e.begin,s.innerText=n.formatDuration(e.duration))}}reloadActiveRecords(){const t=this.getContainer().getPlugin("api"),e=document.querySelector(this._selector).dataset.api;t.get(e,{},(t=>{this._setEntries(t)}))}_changeFavicon(t){const e=document.createElement("canvas"),n=document.getElementById("favicon");null===this._favIconUrl&&(this._favIconUrl=n.href);const i=n.cloneNode(!0);if(e.getContext&&i){const s=window.devicePixelRatio,r=document.createElement("img");e.height=e.width=16*s,r.onload=function(){const r=e.getContext("2d");if(r.drawImage(this,0,0,e.width,e.height),t){const t=5.5*s;r.fillStyle="rgb(182,57,57)",r.fillRect(e.width/2-t/2,e.height/2-t/2,t,t)}i.href=e.toDataURL("image/png"),n.remove(),document.head.appendChild(i)},r.src=this._favIconUrl}}}class Pi extends bi{getId(){return"event"}trigger(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(""!==t)for(const n of t.split(" ")){let t=new Event(n);null!==e&&(t=new CustomEvent(n,{detail:e})),document.dispatchEvent(t)}}}class ji extends bi{constructor(t){super(),this._selector=t}init(){document.addEventListener("click",(t=>{let e=t.target;for(;null!==e&&"function"==typeof e.matches&&!e.matches("body");){if(e.classList.contains(this._selector)){const n=e.dataset;let i=n.href;i||(i=e.getAttribute("href")),void 0!==n.question?this.getContainer().getPlugin("alert").question(n.question,(t=>{t&&this._callApi(i,n)})):this._callApi(i,n),t.preventDefault(),t.stopPropagation()}e=e.parentNode}}))}_callApi(t,e){const n=e.method,i=e.event,s=this.getContainer().getPlugin("api"),r=this.getContainer().getPlugin("event"),o=this.getContainer().getPlugin("alert"),a=()=>{r.trigger(i),void 0!==e.msgSuccess&&o.success(e.msgSuccess)},l=t=>{let n="action.update.error";void 0!==e.msgError&&(n=e.msgError),s.handleError(n,t)};let c={};if(void 0!==e.payload&&(c=e.payload),"PATCH"===n)s.patch(t,c,a,l);else if("POST"===n){let e={};s.post(t,e,a,l)}else"DELETE"===n?s.delete(t,a,l):"GET"===n&&s.get(t,c,a,l)}}class qi extends bi{getId(){return"alert"}error(t,e){const n=this.getTranslation();n.has(t)&&(t=n.get(t)),t=t.replace("%reason%",""),void 0===e&&(e=null),null!==e&&(n.has(e)&&(e=n.get(e)),Array.isArray(e)&&(e=e.join("
")));const i="alert_global_error",s=document.getElementById(i);null!==s&&ki.aF.getOrCreateInstance(s).hide();const r='\n
\n ";this._showModal(r)}warning(t){this._show("warning",t)}success(t){this._toast("success",t)}info(t){this._show("info",t)}_showModal(t){const e=document.body,n=document.createElement("template");n.innerHTML=t.trim();const i=n.content.firstChild;e.appendChild(i);const s=new ki.aF(i);i.addEventListener("hidden.bs.modal",(function(){e.removeChild(i)})),s.show()}_show(t,e){const n=this.getTranslation();n.has(e)&&(e=n.get(e));const i='\n \n ";this._showModal(i)}_mapClass(t){return"info"===t||"success"===t||"warning"===t||"danger"===t?t:"error"===t?"danger":"primary"}_toast(t,e){const n=this.getTranslation();n.has(e)&&(e=n.get(e));let i='';"success"===t?i='':"warning"===t?i='':"danger"!==t&&"error"!==t||(i='');const s='',r=document.getElementById("toast-container"),o=document.createElement("template");o.innerHTML=s.trim();const a=o.content.firstChild;r.appendChild(a);const l=new ki.y8(a);a.addEventListener("hidden.bs.toast",(function(){r.removeChild(a)})),l.show()}question(t,e){const n=this.getTranslation();n.has(t)&&(t=n.get(t));const i=this._mapClass("info"),s='\n \n ",r=document.body,o=document.createElement("template");o.innerHTML=s.trim();const a=o.content.firstChild;r.appendChild(a),a.querySelector(".question-confirm").addEventListener("click",(()=>{e(!0)})),a.querySelector(".question-cancel").addEventListener("click",(()=>{e(!1)}));const l=new ki.aF(a);a.addEventListener("hidden.bs.modal",(()=>{r.removeChild(a)})),l.show()}}function Hi(t,e){t.split(/\s+/).forEach((t=>{e(t)}))}class Vi{constructor(){this._events={}}on(t,e){Hi(t,(t=>{const n=this._events[t]||[];n.push(e),this._events[t]=n}))}off(t,e){var n=arguments.length;0!==n?Hi(t,(t=>{if(1===n)return void delete this._events[t];const i=this._events[t];void 0!==i&&(i.splice(i.indexOf(e),1),this._events[t]=i)})):this._events={}}trigger(t,...e){var n=this;Hi(t,(t=>{const i=n._events[t];void 0!==i&&i.forEach((t=>{t.apply(n,e)}))}))}}const $i=t=>(t=t.filter(Boolean)).length<2?t[0]||"":1==Yi(t)?"["+t.join("")+"]":"(?:"+t.join("|")+")",Ri=t=>{if(!Bi(t))return t.join("");let e="",n=0;const i=()=>{n>1&&(e+="{"+n+"}")};return t.forEach(((s,r)=>{s!==t[r-1]?(i(),e+=s,n=1):n++})),i(),e},Wi=t=>{let e=Array.from(t);return $i(e)},Bi=t=>new Set(t).size!==t.length,zi=t=>(t+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),Yi=t=>t.reduce(((t,e)=>Math.max(t,Ui(e))),0),Ui=t=>Array.from(t).length,Zi=t=>{if(1===t.length)return[[t]];let e=[];const n=t.substring(1);return Zi(n).forEach((function(n){let i=n.slice(0);i[0]=t.charAt(0)+i[0],e.push(i),i=n.slice(0),i.unshift(t.charAt(0)),e.push(i)})),e},Ji=[[0,65535]];let Ki,Gi;const Qi={},Xi={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"};for(let t in Xi){let e=Xi[t]||"";for(let n=0;nt.normalize(e),ns=t=>Array.from(t).reduce(((t,e)=>t+is(e)),""),is=t=>(t=es(t).toLowerCase().replace(ts,(t=>Qi[t]||"")),es(t,"NFC"));const ss=t=>{const e={},n=(t,n)=>{const i=e[t]||new Set,s=new RegExp("^"+Wi(i)+"$","iu");n.match(s)||(i.add(zi(n)),e[t]=i)};for(let e of function*(t){for(const[e,n]of t)for(let t=e;t<=n;t++){let e=String.fromCharCode(t),n=ns(e);n!=e.toLowerCase()&&(n.length>3||0!=n.length&&(yield{folded:n,composed:e,code_point:t}))}}(t))n(e.folded,e.folded),n(e.folded,e.composed);return e},rs=t=>{const e=ss(t),n={};let i=[];for(let t in e){let s=e[t];s&&(n[t]=Wi(s)),t.length>1&&i.push(zi(t))}i.sort(((t,e)=>e.length-t.length));const s=$i(i);return Gi=new RegExp("^"+s,"u"),n},os=(t,e=1)=>(e=Math.max(e,t.length-1),$i(Zi(t).map((t=>((t,e=1)=>{let n=0;return t=t.map((t=>(Ki[t]&&(n+=t.length),Ki[t]||t))),n>=e?Ri(t):""})(t,e))))),as=(t,e=!0)=>{let n=t.length>1?1:0;return $i(t.map((t=>{let i=[];const s=e?t.length():t.length()-1;for(let e=0;e{for(const n of e){if(n.start!=t.start||n.end!=t.end)continue;if(n.substrs.join("")!==t.substrs.join(""))continue;let e=t.parts;const i=t=>{for(const n of e){if(n.start===t.start&&n.substr===t.substr)return!1;if(1!=t.length&&1!=n.length){if(t.startn.start)return!0;if(n.startt.start)return!0}}return!1};if(!(n.parts.filter(i).length>0))return!0}return!1};class cs{parts;substrs;start;end;constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(t){t&&(this.parts.push(t),this.substrs.push(t.substr),this.start=Math.min(t.start,this.start),this.end=Math.max(t.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(t,e){let n=new cs,i=JSON.parse(JSON.stringify(this.parts)),s=i.pop();for(const t of i)n.add(t);let r=e.substr.substring(0,t-s.start),o=r.length;return n.add({start:s.start,end:s.start+o,length:o,substr:r}),n}}const us=t=>{var e;void 0===Ki&&(Ki=rs(e||Ji)),t=ns(t);let n="",i=[new cs];for(let e=0;e0){a=a.sort(((t,e)=>t.length()-e.length()));for(let t of a)ls(t,i)||i.push(t)}else if(e>0&&1==l.size&&!l.has("3")){n+=as(i,!1);let t=new cs;const e=i[0];e&&t.add(e.last()),i=[t]}}return n+=as(i,!0),n},ds=(t,e)=>{if(t)return t[e]},hs=(t,e)=>{if(t){for(var n,i=e.split(".");(n=i.shift())&&(t=t[n]););return t}},ps=(t,e,n)=>{var i,s;return t?(t+="",null==e.regex||-1===(s=t.search(e.regex))?0:(i=e.string.length/t.length,0===s&&(i+=.5),i*n)):0},ms=(t,e)=>{var n=t[e];if("function"==typeof n)return n;n&&!Array.isArray(n)&&(t[e]=[n])},fs=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},gs=(t,e)=>"number"==typeof t&&"number"==typeof e?t>e?1:t(e=ns(e+"").toLowerCase())?1:e>t?-1:0;class vs{items;settings;constructor(t,e){this.items=t,this.settings=e||{diacritics:!0}}tokenize(t,e,n){if(!t||!t.length)return[];const i=[],s=t.split(/\s+/);var r;return n&&(r=new RegExp("^("+Object.keys(n).map(zi).join("|")+"):(.*)$")),s.forEach((t=>{let n,s=null,o=null;r&&(n=t.match(r))&&(s=n[1],t=n[2]),t.length>0&&(o=this.settings.diacritics?us(t)||null:zi(t),o&&e&&(o="\\b"+o)),i.push({string:t,regex:o?new RegExp(o,"iu"):null,field:s})})),i}getScoreFunction(t,e){var n=this.prepareSearch(t,e);return this._getScoreFunction(n)}_getScoreFunction(t){const e=t.tokens,n=e.length;if(!n)return function(){return 0};const i=t.options.fields,s=t.weights,r=i.length,o=t.getAttrFn;if(!r)return function(){return 1};const a=1===r?function(t,e){const n=i[0].field;return ps(o(e,n),t,s[n]||1)}:function(t,e){var n=0;if(t.field){const i=o(e,t.field);!t.regex&&i?n+=1/r:n+=ps(i,t,1)}else fs(s,((i,s)=>{n+=ps(o(e,s),t,i)}));return n/r};return 1===n?function(t){return a(e[0],t)}:"and"===t.options.conjunction?function(t){var i,s=0;for(let n of e){if((i=a(n,t))<=0)return 0;s+=i}return s/n}:function(t){var i=0;return fs(e,(e=>{i+=a(e,t)})),i/n}}getSortFunction(t,e){var n=this.prepareSearch(t,e);return this._getSortFunction(n)}_getSortFunction(t){var e,n=[];const i=this,s=t.options,r=!t.query&&s.sort_empty?s.sort_empty:s.sort;if("function"==typeof r)return r.bind(this);const o=function(e,n){return"$score"===e?n.score:t.getAttrFn(i.items[n.id],e)};if(r)for(let e of r)(t.query||"$score"!==e.field)&&n.push(e);if(t.query){e=!0;for(let t of n)if("$score"===t.field){e=!1;break}e&&n.unshift({field:"$score",direction:"desc"})}else n=n.filter((t=>"$score"!==t.field));return n.length?function(t,e){var i,s;for(let r of n){if(s=r.field,i=("desc"===r.direction?-1:1)*gs(o(s,t),o(s,e)))return i}return 0}:null}prepareSearch(t,e){const n={};var i=Object.assign({},e);if(ms(i,"sort"),ms(i,"sort_empty"),i.fields){ms(i,"fields");const t=[];i.fields.forEach((e=>{"string"==typeof e&&(e={field:e,weight:1}),t.push(e),n[e.field]="weight"in e?e.weight:1})),i.fields=t}return{options:i,query:t.toLowerCase().trim(),tokens:this.tokenize(t,i.respect_word_boundaries,n),total:0,items:[],weights:n,getAttrFn:i.nesting?hs:ds}}search(t,e){var n,i,s=this;i=this.prepareSearch(t,e),e=i.options,t=i.query;const r=e.score||s._getScoreFunction(i);t.length?fs(s.items,((t,s)=>{n=r(t),(!1===e.filter||n>0)&&i.items.push({score:n,id:s})})):fs(s.items,((t,e)=>{i.items.push({score:1,id:e})}));const o=s._getSortFunction(i);return o&&i.items.sort(o),i.total=i.items.length,"number"==typeof e.limit&&(i.items=i.items.slice(0,e.limit)),i}}const ys=t=>null==t?null:bs(t),bs=t=>"boolean"==typeof t?t?"1":"0":t+"",_s=t=>(t+"").replace(/&/g,"&").replace(//g,">").replace(/"/g,"""),ws=(t,e)=>{var n;return function(i,s){var r=this;n&&(r.loading=Math.max(r.loading-1,0),clearTimeout(n)),n=setTimeout((function(){n=null,r.loadedSearches[i]=!0,t.call(r,i,s)}),e)}},ks=(t,e,n)=>{var i,s=t.trigger,r={};for(i of(t.trigger=function(){var n=arguments[0];if(-1===e.indexOf(n))return s.apply(t,arguments);r[n]=arguments},n.apply(t,[]),t.trigger=s,e))i in r&&s.apply(t,r[i])},Ts=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},xs=(t,e,n,i)=>{t.addEventListener(e,n,i)},Es=(t,e)=>!!e&&(!!e[t]&&1===(e.altKey?1:0)+(e.ctrlKey?1:0)+(e.shiftKey?1:0)+(e.metaKey?1:0)),Ds=(t,e)=>{const n=t.getAttribute("id");return n||(t.setAttribute("id",e),e)},Ss=t=>t.replace(/[\\"']/g,"\\$&"),Os=(t,e)=>{e&&t.append(e)},Ls=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},Cs=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(Ms(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},Ms=t=>"string"==typeof t&&t.indexOf("<")>-1,As=(t,e)=>{var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!1),t.dispatchEvent(n)},Is=(t,e)=>{Object.assign(t.style,e)},Ns=(t,...e)=>{var n=Ps(e);(t=js(t)).map((t=>{n.map((e=>{t.classList.add(e)}))}))},Fs=(t,...e)=>{var n=Ps(e);(t=js(t)).map((t=>{n.map((e=>{t.classList.remove(e)}))}))},Ps=t=>{var e=[];return Ls(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},js=t=>(Array.isArray(t)||(t=[t]),t),qs=(t,e,n)=>{if(!n||n.contains(t))for(;t&&t.matches;){if(t.matches(e))return t;t=t.parentNode}},Hs=(t,e=0)=>e>0?t[t.length-1]:t[0],Vs=(t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var n=0;t=t.previousElementSibling;)t.matches(e)&&n++;return n},$s=(t,e)=>{Ls(e,((e,n)=>{null==e?t.removeAttribute(n):t.setAttribute(n,""+e)}))},Rs=(t,e)=>{t.parentNode&&t.parentNode.replaceChild(e,t)},Ws=(t,e)=>{if(null===e)return;if("string"==typeof e){if(!e.length)return;e=new RegExp(e,"i")}const n=t=>3===t.nodeType?(t=>{var n=t.data.match(e);if(n&&t.data.length>0){var i=document.createElement("span");i.className="highlight";var s=t.splitText(n.index);s.splitText(n[0].length);var r=s.cloneNode(!0);return i.appendChild(r),Rs(s,i),1}return 0})(t):((t=>{1!==t.nodeType||!t.childNodes||/(script|style)/i.test(t.tagName)||"highlight"===t.className&&"SPAN"===t.tagName||Array.from(t.childNodes).forEach((t=>{n(t)}))})(t),0);n(t)},Bs="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey";var zs={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,refreshThrottle:300,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(t){return t.length>0},render:{}};function Ys(t,e){var n=Object.assign({},zs,e),i=n.dataAttr,s=n.labelField,r=n.valueField,o=n.disabledField,a=n.optgroupField,l=n.optgroupLabelField,c=n.optgroupValueField,u=t.tagName.toLowerCase(),d=t.getAttribute("placeholder")||t.getAttribute("data-placeholder");if(!d&&!n.allowEmptyOption){let e=t.querySelector('option[value=""]');e&&(d=e.textContent)}var h={placeholder:d,options:[],optgroups:[],items:[],maxItems:null};return"select"===u?(()=>{var e,u=h.options,d={},p=1;let m=0;var f=t=>{var e=Object.assign({},t.dataset),n=i&&e[i];return"string"==typeof n&&n.length&&(e=Object.assign(e,JSON.parse(n))),e},g=(t,e)=>{var i=ys(t.value);if(null!=i&&(i||n.allowEmptyOption)){if(d.hasOwnProperty(i)){if(e){var l=d[i][a];l?Array.isArray(l)?l.push(e):d[i][a]=[l,e]:d[i][a]=e}}else{var c=f(t);c[s]=c[s]||t.textContent,c[r]=c[r]||i,c[o]=c[o]||t.disabled,c[a]=c[a]||e,c.$option=t,c.$order=c.$order||++m,d[i]=c,u.push(c)}t.selected&&h.items.push(i)}};h.maxItems=t.hasAttribute("multiple")?null:1,Ls(t.children,(t=>{var n,i,s;"optgroup"===(e=t.tagName.toLowerCase())?((s=f(n=t))[l]=s[l]||n.getAttribute("label")||"",s[c]=s[c]||p++,s[o]=s[o]||n.disabled,s.$order=s.$order||++m,h.optgroups.push(s),i=s[c],Ls(n.children,(t=>{g(t,i)}))):"option"===e&&g(t)}))})():(()=>{const e=t.getAttribute(i);if(e)h.options=JSON.parse(e),Ls(h.options,(t=>{h.items.push(t[r])}));else{var o=t.value.trim()||"";if(!n.allowEmptyOption&&!o.length)return;const e=o.split(n.delimiter);Ls(e,(t=>{const e={};e[s]=t,e[r]=t,h.options.push(e)})),h.items=e}})(),Object.assign({},zs,h,e)}var Us=0;class Zs extends(function(t){return t.plugins={},class extends t{constructor(){super(...arguments),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(e,n){t.plugins[e]={name:e,fn:n}}initializePlugins(t){var e,n;const i=this,s=[];if(Array.isArray(t))t.forEach((t=>{"string"==typeof t?s.push(t):(i.plugins.settings[t.name]=t.options,s.push(t.name))}));else if(t)for(e in t)t.hasOwnProperty(e)&&(i.plugins.settings[e]=t[e],s.push(e));for(;n=s.shift();)i.require(n)}loadPlugin(e){var n=this,i=n.plugins,s=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin');i.requested[e]=!0,i.loaded[e]=s.fn.apply(n,[n.plugins.settings[e]||{}]),i.names.push(e)}require(t){var e=this,n=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(n.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return n.loaded[t]}}}(Vi)){constructor(t,e){var n;super(),this.order=0,this.isOpen=!1,this.isDisabled=!1,this.isReadOnly=!1,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],this.refreshTimeout=null,Us++;var i=Cs(t);if(i.tomselect)throw new Error("Tom Select already initialized on this element");i.tomselect=this,n=(window.getComputedStyle&&window.getComputedStyle(i,null)).getPropertyValue("direction");const s=Ys(i,e);this.settings=s,this.input=i,this.tabIndex=i.tabIndex||0,this.is_select_tag="select"===i.tagName.toLowerCase(),this.rtl=/rtl/i.test(n),this.inputId=Ds(i,"tomselect-"+Us),this.isRequired=i.required,this.sifter=new vs(this.options,{diacritics:s.diacritics}),s.mode=s.mode||(1===s.maxItems?"single":"multi"),"boolean"!=typeof s.hideSelected&&(s.hideSelected="multi"===s.mode),"boolean"!=typeof s.hidePlaceholder&&(s.hidePlaceholder="multi"!==s.mode);var r=s.createFilter;"function"!=typeof r&&("string"==typeof r&&(r=new RegExp(r)),r instanceof RegExp?s.createFilter=t=>r.test(t):s.createFilter=t=>this.settings.duplicates||!this.options[t]),this.initializePlugins(s.plugins),this.setupCallbacks(),this.setupTemplates();const o=Cs("
"),a=Cs("
"),l=this._render("dropdown"),c=Cs('
'),u=this.input.getAttribute("class")||"",d=s.mode;var h;if(Ns(o,s.wrapperClass,u,d),Ns(a,s.controlClass),Os(o,a),Ns(l,s.dropdownClass,d),s.copyClassesToDropdown&&Ns(l,u),Ns(c,s.dropdownContentClass),Os(l,c),Cs(s.dropdownParent||o).appendChild(l),Ms(s.controlInput)){h=Cs(s.controlInput);Ls(["autocorrect","autocapitalize","autocomplete","spellcheck"],(t=>{i.getAttribute(t)&&$s(h,{[t]:i.getAttribute(t)})})),h.tabIndex=-1,a.appendChild(h),this.focus_node=h}else s.controlInput?(h=Cs(s.controlInput),this.focus_node=h):(h=Cs(""),this.focus_node=a);this.wrapper=o,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=h,this.setup()}setup(){const t=this,e=t.settings,n=t.control_input,i=t.dropdown,s=t.dropdown_content,r=t.wrapper,o=t.control,a=t.input,l=t.focus_node,c={passive:!0},u=t.inputId+"-ts-dropdown";$s(s,{id:u}),$s(l,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":u});const d=Ds(l,t.inputId+"-ts-control"),h="label[for='"+(t=>t.replace(/['"\\]/g,"\\$&"))(t.inputId)+"']",p=document.querySelector(h),m=t.focus.bind(t);if(p){xs(p,"click",m),$s(p,{for:d});const e=Ds(p,t.inputId+"-ts-label");$s(l,{"aria-labelledby":e}),$s(s,{"aria-labelledby":e})}if(r.style.width=a.style.width,t.plugins.names.length){const e="plugin-"+t.plugins.names.join(" plugin-");Ns([r,i],e)}(null===e.maxItems||e.maxItems>1)&&t.is_select_tag&&$s(a,{multiple:"multiple"}),e.placeholder&&$s(n,{placeholder:e.placeholder}),!e.splitOn&&e.delimiter&&(e.splitOn=new RegExp("\\s*"+zi(e.delimiter)+"+\\s*")),e.load&&e.loadThrottle&&(e.load=ws(e.load,e.loadThrottle)),xs(i,"mousemove",(()=>{t.ignoreHover=!1})),xs(i,"mouseenter",(e=>{var n=qs(e.target,"[data-selectable]",i);n&&t.onOptionHover(e,n)}),{capture:!0}),xs(i,"click",(e=>{const n=qs(e.target,"[data-selectable]");n&&(t.onOptionSelect(e,n),Ts(e,!0))})),xs(o,"click",(e=>{var i=qs(e.target,"[data-ts-item]",o);i&&t.onItemSelect(e,i)?Ts(e,!0):""==n.value&&(t.onClick(),Ts(e,!0))})),xs(l,"keydown",(e=>t.onKeyDown(e))),xs(n,"keypress",(e=>t.onKeyPress(e))),xs(n,"input",(e=>t.onInput(e))),xs(l,"blur",(e=>t.onBlur(e))),xs(l,"focus",(e=>t.onFocus(e))),xs(n,"paste",(e=>t.onPaste(e)));const f=e=>{const s=e.composedPath()[0];if(!r.contains(s)&&!i.contains(s))return t.isFocused&&t.blur(),void t.inputState();s==n&&t.isOpen?e.stopPropagation():Ts(e,!0)},g=()=>{t.isOpen&&t.positionDropdown()};xs(document,"mousedown",f),xs(window,"scroll",g,c),xs(window,"resize",g,c),this._destroy=()=>{document.removeEventListener("mousedown",f),window.removeEventListener("scroll",g),window.removeEventListener("resize",g),p&&p.removeEventListener("click",m)},this.revertSettings={innerHTML:a.innerHTML,tabIndex:a.tabIndex},a.tabIndex=-1,a.insertAdjacentElement("afterend",t.wrapper),t.sync(!1),e.items=[],delete e.optgroups,delete e.options,xs(a,"invalid",(()=>{t.isValid&&(t.isValid=!1,t.isInvalid=!0,t.refreshState())})),t.updateOriginalInput(),t.refreshItems(),t.close(!1),t.inputState(),t.isSetup=!0,a.disabled?t.disable():a.readOnly?t.setReadOnly(!0):t.enable(),t.on("change",this.onChange),Ns(a,"tomselected","ts-hidden-accessible"),t.trigger("initialize"),!0===e.preload&&t.preload()}setupOptions(t=[],e=[]){this.addOptions(t),Ls(e,(t=>{this.registerOptionGroup(t)}))}setupTemplates(){var t=this,e=t.settings.labelField,n=t.settings.optgroupLabelField,i={optgroup:t=>{let e=document.createElement("div");return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,e)=>'
'+e(t[n])+"
",option:(t,n)=>"
"+n(t[e])+"
",item:(t,n)=>"
"+n(t[e])+"
",option_create:(t,e)=>'
Add '+e(t.input)+"
",no_results:()=>'
No results found
',loading:()=>'
',not_loading:()=>{},dropdown:()=>"
"};t.settings.render=Object.assign({},i,t.settings.render)}setupCallbacks(){var t,e,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in n)(e=this.settings[n[t]])&&this.on(t,e)}sync(t=!0){const e=this,n=t?Ys(e.input,{delimiter:e.settings.delimiter}):e.settings;e.setupOptions(n.options,n.optgroups),e.setValue(n.items||[],!0),e.lastQuery=null}onClick(){var t=this;if(t.activeItems.length>0)return t.clearActiveItems(),void t.focus();t.isFocused&&t.isOpen?t.blur():t.focus()}onMouseDown(){}onChange(){As(this.input,"input"),As(this.input,"change")}onPaste(t){var e=this;e.isInputHidden||e.isLocked?Ts(t):e.settings.splitOn&&setTimeout((()=>{var t=e.inputValue();if(t.match(e.settings.splitOn)){var n=t.trim().split(e.settings.splitOn);Ls(n,(t=>{ys(t)&&(this.options[t]?e.addItem(t):e.createItem(t))}))}}),0)}onKeyPress(t){var e=this;if(!e.isLocked){var n=String.fromCharCode(t.keyCode||t.which);return e.settings.create&&"multi"===e.settings.mode&&n===e.settings.delimiter?(e.createItem(),void Ts(t)):void 0}Ts(t)}onKeyDown(t){var e=this;if(e.ignoreHover=!0,e.isLocked)9!==t.keyCode&&Ts(t);else{switch(t.keyCode){case 65:if(Es(Bs,t)&&""==e.control_input.value)return Ts(t),void e.selectAll();break;case 27:return e.isOpen&&(Ts(t,!0),e.close()),void e.clearActiveItems();case 40:if(!e.isOpen&&e.hasOptions)e.open();else if(e.activeOption){let t=e.getAdjacent(e.activeOption,1);t&&e.setActiveOption(t)}return void Ts(t);case 38:if(e.activeOption){let t=e.getAdjacent(e.activeOption,-1);t&&e.setActiveOption(t)}return void Ts(t);case 13:return void(e.canSelect(e.activeOption)?(e.onOptionSelect(t,e.activeOption),Ts(t)):(e.settings.create&&e.createItem()||document.activeElement==e.control_input&&e.isOpen)&&Ts(t));case 37:return void e.advanceSelection(-1,t);case 39:return void e.advanceSelection(1,t);case 9:return void(e.settings.selectOnTab&&(e.canSelect(e.activeOption)&&(e.onOptionSelect(t,e.activeOption),Ts(t)),e.settings.create&&e.createItem()&&Ts(t)));case 8:case 46:return void e.deleteSelection(t)}e.isInputHidden&&!Es(Bs,t)&&Ts(t)}}onInput(t){if(this.isLocked)return;const e=this.inputValue();this.lastValue!==e&&(this.lastValue=e,""!=e?(this.refreshTimeout&&window.clearTimeout(this.refreshTimeout),this.refreshTimeout=((t,e)=>e>0?window.setTimeout(t,e):(t.call(null),null))((()=>{this.refreshTimeout=null,this._onInput()}),this.settings.refreshThrottle)):this._onInput())}_onInput(){const t=this.lastValue;this.settings.shouldLoad.call(this,t)&&this.load(t),this.refreshOptions(),this.trigger("type",t)}onOptionHover(t,e){this.ignoreHover||this.setActiveOption(e,!1)}onFocus(t){var e=this,n=e.isFocused;if(e.isDisabled||e.isReadOnly)return e.blur(),void Ts(t);e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.preload(),n||e.trigger("focus"),e.activeItems.length||(e.inputState(),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())}onBlur(t){if(!1!==document.hasFocus()){var e=this;if(e.isFocused){e.isFocused=!1,e.ignoreFocus=!1;var n=()=>{e.close(),e.setActiveItem(),e.setCaret(e.items.length),e.trigger("blur")};e.settings.create&&e.settings.createOnBlur?e.createItem(null,n):n()}}}onOptionSelect(t,e){var n,i=this;e.parentElement&&e.parentElement.matches("[data-disabled]")||(e.classList.contains("create")?i.createItem(null,(()=>{i.settings.closeAfterSelect&&i.close()})):void 0!==(n=e.dataset.value)&&(i.lastQuery=null,i.addItem(n),i.settings.closeAfterSelect&&i.close(),!i.settings.hideSelected&&t.type&&/click/.test(t.type)&&i.setActiveOption(e)))}canSelect(t){return!!(this.isOpen&&t&&this.dropdown_content.contains(t))}onItemSelect(t,e){var n=this;return!n.isLocked&&"multi"===n.settings.mode&&(Ts(t),n.setActiveItem(e,t),!0)}canLoad(t){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(t)}load(t){const e=this;if(!e.canLoad(t))return;Ns(e.wrapper,e.settings.loadingClass),e.loading++;const n=e.loadCallback.bind(e);e.settings.load.call(e,t,n)}loadCallback(t,e){const n=this;n.loading=Math.max(n.loading-1,0),n.lastQuery=null,n.clearActiveOption(),n.setupOptions(t,e),n.refreshOptions(n.isFocused&&!n.isInputHidden),n.loading||Fs(n.wrapper,n.settings.loadingClass),n.trigger("load",t,e)}preload(){var t=this.wrapper.classList;t.contains("preloaded")||(t.add("preloaded"),this.load(""))}setTextboxValue(t=""){var e=this.control_input;e.value!==t&&(e.value=t,As(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){ks(this,e?[]:["change"],(()=>{this.clear(e),this.addItems(t,e)}))}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var n,i,s,r,o,a,l=this;if("single"!==l.settings.mode){if(!t)return l.clearActiveItems(),void(l.isFocused&&l.inputState());if("click"===(n=e&&e.type.toLowerCase())&&Es("shiftKey",e)&&l.activeItems.length){for(a=l.getLastActive(),(s=Array.prototype.indexOf.call(l.control.children,a))>(r=Array.prototype.indexOf.call(l.control.children,t))&&(o=s,s=r,r=o),i=s;i<=r;i++)t=l.control.children[i],-1===l.activeItems.indexOf(t)&&l.setActiveItemClass(t);Ts(e)}else"click"===n&&Es(Bs,e)||"keydown"===n&&Es("shiftKey",e)?t.classList.contains("active")?l.removeActiveItem(t):l.setActiveItemClass(t):(l.clearActiveItems(),l.setActiveItemClass(t));l.inputState(),l.isFocused||l.focus()}}setActiveItemClass(t){const e=this,n=e.control.querySelector(".last-active");n&&Fs(n,"last-active"),Ns(t,"active last-active"),e.trigger("item_select",t),-1==e.activeItems.indexOf(t)&&e.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t);this.activeItems.splice(e,1),Fs(t,"active")}clearActiveItems(){Fs(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t,e=!0){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,$s(this.focus_node,{"aria-activedescendant":t.getAttribute("id")}),$s(t,{"aria-selected":"true"}),Ns(t,"active"),e&&this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return;const n=this.dropdown_content,i=n.clientHeight,s=n.scrollTop||0,r=t.offsetHeight,o=t.getBoundingClientRect().top-n.getBoundingClientRect().top+s;o+r>i+s?this.scroll(o-i+r,e):o{t.setActiveItemClass(e)})))}inputState(){var t=this;t.control.contains(t.control_input)&&($s(t.control_input,{placeholder:t.settings.placeholder}),t.activeItems.length>0||!t.isFocused&&t.settings.hidePlaceholder&&t.items.length>0?(t.setTextboxValue(),t.isInputHidden=!0):(t.settings.hidePlaceholder&&t.items.length>0&&$s(t.control_input,{placeholder:""}),t.isInputHidden=!1),t.wrapper.classList.toggle("input-hidden",t.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var t=this;t.isDisabled||t.isReadOnly||(t.ignoreFocus=!0,t.control_input.offsetWidth?t.control_input.focus():t.focus_node.focus(),setTimeout((()=>{t.ignoreFocus=!1,t.onFocus()}),0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField;return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,n,i=this,s=this.getSearchOptions();if(i.settings.score&&"function"!=typeof(n=i.settings.score.call(i,t)))throw new Error('Tom Select "score" setting must be a function that returns a function');return t!==i.lastQuery?(i.lastQuery=t,e=i.sifter.search(t,Object.assign(s,{score:n})),i.currentResults=e):e=Object.assign({},i.currentResults),i.settings.hideSelected&&(e.items=e.items.filter((t=>{let e=ys(t.id);return!(e&&-1!==i.items.indexOf(e))}))),e}refreshOptions(t=!0){var e,n,i,s,r,o,a,l,c,u;const d={},h=[];var p=this,m=p.inputValue();const f=m===p.lastQuery||""==m&&null==p.lastQuery;var g=p.search(m),v=null,y=p.settings.shouldOpen||!1,b=p.dropdown_content;f&&(v=p.activeOption)&&(c=v.closest("[data-group]")),s=g.items.length,"number"==typeof p.settings.maxOptions&&(s=Math.min(s,p.settings.maxOptions)),s>0&&(y=!0);const _=(t,e)=>{let n=d[t];if(void 0!==n){let t=h[n];if(void 0!==t)return[n,t.fragment]}let i=document.createDocumentFragment();return n=h.length,h.push({fragment:i,order:e,optgroup:t}),[n,i]};for(e=0;e0&&(u=u.cloneNode(!0),$s(u,{id:a.$id+"-clone-"+n,"aria-selected":null}),u.classList.add("ts-cloned"),Fs(u,"active"),p.activeOption&&p.activeOption.dataset.value==s&&c&&c.dataset.group===r.toString()&&(v=u)),l.appendChild(u),""!=r&&(d[r]=i)}}var w;p.settings.lockOptgroupOrder&&h.sort(((t,e)=>t.order-e.order)),a=document.createDocumentFragment(),Ls(h,(t=>{let e=t.fragment,n=t.optgroup;if(!e||!e.children.length)return;let i=p.optgroups[n];if(void 0!==i){let t=document.createDocumentFragment(),n=p.render("optgroup_header",i);Os(t,n),Os(t,e);let s=p.render("optgroup",{group:i,options:t});Os(a,s)}else Os(a,e)})),b.innerHTML="",Os(b,a),p.settings.highlight&&(w=b.querySelectorAll("span.highlight"),Array.prototype.forEach.call(w,(function(t){var e=t.parentNode;e.replaceChild(t.firstChild,t),e.normalize()})),g.query.length&&g.tokens.length&&Ls(g.tokens,(t=>{Ws(b,t.regex)})));var k=t=>{let e=p.render(t,{input:m});return e&&(y=!0,b.insertBefore(e,b.firstChild)),e};if(p.loading?k("loading"):p.settings.shouldLoad.call(p,m)?0===g.items.length&&k("no_results"):k("not_loading"),(l=p.canCreate(m))&&(u=k("option_create")),p.hasOptions=g.items.length>0||l,y){if(g.items.length>0){if(v||"single"!==p.settings.mode||null==p.items[0]||(v=p.getOption(p.items[0])),!b.contains(v)){let t=0;u&&!p.settings.addPrecedence&&(t=1),v=p.selectable()[t]}}else u&&(v=u);t&&!p.isOpen&&(p.open(),p.scrollToOption(v,"auto")),p.setActiveOption(v)}else p.clearActiveOption(),t&&p.isOpen&&p.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t,e=!1){const n=this;if(Array.isArray(t))return n.addOptions(t,e),!1;const i=ys(t[n.settings.valueField]);return null!==i&&!n.options.hasOwnProperty(i)&&(t.$order=t.$order||++n.order,t.$id=n.inputId+"-opt-"+t.$order,n.options[i]=t,n.lastQuery=null,e&&(n.userOptions[i]=e,n.trigger("option_add",i,t)),i)}addOptions(t,e=!1){Ls(t,(t=>{this.addOption(t,e)}))}registerOption(t){return this.addOption(t)}registerOptionGroup(t){var e=ys(t[this.settings.optgroupValueField]);return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var n;e[this.settings.optgroupValueField]=t,(n=this.registerOptionGroup(e))&&this.trigger("optgroup_add",n,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){const n=this;var i,s;const r=ys(t),o=ys(e[n.settings.valueField]);if(null===r)return;const a=n.options[r];if(null==a)return;if("string"!=typeof o)throw new Error("Value must be set in option data");const l=n.getOption(r),c=n.getItem(r);if(e.$order=e.$order||a.$order,delete n.options[r],n.uncacheValue(o),n.options[o]=e,l){if(n.dropdown_content.contains(l)){const t=n._render("option",e);Rs(l,t),n.activeOption===l&&n.setActiveOption(t)}l.remove()}c&&(-1!==(s=n.items.indexOf(r))&&n.items.splice(s,1,o),i=n._render("item",e),c.classList.contains("active")&&Ns(i,"active"),Rs(c,i)),n.lastQuery=null}removeOption(t,e){const n=this;t=bs(t),n.uncacheValue(t),delete n.userOptions[t],delete n.options[t],n.lastQuery=null,n.trigger("option_remove",t),n.removeItem(t,e)}clearOptions(t){const e=(t||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const n={};Ls(this.options,((t,i)=>{e(t,i)&&(n[i]=t)})),this.options=this.sifter.items=n,this.lastQuery=null,this.trigger("option_clear")}clearFilter(t,e){return this.items.indexOf(e)>=0}getOption(t,e=!1){const n=ys(t);if(null===n)return null;const i=this.options[n];if(null!=i){if(i.$div)return i.$div;if(e)return this._render("option",i)}return null}getAdjacent(t,e,n="option"){var i;if(!t)return null;i="item"==n?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let n=0;n0?i[n+1]:i[n-1];return null}getItem(t){if("object"==typeof t)return t;var e=ys(t);return null!==e?this.control.querySelector(`[data-value="${Ss(e)}"]`):null}addItems(t,e){var n=this,i=Array.isArray(t)?t:[t];const s=(i=i.filter((t=>-1===n.items.indexOf(t))))[i.length-1];i.forEach((t=>{n.isPending=t!==s,n.addItem(t,e)}))}addItem(t,e){ks(this,e?[]:["change","dropdown_close"],(()=>{var n,i;const s=this,r=s.settings.mode,o=ys(t);if((!o||-1===s.items.indexOf(o)||("single"===r&&s.close(),"single"!==r&&s.settings.duplicates))&&null!==o&&s.options.hasOwnProperty(o)&&("single"===r&&s.clear(e),"multi"!==r||!s.isFull())){if(n=s._render("item",s.options[o]),s.control.contains(n)&&(n=n.cloneNode(!0)),i=s.isFull(),s.items.splice(s.caretPos,0,o),s.insertAtCaret(n),s.isSetup){if(!s.isPending&&s.settings.hideSelected){let t=s.getOption(o),e=s.getAdjacent(t,1);e&&s.setActiveOption(e)}s.isPending||s.settings.closeAfterSelect||s.refreshOptions(s.isFocused&&"single"!==r),0!=s.settings.closeAfterSelect&&s.isFull()?s.close():s.isPending||s.positionDropdown(),s.trigger("item_add",o,n),s.isPending||s.updateOriginalInput({silent:e})}(!s.isPending||!i&&s.isFull())&&(s.inputState(),s.refreshState())}}))}removeItem(t=null,e){const n=this;if(!(t=n.getItem(t)))return;var i,s;const r=t.dataset.value;i=Vs(t),t.remove(),t.classList.contains("active")&&(s=n.activeItems.indexOf(t),n.activeItems.splice(s,1),Fs(t,"active")),n.items.splice(i,1),n.lastQuery=null,!n.settings.persist&&n.userOptions.hasOwnProperty(r)&&n.removeOption(r,e),i{})){3===arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{});var n,i=this,s=i.caretPos;if(t=t||i.inputValue(),!i.canCreate(t))return e(),!1;i.lock();var r=!1,o=t=>{if(i.unlock(),!t||"object"!=typeof t)return e();var n=ys(t[i.settings.valueField]);if("string"!=typeof n)return e();i.setTextboxValue(),i.addOption(t,!0),i.setCaret(s),i.addItem(n),e(t),r=!0};return n="function"==typeof i.settings.create?i.settings.create.call(this,t,o):{[i.settings.labelField]:t,[i.settings.valueField]:t},r||o(n),!0}refreshItems(){var t=this;t.lastQuery=null,t.isSetup&&t.addItems(t.items),t.updateOriginalInput(),t.refreshState()}refreshState(){const t=this;t.refreshValidityState();const e=t.isFull(),n=t.isLocked;t.wrapper.classList.toggle("rtl",t.rtl);const i=t.wrapper.classList;var s;i.toggle("focus",t.isFocused),i.toggle("disabled",t.isDisabled),i.toggle("readonly",t.isReadOnly),i.toggle("required",t.isRequired),i.toggle("invalid",!t.isValid),i.toggle("locked",n),i.toggle("full",e),i.toggle("input-active",t.isFocused&&!t.isInputHidden),i.toggle("dropdown-active",t.isOpen),i.toggle("has-options",(s=t.options,0===Object.keys(s).length)),i.toggle("has-items",t.items.length>0)}refreshValidityState(){var t=this;t.input.validity&&(t.isValid=t.input.validity.valid,t.isInvalid=!t.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){const e=this;var n,i;const s=e.input.querySelector('option[value=""]');if(e.is_select_tag){const r=[],o=e.input.querySelectorAll("option:checked").length;function a(t,n,i){return t||(t=Cs('")),t!=s&&e.input.append(t),r.push(t),(t!=s||o>0)&&(t.selected=!0),t}e.input.querySelectorAll("option:checked").forEach((t=>{t.selected=!1})),0==e.items.length&&"single"==e.settings.mode?a(s,"",""):e.items.forEach((t=>{if(n=e.options[t],i=n[e.settings.labelField]||"",r.includes(n.$option)){a(e.input.querySelector(`option[value="${Ss(t)}"]:not(:checked)`),t,i)}else n.$option=a(n.$option,t,i)}))}else e.input.value=e.getValue();e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,$s(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),Is(t.dropdown,{visibility:"hidden",display:"block"}),t.positionDropdown(),Is(t.dropdown,{visibility:"visible",display:"block"}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,n=e.isOpen;t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&e.inputState()),e.isOpen=!1,$s(e.focus_node,{"aria-expanded":"false"}),Is(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),n&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),n=t.offsetHeight+e.top+window.scrollY,i=e.left+window.scrollX;Is(this.dropdown,{width:e.width+"px",top:n+"px",left:i+"px"})}}clear(t){var e=this;if(e.items.length){var n=e.controlChildren();Ls(n,(t=>{e.removeItem(t,!0)})),e.inputState(),t||e.updateOriginalInput(),e.trigger("clear")}}insertAtCaret(t){const e=this,n=e.caretPos,i=e.control;i.insertBefore(t,i.children[n]||null),e.setCaret(n+1)}deleteSelection(t){var e,n,i,s,r,o=this;e=t&&8===t.keyCode?-1:1,n={start:(r=o.control_input).selectionStart||0,length:(r.selectionEnd||0)-(r.selectionStart||0)};const a=[];if(o.activeItems.length)s=Hs(o.activeItems,e),i=Vs(s),e>0&&i++,Ls(o.activeItems,(t=>a.push(t)));else if((o.isFocused||"single"===o.settings.mode)&&o.items.length){const t=o.controlChildren();let i;e<0&&0===n.start&&0===n.length?i=t[o.caretPos-1]:e>0&&n.start===o.inputValue().length&&(i=t[o.caretPos]),void 0!==i&&a.push(i)}if(!o.shouldDelete(a,t))return!1;for(Ts(t,!0),void 0!==i&&o.setCaret(i);a.length;)o.removeItem(a.pop());return o.inputState(),o.positionDropdown(),o.refreshOptions(!1),!0}shouldDelete(t,e){const n=t.map((t=>t.dataset.value));return!(!n.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(n,e))}advanceSelection(t,e){var n,i,s=this;s.rtl&&(t*=-1),s.inputValue().length||(Es(Bs,e)||Es("shiftKey",e)?(i=(n=s.getLastActive(t))?n.classList.contains("active")?s.getAdjacent(n,t,"item"):n:t>0?s.control_input.nextElementSibling:s.control_input.previousElementSibling)&&(i.classList.contains("active")&&s.removeActiveItem(n),s.setActiveItemClass(i)):s.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active");if(e)return e;var n=this.control.querySelectorAll(".active");return n?Hs(n,t):void 0}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(t=this.isReadOnly||this.isDisabled){this.isLocked=t,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(t){this.focus_node.tabIndex=t?-1:this.tabIndex,this.isDisabled=t,this.input.disabled=t,this.control_input.disabled=t,this.setLocked()}setReadOnly(t){this.isReadOnly=t,this.input.readOnly=t,this.control_input.readOnly=t,this.setLocked()}destroy(){var t=this,e=t.revertSettings;t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,Fs(t.input,"tomselected","ts-hidden-accessible"),t._destroy(),delete t.input.tomselect}render(t,e){var n,i;const s=this;if("function"!=typeof this.settings.render[t])return null;if(!(i=s.settings.render[t].call(this,e,_s)))return null;if(i=Cs(i),"option"===t||"option_create"===t?e[s.settings.disabledField]?$s(i,{"aria-disabled":"true"}):$s(i,{"data-selectable":""}):"optgroup"===t&&(n=e.group[s.settings.optgroupValueField],$s(i,{"data-group":n}),e.group[s.settings.disabledField]&&$s(i,{"data-disabled":""})),"option"===t||"item"===t){const n=bs(e[s.settings.valueField]);$s(i,{"data-value":n}),"item"===t?(Ns(i,s.settings.itemClass),$s(i,{"data-ts-item":""})):(Ns(i,s.settings.optionClass),$s(i,{role:"option",id:e.$id}),e.$div=i,s.options[n]=e)}return i}_render(t,e){const n=this.render(t,e);if(null==n)throw"HTMLElement expected";return n}clearCache(){Ls(this.options,(t=>{t.$div&&(t.$div.remove(),delete t.$div)}))}uncacheValue(t){const e=this.getOption(t);e&&e.remove()}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,n){var i=this,s=i[e];i[e]=function(){var e,r;return"after"===t&&(e=s.apply(i,arguments)),r=n.apply(i,arguments),"instead"===t?r:("before"===t&&(e=s.apply(i,arguments)),e)}}}const Js=t=>"boolean"==typeof t?t?"1":"0":t+"",Ks=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},Gs=t=>"string"==typeof t&&t.indexOf("<")>-1;const Qs=t=>"string"==typeof t&&t.indexOf("<")>-1;const Xs=(t,e,n,i)=>{t.addEventListener(e,n,i)},tr=t=>"string"==typeof t&&t.indexOf("<")>-1,er=(t,e)=>{((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(e,((e,n)=>{null==e?t.removeAttribute(n):t.setAttribute(n,""+e)}))};const nr=t=>"string"==typeof t&&t.indexOf("<")>-1;const ir=t=>{var e=[];return((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},sr=t=>(Array.isArray(t)||(t=[t]),t);const rr=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(or(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},or=t=>"string"==typeof t&&t.indexOf("<")>-1,ar=t=>{var e=[];return((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},lr=t=>(Array.isArray(t)||(t=[t]),t);const cr=(t,e,n,i)=>{t.addEventListener(e,n,i)};const ur=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},dr=(t,e,n,i)=>{t.addEventListener(e,n,i)},hr=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(pr(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},pr=t=>"string"==typeof t&&t.indexOf("<")>-1;const mr=t=>{var e=[];return((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},fr=t=>(Array.isArray(t)||(t=[t]),t);Zs.define("change_listener",(function(){var t,e,n,i;t=this.input,e="change",n=()=>{this.sync()},t.addEventListener(e,n,i)})),Zs.define("checkbox_options",(function(t){var e=this,n=e.onOptionSelect;e.settings.hideSelected=!1;const i=Object.assign({className:"tomselect-checkbox",checkedClassNames:void 0,uncheckedClassNames:void 0},t);var s=function(t,e){e?(t.checked=!0,i.uncheckedClassNames&&t.classList.remove(...i.uncheckedClassNames),i.checkedClassNames&&t.classList.add(...i.checkedClassNames)):(t.checked=!1,i.checkedClassNames&&t.classList.remove(...i.checkedClassNames),i.uncheckedClassNames&&t.classList.add(...i.uncheckedClassNames))},r=function(t){setTimeout((()=>{var e=t.querySelector("input."+i.className);e instanceof HTMLInputElement&&s(e,t.classList.contains("selected"))}),1)};e.hook("after","setupTemplates",(()=>{var t=e.settings.render.option;e.settings.render.option=(n,r)=>{var o=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(Gs(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(t.call(e,n,r)),a=document.createElement("input");i.className&&a.classList.add(i.className),a.addEventListener("click",(function(t){Ks(t)})),a.type="checkbox";const l=null==(c=n[e.settings.valueField])?null:Js(c);var c;return s(a,!!(l&&e.items.indexOf(l)>-1)),o.prepend(a),o}})),e.on("item_remove",(t=>{var n=e.getOption(t);n&&(n.classList.remove("selected"),r(n))})),e.on("item_add",(t=>{var n=e.getOption(t);n&&r(n)})),e.hook("instead","onOptionSelect",((t,i)=>{if(i.classList.contains("selected"))return i.classList.remove("selected"),e.removeItem(i.dataset.value),e.refreshOptions(),void Ks(t,!0);n.call(e,t,i),r(i)}))})),Zs.define("clear_button",(function(t){const e=this,n=Object.assign({className:"clear-button",title:"Clear All",html:t=>`
`},t);e.on("initialize",(()=>{var t=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(Qs(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(n.html(n));t.addEventListener("click",(t=>{e.isLocked||(e.clear(),"single"===e.settings.mode&&e.settings.allowEmptyOption&&e.addItem(""),t.preventDefault(),t.stopPropagation())})),e.control.appendChild(t)}))})),Zs.define("drag_drop",(function(){var t=this;if("multi"!==t.settings.mode)return;var e=t.lock,n=t.unlock;let i,s=!0;t.hook("after","setupTemplates",(()=>{var e=t.settings.render.item;t.settings.render.item=(n,r)=>{const o=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(tr(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(e.call(t,n,r));er(o,{draggable:"true"});const a=t=>{t.preventDefault(),o.classList.add("ts-drag-over"),l(o,i)},l=(t,e)=>{var n,i,s;void 0!==e&&(((t,e)=>{do{var n;if(t==(e=null==(n=e)?void 0:n.previousElementSibling))return!0}while(e&&e.previousElementSibling);return!1})(e,o)?(i=e,null==(s=(n=t).parentNode)||s.insertBefore(i,n.nextSibling)):((t,e)=>{var n;null==(n=t.parentNode)||n.insertBefore(e,t)})(t,e))};return Xs(o,"mousedown",(t=>{s||((t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())})(t),t.stopPropagation()})),Xs(o,"dragstart",(t=>{i=o,setTimeout((()=>{o.classList.add("ts-dragging")}),0)})),Xs(o,"dragenter",a),Xs(o,"dragover",a),Xs(o,"dragleave",(()=>{o.classList.remove("ts-drag-over")})),Xs(o,"dragend",(()=>{var e;document.querySelectorAll(".ts-drag-over").forEach((t=>t.classList.remove("ts-drag-over"))),null==(e=i)||e.classList.remove("ts-dragging"),i=void 0;var n=[];t.control.querySelectorAll("[data-value]").forEach((t=>{if(t.dataset.value){let e=t.dataset.value;e&&n.push(e)}})),t.setValue(n)})),o}})),t.hook("instead","lock",(()=>(s=!1,e.call(t)))),t.hook("instead","unlock",(()=>(s=!0,n.call(t))))})),Zs.define("dropdown_header",(function(t){const e=this,n=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:t=>'
'+t.title+'×
'},t);e.on("initialize",(()=>{var t=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(nr(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(n.html(n)),i=t.querySelector("."+n.closeClass);i&&i.addEventListener("click",(t=>{((t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())})(t,!0),e.close()})),e.dropdown.insertBefore(t,e.dropdown.firstChild)}))})),Zs.define("caret_position",(function(){var t=this;t.hook("instead","setCaret",(e=>{"single"!==t.settings.mode&&t.control.contains(t.control_input)?(e=Math.max(0,Math.min(t.items.length,e)))==t.caretPos||t.isPending||t.controlChildren().forEach(((n,i)=>{i{if(!t.isFocused)return;const n=t.getLastActive(e);if(n){const i=((t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var n=0;t=t.previousElementSibling;)t.matches(e)&&n++;return n})(n);t.setCaret(e>0?i+1:i),t.setActiveItem(),((t,...e)=>{var n=ir(e);(t=sr(t)).map((t=>{n.map((e=>{t.classList.remove(e)}))}))})(n,"last-active")}else t.setCaret(t.caretPos+e)}))})),Zs.define("dropdown_input",(function(){const t=this;t.settings.shouldOpen=!0,t.hook("before","setup",(()=>{t.focus_node=t.control,((t,...e)=>{var n=ar(e);(t=lr(t)).map((t=>{n.map((e=>{t.classList.add(e)}))}))})(t.control_input,"dropdown-input");const e=rr('");for(var E=1;E<=7;E+=1){var D=3+this.options.firstDay+E,S=document.createElement("div");S.innerHTML=this.weekdayName(D),S.title=this.weekdayName(D,"long"),x.appendChild(S)}var O=document.createElement("div");O.className=a.containerDays;var L=this.calcSkipDays(i);this.options.showWeekNumbers&&L&&O.appendChild(this.renderWeekNumber(i));for(var C=0;C1&&1===this.datePicked.length){var s=this.options.minDays-1,r=this.datePicked[0].clone().subtract(s,"day"),c=this.datePicked[0].clone().add(s,"day");t.isBetween(r,this.datePicked[0],"(]")&&e.classList.add(a.isLocked),t.isBetween(this.datePicked[0],c,"[)")&&e.classList.add(a.isLocked)}if(this.options.maxDays&&1===this.datePicked.length){var u=this.options.maxDays;r=this.datePicked[0].clone().subtract(u,"day"),c=this.datePicked[0].clone().add(u,"day"),t.isSameOrBefore(r)&&e.classList.add(a.isLocked),t.isSameOrAfter(c)&&e.classList.add(a.isLocked)}return this.options.selectForward&&1===this.datePicked.length&&t.isBefore(this.datePicked[0])&&e.classList.add(a.isLocked),this.options.selectBackward&&1===this.datePicked.length&&t.isAfter(this.datePicked[0])&&e.classList.add(a.isLocked),l.dateIsLocked(t,this.options,this.datePicked)&&e.classList.add(a.isLocked),this.options.highlightedDays.length&&this.options.highlightedDays.filter((function(e){return e instanceof Array?t.isBetween(e[0],e[1],"[]"):e.isSame(t,"day")})).length&&e.classList.add(a.isHighlighted),e.tabIndex=e.classList.contains("is-locked")?-1:0,this.emit("render:day",e,t),e},e.prototype.renderFooter=function(){var t=document.createElement("div");if(t.className=a.containerFooter,this.options.footerHTML?t.innerHTML=this.options.footerHTML:t.innerHTML='\n \n \n \n ",this.options.singleMode){if(1===this.datePicked.length){var e=this.datePicked[0].format(this.options.format,this.options.lang);t.querySelector("."+a.previewDateRange).innerHTML=e}}else if(1===this.datePicked.length&&t.querySelector("."+a.buttonApply).setAttribute("disabled",""),2===this.datePicked.length){e=this.datePicked[0].format(this.options.format,this.options.lang);var n=this.datePicked[1].format(this.options.format,this.options.lang);t.querySelector("."+a.previewDateRange).innerHTML=""+e+this.options.delimiter+n}return this.emit("render:footer",t),t},e.prototype.renderWeekNumber=function(t){var e=document.createElement("div"),n=t.getWeek(this.options.firstDay);return e.className=a.weekNumber,e.innerHTML=53===n&&0===t.getMonth()?"53 / 1":n,e},e.prototype.renderTooltip=function(){var t=document.createElement("div");return t.className=a.containerTooltip,t},e.prototype.weekdayName=function(t,e){return void 0===e&&(e="short"),new Date(1970,0,t,12,0,0,0).toLocaleString(this.options.lang,{weekday:e})},e.prototype.calcSkipDays=function(t){var e=t.getDay()-this.options.firstDay;return e<0&&(e+=7),e},e}(r.LPCore);e.Calendar=c},function(t,e,n){"use strict";var i,s=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,i=arguments.length;n',nextMonth:'',reset:'\n \n \n '},tooltipText:{one:"day",other:"days"}},n.options=r(r({},n.options),e.element.dataset),Object.keys(n.options).forEach((function(t){"true"!==n.options[t]&&"false"!==n.options[t]||(n.options[t]="true"===n.options[t])}));var i=r(r({},n.options.dropdowns),e.dropdowns),s=r(r({},n.options.buttonText),e.buttonText),o=r(r({},n.options.tooltipText),e.tooltipText);n.options=r(r({},n.options),e),n.options.dropdowns=r({},i),n.options.buttonText=r({},s),n.options.tooltipText=r({},o),n.options.elementEnd||(n.options.allowRepick=!1),n.options.lockDays.length&&(n.options.lockDays=a.DateTime.convertArray(n.options.lockDays,n.options.lockDaysFormat)),n.options.highlightedDays.length&&(n.options.highlightedDays=a.DateTime.convertArray(n.options.highlightedDays,n.options.highlightedDaysFormat));var l=n.parseInput(),c=l[0],u=l[1];n.options.startDate&&(n.options.singleMode||n.options.endDate)&&(c=new a.DateTime(n.options.startDate,n.options.format,n.options.lang)),c&&n.options.endDate&&(u=new a.DateTime(n.options.endDate,n.options.format,n.options.lang)),c instanceof a.DateTime&&!isNaN(c.getTime())&&(n.options.startDate=c),n.options.startDate&&u instanceof a.DateTime&&!isNaN(u.getTime())&&(n.options.endDate=u),!n.options.singleMode||n.options.startDate instanceof a.DateTime||(n.options.startDate=null),n.options.singleMode||n.options.startDate instanceof a.DateTime&&n.options.endDate instanceof a.DateTime||(n.options.startDate=null,n.options.endDate=null);for(var d=0;dwindow.innerHeight,c=e.top+r-n.height>=n.height;l&&c&&(o=e.top+r-n.height)}if(/left|right/.test(i[0])||i[1]&&"auto"!==i[1]&&/left|right/.test(i[1]))a=/left|right/.test(i[0])?e[i[0]]+s:e[i[1]]+s,"right"!==i[0]&&"right"!==i[1]||(a-=n.width);else{a=e.left+s,l=e.left+n.width>window.innerWidth;var u=e.right+s-n.width>=0;l&&u&&(a=e.right+s-n.width)}return{left:a,top:o}},e}(o.EventEmitter);e.LPCore=c},function(t,e,n){"use strict";var i,s="object"==typeof Reflect?Reflect:null,r=s&&"function"==typeof s.apply?s.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};i=s&&"function"==typeof s.ownKeys?s.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function c(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function u(t,e,n,i){var s,r,o,a;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(r=t._events)?(r=t._events=Object.create(null),t._eventsCount=0):(void 0!==r.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),r=t._events),o=r[e]),void 0===o)o=r[e]=n,++t._eventsCount;else if("function"==typeof o?o=r[e]=i?[n,o]:[o,n]:i?o.unshift(n):o.push(n),(s=c(t))>0&&o.length>s&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=o.length,a=l,console&&console.warn&&console.warn(a)}return t}function d(){for(var t=[],e=0;e0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=s[t];if(void 0===l)return!1;if("function"==typeof l)r(l,this,e);else{var c=l.length,u=f(l,c);for(n=0;n=0;r--)if(n[r]===e||n[r].listener===e){o=n[r].listener,s=r;break}if(s<0)return this;0===s?n.shift():function(t,e){for(;e+1=0;i--)this.removeListener(t,e[i]);return this},a.prototype.listeners=function(t){return p(this,t,!0)},a.prototype.rawListeners=function(t){return p(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(t,e,n){(e=n(9)(!1)).push([t.i,':root{--litepicker-container-months-color-bg: #fff;--litepicker-container-months-box-shadow-color: #ddd;--litepicker-footer-color-bg: #fafafa;--litepicker-footer-box-shadow-color: #ddd;--litepicker-tooltip-color-bg: #fff;--litepicker-month-header-color: #333;--litepicker-button-prev-month-color: #9e9e9e;--litepicker-button-next-month-color: #9e9e9e;--litepicker-button-prev-month-color-hover: #2196f3;--litepicker-button-next-month-color-hover: #2196f3;--litepicker-month-width: calc(var(--litepicker-day-width) * 7);--litepicker-month-weekday-color: #9e9e9e;--litepicker-month-week-number-color: #9e9e9e;--litepicker-day-width: 38px;--litepicker-day-color: #333;--litepicker-day-color-hover: #2196f3;--litepicker-is-today-color: #f44336;--litepicker-is-in-range-color: #bbdefb;--litepicker-is-locked-color: #9e9e9e;--litepicker-is-start-color: #fff;--litepicker-is-start-color-bg: #2196f3;--litepicker-is-end-color: #fff;--litepicker-is-end-color-bg: #2196f3;--litepicker-button-cancel-color: #fff;--litepicker-button-cancel-color-bg: #9e9e9e;--litepicker-button-apply-color: #fff;--litepicker-button-apply-color-bg: #2196f3;--litepicker-button-reset-color: #909090;--litepicker-button-reset-color-hover: #2196f3;--litepicker-highlighted-day-color: #333;--litepicker-highlighted-day-color-bg: #ffeb3b}.show-week-numbers{--litepicker-month-width: calc(var(--litepicker-day-width) * 8)}.litepicker{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;font-size:0.8em;display:none}.litepicker button{border:none;background:none}.litepicker .container__main{display:-webkit-box;display:-ms-flexbox;display:flex}.litepicker .container__months{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;background-color:var(--litepicker-container-months-color-bg);border-radius:5px;-webkit-box-shadow:0 0 5px var(--litepicker-container-months-box-shadow-color);box-shadow:0 0 5px var(--litepicker-container-months-box-shadow-color);width:calc(var(--litepicker-month-width) + 10px);-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__months.columns-2{width:calc((var(--litepicker-month-width) * 2) + 20px)}.litepicker .container__months.columns-3{width:calc((var(--litepicker-month-width) * 3) + 30px)}.litepicker .container__months.columns-4{width:calc((var(--litepicker-month-width) * 4) + 40px)}.litepicker .container__months.split-view .month-item-header .button-previous-month,.litepicker .container__months.split-view .month-item-header .button-next-month{visibility:visible}.litepicker .container__months .month-item{padding:5px;width:var(--litepicker-month-width);-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__months .month-item-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-weight:500;padding:10px 5px;text-align:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--litepicker-month-header-color)}.litepicker .container__months .month-item-header div{-webkit-box-flex:1;-ms-flex:1;flex:1}.litepicker .container__months .month-item-header div>.month-item-name{margin-right:5px}.litepicker .container__months .month-item-header div>.month-item-year{padding:0}.litepicker .container__months .month-item-header .reset-button{color:var(--litepicker-button-reset-color)}.litepicker .container__months .month-item-header .reset-button>svg{fill:var(--litepicker-button-reset-color)}.litepicker .container__months .month-item-header .reset-button *{pointer-events:none}.litepicker .container__months .month-item-header .reset-button:hover{color:var(--litepicker-button-reset-color-hover)}.litepicker .container__months .month-item-header .reset-button:hover>svg{fill:var(--litepicker-button-reset-color-hover)}.litepicker .container__months .month-item-header .button-previous-month,.litepicker .container__months .month-item-header .button-next-month{visibility:hidden;text-decoration:none;padding:3px 5px;border-radius:3px;-webkit-transition:color 0.3s, border 0.3s;transition:color 0.3s, border 0.3s;cursor:default}.litepicker .container__months .month-item-header .button-previous-month *,.litepicker .container__months .month-item-header .button-next-month *{pointer-events:none}.litepicker .container__months .month-item-header .button-previous-month{color:var(--litepicker-button-prev-month-color)}.litepicker .container__months .month-item-header .button-previous-month>svg,.litepicker .container__months .month-item-header .button-previous-month>img{fill:var(--litepicker-button-prev-month-color)}.litepicker .container__months .month-item-header .button-previous-month:hover{color:var(--litepicker-button-prev-month-color-hover)}.litepicker .container__months .month-item-header .button-previous-month:hover>svg{fill:var(--litepicker-button-prev-month-color-hover)}.litepicker .container__months .month-item-header .button-next-month{color:var(--litepicker-button-next-month-color)}.litepicker .container__months .month-item-header .button-next-month>svg,.litepicker .container__months .month-item-header .button-next-month>img{fill:var(--litepicker-button-next-month-color)}.litepicker .container__months .month-item-header .button-next-month:hover{color:var(--litepicker-button-next-month-color-hover)}.litepicker .container__months .month-item-header .button-next-month:hover>svg{fill:var(--litepicker-button-next-month-color-hover)}.litepicker .container__months .month-item-weekdays-row{display:-webkit-box;display:-ms-flexbox;display:flex;justify-self:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;color:var(--litepicker-month-weekday-color)}.litepicker .container__months .month-item-weekdays-row>div{padding:5px 0;font-size:85%;-webkit-box-flex:1;-ms-flex:1;flex:1;width:var(--litepicker-day-width);text-align:center}.litepicker .container__months .month-item:first-child .button-previous-month{visibility:visible}.litepicker .container__months .month-item:last-child .button-next-month{visibility:visible}.litepicker .container__months .month-item.no-previous-month .button-previous-month{visibility:hidden}.litepicker .container__months .month-item.no-next-month .button-next-month{visibility:hidden}.litepicker .container__days{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-self:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:center;-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__days>div,.litepicker .container__days>a{padding:5px 0;width:var(--litepicker-day-width)}.litepicker .container__days .day-item{color:var(--litepicker-day-color);text-align:center;text-decoration:none;border-radius:3px;-webkit-transition:color 0.3s, border 0.3s;transition:color 0.3s, border 0.3s;cursor:default}.litepicker .container__days .day-item:hover{color:var(--litepicker-day-color-hover);-webkit-box-shadow:inset 0 0 0 1px var(--litepicker-day-color-hover);box-shadow:inset 0 0 0 1px var(--litepicker-day-color-hover)}.litepicker .container__days .day-item.is-today{color:var(--litepicker-is-today-color)}.litepicker .container__days .day-item.is-locked{color:var(--litepicker-is-locked-color)}.litepicker .container__days .day-item.is-locked:hover{color:var(--litepicker-is-locked-color);-webkit-box-shadow:none;box-shadow:none;cursor:default}.litepicker .container__days .day-item.is-in-range{background-color:var(--litepicker-is-in-range-color);border-radius:0}.litepicker .container__days .day-item.is-start-date{color:var(--litepicker-is-start-color);background-color:var(--litepicker-is-start-color-bg);border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:0;border-bottom-right-radius:0}.litepicker .container__days .day-item.is-start-date.is-flipped{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-end-date{color:var(--litepicker-is-end-color);background-color:var(--litepicker-is-end-color-bg);border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-end-date.is-flipped{border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:0;border-bottom-right-radius:0}.litepicker .container__days .day-item.is-start-date.is-end-date{border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-highlighted{color:var(--litepicker-highlighted-day-color);background-color:var(--litepicker-highlighted-day-color-bg)}.litepicker .container__days .week-number{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:var(--litepicker-month-week-number-color);font-size:85%}.litepicker .container__footer{text-align:right;padding:10px 5px;margin:0 5px;background-color:var(--litepicker-footer-color-bg);-webkit-box-shadow:inset 0px 3px 3px 0px var(--litepicker-footer-box-shadow-color);box-shadow:inset 0px 3px 3px 0px var(--litepicker-footer-box-shadow-color);border-bottom-left-radius:5px;border-bottom-right-radius:5px}.litepicker .container__footer .preview-date-range{margin-right:10px;font-size:90%}.litepicker .container__footer .button-cancel{background-color:var(--litepicker-button-cancel-color-bg);color:var(--litepicker-button-cancel-color);border:0;padding:3px 7px 4px;border-radius:3px}.litepicker .container__footer .button-cancel *{pointer-events:none}.litepicker .container__footer .button-apply{background-color:var(--litepicker-button-apply-color-bg);color:var(--litepicker-button-apply-color);border:0;padding:3px 7px 4px;border-radius:3px;margin-left:10px;margin-right:10px}.litepicker .container__footer .button-apply:disabled{opacity:0.7}.litepicker .container__footer .button-apply *{pointer-events:none}.litepicker .container__tooltip{position:absolute;margin-top:-4px;padding:4px 8px;border-radius:4px;background-color:var(--litepicker-tooltip-color-bg);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.25);box-shadow:0 1px 3px rgba(0,0,0,0.25);white-space:nowrap;font-size:11px;pointer-events:none;visibility:hidden}.litepicker .container__tooltip:before{position:absolute;bottom:-5px;left:calc(50% - 5px);border-top:5px solid rgba(0,0,0,0.12);border-right:5px solid transparent;border-left:5px solid transparent;content:""}.litepicker .container__tooltip:after{position:absolute;bottom:-4px;left:calc(50% - 4px);border-top:4px solid var(--litepicker-tooltip-color-bg);border-right:4px solid transparent;border-left:4px solid transparent;content:""}\n',""]),e.locals={showWeekNumbers:"show-week-numbers",litepicker:"litepicker",containerMain:"container__main",containerMonths:"container__months",columns2:"columns-2",columns3:"columns-3",columns4:"columns-4",splitView:"split-view",monthItemHeader:"month-item-header",buttonPreviousMonth:"button-previous-month",buttonNextMonth:"button-next-month",monthItem:"month-item",monthItemName:"month-item-name",monthItemYear:"month-item-year",resetButton:"reset-button",monthItemWeekdaysRow:"month-item-weekdays-row",noPreviousMonth:"no-previous-month",noNextMonth:"no-next-month",containerDays:"container__days",dayItem:"day-item",isToday:"is-today",isLocked:"is-locked",isInRange:"is-in-range",isStartDate:"is-start-date",isFlipped:"is-flipped",isEndDate:"is-end-date",isHighlighted:"is-highlighted",weekNumber:"week-number",containerFooter:"container__footer",previewDateRange:"preview-date-range",buttonCancel:"button-cancel",buttonApply:"button-apply",containerTooltip:"container__tooltip"},t.exports=e},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,i,s,r=t[1]||"",o=t[3];if(!o)return r;if(e&&"function"==typeof btoa){var a=(n=o,i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),"/*# ".concat(s," */")),l=o.sources.map((function(t){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(t," */")}));return[r].concat(l).concat([a]).join("\n")}return[r].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var s={};if(i)for(var r=0;rthis.options.endDate.getTime()&&(this.options.endDate=this.options.startDate.clone(),this.options.startDate=new s.DateTime(t,this.options.format,this.options.lang)),this.updateInput())},r.Litepicker.prototype.setDateRange=function(t,e,n){void 0===n&&(n=!1),this.triggerElement=void 0;var i=new s.DateTime(t,this.options.format,this.options.lang),r=new s.DateTime(e,this.options.format,this.options.lang);(this.options.disallowLockDaysInRange?o.rangeIsLocked([i,r],this.options):o.dateIsLocked(i,this.options,[i,r])||o.dateIsLocked(r,this.options,[i,r]))&&!n?this.emit("error:range",[i,r]):(this.setStartDate(i),this.setEndDate(r),this.options.inlineMode&&this.render(),this.updateInput(),this.emit("selected",this.getStartDate(),this.getEndDate()))},r.Litepicker.prototype.gotoDate=function(t,e){void 0===e&&(e=0);var n=new s.DateTime(t);n.setDate(1),this.calendars[e]=n.clone(),this.render()},r.Litepicker.prototype.setLockDays=function(t){this.options.lockDays=s.DateTime.convertArray(t,this.options.lockDaysFormat),this.render()},r.Litepicker.prototype.setHighlightedDays=function(t){this.options.highlightedDays=s.DateTime.convertArray(t,this.options.highlightedDaysFormat),this.render()},r.Litepicker.prototype.setOptions=function(t){delete t.element,delete t.elementEnd,delete t.parentEl,t.startDate&&(t.startDate=new s.DateTime(t.startDate,this.options.format,this.options.lang)),t.endDate&&(t.endDate=new s.DateTime(t.endDate,this.options.format,this.options.lang));var e=i(i({},this.options.dropdowns),t.dropdowns),n=i(i({},this.options.buttonText),t.buttonText),r=i(i({},this.options.tooltipText),t.tooltipText);this.options=i(i({},this.options),t),this.options.dropdowns=i({},e),this.options.buttonText=i({},n),this.options.tooltipText=i({},r),!this.options.singleMode||this.options.startDate instanceof s.DateTime||(this.options.startDate=null,this.options.endDate=null),this.options.singleMode||this.options.startDate instanceof s.DateTime&&this.options.endDate instanceof s.DateTime||(this.options.startDate=null,this.options.endDate=null);for(var o=0;oMath.abs(r),a=t.options.numberOfMonths,l=null,c=!1,u="",d=Array.from(t.ui.querySelectorAll(".month-item"));if(o){var h=t.DateTime(t.ui.querySelector(".day-item").dataset.time),p=Number("".concat(1-Math.abs(s)/100)),m=0;if(s>0){m=-Math.abs(s),l=h.clone().add(a,"month");var f=t.options.maxDate;c=!f||l.isSameOrBefore(t.DateTime(f),"month"),u="next"}else{m=Math.abs(s),l=h.clone().subtract(a,"month");var g=t.options.minDate;c=!g||l.isSameOrAfter(t.DateTime(g),"month"),u="prev"}c&&d.map((function(t){t.style.opacity=p,t.style.transform="translateX(".concat(m,"px)")}))}Math.abs(s)+Math.abs(r)>100&&o&&l&&c&&(t.touchTargetMonth=u,t.gotoDate(l))}}),!!n&&{passive:!0}),t.ui.addEventListener("touchend",(function(e){t.touchTargetMonth||Array.from(t.ui.querySelectorAll(".month-item")).map((function(t){t.style.transform="translateX(0px)",t.style.opacity=1})),t.xTouchDown=null,t.yTouchDown=null}),!!n&&{passive:!0})}})},function(t,e,n){var i=n(7);"string"==typeof i&&(i=[[t.i,i,""]]);var s={insert:function(t){var e=document.querySelector("head"),n=window._lastElementInsertedByStyleLoader;window.disableLitepickerStyles||(n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),window._lastElementInsertedByStyleLoader=t)},singleton:!1};n(1)(i,s),i.locals&&(t.exports=i.locals)},function(t,e,n){(e=n(0)(!1)).push([t.i,':root {\n --litepicker-mobilefriendly-backdrop-color-bg: #000;\n}\n\n.litepicker-backdrop {\n display: none;\n background-color: var(--litepicker-mobilefriendly-backdrop-color-bg);\n opacity: 0.3;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n.litepicker-open {\n overflow: hidden;\n}\n\n.litepicker.mobilefriendly[data-plugins*="mobilefriendly"] {\n transform: translate(-50%, -50%);\n font-size: 1.1rem;\n --litepicker-container-months-box-shadow-color: #616161;\n}\n.litepicker.mobilefriendly-portrait {\n --litepicker-day-width: 13.5vw;\n --litepicker-month-width: calc(var(--litepicker-day-width) * 7);\n}\n.litepicker.mobilefriendly-landscape {\n --litepicker-day-width: 5.5vw;\n --litepicker-month-width: calc(var(--litepicker-day-width) * 7);\n}\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months {\n overflow: hidden;\n}\n\n.litepicker.mobilefriendly[data-plugins*="mobilefriendly"] .container__months .month-item-header {\n height: var(--litepicker-day-width);\n}\n\n.litepicker.mobilefriendly[data-plugins*="mobilefriendly"] .container__days > div {\n height: var(--litepicker-day-width);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months .month-item {\n transform-origin: center;\n}\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months .month-item.touch-target-next {\n animation-name: lp-bounce-target-next;\n animation-duration: .5s;\n animation-timing-function: ease;\n}\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months .month-item.touch-target-prev {\n animation-name: lp-bounce-target-prev;\n animation-duration: .5s;\n animation-timing-function: ease;\n}\n\n@keyframes lp-bounce-target-next {\n from {\n transform: translateX(100px) scale(0.5);\n }\n to {\n transform: translateX(0px) scale(1);\n }\n}\n\n@keyframes lp-bounce-target-prev {\n from {\n transform: translateX(-100px) scale(0.5);\n }\n to {\n transform: translateX(0px) scale(1);\n }\n}',""]),t.exports=e}])},4975:function(t,e,n){"use strict";n.r(e)}},function(t){var e;e=4028,t(t.s=e)}]); \ No newline at end of file diff --git a/public/build/calendar.7415ab21.js b/public/build/calendar.7415ab21.js new file mode 100644 index 00000000..27e2ed54 --- /dev/null +++ b/public/build/calendar.7415ab21.js @@ -0,0 +1,2 @@ +/*! For license information please see calendar.7415ab21.js.LICENSE.txt */ +(self.webpackChunkkimai=self.webpackChunkkimai||[]).push([[517],{5179:function(e,t){"use strict";t.A={code:"ar",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"}},3578:function(e,t){"use strict";t.A={code:"cs",week:{dow:1,doy:4},buttonText:{prev:"Dříve",next:"Později",today:"Nyní",month:"Měsíc",week:"Týden",day:"Den",list:"Agenda"},weekText:"Týd",allDayText:"Celý den",moreLinkText:function(e){return"+další: "+e},noEventsText:"Žádné akce k zobrazení"}},4019:function(e,t){"use strict";t.A={code:"da",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Næste",today:"I dag",month:"Måned",week:"Uge",day:"Dag",list:"Agenda"},weekText:"Uge",allDayText:"Hele dagen",moreLinkText:"flere",noEventsText:"Ingen arrangementer at vise"}},6629:function(e,t){"use strict";function n(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}var r={code:"de-at",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:function(e){return"+ weitere "+e},noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:function(e){return"Vorherige".concat(n(e)," ").concat(e)},next:function(e){return"Nächste".concat(n(e)," ").concat(e)},today:function(e){return"Tag"===e?"Heute":"Diese".concat(n(e)," ").concat(e)}},viewHint:function(e){return e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht"},navLinkHint:"Gehe zu $0",moreLinkHint:function(e){return"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse")},closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"};t.A=r},5431:function(e,t){"use strict";function n(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}var r={code:"de",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:function(e){return"+ weitere "+e},noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:function(e){return"Vorherige".concat(n(e)," ").concat(e)},next:function(e){return"Nächste".concat(n(e)," ").concat(e)},today:function(e){return"Tag"===e?"Heute":"Diese".concat(n(e)," ").concat(e)}},viewHint:function(e){return e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht"},navLinkHint:"Gehe zu $0",moreLinkHint:function(e){return"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse")},closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"};t.A=r},7781:function(e,t){"use strict";t.A={code:"el",week:{dow:1,doy:4},buttonText:{prev:"Προηγούμενος",next:"Επόμενος",today:"Σήμερα",month:"Μήνας",week:"Εβδομάδα",day:"Ημέρα",list:"Ατζέντα"},weekText:"Εβδ",allDayText:"Ολοήμερο",moreLinkText:"περισσότερα",noEventsText:"Δεν υπάρχουν γεγονότα προς εμφάνιση"}},4853:function(e,t){"use strict";t.A={code:"en-gb",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show ".concat(e," more event").concat(1===e?"":"s")}}},1368:function(e,t){"use strict";t.A={code:"es",week:{dow:1,doy:4},buttonText:{prev:"Ant",next:"Sig",today:"Hoy",month:"Mes",week:"Semana",day:"Día",list:"Agenda"},buttonHints:{prev:"$0 antes",next:"$0 siguiente",today:function(e){return"Día"===e?"Hoy":("Semana"===e?"Esta":"Este")+" "+e.toLocaleLowerCase()}},viewHint:function(e){return"Vista "+("Semana"===e?"de la":"del")+" "+e.toLocaleLowerCase()},weekText:"Sm",weekTextLong:"Semana",allDayText:"Todo el día",moreLinkText:"más",moreLinkHint:function(e){return"Mostrar ".concat(e," eventos más")},noEventsText:"No hay eventos para mostrar",navLinkHint:"Ir al $0",closeHint:"Cerrar",timeHint:"La hora",eventHint:"Evento"}},8366:function(e,t){"use strict";t.A={code:"eu",week:{dow:1,doy:7},buttonText:{prev:"Aur",next:"Hur",today:"Gaur",month:"Hilabetea",week:"Astea",day:"Eguna",list:"Agenda"},weekText:"As",allDayText:"Egun osoa",moreLinkText:"gehiago",noEventsText:"Ez dago ekitaldirik erakusteko"}},8333:function(e,t){"use strict";t.A={code:"fa",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"قبلی",next:"بعدی",today:"امروز",month:"ماه",week:"هفته",day:"روز",list:"برنامه"},weekText:"هف",allDayText:"تمام روز",moreLinkText:function(e){return"بیش از "+e},noEventsText:"هیچ رویدادی به نمایش"}},4053:function(e,t){"use strict";t.A={code:"fi",week:{dow:1,doy:4},buttonText:{prev:"Edellinen",next:"Seuraava",today:"Tänään",month:"Kuukausi",week:"Viikko",day:"Päivä",list:"Tapahtumat"},weekText:"Vk",allDayText:"Koko päivä",moreLinkText:"lisää",noEventsText:"Ei näytettäviä tapahtumia"}},6500:function(e,t){"use strict";t.A={code:"fr",week:{dow:1,doy:4},buttonText:{prev:"Précédent",next:"Suivant",today:"Aujourd'hui",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Planning"},weekText:"Sem.",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun événement à afficher"}},9795:function(e,t){"use strict";t.A={code:"he",direction:"rtl",buttonText:{prev:"הקודם",next:"הבא",today:"היום",month:"חודש",week:"שבוע",day:"יום",list:"סדר יום"},allDayText:"כל היום",moreLinkText:"אחר",noEventsText:"אין אירועים להצגה",weekText:"שבוע"}},5690:function(e,t){"use strict";t.A={code:"hr",week:{dow:1,doy:7},buttonText:{prev:"Prijašnji",next:"Sljedeći",today:"Danas",month:"Mjesec",week:"Tjedan",day:"Dan",list:"Raspored"},weekText:"Tje",allDayText:"Cijeli dan",moreLinkText:function(e){return"+ još "+e},noEventsText:"Nema događaja za prikaz"}},9379:function(e,t){"use strict";t.A={code:"hu",week:{dow:1,doy:4},buttonText:{prev:"vissza",next:"előre",today:"ma",month:"Hónap",week:"Hét",day:"Nap",list:"Lista"},weekText:"Hét",allDayText:"Egész nap",moreLinkText:"további",noEventsText:"Nincs megjeleníthető esemény"}},4729:function(e,t){"use strict";t.A={code:"it",week:{dow:1,doy:4},buttonText:{prev:"Prec",next:"Succ",today:"Oggi",month:"Mese",week:"Settimana",day:"Giorno",list:"Agenda"},weekText:"Sm",allDayText:"Tutto il giorno",moreLinkText:function(e){return"+altri "+e},noEventsText:"Non ci sono eventi da visualizzare"}},3793:function(e,t){"use strict";t.A={code:"ja",buttonText:{prev:"前",next:"次",today:"今日",month:"月",week:"週",day:"日",list:"予定リスト"},weekText:"週",allDayText:"終日",moreLinkText:function(e){return"他 "+e+" 件"},noEventsText:"表示する予定はありません"}},9478:function(e,t){"use strict";t.A={code:"ko",buttonText:{prev:"이전달",next:"다음달",today:"오늘",month:"월",week:"주",day:"일",list:"일정목록"},weekText:"주",allDayText:"종일",moreLinkText:"개",noEventsText:"일정이 없습니다"}},524:function(e,t){"use strict";t.A={code:"nb",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Neste",today:"I dag",month:"Måned",week:"Uke",day:"Dag",list:"Agenda"},weekText:"Uke",weekTextLong:"Uke",allDayText:"Hele dagen",moreLinkText:"til",noEventsText:"Ingen hendelser å vise",buttonHints:{prev:"Forrige $0",next:"Neste $0",today:"Nåværende $0"},viewHint:"$0 visning",navLinkHint:"Gå til $0",moreLinkHint:function(e){return"Vis ".concat(e," flere hendelse").concat(1===e?"":"r")}}},5506:function(e,t){"use strict";t.A={code:"nl",week:{dow:1,doy:4},buttonText:{prev:"Vorige",next:"Volgende",today:"Vandaag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayText:"Hele dag",moreLinkText:"extra",noEventsText:"Geen evenementen om te laten zien"}},1868:function(e,t){"use strict";t.A={code:"pl",week:{dow:1,doy:4},buttonText:{prev:"Poprzedni",next:"Następny",today:"Dziś",month:"Miesiąc",week:"Tydzień",day:"Dzień",list:"Plan dnia"},weekText:"Tydz",allDayText:"Cały dzień",moreLinkText:"więcej",noEventsText:"Brak wydarzeń do wyświetlenia"}},8357:function(e,t){"use strict";t.A={code:"pt-br",buttonText:{prev:"Anterior",next:"Próximo",today:"Hoje",month:"Mês",week:"Semana",day:"Dia",list:"Lista"},weekText:"Sm",allDayText:"dia inteiro",moreLinkText:function(e){return"mais +"+e},noEventsText:"Não há eventos para mostrar"}},4836:function(e,t){"use strict";t.A={code:"pt",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Seguinte",today:"Hoje",month:"Mês",week:"Semana",day:"Dia",list:"Agenda"},weekText:"Sem",allDayText:"Todo o dia",moreLinkText:"mais",noEventsText:"Não há eventos para mostrar"}},683:function(e,t){"use strict";t.A={code:"ro",week:{dow:1,doy:7},buttonText:{prev:"precedentă",next:"următoare",today:"Azi",month:"Lună",week:"Săptămână",day:"Zi",list:"Agendă"},weekText:"Săpt",allDayText:"Toată ziua",moreLinkText:function(e){return"+alte "+e},noEventsText:"Nu există evenimente de afișat"}},2565:function(e,t){"use strict";t.A={code:"ru",week:{dow:1,doy:4},buttonText:{prev:"Пред",next:"След",today:"Сегодня",month:"Месяц",week:"Неделя",day:"День",list:"Повестка дня"},weekText:"Нед",allDayText:"Весь день",moreLinkText:function(e){return"+ ещё "+e},noEventsText:"Нет событий для отображения"}},6914:function(e,t){"use strict";t.A={code:"sk",week:{dow:1,doy:4},buttonText:{prev:"Predchádzajúci",next:"Nasledujúci",today:"Dnes",month:"Mesiac",week:"Týždeň",day:"Deň",list:"Rozvrh"},weekText:"Ty",allDayText:"Celý deň",moreLinkText:function(e){return"+ďalšie: "+e},noEventsText:"Žiadne akcie na zobrazenie"}},3445:function(e,t){"use strict";t.A={code:"sv",week:{dow:1,doy:4},buttonText:{prev:"Förra",next:"Nästa",today:"Idag",month:"Månad",week:"Vecka",day:"Dag",list:"Program"},buttonHints:{prev:function(e){return"Föregående ".concat(e.toLocaleLowerCase())},next:function(e){return"Nästa ".concat(e.toLocaleLowerCase())},today:function(e){return("Program"===e?"Detta":"Denna")+" "+e.toLocaleLowerCase()}},viewHint:"$0 vy",navLinkHint:"Gå till $0",moreLinkHint:function(e){return"Visa ytterligare ".concat(e," händelse").concat(1===e?"":"r")},weekText:"v.",weekTextLong:"Vecka",allDayText:"Heldag",moreLinkText:"till",noEventsText:"Inga händelser att visa",closeHint:"Stäng",timeHint:"Klockan",eventHint:"Händelse"}},214:function(e,t){"use strict";t.A={code:"tr",week:{dow:1,doy:7},buttonText:{prev:"geri",next:"ileri",today:"bugün",month:"Ay",week:"Hafta",day:"Gün",list:"Ajanda"},weekText:"Hf",allDayText:"Tüm gün",moreLinkText:"daha fazla",noEventsText:"Gösterilecek etkinlik yok"}},4773:function(e,t){"use strict";t.A={code:"vi",week:{dow:1,doy:4},buttonText:{prev:"Trước",next:"Tiếp",today:"Hôm nay",month:"Tháng",week:"Tuần",day:"Ngày",list:"Lịch biểu"},weekText:"Tu",allDayText:"Cả ngày",moreLinkText:function(e){return"+ thêm "+e},noEventsText:"Không có sự kiện để hiển thị"}},1730:function(e,t){"use strict";t.A={code:"zh-cn",week:{dow:1,doy:4},buttonText:{prev:"上月",next:"下月",today:"今天",month:"月",week:"周",day:"日",list:"日程"},weekText:"周",allDayText:"全天",moreLinkText:function(e){return"另外 "+e+" 个"},noEventsText:"没有事件显示"}},6941:function(e,t,n){n.g.KimaiCalendar=n(4661).A},4661:function(e,t,n){"use strict";n.d(t,{A:function(){return Mu}});var r=n(9336),i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n2&&(s.children=arguments.length>3?l.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return T(e,s,r,i,null)}function T(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++c:i};return null==i&&null!=u.vnode&&u.vnode(o),o}function w(){return{current:null}}function D(e){return e.children}function S(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||y.test(t)?n:n+"px"}function C(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||S(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||S(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?k:x,o):e.removeEventListener(t,o?k:x,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function x(e){d=!0;try{return this.l[e.type+!1](u.event?u.event(e):e)}finally{d=!1}}function k(e){d=!0;try{return this.l[e.type+!0](u.event?u.event(e):e)}finally{d=!1}}function R(e,t){this.props=e,this.context=t}function A(e,t){if(null==t)return e.__?A(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&h.sort((function(e,t){return e.__v.__b-t.__v.__b})));P.__r=0}function N(e,t,n,r,i,o,s,a,l,u){var c,d,h,f,p,m,y,_=r&&r.__k||v,b=_.length;for(n.__k=[],c=0;c0?T(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(h=_[c])||h&&f.key==h.key&&f.type===h.type)_[c]=void 0;else for(d=0;d=0;t--)if((n=e.__k[t])&&(r=z(n)))return r;return null}function B(e,t,n,r,i,o,s,a,l){var c,d,h,f,p,m,g,v,y,b,E,T,w,S,C,x=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(c=u.__b)&&c(t);try{e:if("function"==typeof x){if(v=t.props,y=(c=x.contextType)&&r[c.__c],b=c?y?y.props.value:c.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:("prototype"in x&&x.prototype.render?t.__c=d=new x(v,b):(t.__c=d=new R(v,b),d.constructor=x,d.render=F),y&&y.sub(d),d.props=v,d.state||(d.state={}),d.context=b,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=x.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=_({},d.__s)),_(d.__s,x.getDerivedStateFromProps(v,d.__s))),f=d.props,p=d.state,d.__v=t,h)null==x.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==x.getDerivedStateFromProps&&v!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(v,b),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(v,d.__s,b)||t.__v===n.__v){for(t.__v!==n.__v&&(d.props=v,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),E=0;E3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),q(E(Ee,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function we(e,t){var n=E(Te,{__v:e,i:t});return n.containerInfo=t,n}(_e.prototype=new R).__a=function(e){var t=this,n=ye(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),be(t,e,r)):i()};n?n(o):o()}},_e.prototype.render=function(e){this.u=null,this.o=new Map;var t=L(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},_e.prototype.componentDidUpdate=_e.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){be(e,n,t)}))};var De="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Se=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ce="undefined"!=typeof document,xe=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};R.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(R.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var ke=u.event;function Re(){}function Ae(){return this.cancelBubble}function Oe(){return this.defaultPrevented}u.event=function(e){return ke&&(e=ke(e)),e.persist=Re,e.isPropagationStopped=Ae,e.isDefaultPrevented=Oe,e.nativeEvent=e};var Ie={configurable:!0,get:function(){return this.class}},Me=u.vnode;u.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var s=n[o];Ce&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==s||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===s?s="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!xe(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&Se.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===s&&(s=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=s)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=L(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=L(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Ie.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Ie))}e.$$typeof=De,Me&&Me(e)};var Pe=u.__r;u.__r=function(e){Pe&&Pe(e),e.__c};var Ne="undefined"!=typeof globalThis?globalThis:window;Ne.FullCalendarVDom?console.warn("FullCalendar VDOM already loaded"):Ne.FullCalendarVDom={Component:R,createElement:E,render:q,createRef:w,Fragment:D,createContext:function(e){var t=G(e),n=t.Provider;return t.Provider=function(){var e=this,t=!this.getChildContext,r=n.apply(this,arguments);if(t){var i=[];this.shouldComponentUpdate=function(t){e.props.value!==t.value&&i.forEach((function(e){e.context=t.value,e.forceUpdate()}))},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}}return r},t},createPortal:we,flushSync:function(e){e();var t=u.debounceRendering,n=[];function r(e){n.push(e)}u.debounceRendering=r,q(E(He,{}),document.createElement("div"));for(;n.length;)n.shift()();u.debounceRendering=t},unmountComponentAtNode:function(e){q(null,e)}};var He=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){return E("div",{})},t.prototype.componentDidMount=function(){this.setState({})},t}(R);if("undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Le=FullCalendarVDom.Component,Ye=FullCalendarVDom.createElement,ze=FullCalendarVDom.render,Be=FullCalendarVDom.createRef,Ue=FullCalendarVDom.Fragment,je=FullCalendarVDom.createContext,We=FullCalendarVDom.createPortal,Ve=FullCalendarVDom.flushSync,Fe=FullCalendarVDom.unmountComponentAtNode,qe=function(){function e(e,t){this.context=e,this.internalEventSource=t}return e.prototype.remove=function(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},e.prototype.refetch=function(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})},Object.defineProperty(e.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"format",{get:function(){return this.internalEventSource.meta.format},enumerable:!1,configurable:!0}),e}();function Ge(e){e.parentNode&&e.parentNode.removeChild(e)}function Ze(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(Ke(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function Ke(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}var Xe=/(top|left|right|bottom|width|height)$/i;function $e(e,t){for(var n in t)Je(e,n,t[n])}function Je(e,t,n){null==n?e.style[t]="":"number"==typeof n&&Xe.test(t)?e.style[t]=n+"px":e.style[t]=n}function Qe(e){var t,n;return null!==(n=null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])&&void 0!==n?n:e.target}function et(e){return e.getRootNode?e.getRootNode():document}var tt=0;function nt(){return"fc-dom-"+(tt+=1)}function rt(e){e.preventDefault()}function it(e,t,n,r){var i=function(e,t){return function(n){var r=Ze(n.target,e);r&&t.call(r,n,r)}}(n,r);return e.addEventListener(t,i),function(){e.removeEventListener(t,i)}}var ot=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function st(e){return s({onClick:e},at(e))}function at(e){return{tabIndex:0,onKeyDown:function(t){"Enter"!==t.key&&" "!==t.key||(e(t),t.preventDefault())}}}var lt=0;function ut(){return String(lt+=1)}function ct(){document.body.classList.add("fc-not-allowed")}function dt(){document.body.classList.remove("fc-not-allowed")}function ht(e,t,n){return n.func?n.func(e,t):function(e,t){if(!e&&!t)return 0;if(null==t)return-1;if(null==e)return 1;if("string"==typeof e||"string"==typeof t)return String(e).localeCompare(String(t));return e-t}(e[n.field],t[n.field])*(n.order||1)}function ft(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function pt(e,t,n){return"function"==typeof e?e.apply(void 0,t):"string"==typeof e?t.reduce((function(e,t,n){return e.replace("$"+n,t||"")}),e):n}function mt(e,t){return e-t}function gt(e){return e%1==0}function vt(e){var t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var yt=["sun","mon","tue","wed","thu","fri","sat"];function _t(e,t){var n=Rt(e);return n[2]+=7*t,At(n)}function bt(e,t){var n=Rt(e);return n[2]+=t,At(n)}function Et(e,t){var n=Rt(e);return n[6]+=t,At(n)}function Tt(e,t){return(t.valueOf()-e.valueOf())/864e5}function wt(e,t){return It(e)===It(t)?Math.round(Tt(e,t)):null}function Dt(e){return At([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function St(e,t,n,r){var i=At([t,0,1+Ct(t,n,r)]),o=Dt(e),s=Math.round(Tt(i,o));return Math.floor(s/7)+1}function Ct(e,t,n){var r=7+t-n;return-((7+At([e,0,r]).getUTCDay()-t)%7)+r-1}function xt(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function kt(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function Rt(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function At(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function Ot(e){return!isNaN(e.valueOf())}function It(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function Mt(e,t,n,r){return{instanceId:ut(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var Pt=Object.prototype.hasOwnProperty;function Nt(e,t){var n={};if(t)for(var r in t){for(var i=[],o=e.length-1;o>=0;o-=1){var s=e[o][r];if("object"==typeof s&&s)i.unshift(s);else if(void 0!==s){n[r]=s;break}}i.length&&(n[r]=Nt(i))}for(o=e.length-1;o>=0;o-=1){var a=e[o];for(var l in a)l in n||(n[l]=a[l])}return n}function Ht(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Lt(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Yt(e){for(var t={},n=0,r=e;n10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",rn(t,!0)))),r}function nn(e){return e.toISOString().replace(/T.*$/,"")}function rn(e,t){void 0===t&&(t=!1);var n=e<0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=Math.round(r%60);return t?n+ft(i,2)+":"+ft(o,2):"GMT"+n+i+(o?":"+ft(o,2):"")}function on(e,t,n){if(e===t)return!0;var r,i=e.length;if(i!==t.length)return!1;for(r=0;r1)||"numeric"!==i.year&&"2-digit"!==i.year||"numeric"!==i.month&&"2-digit"!==i.month||"numeric"!==i.day&&"2-digit"!==i.day||(a=1);var l=this.format(e,n),u=this.format(t,n);if(l===u)return l;var c=gn(function(e,t){var n={};for(var r in e)(!(r in un)||un[r]<=t)&&(n[r]=e[r]);return n}(i,a),o,n),d=c(e),h=c(t),f=function(e,t,n,r){var i=0;for(;i=Jt(t)&&(r=bt(r,1))}return e.start&&(n=Dt(e.start),r&&r<=n&&(r=bt(n,1))),{start:n,end:r}}function Jn(e,t,n,r){return"year"===r?Zt(n.diffWholeYears(e,t),"year"):"month"===r?Zt(n.diffWholeMonths(e,t),"month"):(o=t,s=Dt(i=e),a=Dt(o),{years:0,months:0,days:Math.round(Tt(s,a)),milliseconds:o.valueOf()-a.valueOf()-(i.valueOf()-s.valueOf())});var i,o,s,a}function Qn(e,t){var n,r,i=[],o=t.start;for(e.sort(er),n=0;no&&i.push({start:o,end:r.start}),r.end>o&&(o=r.end);return ot.start)&&(null===e.start||null===t.end||e.start=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function ir(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t=(n||t.end),isToday:t&&ir(t,r.start)}}function vr(e){return e.instance?e.instance.instanceId:e.def.defId+":"+e.range.start.toISOString()}function yr(e,t){var n=e.eventRange,r=n.def,i=n.instance,o=r.url;if(o)return{href:o};var s=t.emitter,a=t.options.eventInteractive;return null==a&&null==(a=r.interactive)&&(a=Boolean(s.hasHandlers("eventClick"))),a?at((function(e){s.trigger("eventClick",{el:e.target,event:new Hr(t,r,i),jsEvent:e,view:t.viewApi})})):{}}var _r={start:On,end:On,allDay:Boolean};function br(e,t,n){var r=function(e,t){var n=An(e,_r),r=n.refined,i=n.extra,o=r.start?t.createMarkerMeta(r.start):null,a=r.end?t.createMarkerMeta(r.end):null,l=r.allDay;null==l&&(l=o&&o.isTimeUnspecified&&(!a||a.isTimeUnspecified));return s({range:{start:o?o.marker:null,end:a?a.marker:null},allDay:l},i)}(e,t),i=r.range;if(!i.start)return null;if(!i.end){if(null==n)return null;i.end=t.add(i.start,n)}return r}function Er(e,t,n){return s(s({},Tr(e,t,n)),{timeZone:t.timeZone})}function Tr(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function wr(e,t,n){var r=Gn({editable:!1},n),i=Kn(r.refined,r.extra,"",e.allDay,!0,n);return{def:i,ui:ur(i,t),instance:Mt(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function Dr(e,t,n){n.emitter.trigger("select",s(s({},Sr(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Sr(e,t){for(var n,r,i={},o=0,a=t.pluginHooks.dateSpanTransforms;o=0;r-=1){var i=n[r].parseMeta(e);if(i)return{sourceDefId:r,meta:i}}return null}(o,t);if(a)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:o.defaultAllDay,eventDataTransform:o.eventDataTransform,success:o.success,failure:o.failure,publicId:o.id||"",sourceId:ut(),sourceDefId:a.sourceDefId,meta:a.meta,ui:Bn(o,t),extendedProps:s}}return null}function Mr(e){return s(s(s({},Yn),Or),e.pluginHooks.eventSourceRefiners)}function Pr(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var Nr=function(){function e(){}return e.prototype.getCurrentData=function(){return this.currentDataManager.getCurrentData()},e.prototype.dispatch=function(e){return this.currentDataManager.dispatch(e)},Object.defineProperty(e.prototype,"view",{get:function(){return this.getCurrentData().viewApi},enumerable:!1,configurable:!0}),e.prototype.batchRendering=function(e){e()},e.prototype.updateSize=function(){this.trigger("_resize",!0)},e.prototype.setOption=function(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})},e.prototype.getOption=function(e){return this.currentDataManager.currentCalendarOptionsInput[e]},e.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.getCurrentData().availableRawLocales)},e.prototype.on=function(e,t){var n=this.currentDataManager;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn("Unknown listener name '"+e+"'")},e.prototype.off=function(e,t){this.currentDataManager.emitter.off(e,t)},e.prototype.trigger=function(e){for(var t,n=[],r=1;r=1?Math.min(i,o):i}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=Et(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),tn(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?At(xt(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?At(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-kt(Rt(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Rt(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?kt(Rt(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(Rt(e))*60):new Date(e.valueOf()-(t||0))},e}(),Vr=[],Fr={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},qr=s(s({},Fr),{buttonHints:{prev:"Previous $0",next:"Next $0",today:function(e,t){return"day"===t?"Today":"This "+e}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show "+e+" more event"+(1===e?"":"s")}});function Gr(e){for(var t=e.length>0?e[0].code:"en",n=Vr.concat(e),r={en:qr},i=0,o=n;i0;i-=1){var o=r.slice(0,i).join("-");if(t[o])return t[o]}return null}(n,t)||qr;return Kr(e,n,r)}(e,t):Kr(e.code,[e.code],e)}function Kr(e,t,n){var r=Nt([Fr,n],["buttonText"]);delete r.code;var i=r.week;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}var Xr,$r={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function Jr(e,t){return In(function(e){var t;t=!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[];return t=t.map((function(e){return s(s({},$r),e)}))}(e),null,t)}function Qr(e,t){return e.left>=t.left&&e.left=t.top&&e.top
",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);var t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),Xr}var ni={defs:{},instances:{}},ri=function(){function e(){this.getKeysForEventDefs=sn(this._getKeysForEventDefs),this.splitDateSelection=sn(this._splitDateSpan),this.splitEventStore=sn(this._splitEventStore),this.splitIndividualUi=sn(this._splitIndividualUi),this.splitEventDrag=sn(this._splitInteraction),this.splitEventResize=sn(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),i=this.splitDateSelection(e.dateSelection),o=this.splitIndividualUi(e.eventUiBases,r),s=this.splitEventStore(e.eventStore,r),a=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),u={};for(var c in this.eventUiBuilders=Lt(n,(function(e,n){return t.eventUiBuilders[n]||sn(ii)})),n){var d=n[c],h=s[c]||ni,f=this.eventUiBuilders[c];u[c]={businessHours:d.businessHours||e.businessHours,dateSelection:i[c]||null,eventStore:h,eventUiBases:f(e.eventUiBases[""],d.ui,o[c]),eventSelection:h.instances[e.eventSelection]?e.eventSelection:"",eventDrag:a[c]||null,eventResize:l[c]||null}}return u},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);nn:!!t&&e>=t.end)}}function si(e,t){var n=["fc-day","fc-day-"+yt[e.dow]];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}var ai=En({year:"numeric",month:"long",day:"numeric"}),li=En({week:"long"});function ui(e,t,n,r){void 0===n&&(n="day"),void 0===r&&(r=!0);var i=e.dateEnv,o=e.options,a=e.calendarApi,l=i.format(t,"week"===n?li:ai);if(o.navLinks){var u=i.toDate(t),c=function(e){var r="day"===n?o.navLinkDayClick:"week"===n?o.navLinkWeekClick:null;"function"==typeof r?r.call(a,i.toDate(t),e):("string"==typeof r&&(n=r),a.zoomTo(t,n))};return s({title:pt(o.navLinkHint,[l,u],l),"data-navlink":""},r?st(c):{onClick:c})}return{"aria-label":l}}var ci,di=null;function hi(){return null===di&&(di=function(){var e=document.createElement("div");$e(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="
",document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return Ge(e),t}()),di}function fi(){return ci||(ci=function(){var e=document.createElement("div");e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",document.body.appendChild(e);var t=pi(e);return document.body.removeChild(e),t}()),ci}function pi(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function mi(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():gi(e),i=function(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,o=parseInt(n.borderTopWidth,10)||0,s=parseInt(n.borderBottomWidth,10)||0,a=pi(e),l=a.y-r-i,u={borderLeft:r,borderRight:i,borderTop:o,borderBottom:s,scrollbarBottom:a.x-o-s,scrollbarLeft:0,scrollbarRight:0};return hi()&&"rtl"===n.direction?u.scrollbarLeft=l:u.scrollbarRight=l,t&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}(e,t),o={left:r.left+i.borderLeft+i.scrollbarLeft,right:r.right-i.borderRight-i.scrollbarRight,top:r.top+i.borderTop,bottom:r.bottom-i.borderBottom-i.scrollbarBottom};return t&&(o.left+=i.paddingLeft,o.right-=i.paddingRight,o.top+=i.paddingTop,o.bottom-=i.paddingBottom),o}function gi(e){var t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function vi(e){for(var t=[];e instanceof HTMLElement;){var n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}var yi=function(){function e(){this.handlers={},this.thisContext=null}return e.prototype.setThisContext=function(e){this.thisContext=e},e.prototype.setOptions=function(e){this.options=e},e.prototype.on=function(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)},e.prototype.off=function(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((function(e){return e!==n}))):delete e[t]}(this.handlers,e,t)},e.prototype.trigger=function(e){for(var t=[],n=1;n=n[t]&&e=n[t]&&e0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()0},e.prototype.canScrollRight=function(){return this.getScrollLeft()=c.end?new Date(c.end.valueOf()-1):u),i=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(i.unit),s=this.buildRenderRange(this.trimHiddenDays(i.range),i.unit,o),a=s=this.trimHiddenDays(s),d.showNonCurrentDates||(a=tr(a,i.range)),a=tr(a=this.adjustActiveRange(a),r),l=nr(i.range,r),{validRange:r,currentRange:i.range,currentRangeUnit:i.unit,isRangeAllDay:o,activeRange:a,renderRange:s,slotMinTime:d.slotMinTime,slotMaxTime:d.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(i.duration)}},e.prototype.buildValidRange=function(){var e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.props,i=null,o=null,s=null;return r.duration?(i=r.duration,o=r.durationUnit,s=this.buildRangeFromDuration(e,t,i,o)):(n=this.props.dayCount)?(o="day",s=this.buildRangeFromDayCount(e,t,n)):(s=this.buildCustomVisibleRange(e))?o=r.dateEnv.greatestWholeUnit(s.start,s.end).unit:(o=en(i=this.getFallbackDuration()).unit,s=this.buildRangeFromDuration(e,t,i,o)),{duration:i,unit:o,range:s}},e.prototype.getFallbackDuration=function(){return Zt({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,i=t.slotMinTime,o=t.slotMaxTime,s=e.start,a=e.end;return r&&($t(i)<0&&(s=Dt(s),s=n.add(s,i)),$t(o)>1&&(a=bt(a=Dt(a),-1),a=n.add(a,o))),{start:s,end:a}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var i,o,s,a=this.props,l=a.dateEnv,u=a.dateAlignment;if(!u){var c=this.props.dateIncrement;u=c&&Jt(c)e.fetchRange.end}(e,t,n)})),t,!1,n)}function no(e,t,n,r,i){var o={};for(var s in e){var a=e[s];t[s]?o[s]=ro(a,n,r,i):o[s]=a}return o}function ro(e,t,n,r){var i=r.options,o=r.calendarApi,a=r.pluginHooks.eventSourceDefs[e.sourceDefId],l=ut();return a.fetch({eventSource:e,range:t,isRefetch:n,context:r},(function(n){var s=n.rawEvents;i.eventSourceSuccess&&(s=i.eventSourceSuccess.call(o,s,n.xhr)||s),e.success&&(s=e.success.call(o,s,n.xhr)||s),r.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:l,fetchRange:t,rawEvents:s})}),(function(n){console.warn(n.message,n),i.eventSourceFailure&&i.eventSourceFailure.call(o,n),e.failure&&e.failure(n),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:l,fetchRange:t,error:n})})),s(s({},e),{isFetching:!0,latestFetchId:l})}function io(e,t){return Ht(e,(function(e){return oo(e,t)}))}function oo(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function so(e,t,n,r,i){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,i,o){if(t&&n===t.latestFetchId){var s=In(function(e,t,n){var r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;i&&(e=ao(e,i));r&&(e=ao(e,r));return e}(i,t,o),t,o);return r&&(s=Vt(s,r,o)),Nn(lo(e,t.sourceId),s)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case"ADD_EVENTS":return function(e,t,n,r){n&&(t=Vt(t,n,r));return Nn(e,t)}(e,t.eventStore,r?r.activeRange:null,i);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return Nn(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Vt(e,r.activeRange,i):e;case"REMOVE_EVENTS":return function(e,t){var n=e.defs,r=e.instances,i={},o={};for(var s in n)t.defs[s]||(i[s]=n[s]);for(var a in r)!t.instances[a]&&i[r[a].defId]&&(o[a]=r[a]);return{defs:i,instances:o}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return lo(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Hn(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}function ao(e,t){var n;if(t){n=[];for(var r=0,i=e;r=200&&s.status<400){var e=!1,t=void 0;try{t=JSON.parse(s.responseText),e=!0}catch(e){}e?r(t,s):i("Failure parsing JSON",s)}else i("Request failed",s)},s.onerror=function(){i("Request failed",s)},s.send(o)}function _o(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function bo(e,t){for(var n=zt(t.getCurrentData().eventSources),r=[],i=0,o=e;i1)return{year:"numeric",month:"short",day:"numeric"};return{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}var So=function(){function e(e){var t=this;this.computeOptionsData=sn(this._computeOptionsData),this.computeCurrentViewData=sn(this._computeCurrentViewData),this.organizeRawLocales=sn(Gr),this.buildLocale=sn(Zr),this.buildPluginHooks=Pi(),this.buildDateEnv=sn(Co),this.buildTheme=sn(xo),this.parseToolbars=sn(po),this.buildViewSpecs=sn(Zi),this.buildDateProfileGenerator=an(ko),this.buildViewApi=sn(Ro),this.buildViewUiProps=an(Io),this.buildEventUiBySource=sn(Ao,Bt),this.buildEventUiBases=sn(Oo),this.parseContextBusinessHours=an(Po),this.buildTitle=sn(Do),this.emitter=new yi,this.actionRunner=new wo(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.getCurrentData=function(){return t.data},this.dispatch=function(e){t.actionRunner.request(e)},this.props=e,this.actionRunner.pause();var n={},r=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),i=r.calendarOptions.initialView||r.pluginHooks.initialView,o=this.computeCurrentViewData(i,r,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(o.options);var a,l,u,c=(a=r.calendarOptions,l=r.dateEnv,null!=(u=a.initialDate)?l.createMarker(u):Pr(a.now,l)),d=o.dateProfileGenerator.build(c);ir(d.activeRange,c)||(c=d.currentRange.start);for(var h={dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},f=0,p=r.pluginHooks.contextInit;fs.end&&(r+=this.insertEntry({index:e.index,thickness:e.thickness,span:{start:s.end,end:o.end}},i)),r?(n.push.apply(n,a([{index:e.index,thickness:e.thickness,span:zo(s,o)}],i)),r):(n.push(e),0)},e.prototype.insertEntryAt=function(e,t){var n=this.entriesByLevel,r=this.levelCoords;-1===t.lateral?(Bo(r,t.level,t.levelCoord),Bo(n,t.level,[e])):Bo(n[t.level],t.lateral,e),this.stackCnts[Yo(e)]=t.stackCnt},e.prototype.findInsertion=function(e){for(var t=this,n=t.levelCoords,r=t.entriesByLevel,i=t.strictOrder,o=t.stackCnts,s=n.length,a=0,l=-1,u=-1,c=null,d=0,h=0;h=a+e.thickness)break;for(var p=r[h],m=void 0,g=Uo(p,e.span.start,Lo),v=g[0]+g[1];(m=p[v])&&m.span.starta&&(a=y,c=m,l=h,u=v),y===a&&(d=Math.max(d,o[Yo(m)]+1)),v+=1}}var _=0;if(c)for(_=l+1;_n(e[i-1]))return[i,0];for(;rs))return[o,1];r=o+1}}return[r,0]}var jo=function(){function e(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}return e.prototype.destroy=function(){},e}();function Wo(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}function Vo(e){var t;return(t={})[e.component.uid]=e,t}var Fo={},qo=function(){function e(e,t){this.emitter=new yi}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),Go={},Zo={startTime:Zt,duration:Zt,create:Boolean,sourceId:String};function Ko(e){var t=An(e,Zo),n=t.refined,r=t.extra;return{startTime:n.startTime||null,duration:n.duration||null,create:null==n.create||n.create,sourceId:n.sourceId,leftoverProps:r}}var Xo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this,t=this.props.widgetGroups.map((function(t){return e.renderWidgetGroup(t)}));return Ye.apply(void 0,a(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,r=[],i=!0,o=0,s=e;o1){var v=i&&n.getClass("buttonGroup")||"";return Ye.apply(void 0,a(["div",{className:v}],r))}return r[0]},t}(ki),$o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.model,i=n.extraClassName,o=!1,s=r.sectionWidgets,a=s.center;return s.left?(o=!0,e=s.left):e=s.start,s.right?(o=!0,t=s.right):t=s.end,Ye("div",{className:[i||"","fc-toolbar",o?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",a||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return Ye(Xo,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})},t}(ki),Jo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={availableWidth:null},t.handleEl=function(e){t.el=e,Oi(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return o(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=e.aspectRatio,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],i="",o="";return n?null!==t.availableWidth?i=t.availableWidth/n:o=1/n*100+"%":i=e.height||"",Ye("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(" "),style:{height:i,paddingBottom:o}},e.children)},t.prototype.componentDidMount=function(){this.context.addResizeHandler(this.handleResize)},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleResize)},t.prototype.updateAvailableWidth=function(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})},t}(ki),Qo=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,i=r.context,o=ar(t);if(o&&r.isValidSegDownEl(e.target)){var s=Ze(e.target,".fc-event-forced-url"),a=s?s.querySelector("a[href]").href:"";i.emitter.trigger("eventClick",{el:t,event:new Hr(r.context,o.eventRange.def,o.eventRange.instance),jsEvent:e,view:i.viewApi}),a&&!e.defaultPrevented&&(window.location.href=a)}},n.destroy=it(t.el,"click",".fc-event",n.handleSegClick),n}return o(t,e),t}(jo),es=function(e){function t(t){var n,r,i,o,s,a=e.call(this,t)||this;return a.handleEventElRemove=function(e){e===a.currentSegEl&&a.handleSegLeave(null,a.currentSegEl)},a.handleSegEnter=function(e,t){ar(t)&&(a.currentSegEl=t,a.triggerEvent("eventMouseEnter",e,t))},a.handleSegLeave=function(e,t){a.currentSegEl&&(a.currentSegEl=null,a.triggerEvent("eventMouseLeave",e,t))},a.removeHoverListeners=(n=t.el,r=".fc-event",i=a.handleSegEnter,o=a.handleSegLeave,it(n,"mouseover",r,(function(e,t){if(t!==s){s=t,i(e,t);var n=function(e){s=null,o(e,t),t.removeEventListener("mouseleave",n)};t.addEventListener("mouseleave",n)}}))),a}return o(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,i=r.context,o=ar(n);t&&!r.isValidSegDownEl(t.target)||i.emitter.trigger(e,{el:n,event:new Hr(i,o.eventRange.def,o.eventRange.instance),jsEvent:t,view:i.viewApi})},t}(jo),ts=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=sn(Ci),t.buildViewPropTransformers=sn(rs),t.buildToolbarProps=sn(ns),t.headerRef=Be(),t.footerRef=Be(),t.interactionsStore={},t.state={viewLabelId:nt()},t.registerInteractiveComponent=function(e,n){var r=Wo(e,n),i=[Qo,es].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=i,Fo[e.uid]=r},t.unregisterInteractiveComponent=function(e){var n=t.interactionsStore[e.uid];if(n){for(var r=0,i=n;r1?ui(this.context,a):{},f=s(s(s({date:t.toDate(a),view:i},o.extraHookProps),{text:d}),u);return Ye(Li,{hookProps:f,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:ss,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,r){return Ye("th",s({ref:e,role:"columnheader",className:c.concat(t).join(" "),"data-date":u.isDisabled?void 0:nn(a),colSpan:o.colSpan},o.extraDataAttrs),Ye("div",{className:"fc-scrollgrid-sync-inner"},!u.isDisabled&&Ye("a",s({ref:n,className:["fc-col-header-cell-cushion",o.isSticky?"fc-sticky":""].join(" ")},h),r)))}))},t}(ki),ls=En({weekday:"long"}),us=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,r=t.theme,i=t.viewApi,o=t.options,a=bt(new Date(2592e5),e.dow),l={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},u=[os].concat(si(l,r),e.extraClassNames||[]),c=n.format(a,e.dayHeaderFormat),d=s(s(s(s({date:a},l),{view:i}),e.extraHookProps),{text:c});return Ye(Li,{hookProps:d,classNames:o.dayHeaderClassNames,content:o.dayHeaderContent,defaultContent:ss,didMount:o.dayHeaderDidMount,willUnmount:o.dayHeaderWillUnmount},(function(t,r,i,o){return Ye("th",s({ref:t,role:"columnheader",className:u.concat(r).join(" "),colSpan:e.colSpan},e.extraDataAttrs),Ye("div",{className:"fc-scrollgrid-sync-inner"},Ye("a",{"aria-label":n.format(a,ls),className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:i},o)))}))},t}(ki),cs=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=Pr(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return o(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return e.children(t.nowDate,t.todayRange)},t.prototype.componentDidMount=function(){this.setTimeout()},t.prototype.componentDidUpdate=function(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())},t.prototype.componentWillUnmount=function(){this.clearTimeout()},t.prototype.computeTiming=function(){var e=this.props,t=this.context,n=Et(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),i=t.dateEnv.add(r,Zt(1,e.unit)),o=i.valueOf()-n.valueOf();return o=Math.min(864e5,o),{currentState:{nowDate:r,todayRange:ds(r)},nextState:{nowDate:i,todayRange:ds(i)},waitMs:o}},t.prototype.setTimeout=function(){var e=this,t=this.computeTiming(),n=t.nextState,r=t.waitMs;this.timeoutId=setTimeout((function(){e.setState(n,(function(){e.setTimeout()}))}),r)},t.prototype.clearTimeout=function(){this.timeoutId&&clearTimeout(this.timeoutId)},t.contextType=Si,t}(Le);function ds(e){var t=Dt(e);return{start:t,end:bt(t,1)}}var hs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=sn(fs),t}return o(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,i=t.datesRepDistinctDays,o=t.renderIntro,s=this.createDayHeaderFormatter(e.options.dayHeaderFormat,i,n.length);return Ye(cs,{unit:"day"},(function(e,t){return Ye("tr",{role:"row"},o&&o("day"),n.map((function(e){return i?Ye(as,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:s}):Ye(us,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:s})})))}))},t}(ki);function fs(e,t,n){return e||function(e,t){return En(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}(t,n)}var ps=function(){function e(e,t){for(var n=e.start,r=e.end,i=[],o=[],s=-1;n=t.length?t[t.length-1]+1:t[n]},e}(),ms=function(){function e(e,t){var n,r,i,o=e.dates;if(t){for(r=o[0].getUTCDay(),n=1;nt)return!0}return!1},t.prototype.needsYScrolling=function(){if(Ss.test(this.props.overflowY))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),n=e.children,r=0;rt)return!0}return!1},t.prototype.getXScrollbarWidth=function(){return Ss.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return Ss.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(ki),xs=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,i=r.depths,o=r.currentMap,s=!1,a=!1;null!==e?(s=n in o,o[n]=e,i[n]=(i[n]||0)+1,a=!0):(i[n]-=1,i[n]||(delete o[n],delete t.callbackMap[n],s=!0)),t.masterCallback&&(s&&t.masterCallback(null,String(n)),a&&t.masterCallback(e,String(n)))}}return e.prototype.createRef=function(e){var t=this,n=this.callbackMap[e];return n||(n=this.callbackMap[e]=function(n){t.handleValue(n,String(e))}),n},e.prototype.collect=function(e,t,n){return function(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var i=[];null==n&&(n=Object.keys(e).length);for(var o=t;o=0&&e=0&&tt.eventRange.range.end?e:t}var oa=function(e){function t(t,n){void 0===n&&(n={});var r=e.call(this)||this;return r.isRendering=!1,r.isRendered=!1,r.currentClassNames=[],r.customContentRenderId=0,r.handleAction=function(e){switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":r.renderRunner.tryDrain()}},r.handleData=function(e){r.currentData=e,r.renderRunner.request(e.calendarOptions.rerenderDelay)},r.handleRenderRequest=function(){if(r.isRendering){r.isRendered=!0;var e=r.currentData;Ve((function(){ze(Ye(is,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,i,o){return r.setClassNames(t),r.setHeight(n),Ye(Yi.Provider,{value:r.customContentRenderId},Ye(ts,s({isHeightAuto:i,forPrint:o},e)))})),r.el)}))}else r.isRendered&&(r.isRendered=!1,Fe(r.el),r.setClassNames([]),r.setHeight(""))},r.el=t,r.renderRunner=new To(r.handleRenderRequest),new So({optionOverrides:n,calendarApi:r,onAction:r.handleAction,onData:r.handleData}),r}return o(t,e),Object.defineProperty(t.prototype,"view",{get:function(){return this.currentData.viewApi},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()},t.prototype.destroy=function(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())},t.prototype.updateSize=function(){var t=this;Ve((function(){e.prototype.updateSize.call(t)}))},t.prototype.batchRendering=function(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")},t.prototype.pauseRendering=function(){this.renderRunner.pause("pauseRendering")},t.prototype.resumeRendering=function(){this.renderRunner.resume("pauseRendering",!0)},t.prototype.resetOptions=function(e,t){this.currentDataManager.resetOptions(e,t)},t.prototype.setClassNames=function(e){if(!on(e,this.currentClassNames)){for(var t=this.el.classList,n=0,r=this.currentClassNames;n1,b=y.span.start===a;d+=y.levelCoord-c,c=y.levelCoord+y.thickness,_?(d+=y.thickness,b&&m.push({seg:Ta(p,y.span.start,y.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:y.levelCoord,marginTop:0})):b&&(m.push({seg:Ta(p,y.span.start,y.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:y.levelCoord,marginTop:d}),d=0)}i.push(u),o.push(m),s.push(d)}return{singleColPlacements:i,multiColPlacements:o,leftoverMargins:s}}(a.toRects(),e,s),p=f.singleColPlacements,m=f.multiColPlacements,g=f.leftoverMargins,v=[],y=[],_=0,b=u;_1,showWeekNumbers:t.showWeekNumbers,todayRange:p,dateProfile:n,cells:o,renderIntro:t.renderRowIntro,businessHourSegs:a[f],eventSelection:t.eventSelection,bgEventSegs:l[f].filter(Ca),fgEventSegs:u[f],dateSelectionSegs:c[f],eventDrag:d[f],eventResize:h[f],dayMaxEvents:i,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:t.forPrint})})))))})))},t.prototype.prepareHits=function(){this.rowPositions=new _i(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new _i(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.queryHit=function(e,t){var n=this.colPositions,r=this.rowPositions,i=n.leftToIndex(e),o=r.topToIndex(t);if(null!=o&&null!=i){var a=this.props.cells[o][i];return{dateProfile:this.props.dateProfile,dateSpan:s({range:this.getCellRange(o,i),allDay:!0},a.extraDateSpan),dayEl:this.getCellEl(o,i),rect:{left:n.lefts[i],right:n.rights[i],top:r.tops[o],bottom:r.bottoms[o]},layer:0}}return null},t.prototype.getCellEl=function(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:bt(n,1)}},t}(Ii);function Ca(e){return e.eventRange.def.allDay}var xa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return o(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(gs),ka=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new xa,t.tableRef=Be(),t}return o(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Ye(Sa,s({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))},t}(Ii),Ra=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=sn(Aa),t.headerRef=Be(),t.tableRef=Be(),t}return o(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,i=this.props,o=this.buildDayTableModel(i.dateProfile,r),s=n.dayHeaders&&Ye(hs,{ref:this.headerRef,dateProfile:i.dateProfile,dates:o.headerDates,datesRepDistinctDays:1===o.rowCnt}),a=function(t){return Ye(ka,{ref:e.tableRef,dateProfile:i.dateProfile,dayTableModel:o,businessHours:i.businessHours,dateSelection:i.dateSelection,eventStore:i.eventStore,eventUiBases:i.eventUiBases,eventSelection:i.eventSelection,eventDrag:i.eventDrag,eventResize:i.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!i.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:i.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(s,a,o.colCnt,n.dayMinWidth):this.renderSimpleLayout(s,a)},t}(sa);function Aa(e,t){var n=new ps(e.renderRange,t);return new ms(n,/year|month|week/.test(e.currentRangeUnit))}var Oa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.buildRenderRange=function(t,n,r){var i,o=this.props.dateEnv,s=e.prototype.buildRenderRange.call(this,t,n,r),a=s.start,l=s.end;(/^(year|month)$/.test(n)&&(a=o.startOfWeek(a),(i=o.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=_t(i,1))),this.props.monthMode&&this.props.fixedWeekCount)&&(l=_t(l,6-Math.ceil(Tt(a,l)/7)));return{start:a,end:l}},t}(Xi),Ia=Mi({initialView:"dayGridMonth",views:{dayGrid:{component:Ra,dateProfileGeneratorClass:Oa},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),Ma=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getKeyInfo=function(){return{allDay:{},timed:{}}},t.prototype.getKeysForDateSpan=function(e){return e.allDay?["allDay"]:["timed"]},t.prototype.getKeysForEventDef=function(e){return e.allDay?"background"===(t=e).ui.display||"inverse-background"===t.ui.display?["timed","allDay"]:["allDay"]:["timed"];var t},t}(ri),Pa=En({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function Na(e){var t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return Ye(Si.Consumer,null,(function(n){if(!e.isLabeled)return Ye("td",{className:t.join(" "),"data-time":e.isoTimeStr});var r=n.dateEnv,i=n.options,o=n.viewApi,s=null==i.slotLabelFormat?Pa:Array.isArray(i.slotLabelFormat)?En(i.slotLabelFormat[0]):En(i.slotLabelFormat),a={level:0,time:e.time,date:r.toDate(e.date),view:o,text:r.format(e.date,s)};return Ye(Li,{hookProps:a,classNames:i.slotLabelClassNames,content:i.slotLabelContent,defaultContent:Ha,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(function(n,r,i,o){return Ye("td",{ref:n,className:t.concat(r).join(" "),"data-time":e.isoTimeStr},Ye("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},Ye("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:i},o)))}))}))}function Ha(e){return e.text}var La=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){return this.props.slatMetas.map((function(e){return Ye("tr",{key:e.key},Ye(Na,s({},e)))}))},t}(ki),Ya=En({week:"short"}),za=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allDaySplitter=new Ma,t.headerElRef=Be(),t.rootElRef=Be(),t.scrollerElRef=Be(),t.state={slatCoords:null},t.handleScrollTopRequest=function(e){var n=t.scrollerElRef.current;n&&(n.scrollTop=e)},t.renderHeadAxis=function(e,n){void 0===n&&(n="");var r=t.context.options,i=t.props.dateProfile.renderRange,o=1===Tt(i.start,i.end)?ui(t.context,i.start,"week"):{};return r.weekNumbers&&"day"===e?Ye(Ks,{date:i.start,defaultFormat:Ya},(function(e,t,r,i){return Ye("th",{ref:e,"aria-hidden":!0,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(t).join(" ")},Ye("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:n}},Ye("a",s({ref:r,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},o),i)))})):Ye("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},Ye("div",{className:"fc-timegrid-axis-frame",style:{height:n}}))},t.renderTableRowAxis=function(e){var n=t.context,r=n.options,i=n.viewApi,o={text:r.allDayText,view:i};return Ye(Li,{hookProps:o,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:Ba,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(t,n,r,i){return Ye("td",{ref:t,"aria-hidden":!0,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Ye("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},Ye("span",{className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner",ref:r},i)))}))},t.handleSlatCoords=function(e){t.setState({slatCoords:e})},t}return o(t,e),t.prototype.renderSimpleLayout=function(e,t,n){var r=this.context,i=this.props,o=[],s=Ns(r.options);return e&&o.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(o.push({type:"body",key:"all-day",chunk:{content:t}}),o.push({type:"body",key:"all-day-divider",outerContent:Ye("tr",{role:"presentation",className:"fc-scrollgrid-section"},Ye("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),o.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),Ye(Fi,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,t){return Ye("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Ye(Ls,{liquid:!i.isHeightAuto&&!i.forPrint,collapsibleWidth:i.forPrint,cols:[{width:"shrink"}],sections:o}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r,i,o,s){var a=this,l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");var u=this.context,c=this.props,d=!c.forPrint&&Ns(u.options),h=!c.forPrint&&Hs(u.options),f=[];e&&f.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Ye("tr",{role:"presentation"},a.renderHeadAxis("day",e.rowSyncHeights[0]))}},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(f.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Ye("tr",{role:"presentation"},a.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:t}]}),f.push({key:"all-day-divider",type:"body",outerContent:Ye("tr",{role:"presentation",className:"fc-scrollgrid-section"},Ye("td",{colSpan:2,className:"fc-timegrid-divider "+u.theme.getClass("tableCellShaded")}))}));var p=u.options.nowIndicator;return f.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(u.options.expandRows),chunks:[{key:"axis",content:function(e){return Ye("div",{className:"fc-timegrid-axis-chunk"},Ye("table",{"aria-hidden":!0,style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,Ye("tbody",null,Ye(La,{slatMetas:o}))),Ye("div",{className:"fc-timegrid-now-indicator-container"},Ye(cs,{unit:p?"minute":"day"},(function(e){var t=p&&s&&s.safeComputeTop(e);return"number"==typeof t?Ye(Us,{isAxis:!0,date:e},(function(e,n,r,i){return Ye("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(n).join(" "),style:{top:t}},i)})):null}))))}},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),h&&f.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Ps},{key:"cols",content:Ps}]}),Ye(Fi,{viewSpec:u.viewSpec,elRef:this.rootElRef},(function(e,t){return Ye("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Ye(l,{liquid:!c.isHeightAuto&&!c.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:i}]}],sections:f}))}))},t.prototype.getAllDayMaxEventProps=function(){var e=this.context.options,t=e.dayMaxEvents,n=e.dayMaxEventRows;return!0!==t&&!0!==n||(t=void 0,n=5),{dayMaxEvents:t,dayMaxEventRows:n}},t}(Ii);function Ba(e){return e.text}var Ua=function(){function e(e,t,n){this.positions=e,this.dateProfile=t,this.slotDuration=n}return e.prototype.safeComputeTop=function(e){var t=this.dateProfile;if(ir(t.currentRange,e)){var n=Dt(e),r=e.valueOf()-n.valueOf();if(r>=Jt(t.slotMinTime)&&r0,_=Boolean(l)&&l.span.end-l.span.start=0;t-=1)if(null!==(r=Qt(n=Zt(hl[t]),e))&&r>1)return n;return e}(r),c=[];Jt(a)=e.getTime())&&(!t||n<=t.getTime())}function i(e){var t=e.startDate.toJSDate().getTime(),n=e.endDate.toJSDate().getTime();return e.endDate.isDate&&n>t&&(n-=1),{startTime:t,endTime:n}}var o=[];this.events.forEach((function(e){e.isRecurrenceException()&&o.push(e)}));var s={events:[],occurrences:[]};return this.events.filter((function(e){return!e.isRecurrenceException()})).forEach((function(e){var a=[];if(e.component.getAllProperties("exdate").forEach((function(e){var t=e.getFirstValue();a.push(t.toJSDate().getTime())})),e.isRecurring()){var l=e.iterator(),u=void 0,c=0,d=function(){if(c+=1,u=l.next()){var n=e.getOccurrenceDetails(u),d=i(n),h=d.startTime,f=d.endTime,p=-1!==a.indexOf(h),m=o.find((function(t){return t.uid===e.uid&&t.recurrenceId.toJSDate().getTime()===n.startDate.toJSDate().getTime()}));if(t&&h>t.getTime())return"break";r(h,f)&&(m?s.events.push(m):p||s.occurrences.push(n))}};do{if("break"===d())break}while(u&&(!n.maxIterations||c=200&&s.status<400?i(s.responseText,s):o("Request failed",s)},s.onerror=function(){return o("Request failed",s)},s.send(null)):l.completed?u(l.errorMessage,l.iCalExpander,l.xhr):l.callbacks.push(u)}}]});Go.touchMouseIgnoreWait=500;var kl=0,Rl=0,Al=!1,Ol=function(){function e(e){var t=this;this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=function(e){if(!t.shouldIgnoreMouse()&&function(e){return 0===e.button&&!e.ctrlKey}(e)&&t.tryStart(e)){var n=t.createEventFromMouse(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n),t.shouldIgnoreMove||document.addEventListener("mousemove",t.handleMouseMove),document.addEventListener("mouseup",t.handleMouseUp)}},this.handleMouseMove=function(e){var n=t.createEventFromMouse(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleMouseUp=function(e){document.removeEventListener("mousemove",t.handleMouseMove),document.removeEventListener("mouseup",t.handleMouseUp),t.emitter.trigger("pointerup",t.createEventFromMouse(e)),t.cleanup()},this.handleTouchStart=function(e){if(t.tryStart(e)){t.isTouchDragging=!0;var n=t.createEventFromTouch(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n);var r=e.target;t.shouldIgnoreMove||r.addEventListener("touchmove",t.handleTouchMove),r.addEventListener("touchend",t.handleTouchEnd),r.addEventListener("touchcancel",t.handleTouchEnd),window.addEventListener("scroll",t.handleTouchScroll,!0)}},this.handleTouchMove=function(e){var n=t.createEventFromTouch(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleTouchEnd=function(e){if(t.isDragging){var n=e.target;n.removeEventListener("touchmove",t.handleTouchMove),n.removeEventListener("touchend",t.handleTouchEnd),n.removeEventListener("touchcancel",t.handleTouchEnd),window.removeEventListener("scroll",t.handleTouchScroll,!0),t.emitter.trigger("pointerup",t.createEventFromTouch(e)),t.cleanup(),t.isTouchDragging=!1,kl+=1,setTimeout((function(){kl-=1}),Go.touchMouseIgnoreWait)}},this.handleTouchScroll=function(){t.wasTouchScroll=!0},this.handleScroll=function(e){if(!t.shouldIgnoreMove){var n=window.pageXOffset-t.prevScrollX+t.prevPageX,r=window.pageYOffset-t.prevScrollY+t.prevPageY;t.emitter.trigger("pointermove",{origEvent:e,isTouch:t.isTouchDragging,subjectEl:t.subjectEl,pageX:n,pageY:r,deltaX:n-t.origPageX,deltaY:r-t.origPageY})}},this.containerEl=e,this.emitter=new yi,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),1===(Rl+=1)&&window.addEventListener("touchmove",Il,{passive:!1})}return e.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),(Rl-=1)||window.removeEventListener("touchmove",Il,{passive:!1})},e.prototype.tryStart=function(e){var t=this.querySubjectEl(e),n=e.target;return!(!t||this.handleSelector&&!Ze(n,this.handleSelector))&&(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,!0)},e.prototype.cleanup=function(){Al=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()},e.prototype.querySubjectEl=function(e){return this.selector?Ze(e.target,this.selector):this.containerEl},e.prototype.shouldIgnoreMouse=function(){return kl||this.isTouchDragging},e.prototype.cancelTouchScroll=function(){this.isDragging&&(Al=!0)},e.prototype.initScrollWatch=function(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))},e.prototype.recordCoords=function(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.pageXOffset,this.prevScrollY=window.pageYOffset)},e.prototype.destroyScrollWatch=function(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)},e.prototype.createEventFromMouse=function(e,t){var n=0,r=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(n=e.pageX-this.origPageX,r=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:n,deltaY:r}},e.prototype.createEventFromTouch=function(e,t){var n,r,i=e.touches,o=0,s=0;return i&&i.length?(n=i[0].pageX,r=i[0].pageY):(n=e.pageX,r=e.pageY),t?(this.origPageX=n,this.origPageY=r):(o=n-this.origPageX,s=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:n,pageY:r,deltaX:o,deltaY:s}},e}();function Il(e){Al&&e.preventDefault()}var Ml=function(){function e(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}return e.prototype.start=function(e,t,n){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.pageXOffset,this.origScreenY=n-window.pageYOffset,this.deltaX=0,this.deltaY=0,this.updateElPosition()},e.prototype.handleMove=function(e,t){this.deltaX=e-window.pageXOffset-this.origScreenX,this.deltaY=t-window.pageYOffset-this.origScreenY,this.updateElPosition()},e.prototype.setIsVisible=function(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)},e.prototype.stop=function(e,t){var n=this,r=function(){n.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)},e.prototype.doRevertAnimation=function(e,t){var n=this.mirrorEl,r=this.sourceEl.getBoundingClientRect();n.style.transition="top "+t+"ms,left "+t+"ms",$e(n,{left:r.left,top:r.top}),function(e,t){var n=function(r){t(r),ot.forEach((function(t){e.removeEventListener(t,n)}))};ot.forEach((function(t){e.addEventListener(t,n)}))}(n,(function(){n.style.transition="",e()}))},e.prototype.cleanup=function(){this.mirrorEl&&(Ge(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},e.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&$e(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})},e.prototype.getMirrorEl=function(){var e=this.sourceElRect,t=this.mirrorEl;return t||((t=this.mirrorEl=this.sourceEl.cloneNode(!0)).classList.add("fc-unselectable"),t.classList.add("fc-event-dragging"),$e(t,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(t)),t},e}(),Pl=function(e){function t(t,n){var r=e.call(this)||this;return r.handleScroll=function(){r.scrollTop=r.scrollController.getScrollTop(),r.scrollLeft=r.scrollController.getScrollLeft(),r.handleScrollChange()},r.scrollController=t,r.doesListening=n,r.scrollTop=r.origScrollTop=t.getScrollTop(),r.scrollLeft=r.origScrollLeft=t.getScrollLeft(),r.scrollWidth=t.getScrollWidth(),r.scrollHeight=t.getScrollHeight(),r.clientWidth=t.getClientWidth(),r.clientHeight=t.getClientHeight(),r.clientRect=r.computeClientRect(),r.doesListening&&r.getEventTarget().addEventListener("scroll",r.handleScroll),r}return o(t,e),t.prototype.destroy=function(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)},t.prototype.getScrollTop=function(){return this.scrollTop},t.prototype.getScrollLeft=function(){return this.scrollLeft},t.prototype.setScrollTop=function(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())},t.prototype.setScrollLeft=function(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())},t.prototype.getClientWidth=function(){return this.clientWidth},t.prototype.getClientHeight=function(){return this.clientHeight},t.prototype.getScrollWidth=function(){return this.scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollHeight},t.prototype.handleScrollChange=function(){},t}(bi),Nl=function(e){function t(t,n){return e.call(this,new Ei(t),n)||this}return o(t,e),t.prototype.getEventTarget=function(){return this.scrollController.el},t.prototype.computeClientRect=function(){return mi(this.scrollController.el)},t}(Pl),Hl=function(e){function t(t){return e.call(this,new Ti,t)||this}return o(t,e),t.prototype.getEventTarget=function(){return window},t.prototype.computeClientRect=function(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}},t.prototype.handleScrollChange=function(){this.clientRect=this.computeClientRect()},t}(Pl),Ll="function"==typeof performance?performance.now:Date.now,Yl=function(){function e(){var e=this;this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=function(){if(e.isAnimating){var t=e.computeBestEdge(e.pointerScreenX+window.pageXOffset,e.pointerScreenY+window.pageYOffset);if(t){var n=Ll();e.handleSide(t,(n-e.msSinceRequest)/1e3),e.requestAnimation(n)}else e.isAnimating=!1}}}return e.prototype.start=function(e,t,n){this.isEnabled&&(this.scrollCaches=this.buildCaches(n),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))},e.prototype.handleMove=function(e,t){if(this.isEnabled){var n=e-window.pageXOffset,r=t-window.pageYOffset,i=null===this.pointerScreenY?0:r-this.pointerScreenY,o=null===this.pointerScreenX?0:n-this.pointerScreenX;i<0?this.everMovedUp=!0:i>0&&(this.everMovedDown=!0),o<0?this.everMovedLeft=!0:o>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(Ll()))}},e.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var e=0,t=this.scrollCaches;e=0&&u>=0&&c>=0&&d>=0&&(c<=n&&this.everMovedUp&&s.canScrollUp()&&(!r||r.distance>c)&&(r={scrollCache:s,name:"top",distance:c}),d<=n&&this.everMovedDown&&s.canScrollDown()&&(!r||r.distance>d)&&(r={scrollCache:s,name:"bottom",distance:d}),l<=n&&this.everMovedLeft&&s.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:s,name:"left",distance:l}),u<=n&&this.everMovedRight&&s.canScrollRight()&&(!r||r.distance>u)&&(r={scrollCache:s,name:"right",distance:u}))}return r},e.prototype.buildCaches=function(e){return this.queryScrollEls(e).map((function(e){return e===window?new Hl(!1):new Nl(e,!1)}))},e.prototype.queryScrollEls=function(e){for(var t=[],n=0,r=this.scrollQuery;n=t*t&&r.handleDistanceSurpassed(e)}r.isDragging&&("scroll"!==e.origEvent.type&&(r.mirror.handleMove(e.pageX,e.pageY),r.autoScroller.handleMove(e.pageX,e.pageY)),r.emitter.trigger("dragmove",e))}},r.onPointerUp=function(e){r.isInteracting&&(r.isInteracting=!1,function(e){e.classList.remove("fc-unselectable"),e.removeEventListener("selectstart",rt)}(document.body),function(e){e.removeEventListener("contextmenu",rt)}(document.body),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var i=r.pointer=new Ol(t);return i.emitter.on("pointerdown",r.onPointerDown),i.emitter.on("pointermove",r.onPointerMove),i.emitter.on("pointerup",r.onPointerUp),n&&(i.selector=n),r.mirror=new Ml,r.autoScroller=new Yl,r}return o(t,e),t.prototype.destroy=function(){this.pointer.destroy(),this.onPointerUp({})},t.prototype.startDelay=function(e){var t=this;"number"==typeof this.delay?this.delayTimeoutId=setTimeout((function(){t.delayTimeoutId=null,t.handleDelayEnd(e)}),this.delay):this.handleDelayEnd(e)},t.prototype.handleDelayEnd=function(e){this.isDelayEnded=!0,this.tryStartDrag(e)},t.prototype.handleDistanceSurpassed=function(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)},t.prototype.tryStartDrag=function(e){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY,this.containerEl),this.emitter.trigger("dragstart",e),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))},t.prototype.tryStopDrag=function(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))},t.prototype.stopDrag=function(e){this.isDragging=!1,this.emitter.trigger("dragend",e)},t.prototype.setIgnoreMove=function(e){this.pointer.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){this.mirror.setIsVisible(e)},t.prototype.setMirrorNeedsRevert=function(e){this.mirrorNeedsRevert=e},t.prototype.setAutoScrollEnabled=function(e){this.autoScroller.isEnabled=e},t}(qo),Bl=function(){function e(e){this.origRect=gi(e),this.scrollCaches=vi(e).map((function(e){return new Nl(e,!0)}))}return e.prototype.destroy=function(){for(var e=0,t=this.scrollCaches;e=0&&c=0&&di.layer)&&(m.componentId=o,m.context=s.context,m.rect.left+=l,m.rect.right+=l,m.rect.top+=u,m.rect.bottom+=u,i=m)}}}return i},e}();function jl(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&(n=e.dateSpan,r=t.dateSpan,i=n.range,o=r.range,(null===i.start?null:i.start.valueOf())===(null===o.start?null:o.start.valueOf())&&(null===i.end?null:i.end.valueOf())===(null===o.end?null:o.end.valueOf())&&n.allDay===r.allDay&&function(e,t){for(var n in t)if("range"!==n&&"allDay"!==n&&e[n]!==t[n])return!1;for(var n in e)if(!(n in t))return!1;return!0}(n,r));var n,r,i,o}function Wl(e,t){for(var n,r,i={},o=0,a=t.pluginHooks.datePointTransforms;or.start)return{endDelta:a};return null}(s,e,r.subjectEl.classList.contains("fc-event-resizer-start"),a.range)));l&&(u=xr(o,i.getCurrentData().eventUiBases,l,i),d.mutatedEvents=u,ys(d,e.dateProfile,i)||(c=!0,l=null,u=null,d.mutatedEvents=null)),u?i.dispatch({type:"SET_EVENT_RESIZE",state:d}):i.dispatch({type:"UNSET_EVENT_RESIZE"}),c?ct():dt(),t||(l&&jl(s,e)&&(l=null),n.validMutation=l,n.mutatedRelevantEvents=u)},n.handleDragEnd=function(e){var t=n.component.context,r=n.eventRange.def,i=n.eventRange.instance,o=new Hr(t,r,i),a=n.relevantEvents,l=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:o,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var u=new Hr(t,l.defs[r.defId],i?l.instances[i.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:l});var c={oldEvent:o,event:u,relatedEvents:Yr(l,t,i),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:a})}};t.emitter.trigger("eventResize",s(s({},c),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||Zt(0),endDelta:n.validMutation.endDelta||Zt(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",c)}else t.emitter.trigger("_noEventResize");n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var r=t.component,i=n.dragging=new zl(t.el);i.pointer.selector=".fc-event-resizer",i.touchScrollAllowed=!1,i.autoScroller.isEnabled=r.context.options.dragScroll;var o=n.hitDragging=new Ul(n.dragging,Vo(t));return o.emitter.on("pointerdown",n.handlePointerDown),o.emitter.on("dragstart",n.handleDragStart),o.emitter.on("hitupdate",n.handleHitUpdate),o.emitter.on("dragend",n.handleDragEnd),n}return o(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return Ze(e.subjectEl,".fc-event")},t}(jo);var Zl=function(){function e(e){var t=this;this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=function(e){e.jsEvent&&(t.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=function(e){var n=t.context.options.unselectCancel,r=Qe(e.origEvent);t.matchesCancel=!!Ze(r,n),t.matchesEvent=!!Ze(r,ql.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,i=n.getCurrentData();if(!r.wasTouchScroll){if(i.dateSelection&&!t.isRecentPointerDateSelect){var o=n.options.unselectAuto;!o||o&&t.matchesCancel||n.calendarApi.unselect(e)}i.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new Ol(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}return e.prototype.destroy=function(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()},e}(),Kl={fixedMirrorParent:On},Xl={dateClick:On,eventDragStart:On,eventDragStop:On,eventDrop:On,eventResizeStart:On,eventResizeStop:On,eventResize:On,drop:On,eventReceive:On,eventLeave:On},$l=function(){function e(e,t){var n=this;this.receivingContext=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(e){n.dragMeta=n.buildDragMeta(e.subjectEl)},this.handleHitUpdate=function(e,t,r){var i=n.hitDragging.dragging,o=null,a=null,l=!1,u={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:n.dragMeta.create};e&&(o=e.context,n.canDropElOnCalendar(r.subjectEl,o)&&(a=function(e,t,n){for(var r=s({},t.leftoverProps),i=0,o=n.pluginHooks.externalDefTransforms;i{document.querySelector(".fc-dayGridMonth-button").classList.remove("btn-icon"),document.querySelector(".fc-timeGridWeek-button").classList.remove("btn-icon"),document.querySelector(".fc-timeGridDay-button").classList.remove("btn-icon")},eventWillUnmount:e=>{if(null===e.event.source)return;if(!this.isKimaiSource(e.event))return;const t=r.AM.getInstance(e.element);null!==t&&t.dispose()},eventMouseEnter:e=>{const t=e.event;if(!this.isKimaiSource(t))return;const n=e.el,i=o.getFormattedDate(t.start)+" | "+o.formatTime(t.start)+" - "+(t.end?o.formatTime(t.end):""),s=this.renderEventPopoverContent(t);let a=r.AM.getInstance(n);null!==a?a.setContent({".popover-header":i,".popover-body":s}):a=new r.AM(n,{title:i,placement:"top",html:!0,content:s,trigger:"focus"}),a.show()},eventMouseLeave:e=>{this.isKimaiSource(e.event)&&this.hidePopover(e.el)},eventDidMount:e=>{e.el.addEventListener("contextmenu",(t=>{t.preventDefault();const n=e.event;if(!n.allDay){const e=this.options.url.actions(n.extendedProps.timesheet);i.get(e,{},(e=>{new Iu.A("calendar_contextMenu").createFromApi(t,e)}),(e=>{console.log("Failed to load actions for context menu",e)}))}}))}};if(!this.hasPermission("punch")&&this.hasPermission("create")&&void 0!==this.options.dragdrop){[].slice.call(document.querySelectorAll(this.options.dragdrop.container)).map((e=>new Jl(e,{itemSelector:this.options.dragdrop.items}))),u={...u,droppable:!0,drop:e=>{const t=e.draggedEl,n=t.parentElement;let r=JSON.parse(t.dataset.entry);const s=JSON.parse(n.dataset.routeReplacer);let l=n.dataset.route;for(const[e,t]of Object.entries(s))l=l.replace(e,r[t]);let u=e.date;if("dayGridMonth"===e.view.type){let e=this.options.defaultStartTime;if(null===e){const t=new Date;e=(t.getHours()<10?"0":"")+t.getHours()+":"+(t.getMinutes()<10?"0":"")+t.getMinutes()}u=o.addHumanDuration(u,e)}let c=o.addHumanDuration(u,this.options.slotDuration);this.hasPermission("punch")||(this.hasPermission("edit_begin")&&(r.begin=o.formatForAPI(u)),this.hasPermission("edit_end")&&(r.end=o.formatForAPI(c))),r=this.options.preparePayloadForUpdate(r),"PATCH"===n.dataset.method?i.patch(l,JSON.stringify(r),(e=>{const t=this.convertSourceForCalendar(e);this.getCalendar().addEvent(t,!0),a.success("action.update.success")})):i.post(l,JSON.stringify(r),(e=>{const t=this.convertSourceForCalendar(e);this.getCalendar().addEvent(t,!0),a.success("action.update.success")}))}}}!this.hasPermission("punch")&&this.hasPermission("create")&&(u={...u,dateClick:e=>{if("dayGridMonth"!==e.view.type)return;const t=this.options.url.create(e.dateStr);s.openUrlInModal(t)},selectable:!0,select:e=>{if("dayGridMonth"===e.view.type)return;const t=this.options.url.create(e.startStr,e.endStr);s.openUrlInModal(t)}}),this.hasPermission("edit")&&(u={...u,eventClick:e=>{const t=e.event;this.isKimaiSource(t)?(this.hidePopover(e.el),t.extendedProps.exported&&!this.hasPermission("edit_exported")||s.openUrlInModal(this.options.url.edit(t.id),(e=>{403!==e.status&&console.log(e)}))):e.jsEvent.preventDefault()}},this.hasPermission("punch")||(u={...u,dragRevertDuration:0,eventStartEditable:this.hasPermission("edit_begin"),eventDurationEditable:this.hasPermission("edit_end")||this.hasPermission("edit_duration"),eventDragStart:e=>{this.hidePopover(e.el)},eventDrop:e=>{this.changeHandler(e)},eventResizeStart:e=>{this.hidePopover(e.el)},eventResize:e=>{this.changeHandler(e)}})),void 0!==this.options.googleCalendarApiKey&&(u={...u,googleCalendarApiKey:this.options.googleCalendarApiKey});let c=[];for(const e of this.options.eventSources){let t={};if("timesheet"===e.type)t={...t,id:"kimai-"+e.id,events:(t,n,r)=>{const s=o.formatForAPI(t.start),a=o.formatForAPI(t.end);let l=e.url;l=l.replace("{from}",s),l=l.replace("__FROM__",s),l=l.replace("{to}",a),l=l.replace("__TO__",a),i.get(l,{},(e=>{let t=[];for(const n of e)t.push(this.convertSourceForCalendar(n));n(t)}),r)}};else if("google"===e.type)t={...t,id:"google-"+e.id,name:"google",editable:!1};else if("json"===e.type)t={...t,id:"json-"+e.id,editable:!1,events:(t,n,r)=>{const s=o.formatForAPI(t.start),a=o.formatForAPI(t.end);let l=e.url;l=l.replace("{from}",s),l=l.replace("__FROM__",s),l=l.replace("{to}",a),l=l.replace("__TO__",a),i.get(l,{},(e=>{let t=[];for(const n of e)t.push(n);n(t)}),r)}};else{if("ical"!==e.type){console.log("Unknown source type given, skipping to load events from: "+e.id);continue}t={...t,id:"ical-"+e.id,url:e.url,format:"ics",editable:!1}}void 0!==e.options&&(t={...t,...e.options}),c.push(t)}c.length>0&&(u={...u,eventSources:c}),this.calendar=new oa(t,u)}isKimaiSource(e){return null!==e&&(null!==e.source&&0===e.source.id.indexOf("kimai-"))}hasPermission(e){return this.options.permissions[e]}getCalendar(){return this.calendar}render(){this.calendar.render()}reloadEvents(){this.calendar.getEventSources().forEach((e=>e.refetch()))}convertSourceForCalendar(e){const t=this.kimai.getConfiguration().get("defaultColor");let n=e.activity.color;null!==n&&n!==t||(n=e.project.color,null!==n&&n!==t||(n=e.project.customer.color)),null===n&&(n=t);const r=this.kimai.getPlugin("date");let i=this.options.patterns.title;return i=i.replace("{project}",e.project.name),i=i.replace("{customer}",e.project.customer.name),i=i.replace("{description}",e.description??""),i=i.replace("{activity}",e.activity.name??""),i=null===e.end?i.replace("{duration}",""):i.replace("{duration}",r.formatDuration(e.duration)),""!==i&&null!==i||(i=e.activity.name),{id:e.id,timesheet:e.id,title:i,description:e.description,exported:e.exported,start:e.begin,end:e.end,activity:e.activity.name,project:e.project.name,customer:e.project.customer.name,tags:e.tags,color:n,textColor:Ou.A.calculateContrastColor(n)}}renderEventPopoverContent(e){const t=e.extendedProps,n=this.kimai.getPlugin("escape");let r="";if(null!==t.tags&&t.tags.length>0)for(let e of t.tags)r+=''+n.escapeForHtml(e)+"";return'\n
\n
    \n
  • '+this.options.translations.customer+": "+n.escapeForHtml(t.customer)+"
  • \n
  • "+this.options.translations.project+": "+n.escapeForHtml(t.project)+"
  • \n
  • "+this.options.translations.activity+": "+n.escapeForHtml(t.activity)+"
  • \n
"+(null!==t.description||t.tags.length>0?"
":"")+(t.description?"
"+n.escapeForHtml(t.description)+"
":"")+r+"\n
"}hidePopover(e){let t=r.AM.getInstance(e);null!==t&&t.hide()}changeHandler(e){const t=e.event;if(t.extendedProps.exported&&!this.hasPermission("edit_exported"))return void e.revert();const n=this.kimai.getPlugin("api"),r=this.kimai.getPlugin("alert"),i=this.kimai.getPlugin("date");let o={begin:i.formatForAPI(t.start)};null!==t.end&&void 0!==t.end?o.end=i.formatForAPI(t.end):o.end=null;const s=this.options.url.update(t.id);n.patch(s,JSON.stringify(o),(()=>{r.success("action.update.success")}),(t=>{e.revert(),n.handleError("action.update.error",t)}))}}},9997:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});class r{static calculateContrastColor(e){"#"===e.slice(0,1)&&(e=e.slice(1)),3===e.length&&(e=e.split("").map((function(e){return e+e})).join(""));return(299*parseInt(e.substring(0,2),16)+587*parseInt(e.substring(2,4),16)+114*parseInt(e.substring(4,6),16))/1e3>=128?"#000000":"#ffffff"}}},2758:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});class r{constructor(e){this.id=e}getContextMenuElement(){if(null===document.getElementById(this.id)){const e=document.createElement("div");e.id=this.id,e.classList.add("dropdown-menu","d-none"),document.body.appendChild(e)}return document.getElementById(this.id)}createFromApi(e,t){let n="";for(const e of t)if(!0===e.divider&&(n+=''),null!==e.url){if(n+='
"}this.createFromClickEvent(e,n)}createFromClickEvent(e,t){const n=this.getContextMenuElement();n.classList.contains("action-dropdown")||n.classList.add("action-dropdown"),n.innerHTML=t,n.style.position="fixed",n.style.top=e.clientY+"px",n.style.left=e.clientX+"px";const r=e=>{e.target.classList.contains("dropdown-toggle")||e.target.classList.contains("dropdown-divider")||(n.classList.remove("d-block"),n.classList.contains("d-none")||n.classList.add("d-none"),n.removeEventListener("click",r),document.removeEventListener("click",r))};n.addEventListener("click",r),document.addEventListener("click",r),n.classList.remove("d-none"),n.classList.contains("d-block")||n.classList.add("d-block")}static createForDataTable(e){[].slice.call(document.querySelectorAll(e)).map((e=>{null!==e.querySelector("td.actions div.dropdown-menu")&&e.addEventListener("contextmenu",(t=>{let n=t.target;for(;null!==n;){const e=n.tagName.toUpperCase();if("TH"===e||"TABLE"===e||"BODY"===e)return;if("TR"===e)break;n=n.parentNode}if(null===n||!n.matches("table.dataTable tbody tr"))return;const i=n.querySelector("td.actions div.dropdown-menu");if(null===i)return;t.preventDefault();new r(e.dataset.contextMenu).createFromClickEvent(t,i.innerHTML)}))}))}}},9336:function(e,t,n){"use strict";n.d(t,{aF:function(){return Un},go:function(){return Xn},AM:function(){return yr},y8:function(){return Wr},m_:function(){return mr}});var r={};n.r(r),n.d(r,{afterMain:function(){return w},afterRead:function(){return b},afterWrite:function(){return C},applyStyles:function(){return M},arrow:function(){return Q},auto:function(){return l},basePlacements:function(){return u},beforeMain:function(){return E},beforeRead:function(){return y},beforeWrite:function(){return D},bottom:function(){return o},clippingParents:function(){return h},computeStyles:function(){return re},createPopper:function(){return Me},createPopperBase:function(){return Ie},createPopperLite:function(){return Pe},detectOverflow:function(){return _e},end:function(){return d},eventListeners:function(){return oe},flip:function(){return be},hide:function(){return we},left:function(){return a},main:function(){return T},modifierPhases:function(){return x},offset:function(){return De},placements:function(){return v},popper:function(){return p},popperGenerator:function(){return Oe},popperOffsets:function(){return Se},preventOverflow:function(){return Ce},read:function(){return _},reference:function(){return m},right:function(){return s},start:function(){return c},top:function(){return i},variationPlacements:function(){return g},viewport:function(){return f},write:function(){return S}});var i="top",o="bottom",s="right",a="left",l="auto",u=[i,o,s,a],c="start",d="end",h="clippingParents",f="viewport",p="popper",m="reference",g=u.reduce((function(e,t){return e.concat([t+"-"+c,t+"-"+d])}),[]),v=[].concat(u,[l]).reduce((function(e,t){return e.concat([t,t+"-"+c,t+"-"+d])}),[]),y="beforeRead",_="read",b="afterRead",E="beforeMain",T="main",w="afterMain",D="beforeWrite",S="write",C="afterWrite",x=[y,_,b,E,T,w,D,S,C];function k(e){return e?(e.nodeName||"").toLowerCase():null}function R(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function A(e){return e instanceof R(e).Element||e instanceof Element}function O(e){return e instanceof R(e).HTMLElement||e instanceof HTMLElement}function I(e){return"undefined"!=typeof ShadowRoot&&(e instanceof R(e).ShadowRoot||e instanceof ShadowRoot)}var M={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];O(i)&&k(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});O(r)&&k(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function P(e){return e.split("-")[0]}var N=Math.max,H=Math.min,L=Math.round;function Y(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function z(){return!/^((?!chrome|android).)*safari/i.test(Y())}function B(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&O(e)&&(i=e.offsetWidth>0&&L(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&L(r.height)/e.offsetHeight||1);var s=(A(e)?R(e):window).visualViewport,a=!z()&&n,l=(r.left+(a&&s?s.offsetLeft:0))/i,u=(r.top+(a&&s?s.offsetTop:0))/o,c=r.width/i,d=r.height/o;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l,x:l,y:u}}function U(e){var t=B(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function j(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&I(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function W(e){return R(e).getComputedStyle(e)}function V(e){return["table","td","th"].indexOf(k(e))>=0}function F(e){return((A(e)?e.ownerDocument:e.document)||window.document).documentElement}function q(e){return"html"===k(e)?e:e.assignedSlot||e.parentNode||(I(e)?e.host:null)||F(e)}function G(e){return O(e)&&"fixed"!==W(e).position?e.offsetParent:null}function Z(e){for(var t=R(e),n=G(e);n&&V(n)&&"static"===W(n).position;)n=G(n);return n&&("html"===k(n)||"body"===k(n)&&"static"===W(n).position)?t:n||function(e){var t=/firefox/i.test(Y());if(/Trident/i.test(Y())&&O(e)&&"fixed"===W(e).position)return null;var n=q(e);for(I(n)&&(n=n.host);O(n)&&["html","body"].indexOf(k(n))<0;){var r=W(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function K(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function X(e,t,n){return N(e,H(t,n))}function $(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function J(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var Q={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,l=e.options,c=n.elements.arrow,d=n.modifiersData.popperOffsets,h=P(n.placement),f=K(h),p=[a,s].indexOf(h)>=0?"height":"width";if(c&&d){var m=function(e,t){return $("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:J(e,u))}(l.padding,n),g=U(c),v="y"===f?i:a,y="y"===f?o:s,_=n.rects.reference[p]+n.rects.reference[f]-d[f]-n.rects.popper[p],b=d[f]-n.rects.reference[f],E=Z(c),T=E?"y"===f?E.clientHeight||0:E.clientWidth||0:0,w=_/2-b/2,D=m[v],S=T-g[p]-m[y],C=T/2-g[p]/2+w,x=X(D,C,S),k=f;n.modifiersData[r]=((t={})[k]=x,t.centerOffset=x-C,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&j(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ee(e){return e.split("-")[1]}var te={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ne(e){var t,n=e.popper,r=e.popperRect,l=e.placement,u=e.variation,c=e.offsets,h=e.position,f=e.gpuAcceleration,p=e.adaptive,m=e.roundOffsets,g=e.isFixed,v=c.x,y=void 0===v?0:v,_=c.y,b=void 0===_?0:_,E="function"==typeof m?m({x:y,y:b}):{x:y,y:b};y=E.x,b=E.y;var T=c.hasOwnProperty("x"),w=c.hasOwnProperty("y"),D=a,S=i,C=window;if(p){var x=Z(n),k="clientHeight",A="clientWidth";if(x===R(n)&&"static"!==W(x=F(n)).position&&"absolute"===h&&(k="scrollHeight",A="scrollWidth"),l===i||(l===a||l===s)&&u===d)S=o,b-=(g&&x===C&&C.visualViewport?C.visualViewport.height:x[k])-r.height,b*=f?1:-1;if(l===a||(l===i||l===o)&&u===d)D=s,y-=(g&&x===C&&C.visualViewport?C.visualViewport.width:x[A])-r.width,y*=f?1:-1}var O,I=Object.assign({position:h},p&&te),M=!0===m?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:L(n*i)/i||0,y:L(r*i)/i||0}}({x:y,y:b},R(n)):{x:y,y:b};return y=M.x,b=M.y,f?Object.assign({},I,((O={})[S]=w?"0":"",O[D]=T?"0":"",O.transform=(C.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",O)):Object.assign({},I,((t={})[S]=w?b+"px":"",t[D]=T?y+"px":"",t.transform="",t))}var re={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,s=void 0===o||o,a=n.roundOffsets,l=void 0===a||a,u={placement:P(t.placement),variation:ee(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ne(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ne(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},ie={passive:!0};var oe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,s=r.resize,a=void 0===s||s,l=R(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach((function(e){e.addEventListener("scroll",n.update,ie)})),a&&l.addEventListener("resize",n.update,ie),function(){o&&u.forEach((function(e){e.removeEventListener("scroll",n.update,ie)})),a&&l.removeEventListener("resize",n.update,ie)}},data:{}},se={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var le={start:"end",end:"start"};function ue(e){return e.replace(/start|end/g,(function(e){return le[e]}))}function ce(e){var t=R(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function de(e){return B(F(e)).left+ce(e).scrollLeft}function he(e){var t=W(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function fe(e){return["html","body","#document"].indexOf(k(e))>=0?e.ownerDocument.body:O(e)&&he(e)?e:fe(q(e))}function pe(e,t){var n;void 0===t&&(t=[]);var r=fe(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=R(r),s=i?[o].concat(o.visualViewport||[],he(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(pe(q(s)))}function me(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ge(e,t,n){return t===f?me(function(e,t){var n=R(e),r=F(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var u=z();(u||!u&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+de(e),y:l}}(e,n)):A(t)?function(e,t){var n=B(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):me(function(e){var t,n=F(e),r=ce(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=N(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=N(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+de(e),l=-r.scrollTop;return"rtl"===W(i||n).direction&&(a+=N(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(F(e)))}function ve(e,t,n,r){var i="clippingParents"===t?function(e){var t=pe(q(e)),n=["absolute","fixed"].indexOf(W(e).position)>=0&&O(e)?Z(e):e;return A(n)?t.filter((function(e){return A(e)&&j(e,n)&&"body"!==k(e)})):[]}(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce((function(t,n){var i=ge(e,n,r);return t.top=N(i.top,t.top),t.right=H(i.right,t.right),t.bottom=H(i.bottom,t.bottom),t.left=N(i.left,t.left),t}),ge(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ye(e){var t,n=e.reference,r=e.element,l=e.placement,u=l?P(l):null,h=l?ee(l):null,f=n.x+n.width/2-r.width/2,p=n.y+n.height/2-r.height/2;switch(u){case i:t={x:f,y:n.y-r.height};break;case o:t={x:f,y:n.y+n.height};break;case s:t={x:n.x+n.width,y:p};break;case a:t={x:n.x-r.width,y:p};break;default:t={x:n.x,y:n.y}}var m=u?K(u):null;if(null!=m){var g="y"===m?"height":"width";switch(h){case c:t[m]=t[m]-(n[g]/2-r[g]/2);break;case d:t[m]=t[m]+(n[g]/2-r[g]/2)}}return t}function _e(e,t){void 0===t&&(t={});var n=t,r=n.placement,a=void 0===r?e.placement:r,l=n.strategy,c=void 0===l?e.strategy:l,d=n.boundary,g=void 0===d?h:d,v=n.rootBoundary,y=void 0===v?f:v,_=n.elementContext,b=void 0===_?p:_,E=n.altBoundary,T=void 0!==E&&E,w=n.padding,D=void 0===w?0:w,S=$("number"!=typeof D?D:J(D,u)),C=b===p?m:p,x=e.rects.popper,k=e.elements[T?C:b],R=ve(A(k)?k:k.contextElement||F(e.elements.popper),g,y,c),O=B(e.elements.reference),I=ye({reference:O,element:x,strategy:"absolute",placement:a}),M=me(Object.assign({},x,I)),P=b===p?M:O,N={top:R.top-P.top+S.top,bottom:P.bottom-R.bottom+S.bottom,left:R.left-P.left+S.left,right:P.right-R.right+S.right},H=e.modifiersData.offset;if(b===p&&H){var L=H[a];Object.keys(N).forEach((function(e){var t=[s,o].indexOf(e)>=0?1:-1,n=[i,o].indexOf(e)>=0?"y":"x";N[e]+=L[n]*t}))}return N}var be={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var d=n.mainAxis,h=void 0===d||d,f=n.altAxis,p=void 0===f||f,m=n.fallbackPlacements,y=n.padding,_=n.boundary,b=n.rootBoundary,E=n.altBoundary,T=n.flipVariations,w=void 0===T||T,D=n.allowedAutoPlacements,S=t.options.placement,C=P(S),x=m||(C===S||!w?[ae(S)]:function(e){if(P(e)===l)return[];var t=ae(e);return[ue(e),t,ue(t)]}(S)),k=[S].concat(x).reduce((function(e,n){return e.concat(P(n)===l?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?v:l,d=ee(r),h=d?a?g:g.filter((function(e){return ee(e)===d})):u,f=h.filter((function(e){return c.indexOf(e)>=0}));0===f.length&&(f=h);var p=f.reduce((function(t,n){return t[n]=_e(e,{placement:n,boundary:i,rootBoundary:o,padding:s})[P(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:_,rootBoundary:b,padding:y,flipVariations:w,allowedAutoPlacements:D}):n)}),[]),R=t.rects.reference,A=t.rects.popper,O=new Map,I=!0,M=k[0],N=0;N=0,B=z?"width":"height",U=_e(t,{placement:H,boundary:_,rootBoundary:b,altBoundary:E,padding:y}),j=z?Y?s:a:Y?o:i;R[B]>A[B]&&(j=ae(j));var W=ae(j),V=[];if(h&&V.push(U[L]<=0),p&&V.push(U[j]<=0,U[W]<=0),V.every((function(e){return e}))){M=H,I=!1;break}O.set(H,V)}if(I)for(var F=function(e){var t=k.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return M=t,"break"},q=w?3:1;q>0;q--){if("break"===F(q))break}t.placement!==M&&(t.modifiersData[r]._skip=!0,t.placement=M,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Ee(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Te(e){return[i,s,o,a].some((function(t){return e[t]>=0}))}var we={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=_e(t,{elementContext:"reference"}),a=_e(t,{altBoundary:!0}),l=Ee(s,r),u=Ee(a,i,o),c=Te(l),d=Te(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}};var De={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,l=void 0===o?[0,0]:o,u=v.reduce((function(e,n){return e[n]=function(e,t,n){var r=P(e),o=[a,i].indexOf(r)>=0?-1:1,l="function"==typeof n?n(Object.assign({},t,{placement:e})):n,u=l[0],c=l[1];return u=u||0,c=(c||0)*o,[a,s].indexOf(r)>=0?{x:c,y:u}:{x:u,y:c}}(n,t.rects,l),e}),{}),c=u[t.placement],d=c.x,h=c.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=h),t.modifiersData[r]=u}};var Se={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ye({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var Ce={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,l=n.mainAxis,u=void 0===l||l,d=n.altAxis,h=void 0!==d&&d,f=n.boundary,p=n.rootBoundary,m=n.altBoundary,g=n.padding,v=n.tether,y=void 0===v||v,_=n.tetherOffset,b=void 0===_?0:_,E=_e(t,{boundary:f,rootBoundary:p,padding:g,altBoundary:m}),T=P(t.placement),w=ee(t.placement),D=!w,S=K(T),C="x"===S?"y":"x",x=t.modifiersData.popperOffsets,k=t.rects.reference,R=t.rects.popper,A="function"==typeof b?b(Object.assign({},t.rects,{placement:t.placement})):b,O="number"==typeof A?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,M={x:0,y:0};if(x){if(u){var L,Y="y"===S?i:a,z="y"===S?o:s,B="y"===S?"height":"width",j=x[S],W=j+E[Y],V=j-E[z],F=y?-R[B]/2:0,q=w===c?k[B]:R[B],G=w===c?-R[B]:-k[B],$=t.elements.arrow,J=y&&$?U($):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=Q[Y],ne=Q[z],re=X(0,k[B],J[B]),ie=D?k[B]/2-F-re-te-O.mainAxis:q-re-te-O.mainAxis,oe=D?-k[B]/2+F+re+ne+O.mainAxis:G+re+ne+O.mainAxis,se=t.elements.arrow&&Z(t.elements.arrow),ae=se?"y"===S?se.clientTop||0:se.clientLeft||0:0,le=null!=(L=null==I?void 0:I[S])?L:0,ue=j+oe-le,ce=X(y?H(W,j+ie-le-ae):W,j,y?N(V,ue):V);x[S]=ce,M[S]=ce-j}if(h){var de,he="x"===S?i:a,fe="x"===S?o:s,pe=x[C],me="y"===C?"height":"width",ge=pe+E[he],ve=pe-E[fe],ye=-1!==[i,a].indexOf(T),be=null!=(de=null==I?void 0:I[C])?de:0,Ee=ye?ge:pe-k[me]-R[me]-be+O.altAxis,Te=ye?pe+k[me]+R[me]-be-O.altAxis:ve,we=y&&ye?function(e,t,n){var r=X(e,t,n);return r>n?n:r}(Ee,pe,Te):X(y?Ee:ge,pe,y?Te:ve);x[C]=we,M[C]=we-pe}t.modifiersData[r]=M}},requiresIfExists:["offset"]};function xe(e,t,n){void 0===n&&(n=!1);var r,i,o=O(t),s=O(t)&&function(e){var t=e.getBoundingClientRect(),n=L(t.width)/e.offsetWidth||1,r=L(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=F(t),l=B(e,s,n),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!n)&&(("body"!==k(t)||he(a))&&(u=(r=t)!==R(r)&&O(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:ce(r)),O(t)?((c=B(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=de(a))),{x:l.left+u.scrollLeft-c.x,y:l.top+u.scrollTop-c.y,width:l.width,height:l.height}}function ke(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var Re={placement:"bottom",modifiers:[],strategy:"absolute"};function Ae(){for(var e=arguments.length,t=new Array(e),n=0;nNe.has(e)&&Ne.get(e).get(t)||null,remove(e,t){if(!Ne.has(e))return;const n=Ne.get(e);n.delete(t),0===n.size&&Ne.delete(e)}},Le="transitionend",Ye=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),e),ze=e=>{e.dispatchEvent(new Event(Le))},Be=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),Ue=e=>Be(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(Ye(e)):null,je=e=>{if(!Be(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const t=e.closest("summary");if(t&&t.parentNode!==n)return!1;if(null===t)return!1}return t},We=e=>!e||e.nodeType!==Node.ELEMENT_NODE||(!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))),Ve=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?Ve(e.parentNode):null},Fe=()=>{},qe=e=>{e.offsetHeight},Ge=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Ze=[],Ke=()=>"rtl"===document.documentElement.dir,Xe=e=>{var t;t=()=>{const t=Ge();if(t){const n=e.NAME,r=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=r,e.jQueryInterface)}},"loading"===document.readyState?(Ze.length||document.addEventListener("DOMContentLoaded",(()=>{for(const e of Ze)e()})),Ze.push(t)):t()},$e=(e,t=[],n=e)=>"function"==typeof e?e(...t):n,Je=(e,t,n=!0)=>{if(!n)return void $e(e);const r=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const r=Number.parseFloat(t),i=Number.parseFloat(n);return r||i?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0})(t)+5;let i=!1;const o=({target:n})=>{n===t&&(i=!0,t.removeEventListener(Le,o),$e(e))};t.addEventListener(Le,o),setTimeout((()=>{i||ze(t)}),r)},Qe=(e,t,n,r)=>{const i=e.length;let o=e.indexOf(t);return-1===o?!n&&r?e[i-1]:e[0]:(o+=n?1:-1,r&&(o=(o+i)%i),e[Math.max(0,Math.min(o,i-1))])},et=/[^.]*(?=\..*)\.|.*/,tt=/\..*/,nt=/::\d+$/,rt={};let it=1;const ot={mouseenter:"mouseover",mouseleave:"mouseout"},st=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function at(e,t){return t&&`${t}::${it++}`||e.uidEvent||it++}function lt(e){const t=at(e);return e.uidEvent=t,rt[t]=rt[t]||{},rt[t]}function ut(e,t,n=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===n))}function ct(e,t,n){const r="string"==typeof t,i=r?n:t||n;let o=pt(e);return st.has(o)||(o=e),[r,i,o]}function dt(e,t,n,r,i){if("string"!=typeof t||!e)return;let[o,s,a]=ct(t,n,r);if(t in ot){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};s=e(s)}const l=lt(e),u=l[a]||(l[a]={}),c=ut(u,s,o?n:null);if(c)return void(c.oneOff=c.oneOff&&i);const d=at(s,t.replace(et,"")),h=o?function(e,t,n){return function r(i){const o=e.querySelectorAll(t);for(let{target:s}=i;s&&s!==this;s=s.parentNode)for(const a of o)if(a===s)return gt(i,{delegateTarget:s}),r.oneOff&&mt.off(e,i.type,t,n),n.apply(s,[i])}}(e,n,s):function(e,t){return function n(r){return gt(r,{delegateTarget:e}),n.oneOff&&mt.off(e,r.type,t),t.apply(e,[r])}}(e,s);h.delegationSelector=o?n:null,h.callable=s,h.oneOff=i,h.uidEvent=d,u[d]=h,e.addEventListener(a,h,o)}function ht(e,t,n,r,i){const o=ut(t[n],r,i);o&&(e.removeEventListener(n,o,Boolean(i)),delete t[n][o.uidEvent])}function ft(e,t,n,r){const i=t[n]||{};for(const[o,s]of Object.entries(i))o.includes(r)&&ht(e,t,n,s.callable,s.delegationSelector)}function pt(e){return e=e.replace(tt,""),ot[e]||e}const mt={on(e,t,n,r){dt(e,t,n,r,!1)},one(e,t,n,r){dt(e,t,n,r,!0)},off(e,t,n,r){if("string"!=typeof t||!e)return;const[i,o,s]=ct(t,n,r),a=s!==t,l=lt(e),u=l[s]||{},c=t.startsWith(".");if(void 0===o){if(c)for(const n of Object.keys(l))ft(e,l,n,t.slice(1));for(const[n,r]of Object.entries(u)){const i=n.replace(nt,"");a&&!t.includes(i)||ht(e,l,s,r.callable,r.delegationSelector)}}else{if(!Object.keys(u).length)return;ht(e,l,s,o,i?n:null)}},trigger(e,t,n){if("string"!=typeof t||!e)return null;const r=Ge();let i=null,o=!0,s=!0,a=!1;t!==pt(t)&&r&&(i=r.Event(t,n),r(e).trigger(i),o=!i.isPropagationStopped(),s=!i.isImmediatePropagationStopped(),a=i.isDefaultPrevented());const l=gt(new Event(t,{bubbles:o,cancelable:!0}),n);return a&&l.preventDefault(),s&&e.dispatchEvent(l),l.defaultPrevented&&i&&i.preventDefault(),l}};function gt(e,t={}){for(const[n,r]of Object.entries(t))try{e[n]=r}catch(t){Object.defineProperty(e,n,{configurable:!0,get:()=>r})}return e}function vt(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function yt(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}const _t={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${yt(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${yt(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter((e=>e.startsWith("bs")&&!e.startsWith("bsConfig")));for(const r of n){let n=r.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),t[n]=vt(e.dataset[r])}return t},getDataAttribute:(e,t)=>vt(e.getAttribute(`data-bs-${yt(t)}`))};class bt{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const n=Be(t)?_t.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...Be(t)?_t.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[r,i]of Object.entries(t)){const t=e[r],o=Be(t)?"element":null==(n=t)?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(i).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${r}" provided type "${o}" but expected type "${i}".`)}var n}}class Et extends bt{constructor(e,t){super(),(e=Ue(e))&&(this._element=e,this._config=this._getConfig(t),He.set(this._element,this.constructor.DATA_KEY,this))}dispose(){He.remove(this._element,this.constructor.DATA_KEY),mt.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){Je(e,t,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return He.get(Ue(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const Tt=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return t?t.split(",").map((e=>Ye(e))).join(","):null},wt={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const n=[];let r=e.parentNode.closest(t);for(;r;)n.push(r),r=r.parentNode.closest(t);return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((e=>`${e}:not([tabindex^="-"])`)).join(",");return this.find(t,e).filter((e=>!We(e)&&je(e)))},getSelectorFromElement(e){const t=Tt(e);return t&&wt.findOne(t)?t:null},getElementFromSelector(e){const t=Tt(e);return t?wt.findOne(t):null},getMultipleElementsFromSelector(e){const t=Tt(e);return t?wt.find(t):[]}},Dt=(e,t="hide")=>{const n=`click.dismiss${e.EVENT_KEY}`,r=e.NAME;mt.on(document,n,`[data-bs-dismiss="${r}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),We(this))return;const i=wt.getElementFromSelector(this)||this.closest(`.${r}`);e.getOrCreateInstance(i)[t]()}))};class St extends Et{static get NAME(){return"alert"}close(){if(mt.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,e)}_destroyElement(){this._element.remove(),mt.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(e){return this.each((function(){const t=St.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}Dt(St,"close"),Xe(St);const Ct='[data-bs-toggle="button"]';class xt extends Et{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each((function(){const t=xt.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}mt.on(document,"click.bs.button.data-api",Ct,(e=>{e.preventDefault();const t=e.target.closest(Ct);xt.getOrCreateInstance(t).toggle()})),Xe(xt);const kt=".bs.swipe",Rt={endCallback:null,leftCallback:null,rightCallback:null},At={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Ot extends bt{constructor(e,t){super(),this._element=e,e&&Ot.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Rt}static get DefaultType(){return At}static get NAME(){return"swipe"}dispose(){mt.off(this._element,kt)}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),$e(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&$e(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(mt.on(this._element,"pointerdown.bs.swipe",(e=>this._start(e))),mt.on(this._element,"pointerup.bs.swipe",(e=>this._end(e))),this._element.classList.add("pointer-event")):(mt.on(this._element,"touchstart.bs.swipe",(e=>this._start(e))),mt.on(this._element,"touchmove.bs.swipe",(e=>this._move(e))),mt.on(this._element,"touchend.bs.swipe",(e=>this._end(e))))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&("pen"===e.pointerType||"touch"===e.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const It="next",Mt="prev",Pt="left",Nt="right",Ht="slid.bs.carousel",Lt="carousel",Yt="active",zt=".active",Bt=".carousel-item",Ut={ArrowLeft:Nt,ArrowRight:Pt},jt={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Wt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Vt extends Et{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=wt.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Lt&&this.cycle()}static get Default(){return jt}static get DefaultType(){return Wt}static get NAME(){return"carousel"}next(){this._slide(It)}nextWhenVisible(){!document.hidden&&je(this._element)&&this.next()}prev(){this._slide(Mt)}pause(){this._isSliding&&ze(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?mt.one(this._element,Ht,(()=>this.cycle())):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void mt.one(this._element,Ht,(()=>this.to(e)));const n=this._getItemIndex(this._getActive());if(n===e)return;const r=e>n?It:Mt;this._slide(r,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&mt.on(this._element,"keydown.bs.carousel",(e=>this._keydown(e))),"hover"===this._config.pause&&(mt.on(this._element,"mouseenter.bs.carousel",(()=>this.pause())),mt.on(this._element,"mouseleave.bs.carousel",(()=>this._maybeEnableCycle()))),this._config.touch&&Ot.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of wt.find(".carousel-item img",this._element))mt.on(e,"dragstart.bs.carousel",(e=>e.preventDefault()));const e={leftCallback:()=>this._slide(this._directionToOrder(Pt)),rightCallback:()=>this._slide(this._directionToOrder(Nt)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new Ot(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=Ut[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=wt.findOne(zt,this._indicatorsElement);t.classList.remove(Yt),t.removeAttribute("aria-current");const n=wt.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(Yt),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const n=this._getActive(),r=e===It,i=t||Qe(this._getItems(),n,r,this._config.wrap);if(i===n)return;const o=this._getItemIndex(i),s=t=>mt.trigger(this._element,t,{relatedTarget:i,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:o});if(s("slide.bs.carousel").defaultPrevented)return;if(!n||!i)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=i;const l=r?"carousel-item-start":"carousel-item-end",u=r?"carousel-item-next":"carousel-item-prev";i.classList.add(u),qe(i),n.classList.add(l),i.classList.add(l);this._queueCallback((()=>{i.classList.remove(l,u),i.classList.add(Yt),n.classList.remove(Yt,u,l),this._isSliding=!1,s(Ht)}),n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return wt.findOne(".active.carousel-item",this._element)}_getItems(){return wt.find(Bt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return Ke()?e===Pt?Mt:It:e===Pt?It:Mt}_orderToDirection(e){return Ke()?e===Mt?Pt:Nt:e===Mt?Nt:Pt}static jQueryInterface(e){return this.each((function(){const t=Vt.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)}))}}mt.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",(function(e){const t=wt.getElementFromSelector(this);if(!t||!t.classList.contains(Lt))return;e.preventDefault();const n=Vt.getOrCreateInstance(t),r=this.getAttribute("data-bs-slide-to");return r?(n.to(r),void n._maybeEnableCycle()):"next"===_t.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())})),mt.on(window,"load.bs.carousel.data-api",(()=>{const e=wt.find('[data-bs-ride="carousel"]');for(const t of e)Vt.getOrCreateInstance(t)})),Xe(Vt);const Ft="show",qt="collapse",Gt="collapsing",Zt='[data-bs-toggle="collapse"]',Kt={parent:null,toggle:!0},Xt={parent:"(null|element)",toggle:"boolean"};class $t extends Et{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=wt.find(Zt);for(const e of n){const t=wt.getSelectorFromElement(e),n=wt.find(t).filter((e=>e===this._element));null!==t&&n.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Kt}static get DefaultType(){return Xt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((e=>e!==this._element)).map((e=>$t.getOrCreateInstance(e,{toggle:!1})))),e.length&&e[0]._isTransitioning)return;if(mt.trigger(this._element,"show.bs.collapse").defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove(qt),this._element.classList.add(Gt),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Gt),this._element.classList.add(qt,Ft),this._element.style[t]="",mt.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[t]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(mt.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,qe(this._element),this._element.classList.add(Gt),this._element.classList.remove(qt,Ft);for(const e of this._triggerArray){const t=wt.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0;this._element.style[e]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Gt),this._element.classList.add(qt),mt.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}_isShown(e=this._element){return e.classList.contains(Ft)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=Ue(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(Zt);for(const t of e){const e=wt.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=wt.find(":scope .collapse .collapse",this._config.parent);return wt.find(e,this._config.parent).filter((e=>!t.includes(e)))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const n of e)n.classList.toggle("collapsed",!t),n.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each((function(){const n=$t.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e]()}}))}}mt.on(document,"click.bs.collapse.data-api",Zt,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of wt.getMultipleElementsFromSelector(this))$t.getOrCreateInstance(e,{toggle:!1}).toggle()})),Xe($t);const Jt="dropdown",Qt="ArrowUp",en="ArrowDown",tn="click.bs.dropdown.data-api",nn="keydown.bs.dropdown.data-api",rn="show",on='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',sn=`${on}.show`,an=".dropdown-menu",ln=Ke()?"top-end":"top-start",un=Ke()?"top-start":"top-end",cn=Ke()?"bottom-end":"bottom-start",dn=Ke()?"bottom-start":"bottom-end",hn=Ke()?"left-start":"right-start",fn=Ke()?"right-start":"left-start",pn={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},mn={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class gn extends Et{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=wt.next(this._element,an)[0]||wt.prev(this._element,an)[0]||wt.findOne(an,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return pn}static get DefaultType(){return mn}static get NAME(){return Jt}toggle(){return this._isShown()?this.hide():this.show()}show(){if(We(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!mt.trigger(this._element,"show.bs.dropdown",e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const e of[].concat(...document.body.children))mt.on(e,"mouseover",Fe);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(rn),this._element.classList.add(rn),mt.trigger(this._element,"shown.bs.dropdown",e)}}hide(){if(We(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!mt.trigger(this._element,"hide.bs.dropdown",e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.off(e,"mouseover",Fe);this._popper&&this._popper.destroy(),this._menu.classList.remove(rn),this._element.classList.remove(rn),this._element.setAttribute("aria-expanded","false"),_t.removeDataAttribute(this._menu,"popper"),mt.trigger(this._element,"hidden.bs.dropdown",e)}}_getConfig(e){if("object"==typeof(e=super._getConfig(e)).reference&&!Be(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${Jt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(void 0===r)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=this._parent:Be(this._config.reference)?e=Ue(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Me(e,this._menu,t)}_isShown(){return this._menu.classList.contains(rn)}_getPlacement(){const e=this._parent;if(e.classList.contains("dropend"))return hn;if(e.classList.contains("dropstart"))return fn;if(e.classList.contains("dropup-center"))return"top";if(e.classList.contains("dropdown-center"))return"bottom";const t="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return e.classList.contains("dropup")?t?un:ln:t?dn:cn}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(_t.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...$e(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const n=wt.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((e=>je(e)));n.length&&Qe(n,t,e===en,!n.includes(t)).focus()}static jQueryInterface(e){return this.each((function(){const t=gn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}static clearMenus(e){if(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const t=wt.find(sn);for(const n of t){const t=gn.getInstance(n);if(!t||!1===t._config.autoClose)continue;const r=e.composedPath(),i=r.includes(t._menu);if(r.includes(t._element)||"inside"===t._config.autoClose&&!i||"outside"===t._config.autoClose&&i)continue;if(t._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const o={relatedTarget:t._element};"click"===e.type&&(o.clickEvent=e),t._completeHide(o)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),n="Escape"===e.key,r=[Qt,en].includes(e.key);if(!r&&!n)return;if(t&&!n)return;e.preventDefault();const i=this.matches(on)?this:wt.prev(this,on)[0]||wt.next(this,on)[0]||wt.findOne(on,e.delegateTarget.parentNode),o=gn.getOrCreateInstance(i);if(r)return e.stopPropagation(),o.show(),void o._selectMenuItem(e);o._isShown()&&(e.stopPropagation(),o.hide(),i.focus())}}mt.on(document,nn,on,gn.dataApiKeydownHandler),mt.on(document,nn,an,gn.dataApiKeydownHandler),mt.on(document,tn,gn.clearMenus),mt.on(document,"keyup.bs.dropdown.data-api",gn.clearMenus),mt.on(document,tn,on,(function(e){e.preventDefault(),gn.getOrCreateInstance(this).toggle()})),Xe(gn);const vn="backdrop",yn="show",_n="mousedown.bs.backdrop",bn={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},En={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Tn extends bt{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return bn}static get DefaultType(){return En}static get NAME(){return vn}show(e){if(!this._config.isVisible)return void $e(e);this._append();const t=this._getElement();this._config.isAnimated&&qe(t),t.classList.add(yn),this._emulateAnimation((()=>{$e(e)}))}hide(e){this._config.isVisible?(this._getElement().classList.remove(yn),this._emulateAnimation((()=>{this.dispose(),$e(e)}))):$e(e)}dispose(){this._isAppended&&(mt.off(this._element,_n),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=Ue(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),mt.on(e,_n,(()=>{$e(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(e){Je(e,this._getElement(),this._config.isAnimated)}}const wn=".bs.focustrap",Dn="backward",Sn={autofocus:!0,trapElement:null},Cn={autofocus:"boolean",trapElement:"element"};class xn extends bt{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Sn}static get DefaultType(){return Cn}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),mt.off(document,wn),mt.on(document,"focusin.bs.focustrap",(e=>this._handleFocusin(e))),mt.on(document,"keydown.tab.bs.focustrap",(e=>this._handleKeydown(e))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,mt.off(document,wn))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const n=wt.focusableChildren(t);0===n.length?t.focus():this._lastTabNavDirection===Dn?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?Dn:"forward")}}const kn=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Rn=".sticky-top",An="padding-right",On="margin-right";class In{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,An,(t=>t+e)),this._setElementAttributes(kn,An,(t=>t+e)),this._setElementAttributes(Rn,On,(t=>t-e))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,An),this._resetElementAttributes(kn,An),this._resetElementAttributes(Rn,On)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,n){const r=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+r)return;this._saveInitialAttribute(e,t);const i=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${n(Number.parseFloat(i))}px`)}))}_saveInitialAttribute(e,t){const n=e.style.getPropertyValue(t);n&&_t.setDataAttribute(e,t,n)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,(e=>{const n=_t.getDataAttribute(e,t);null!==n?(_t.removeDataAttribute(e,t),e.style.setProperty(t,n)):e.style.removeProperty(t)}))}_applyManipulationCallback(e,t){if(Be(e))t(e);else for(const n of wt.find(e,this._element))t(n)}}const Mn=".bs.modal",Pn="hidden.bs.modal",Nn="show.bs.modal",Hn="modal-open",Ln="show",Yn="modal-static",zn={backdrop:!0,focus:!0,keyboard:!0},Bn={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Un extends Et{constructor(e,t){super(e,t),this._dialog=wt.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new In,this._addEventListeners()}static get Default(){return zn}static get DefaultType(){return Bn}static get NAME(){return"modal"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||this._isTransitioning)return;mt.trigger(this._element,Nn,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Hn),this._adjustDialog(),this._backdrop.show((()=>this._showElement(e))))}hide(){if(!this._isShown||this._isTransitioning)return;mt.trigger(this._element,"hide.bs.modal").defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Ln),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated()))}dispose(){mt.off(window,Mn),mt.off(this._dialog,Mn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Tn({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new xn({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=wt.findOne(".modal-body",this._dialog);t&&(t.scrollTop=0),qe(this._element),this._element.classList.add(Ln);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,mt.trigger(this._element,"shown.bs.modal",{relatedTarget:e})}),this._dialog,this._isAnimated())}_addEventListeners(){mt.on(this._element,"keydown.dismiss.bs.modal",(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),mt.on(window,"resize.bs.modal",(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),mt.on(this._element,"mousedown.dismiss.bs.modal",(e=>{mt.one(this._element,"click.dismiss.bs.modal",(t=>{this._element===e.target&&this._element===t.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Hn),this._resetAdjustments(),this._scrollBar.reset(),mt.trigger(this._element,Pn)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(mt.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains(Yn)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(Yn),this._queueCallback((()=>{this._element.classList.remove(Yn),this._queueCallback((()=>{this._element.style.overflowY=t}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),n=t>0;if(n&&!e){const e=Ke()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!n&&e){const e=Ke()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each((function(){const n=Un.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e](t)}}))}}mt.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(e){const t=wt.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),mt.one(t,Nn,(e=>{e.defaultPrevented||mt.one(t,Pn,(()=>{je(this)&&this.focus()}))}));const n=wt.findOne(".modal.show");n&&Un.getInstance(n).hide();Un.getOrCreateInstance(t).toggle(this)})),Dt(Un),Xe(Un);const jn="show",Wn="showing",Vn="hiding",Fn=".offcanvas.show",qn="hidePrevented.bs.offcanvas",Gn="hidden.bs.offcanvas",Zn={backdrop:!0,keyboard:!0,scroll:!1},Kn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Xn extends Et{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Zn}static get DefaultType(){return Kn}static get NAME(){return"offcanvas"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown)return;if(mt.trigger(this._element,"show.bs.offcanvas",{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new In).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Wn);this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(jn),this._element.classList.remove(Wn),mt.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:e})}),this._element,!0)}hide(){if(!this._isShown)return;if(mt.trigger(this._element,"hide.bs.offcanvas").defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Vn),this._backdrop.hide();this._queueCallback((()=>{this._element.classList.remove(jn,Vn),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new In).reset(),mt.trigger(this._element,Gn)}),this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=Boolean(this._config.backdrop);return new Tn({className:"offcanvas-backdrop",isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{"static"!==this._config.backdrop?this.hide():mt.trigger(this._element,qn)}:null})}_initializeFocusTrap(){return new xn({trapElement:this._element})}_addEventListeners(){mt.on(this._element,"keydown.dismiss.bs.offcanvas",(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():mt.trigger(this._element,qn))}))}static jQueryInterface(e){return this.each((function(){const t=Xn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}mt.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(e){const t=wt.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),We(this))return;mt.one(t,Gn,(()=>{je(this)&&this.focus()}));const n=wt.findOne(Fn);n&&n!==t&&Xn.getInstance(n).hide();Xn.getOrCreateInstance(t).toggle(this)})),mt.on(window,"load.bs.offcanvas.data-api",(()=>{for(const e of wt.find(Fn))Xn.getOrCreateInstance(e).show()})),mt.on(window,"resize.bs.offcanvas",(()=>{for(const e of wt.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&Xn.getOrCreateInstance(e).hide()})),Dt(Xn),Xe(Xn);const $n={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Jn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Qn=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,er=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?!Jn.has(n)||Boolean(Qn.test(e.nodeValue)):t.filter((e=>e instanceof RegExp)).some((e=>e.test(n)))};const tr={allowList:$n,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},nr={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},rr={entry:"(string|element|function|null)",selector:"(string|element)"};class ir extends bt{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return tr}static get DefaultType(){return nr}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((e=>this._resolvePossibleFunction(e))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[t,n]of Object.entries(this._config.content))this._setContent(e,n,t);const t=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&t.classList.add(...n.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,n]of Object.entries(e))super._typeCheckConfig({selector:t,entry:n},rr)}_setContent(e,t,n){const r=wt.findOne(n,e);r&&((t=this._resolvePossibleFunction(t))?Be(t)?this._putElementInTemplate(Ue(t),r):this._config.html?r.innerHTML=this._maybeSanitize(t):r.textContent=t:r.remove())}_maybeSanitize(e){return this._config.sanitize?function(e,t,n){if(!e.length)return e;if(n&&"function"==typeof n)return n(e);const r=(new window.DOMParser).parseFromString(e,"text/html"),i=[].concat(...r.body.querySelectorAll("*"));for(const e of i){const n=e.nodeName.toLowerCase();if(!Object.keys(t).includes(n)){e.remove();continue}const r=[].concat(...e.attributes),i=[].concat(t["*"]||[],t[n]||[]);for(const t of r)er(t,i)||e.removeAttribute(t.nodeName)}return r.body.innerHTML}(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return $e(e,[this])}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}}const or=new Set(["sanitize","allowList","sanitizeFn"]),sr="fade",ar="show",lr=".modal",ur="hide.bs.modal",cr="hover",dr="focus",hr={AUTO:"auto",TOP:"top",RIGHT:Ke()?"left":"right",BOTTOM:"bottom",LEFT:Ke()?"right":"left"},fr={allowList:$n,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},pr={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class mr extends Et{constructor(e,t){if(void 0===r)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return fr}static get DefaultType(){return pr}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),mt.off(this._element.closest(lr),ur,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const e=mt.trigger(this._element,this.constructor.eventName("show")),t=(Ve(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:r}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(r.append(n),mt.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add(ar),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.on(e,"mouseover",Fe);this._queueCallback((()=>{mt.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(mt.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;if(this._getTipElement().classList.remove(ar),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.off(e,"mouseover",Fe);this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this._isHovered=null;this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),mt.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(sr,ar),t.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e})(this.constructor.NAME).toString();return t.setAttribute("id",n),this._isAnimated()&&t.classList.add(sr),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new ir({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(sr)}_isShown(){return this.tip&&this.tip.classList.contains(ar)}_createPopper(e){const t=$e(this._config.placement,[this,e,this._element]),n=hr[t.toUpperCase()];return Me(this._element,e,this._getPopperConfig(n))}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_resolvePossibleFunction(e){return $e(e,[this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:e=>{this._getTipElement().setAttribute("data-popper-placement",e.state.placement)}}]};return{...t,...$e(this._config.popperConfig,[t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if("click"===t)mt.on(this._element,this.constructor.eventName("click"),this._config.selector,(e=>{this._initializeOnDelegatedTarget(e).toggle()}));else if("manual"!==t){const e=t===cr?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=t===cr?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");mt.on(this._element,e,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusin"===e.type?dr:cr]=!0,t._enter()})),mt.on(this._element,n,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusout"===e.type?dr:cr]=t._element.contains(e.relatedTarget),t._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},mt.on(this._element.closest(lr),ur,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=_t.getDataAttributes(this._element);for(const e of Object.keys(t))or.has(e)&&delete t[e];return e={...t,..."object"==typeof e&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=!1===e.container?document.body:Ue(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,n]of Object.entries(this._config))this.constructor.Default[t]!==n&&(e[t]=n);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each((function(){const t=mr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}Xe(mr);const gr={...mr.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},vr={...mr.DefaultType,content:"(null|string|element|function)"};class yr extends mr{static get Default(){return gr}static get DefaultType(){return vr}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each((function(){const t=yr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}Xe(yr);const _r="click.bs.scrollspy",br="active",Er="[href]",Tr={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},wr={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Dr extends Et{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Tr}static get DefaultType(){return wr}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=Ue(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,"string"==typeof e.threshold&&(e.threshold=e.threshold.split(",").map((e=>Number.parseFloat(e)))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(mt.off(this._config.target,_r),mt.on(this._config.target,_r,Er,(e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const n=this._rootElement||window,r=t.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:r,behavior:"smooth"});n.scrollTop=r}})))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((e=>this._observerCallback(e)),e)}_observerCallback(e){const t=e=>this._targetLinks.get(`#${e.target.id}`),n=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(t(e))},r=(this._rootElement||document.documentElement).scrollTop,i=r>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=r;for(const o of e){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(o));continue}const e=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(i&&e){if(n(o),!r)return}else i||e||n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=wt.find(Er,this._config.target);for(const t of e){if(!t.hash||We(t))continue;const e=wt.findOne(decodeURI(t.hash),this._element);je(e)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,e))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(br),this._activateParents(e),mt.trigger(this._element,"activate.bs.scrollspy",{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("dropdown-item"))wt.findOne(".dropdown-toggle",e.closest(".dropdown")).classList.add(br);else for(const t of wt.parents(e,".nav, .list-group"))for(const e of wt.prev(t,".nav-link, .nav-item > .nav-link, .list-group-item"))e.classList.add(br)}_clearActiveClass(e){e.classList.remove(br);const t=wt.find("[href].active",e);for(const e of t)e.classList.remove(br)}static jQueryInterface(e){return this.each((function(){const t=Dr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}mt.on(window,"load.bs.scrollspy.data-api",(()=>{for(const e of wt.find('[data-bs-spy="scroll"]'))Dr.getOrCreateInstance(e)})),Xe(Dr);const Sr="ArrowLeft",Cr="ArrowRight",xr="ArrowUp",kr="ArrowDown",Rr="Home",Ar="End",Or="active",Ir="fade",Mr="show",Pr=".dropdown-toggle",Nr='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Hr=`.nav-link:not(.dropdown-toggle), .list-group-item:not(.dropdown-toggle), [role="tab"]:not(.dropdown-toggle), ${Nr}`;class Lr extends Et{constructor(e){super(e),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),mt.on(this._element,"keydown.bs.tab",(e=>this._keydown(e))))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),n=t?mt.trigger(t,"hide.bs.tab",{relatedTarget:e}):null;mt.trigger(e,"show.bs.tab",{relatedTarget:t}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(Or),this._activate(wt.getElementFromSelector(e));this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),mt.trigger(e,"shown.bs.tab",{relatedTarget:t})):e.classList.add(Mr)}),e,e.classList.contains(Ir))}_deactivate(e,t){if(!e)return;e.classList.remove(Or),e.blur(),this._deactivate(wt.getElementFromSelector(e));this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),mt.trigger(e,"hidden.bs.tab",{relatedTarget:t})):e.classList.remove(Mr)}),e,e.classList.contains(Ir))}_keydown(e){if(![Sr,Cr,xr,kr,Rr,Ar].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter((e=>!We(e)));let n;if([Rr,Ar].includes(e.key))n=t[e.key===Rr?0:t.length-1];else{const r=[Cr,kr].includes(e.key);n=Qe(t,e.target,r,!0)}n&&(n.focus({preventScroll:!0}),Lr.getOrCreateInstance(n).show())}_getChildren(){return wt.find(Hr,this._parent)}_getActiveElem(){return this._getChildren().find((e=>this._elemIsActive(e)))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute("aria-selected",t),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=wt.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const n=this._getOuterElement(e);if(!n.classList.contains("dropdown"))return;const r=(e,r)=>{const i=wt.findOne(e,n);i&&i.classList.toggle(r,t)};r(Pr,Or),r(".dropdown-menu",Mr),n.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains(Or)}_getInnerElement(e){return e.matches(Hr)?e:wt.findOne(Hr,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each((function(){const t=Lr.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}mt.on(document,"click.bs.tab",Nr,(function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),We(this)||Lr.getOrCreateInstance(this).show()})),mt.on(window,"load.bs.tab",(()=>{for(const e of wt.find('.active[data-bs-toggle="tab"], .active[data-bs-toggle="pill"], .active[data-bs-toggle="list"]'))Lr.getOrCreateInstance(e)})),Xe(Lr);const Yr="hide",zr="show",Br="showing",Ur={animation:"boolean",autohide:"boolean",delay:"number"},jr={animation:!0,autohide:!0,delay:5e3};class Wr extends Et{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return jr}static get DefaultType(){return Ur}static get NAME(){return"toast"}show(){if(mt.trigger(this._element,"show.bs.toast").defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(Yr),qe(this._element),this._element.classList.add(zr,Br),this._queueCallback((()=>{this._element.classList.remove(Br),mt.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element,this._config.animation)}hide(){if(!this.isShown())return;if(mt.trigger(this._element,"hide.bs.toast").defaultPrevented)return;this._element.classList.add(Br),this._queueCallback((()=>{this._element.classList.add(Yr),this._element.classList.remove(Br,zr),mt.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(zr),super.dispose()}isShown(){return this._element.classList.contains(zr)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){mt.on(this._element,"mouseover.bs.toast",(e=>this._onInteraction(e,!0))),mt.on(this._element,"mouseout.bs.toast",(e=>this._onInteraction(e,!1))),mt.on(this._element,"focusin.bs.toast",(e=>this._onInteraction(e,!0))),mt.on(this._element,"focusout.bs.toast",(e=>this._onInteraction(e,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each((function(){const t=Wr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}Dt(Wr),Xe(Wr)},6225:function(e){var t,n,r,i;(t=e.exports).foldLength=75,t.newLineChar="\r\n",t.helpers={updateTimezones:function(e){var n,r,i,o,s,a;if(!e||"vcalendar"!==e.name)return e;for(n=e.getAllSubcomponents(),r=[],i={},s=0;s0&&"\\"===e[n-1]))return n;n+=1}return-1},binsearchInsert:function(e,t,n){if(!e.length)return 0;for(var r,i,o=0,s=e.length-1;o<=s;)if((i=n(t,e[r=o+Math.floor((s-o)/2)]))<0)s=r-1;else{if(!(i>0))break;o=r+1}return i<0?r:i>0?r+1:r},dumpn:function(){t.debug&&("undefined"!=typeof console&&"log"in console?t.helpers.dumpn=function(e){console.log(e)}:t.helpers.dumpn=function(e){dump(e+"\n")},t.helpers.dumpn(arguments[0]))},clone:function(e,n){if(e&&"object"==typeof e){if(e instanceof Date)return new Date(e.getTime());if("clone"in e)return e.clone();if(Array.isArray(e)){for(var r=[],i=0;i65535?2:1:(n+=t.newLineChar+" "+r.substring(0,i),r=r.substring(i),i=o=0)}return n.substr(t.newLineChar.length+1)},pad2:function(e){switch("string"!=typeof e&&("number"==typeof e&&(e=parseInt(e)),e=String(e)),e.length){case 0:return"00";case 1:return"0"+e;default:return e}},trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)},inherits:function(e,n,r){function i(){}i.prototype=e.prototype,n.prototype=new i,r&&t.helpers.extend(r,n.prototype)},extend:function(e,t){for(var n in e){var r=Object.getOwnPropertyDescriptor(e,n);r&&!Object.getOwnPropertyDescriptor(t,n)&&Object.defineProperty(t,n,r)}return t}},t.design=function(){"use strict";var e=/\\\\|\\,|\\[Nn]/g,n=/\\|,|\n/g;function r(e,t){return{matches:/.*/,fromICAL:function(t,n){return function(e,t,n){if(-1===e.indexOf("\\"))return e;n&&(t=new RegExp(t.source+"|\\\\"+n));return e.replace(t,p)}(t,e,n)},toICAL:function(e,n){var r=t;return n&&(r=new RegExp(r.source+"|"+n)),e.replace(r,(function(e){switch(e){case"\\":return"\\\\";case";":return"\\;";case",":return"\\,";case"\n":return"\\n";default:return e}}))}}}var i={defaultType:"text"},o={defaultType:"text",multiValue:","},s={defaultType:"text",structuredValue:";"},a={defaultType:"integer"},l={defaultType:"date-time",allowedTypes:["date-time","date"]},u={defaultType:"date-time"},c={defaultType:"uri"},d={defaultType:"utc-offset"},h={defaultType:"recur"},f={defaultType:"date-and-or-time",allowedTypes:["date-time","date","text"]};function p(e){switch(e){case"\\\\":return"\\";case"\\;":return";";case"\\,":return",";case"\\n":case"\\N":return"\n";default:return e}}var m={categories:o,url:c,version:i,uid:i},g={boolean:{values:["TRUE","FALSE"],fromICAL:function(e){return"TRUE"===e},toICAL:function(e){return e?"TRUE":"FALSE"}},float:{matches:/^[+-]?\d+\.\d+$/,fromICAL:function(e){var n=parseFloat(e);return t.helpers.isStrictlyNaN(n)?0:n},toICAL:function(e){return String(e)}},integer:{fromICAL:function(e){var n=parseInt(e);return t.helpers.isStrictlyNaN(n)?0:n},toICAL:function(e){return String(e)}},"utc-offset":{toICAL:function(e){return e.length<7?e.substr(0,3)+e.substr(4,2):e.substr(0,3)+e.substr(4,2)+e.substr(7,2)},fromICAL:function(e){return e.length<6?e.substr(0,3)+":"+e.substr(3,2):e.substr(0,3)+":"+e.substr(3,2)+":"+e.substr(5,2)},decorate:function(e){return t.UtcOffset.fromString(e)},undecorate:function(e){return e.toString()}}},v=t.helpers.extend(g,{text:r(/\\\\|\\;|\\,|\\[Nn]/g,/\\|;|,|\n/g),uri:{},binary:{decorate:function(e){return t.Binary.fromString(e)},undecorate:function(e){return e.toString()}},"cal-address":{},date:{decorate:function(e,n){return C.strict?t.Time.fromDateString(e,n):t.Time.fromString(e,n)},undecorate:function(e){return e.toString()},fromICAL:function(e){return!C.strict&&e.length>=15?v["date-time"].fromICAL(e):e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2)},toICAL:function(e){var t=e.length;return 10==t?e.substr(0,4)+e.substr(5,2)+e.substr(8,2):t>=19?v["date-time"].toICAL(e):e}},"date-time":{fromICAL:function(e){if(C.strict||8!=e.length){var t=e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2)+"T"+e.substr(9,2)+":"+e.substr(11,2)+":"+e.substr(13,2);return e[15]&&"Z"===e[15]&&(t+="Z"),t}return v.date.fromICAL(e)},toICAL:function(e){var t=e.length;if(10!=t||C.strict){if(t>=19){var n=e.substr(0,4)+e.substr(5,2)+e.substr(8,5)+e.substr(14,2)+e.substr(17,2);return e[19]&&"Z"===e[19]&&(n+="Z"),n}return e}return v.date.toICAL(e)},decorate:function(e,n){return C.strict?t.Time.fromDateTimeString(e,n):t.Time.fromString(e,n)},undecorate:function(e){return e.toString()}},duration:{decorate:function(e){return t.Duration.fromString(e)},undecorate:function(e){return e.toString()}},period:{fromICAL:function(e){var n=e.split("/");return n[0]=v["date-time"].fromICAL(n[0]),t.Duration.isValueString(n[1])||(n[1]=v["date-time"].fromICAL(n[1])),n},toICAL:function(e){return C.strict||10!=e[0].length?e[0]=v["date-time"].toICAL(e[0]):e[0]=v.date.toICAL(e[0]),t.Duration.isValueString(e[1])||(C.strict||10!=e[1].length?e[1]=v["date-time"].toICAL(e[1]):e[1]=v.date.toICAL(e[1])),e.join("/")},decorate:function(e,n){return t.Period.fromJSON(e,n,!C.strict)},undecorate:function(e){return e.toJSON()}},recur:{fromICAL:function(e){return t.Recur._stringToData(e,!0)},toICAL:function(e){var n="";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];"until"==r?i=i.length>10?v["date-time"].toICAL(i):v.date.toICAL(i):"wkst"==r?"number"==typeof i&&(i=t.Recur.numericDayToIcalDay(i)):Array.isArray(i)&&(i=i.join(",")),n+=r.toUpperCase()+"="+i+";"}return n.substr(0,n.length-1)},decorate:function(e){return t.Recur.fromData(e)},undecorate:function(e){return e.toJSON()}},time:{fromICAL:function(e){if(e.length<6)return e;var t=e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2);return"Z"===e[6]&&(t+="Z"),t},toICAL:function(e){if(e.length<8)return e;var t=e.substr(0,2)+e.substr(3,2)+e.substr(6,2);return"Z"===e[8]&&(t+="Z"),t}}}),y=t.helpers.extend(m,{action:i,attach:{defaultType:"uri"},attendee:{defaultType:"cal-address"},calscale:i,class:i,comment:i,completed:u,contact:i,created:u,description:i,dtend:l,dtstamp:u,dtstart:l,due:l,duration:{defaultType:"duration"},exdate:{defaultType:"date-time",allowedTypes:["date-time","date"],multiValue:","},exrule:h,freebusy:{defaultType:"period",multiValue:","},geo:{defaultType:"float",structuredValue:";"},"last-modified":u,location:i,method:i,organizer:{defaultType:"cal-address"},"percent-complete":a,priority:a,prodid:i,"related-to":i,repeat:a,rdate:{defaultType:"date-time",allowedTypes:["date-time","date","period"],multiValue:",",detectType:function(e){return-1!==e.indexOf("/")?"period":-1===e.indexOf("T")?"date":"date-time"}},"recurrence-id":l,resources:o,"request-status":s,rrule:h,sequence:a,status:i,summary:i,transp:i,trigger:{defaultType:"duration",allowedTypes:["duration","date-time"]},tzoffsetfrom:d,tzoffsetto:d,tzurl:c,tzid:i,tzname:i}),_=t.helpers.extend(g,{text:r(e,n),uri:r(e,n),date:{decorate:function(e){return t.VCardTime.fromDateAndOrTimeString(e,"date")},undecorate:function(e){return e.toString()},fromICAL:function(e){return 8==e.length?v.date.fromICAL(e):"-"==e[0]&&6==e.length?e.substr(0,4)+"-"+e.substr(4):e},toICAL:function(e){return 10==e.length?v.date.toICAL(e):"-"==e[0]&&7==e.length?e.substr(0,4)+e.substr(5):e}},time:{decorate:function(e){return t.VCardTime.fromDateAndOrTimeString("T"+e,"time")},undecorate:function(e){return e.toString()},fromICAL:function(e){var t=_.time._splitZone(e,!0),n=t[0],r=t[1];return 6==r.length?r=r.substr(0,2)+":"+r.substr(2,2)+":"+r.substr(4,2):4==r.length&&"-"!=r[0]?r=r.substr(0,2)+":"+r.substr(2,2):5==r.length&&(r=r.substr(0,3)+":"+r.substr(3,2)),5!=n.length||"-"!=n[0]&&"+"!=n[0]||(n=n.substr(0,3)+":"+n.substr(3)),r+n},toICAL:function(e){var t=_.time._splitZone(e),n=t[0],r=t[1];return 8==r.length?r=r.substr(0,2)+r.substr(3,2)+r.substr(6,2):5==r.length&&"-"!=r[0]?r=r.substr(0,2)+r.substr(3,2):6==r.length&&(r=r.substr(0,3)+r.substr(4,2)),6!=n.length||"-"!=n[0]&&"+"!=n[0]||(n=n.substr(0,3)+n.substr(4)),r+n},_splitZone:function(e,t){var n,r,i=e.length-1,o=e.length-(t?5:6),s=e[o];return"Z"==e[i]?(n=e[i],r=e.substr(0,i)):e.length>6&&("-"==s||"+"==s)?(n=e.substr(o),r=e.substr(0,o)):(n="",r=e),[n,r]}},"date-time":{decorate:function(e){return t.VCardTime.fromDateAndOrTimeString(e,"date-time")},undecorate:function(e){return e.toString()},fromICAL:function(e){return _["date-and-or-time"].fromICAL(e)},toICAL:function(e){return _["date-and-or-time"].toICAL(e)}},"date-and-or-time":{decorate:function(e){return t.VCardTime.fromDateAndOrTimeString(e,"date-and-or-time")},undecorate:function(e){return e.toString()},fromICAL:function(e){var t=e.split("T");return(t[0]?_.date.fromICAL(t[0]):"")+(t[1]?"T"+_.time.fromICAL(t[1]):"")},toICAL:function(e){var t=e.split("T");return _.date.toICAL(t[0])+(t[1]?"T"+_.time.toICAL(t[1]):"")}},timestamp:v["date-time"],"language-tag":{matches:/^[a-zA-Z0-9-]+$/}}),b=t.helpers.extend(m,{adr:{defaultType:"text",structuredValue:";",multiValue:","},anniversary:f,bday:f,caladruri:c,caluri:c,clientpidmap:s,email:i,fburl:c,fn:i,gender:s,geo:c,impp:c,key:c,kind:i,lang:{defaultType:"language-tag"},logo:c,member:c,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:o,note:i,org:{defaultType:"text",structuredValue:";"},photo:c,related:c,rev:{defaultType:"timestamp"},role:i,sound:c,source:c,tel:{defaultType:"uri",allowedTypes:["uri","text"]},title:i,tz:{defaultType:"text",allowedTypes:["text","utc-offset","uri"]},xml:i}),E=t.helpers.extend(g,{binary:v.binary,date:_.date,"date-time":_["date-time"],"phone-number":{},uri:v.uri,text:v.text,time:v.time,vcard:v.text,"utc-offset":{toICAL:function(e){return e.substr(0,7)},fromICAL:function(e){return e.substr(0,7)},decorate:function(e){return t.UtcOffset.fromString(e)},undecorate:function(e){return e.toString()}}}),T=t.helpers.extend(m,{fn:i,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:o,photo:{defaultType:"binary",allowedTypes:["binary","uri"]},bday:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(e){return-1===e.indexOf("T")?"date":"date-time"}},adr:{defaultType:"text",structuredValue:";",multiValue:","},label:i,tel:{defaultType:"phone-number"},email:i,mailer:i,tz:{defaultType:"utc-offset",allowedTypes:["utc-offset","text"]},geo:{defaultType:"float",structuredValue:";"},title:i,role:i,logo:{defaultType:"binary",allowedTypes:["binary","uri"]},agent:{defaultType:"vcard",allowedTypes:["vcard","text","uri"]},org:s,note:o,prodid:i,rev:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(e){return-1===e.indexOf("T")?"date":"date-time"}},"sort-string":i,sound:{defaultType:"binary",allowedTypes:["binary","uri"]},class:i,key:{defaultType:"binary",allowedTypes:["binary","text"]}}),w={value:v,param:{cutype:{values:["INDIVIDUAL","GROUP","RESOURCE","ROOM","UNKNOWN"],allowXName:!0,allowIanaToken:!0},"delegated-from":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},"delegated-to":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},encoding:{values:["8BIT","BASE64"]},fbtype:{values:["FREE","BUSY","BUSY-UNAVAILABLE","BUSY-TENTATIVE"],allowXName:!0,allowIanaToken:!0},member:{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},partstat:{values:["NEEDS-ACTION","ACCEPTED","DECLINED","TENTATIVE","DELEGATED","COMPLETED","IN-PROCESS"],allowXName:!0,allowIanaToken:!0},range:{values:["THISANDFUTURE"]},related:{values:["START","END"]},reltype:{values:["PARENT","CHILD","SIBLING"],allowXName:!0,allowIanaToken:!0},role:{values:["REQ-PARTICIPANT","CHAIR","OPT-PARTICIPANT","NON-PARTICIPANT"],allowXName:!0,allowIanaToken:!0},rsvp:{values:["TRUE","FALSE"]},"sent-by":{valueType:"cal-address"},tzid:{matches:/^\//},value:{values:["binary","boolean","cal-address","date","date-time","duration","float","integer","period","recur","text","time","uri","utc-offset"],allowXName:!0,allowIanaToken:!0}},property:y},D={value:_,param:{type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","time","date-time","date-and-or-time","timestamp","boolean","integer","float","utc-offset","language-tag"],allowXName:!0,allowIanaToken:!0}},property:b},S={value:E,param:{type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","date-time","phone-number","time","boolean","integer","float","utc-offset","vcard","binary"],allowXName:!0,allowIanaToken:!0}},property:T},C={strict:!0,defaultSet:w,defaultType:"unknown",components:{vcard:D,vcard3:S,vevent:w,vtodo:w,vjournal:w,valarm:w,vtimezone:w,daylight:w,standard:w},icalendar:w,vcard:D,vcard3:S,getDesignSet:function(e){return e&&e in C.components?C.components[e]:C.defaultSet}};return C}(),t.stringify=function(){"use strict";var e="\r\n",n="unknown",r=t.design,i=t.helpers;function o(t){"string"==typeof t[0]&&(t=[t]);for(var n=0,r=t.length,i="";n0&&("version"!==t[1][0][0]||"4.0"!==t[1][0][3])&&(c="vcard3"),n=n||r.getDesignSet(c);l1)throw new i("invalid ical body. component began but did not end");return t=null,1==n.length?n[0]:n}i.prototype=Error.prototype,o.property=function(e,t){var r={component:[[],[]],designSet:t||n.defaultSet};return o._handleContentLine(e,r),r.component[1][0]},o.component=function(e){return o(e)},o.ParserError=i,o._handleContentLine=function(e,t){var r,s,a,l,u,c,d=e.indexOf(":"),h=e.indexOf(";"),f={};if(-1!==h&&-1!==d&&h>d&&(h=-1),-1!==h){if(a=e.substring(0,h).toLowerCase(),-1==(u=o._parseParameters(e.substring(h),0,t.designSet))[2])throw new i("Invalid parameters in '"+e+"'");if(f=u[0],r=u[1].length+u[2]+h,-1===(s=e.substring(r).indexOf(":")))throw new i("Missing parameter value in '"+e+"'");l=e.substring(r+s+1)}else{if(-1===d)throw new i('invalid line (no token ";" or ":") "'+e+'"');if(a=e.substring(0,d).toLowerCase(),l=e.substring(d+1),"begin"===a){var p=[l.toLowerCase(),[],[]];return 1===t.stack.length?t.component.push(p):t.component[2].push(p),t.stack.push(t.component),t.component=p,void(t.designSet||(t.designSet=n.getDesignSet(t.component[0])))}if("end"===a)return void(t.component=t.stack.pop())}var m,g,v=!1,y=!1;a in t.designSet.property&&("multiValue"in(m=t.designSet.property[a])&&(v=m.multiValue),"structuredValue"in m&&(y=m.structuredValue),l&&"detectType"in m&&(c=m.detectType(l))),c||(c="value"in f?f.value.toLowerCase():m?m.defaultType:"unknown"),delete f.value,v&&y?g=[a,f,c,l=o._parseMultiValue(l,y,c,[],v,t.designSet,y)]:v?(g=[a,f,c],o._parseMultiValue(l,v,c,g,null,t.designSet,!1)):g=y?[a,f,c,l=o._parseMultiValue(l,y,c,[],null,t.designSet,y)]:[a,f,c,l=o._parseValue(l,c,t.designSet,!1)],"vcard"!==t.component[0]||0!==t.component[1].length||"version"===a&&"4.0"===l||(t.designSet=n.getDesignSet("vcard3")),t.component[1].push(g)},o._parseValue=function(e,t,n,r){return t in n.value&&"fromICAL"in n.value[t]?n.value[t].fromICAL(e,r):e},o._parseParameters=function(e,t,n){for(var s,a,l,u,c,d,h=t,f=0,p={},m=-1;!1!==f&&-1!==(f=r.unescapedIndexOf(e,"=",f+1));){if(0==(s=e.substr(h+1,f-h-1)).length)throw new i("Empty parameter name in '"+e+"'");if(d=!1,c=!1,u=(a=s.toLowerCase())in n.param&&n.param[a].valueType?n.param[a].valueType:"text",a in n.param&&(c=n.param[a].multiValue,n.param[a].multiValueSeparateDQuote&&(d=o._rfc6868Escape('"'+c+'"'))),'"'===e[f+1]){if(m=f+2,f=r.unescapedIndexOf(e,'"',m),c&&-1!=f)for(var g=!0;g;)e[f+1]==c&&'"'==e[f+2]?f=r.unescapedIndexOf(e,'"',f+3):g=!1;if(-1===f)throw new i('invalid line (no matching double quote) "'+e+'"');l=e.substr(m,f-m),-1===(h=r.unescapedIndexOf(e,";",f))&&(f=!1)}else{m=f+1;var v=r.unescapedIndexOf(e,";",m),y=r.unescapedIndexOf(e,":",m);-1!==y&&v>y?(v=y,f=!1):-1===v?(v=-1===y?e.length:y,f=!1):(h=v,f=v),l=e.substr(m,v-m)}if(l=o._rfc6868Escape(l),c){var _=d||c;l=o._parseMultiValue(l,_,u,[],null,n)}else l=o._parseValue(l,u,n);c&&a in p?Array.isArray(p[a])?p[a].push(l):p[a]=[p[a],l]:p[a]=l}return[p,l,m]},o._rfc6868Escape=function(e){return e.replace(/\^['n^]/g,(function(e){return s[e]}))};var s={"^'":'"',"^n":"\n","^^":"^"};return o._parseMultiValue=function(e,t,n,i,s,a,l){var u,c=0,d=0;if(0===t.length)return e;for(;-1!==(c=r.unescapedIndexOf(e,t,d));)u=e.substr(d,c-d),u=s?o._parseMultiValue(u,s,n,[],null,a,l):o._parseValue(u,n,a,l),i.push(u),d=c+t.length;return u=e.substr(d),u=s?o._parseMultiValue(u,s,n,[],null,a,l):o._parseValue(u,n,a,l),i.push(u),1==i.length?i[0]:i},o._eachLine=function(t,n){var r,i,o,s=t.length,a=t.search(e),l=a;do{o=(l=t.indexOf("\n",a)+1)>1&&"\r"===t[l-2]?2:1,0===l&&(l=s,o=0)," "===(i=t[a])||"\t"===i?r+=t.substr(a+1,l-a-(o+1)):(r&&n(null,r),r=t.substr(a,l-a-o)),a=l}while(l!==s);(r=r.trim()).length&&n(null,r)},o}(),t.Component=function(){"use strict";function e(e,t){"string"==typeof e&&(e=[e,[],[]]),this.jCal=e,this.parent=t||null}return e.prototype={_hydratedPropertyCount:0,_hydratedComponentCount:0,get name(){return this.jCal[0]},get _designSet(){return this.parent&&this.parent._designSet||t.design.getDesignSet(this.name)},_hydrateComponent:function(t){if(this._components||(this._components=[],this._hydratedComponentCount=0),this._components[t])return this._components[t];var n=new e(this.jCal[2][t],this);return this._hydratedComponentCount++,this._components[t]=n},_hydrateProperty:function(e){if(this._properties||(this._properties=[],this._hydratedPropertyCount=0),this._properties[e])return this._properties[e];var n=new t.Property(this.jCal[1][e],this);return this._hydratedPropertyCount++,this._properties[e]=n},getFirstSubcomponent:function(e){if(e)for(var t=0,n=this.jCal[2],r=n.length;t=0;o--)n&&i[o][0]!==n||this._removeObjectByIndex(e,r,o)},addSubcomponent:function(e){this._components||(this._components=[],this._hydratedComponentCount=0),e.parent&&e.parent.removeSubcomponent(e);var t=this.jCal[2].push(e.jCal);return this._components[t-1]=e,this._hydratedComponentCount++,e.parent=this,e},removeSubcomponent:function(e){var t=this._removeObject(2,"_components",e);return t&&this._hydratedComponentCount--,t},removeAllSubcomponents:function(e){var t=this._removeAllObjects(2,"_components",e);return this._hydratedComponentCount=0,t},addProperty:function(e){if(!(e instanceof t.Property))throw new TypeError("must instance of ICAL.Property");this._properties||(this._properties=[],this._hydratedPropertyCount=0),e.parent&&e.parent.removeProperty(e);var n=this.jCal[1].push(e.jCal);return this._properties[n-1]=e,this._hydratedPropertyCount++,e.parent=this,e},addPropertyWithValue:function(e,n){var r=new t.Property(e);return r.setValue(n),this.addProperty(r),r},updatePropertyWithValue:function(e,t){var n=this.getFirstProperty(e);return n?n.setValue(t):n=this.addPropertyWithValue(e,t),n},removeProperty:function(e){var t=this._removeObject(1,"_properties",e);return t&&this._hydratedPropertyCount--,t},removeAllProperties:function(e){var t=this._removeAllObjects(1,"_properties",e);return this._hydratedPropertyCount=0,t},toJSON:function(){return this.jCal},toString:function(){return t.stringify.component(this.jCal,this._designSet)}},e.fromString=function(n){return new e(t.parse.component(n))},e}(),t.Property=function(){"use strict";var e=t.design;function n(t,n){this._parent=n||null,"string"==typeof t?(this.jCal=[t,{},e.defaultType],this.jCal[2]=this.getDefaultType()):this.jCal=t,this._updateType()}return n.prototype={get type(){return this.jCal[2]},get name(){return this.jCal[0]},get parent(){return this._parent},set parent(t){var n=!this._parent||t&&t._designSet!=this._parent._designSet;return this._parent=t,this.type==e.defaultType&&n&&(this.jCal[2]=this.getDefaultType(),this._updateType()),t},get _designSet(){return this.parent?this.parent._designSet:e.defaultSet},_updateType:function(){var e=this._designSet;if(this.type in e.value){e.value[this.type];"decorate"in e.value[this.type]?this.isDecorated=!0:this.isDecorated=!1,this.name in e.property&&(this.isMultiValue="multiValue"in e.property[this.name],this.isStructuredValue="structuredValue"in e.property[this.name])}},_hydrateValue:function(e){return this._values&&this._values[e]?this._values[e]:this.jCal.length<=3+e?null:this.isDecorated?(this._values||(this._values=[]),this._values[e]=this._decorate(this.jCal[3+e])):this.jCal[3+e]},_decorate:function(e){return this._designSet.value[this.type].decorate(e,this)},_undecorate:function(e){return this._designSet.value[this.type].undecorate(e,this)},_setDecoratedValue:function(e,t){this._values||(this._values=[]),"object"==typeof e&&"icaltype"in e?(this.jCal[3+t]=this._undecorate(e),this._values[t]=e):(this.jCal[3+t]=e,this._values[t]=this._decorate(e))},getParameter:function(e){return e in this.jCal[1]?this.jCal[1][e]:void 0},getFirstParameter:function(e){var t=this.getParameter(e);return Array.isArray(t)?t[0]:t},setParameter:function(e,t){var n=e.toLowerCase();"string"==typeof t&&n in this._designSet.param&&"multiValue"in this._designSet.param[n]&&(t=[t]),this.jCal[1][e]=t},removeParameter:function(e){delete this.jCal[1][e]},getDefaultType:function(){var t=this.jCal[0],n=this._designSet;if(t in n.property){var r=n.property[t];if("defaultType"in r)return r.defaultType}return e.defaultType},resetType:function(e){this.removeAllValues(),this.jCal[2]=e,this._updateType()},getFirstValue:function(){return this._hydrateValue(0)},getValues:function(){var e=this.jCal.length-3;if(e<1)return[];for(var t=0,n=[];t0&&"object"==typeof e[0]&&"icaltype"in e[0]&&this.resetType(e[0].icaltype),this.isDecorated)for(;nn)-(n>t)},_normalize:function(){for(var e=this.toSeconds(),t=this.factor;e<-43200;)e+=97200;for(;e>50400;)e-=97200;this.fromSeconds(e),0==e&&(this.factor=t)},toICALString:function(){return t.design.icalendar.value["utc-offset"].toICAL(this.toString())},toString:function(){return(1==this.factor?"+":"-")+t.helpers.pad2(this.hours)+":"+t.helpers.pad2(this.minutes)}},e.fromString=function(e){var n={};return n.factor="+"===e[0]?1:-1,n.hours=t.helpers.strictParseInt(e.substr(1,2)),n.minutes=t.helpers.strictParseInt(e.substr(4,2)),new t.UtcOffset(n)},e.fromSeconds=function(t){var n=new e;return n.fromSeconds(t),n},e}(),t.Binary=function(){function e(e){this.value=e}return e.prototype={icaltype:"binary",decodeValue:function(){return this._b64_decode(this.value)},setEncodedValue:function(e){this.value=this._b64_encode(e)},_b64_encode:function(e){var t,n,r,i,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,l=0,u="",c=[];if(!e)return e;do{t=(o=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,c[l++]=s.charAt(t)+s.charAt(n)+s.charAt(r)+s.charAt(i)}while(a>16&255,n=s>>8&255,r=255&s,c[u++]=64==i?String.fromCharCode(t):64==o?String.fromCharCode(t,n):String.fromCharCode(t,n,r)}while(ln)-(t=0?i=r:o=-1,-1==o&&-1!=i)break;if((r+=o)<0)return 0;if(r>=this.changes.length)break}var a=this.changes[i];if(a.utcOffset-a.prevUtcOffset<0&&i>0){var l=t.helpers.clone(a,!0);if(t.Timezone.adjust_change(l,0,0,0,l.prevUtcOffset),t.Timezone._compare_change_fn(n,l)<0){var u=this.changes[i-1];0!=a.is_daylight&&0==u.is_daylight&&(a=u)}}return a.utcOffset},_findNearbyChange:function(e){var n=t.helpers.binsearchInsert(this.changes,e,t.Timezone._compare_change_fn);return n>=this.changes.length?this.changes.length-1:n},_ensureCoverage:function(e){if(-1==t.Timezone._minimumExpansionYear){var n=t.Time.now();t.Timezone._minimumExpansionYear=n.year}var r=e;if(rt.Timezone.MAX_YEAR&&(r=t.Timezone.MAX_YEAR),!this.changes.length||this.expandedUntilYearn)&&h);)i.year=h.year,i.month=h.month,i.day=h.day,i.hour=h.hour,i.minute=h.minute,i.second=h.second,i.isDate=h.isDate,t.Timezone.adjust_change(i,0,0,0,-i.prevUtcOffset),r.push(i)}}else(i=a()).year=o.year,i.month=o.month,i.day=o.day,i.hour=o.hour,i.minute=o.minute,i.second=o.second,t.Timezone.adjust_change(i,0,0,0,-i.prevUtcOffset),r.push(i);return r},toString:function(){return this.tznames?this.tznames:this.tzid}},t.Timezone._compare_change_fn=function(e,t){return e.yeart.year?1:e.montht.month?1:e.dayt.day?1:e.hourt.hour?1:e.minutet.minute?1:e.secondt.second?1:0},t.Timezone.convert_time=function(e,n,r){if(e.isDate||n.tzid==r.tzid||n==t.Timezone.localTimezone||r==t.Timezone.localTimezone)return e.zone=r,e;var i=n.utcOffset(e);return e.adjust(0,0,0,-i),i=r.utcOffset(e),e.adjust(0,0,0,i),null},t.Timezone.fromData=function(e){return(new t.Timezone).fromData(e)},t.Timezone.utcTimezone=t.Timezone.fromData({tzid:"UTC"}),t.Timezone.localTimezone=t.Timezone.fromData({tzid:"floating"}),t.Timezone.adjust_change=function(e,n,r,i,o){return t.Time.prototype.adjust.call(e,n,r,i,o,e)},t.Timezone._minimumExpansionYear=-1,t.Timezone.MAX_YEAR=2035,t.Timezone.EXTRA_COVERAGE=5,t.TimezoneService=((i={get count(){return Object.keys(r).length},reset:function(){r=Object.create(null);var e=t.Timezone.utcTimezone;r.Z=e,r.UTC=e,r.GMT=e},has:function(e){return!!r[e]},get:function(e){return r[e]},register:function(e,n){if(e instanceof t.Component&&"vtimezone"===e.name&&(e=(n=new t.Timezone(e)).tzid),!(n instanceof t.Timezone))throw new TypeError("timezone must be ICAL.Timezone or ICAL.Component");r[e]=n},remove:function(e){return delete r[e]}}).reset(),i),t.Time=function(e,t){this.wrappedJSObject=this;var n=this._time=Object.create(null);n.year=0,n.month=1,n.day=1,n.hour=0,n.minute=0,n.second=0,n.isDate=!1,this.fromData(e,t)},t.Time._dowCache={},t.Time._wnCache={},t.Time.prototype={icalclass:"icaltime",_cachedUnixTime:null,get icaltype(){return this.isDate?"date":"date-time"},zone:null,_pendingNormalization:!1,clone:function(){return new t.Time(this._time,this.zone)},reset:function(){this.fromData(t.Time.epochTime),this.zone=t.Timezone.utcTimezone},resetTo:function(e,t,n,r,i,o,s){this.fromData({year:e,month:t,day:n,hour:r,minute:i,second:o,zone:s})},fromJSDate:function(e,n){return e?n?(this.zone=t.Timezone.utcTimezone,this.year=e.getUTCFullYear(),this.month=e.getUTCMonth()+1,this.day=e.getUTCDate(),this.hour=e.getUTCHours(),this.minute=e.getUTCMinutes(),this.second=e.getUTCSeconds()):(this.zone=t.Timezone.localTimezone,this.year=e.getFullYear(),this.month=e.getMonth()+1,this.day=e.getDate(),this.hour=e.getHours(),this.minute=e.getMinutes(),this.second=e.getSeconds()):this.reset(),this._cachedUnixTime=null,this},fromData:function(e,n){if(e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if("icaltype"===r)continue;this[r]=e[r]}if(n&&(this.zone=n),e&&!("isDate"in e)?this.isDate=!("hour"in e):e&&"isDate"in e&&(this.isDate=e.isDate),e&&"timezone"in e){var i=t.TimezoneService.get(e.timezone);this.zone=i||t.Timezone.localTimezone}return e&&"zone"in e&&(this.zone=e.zone),this.zone||(this.zone=t.Timezone.localTimezone),this._cachedUnixTime=null,this},dayOfWeek:function(e){var n=e||t.Time.SUNDAY,r=(this.year<<12)+(this.month<<8)+(this.day<<3)+n;if(r in t.Time._dowCache)return t.Time._dowCache[r];var i=this.day,o=this.month+(this.month<3?12:0),s=this.year-(this.month<3?1:0),a=i+s+t.helpers.trunc(26*(o+1)/10)+t.helpers.trunc(s/4);return a=((a+=6*t.helpers.trunc(s/100)+t.helpers.trunc(s/400))+7-n)%7+1,t.Time._dowCache[r]=a,a},dayOfYear:function(){var e=t.Time.isLeapYear(this.year)?1:0;return t.Time.daysInYearPassedMonth[e][this.month-1]+this.day},startOfWeek:function(e){var n=e||t.Time.SUNDAY,r=this.clone();return r.day-=(this.dayOfWeek()+7-n)%7,r.isDate=!0,r.hour=0,r.minute=0,r.second=0,r},endOfWeek:function(e){var n=e||t.Time.SUNDAY,r=this.clone();return r.day+=(7-this.dayOfWeek()+n-t.Time.SUNDAY)%7,r.isDate=!0,r.hour=0,r.minute=0,r.second=0,r},startOfMonth:function(){var e=this.clone();return e.day=1,e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e},endOfMonth:function(){var e=this.clone();return e.day=t.Time.daysInMonth(e.month,e.year),e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e},startOfYear:function(){var e=this.clone();return e.day=1,e.month=1,e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e},endOfYear:function(){var e=this.clone();return e.day=31,e.month=12,e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e},startDoyWeek:function(e){var n=e||t.Time.SUNDAY,r=this.dayOfWeek()-n;return r<0&&(r+=7),this.dayOfYear()-r},getDominicalLetter:function(){return t.Time.getDominicalLetter(this.year)},nthWeekDay:function(e,n){var r,i=t.Time.daysInMonth(this.month,this.year),o=n,s=0,a=this.clone();if(o>=0){a.day=1,0!=o&&o--,s=a.day;var l=e-a.dayOfWeek();l<0&&(l+=7),s+=l,s-=e,r=e}else a.day=i,o++,(r=a.dayOfWeek()-e)<0&&(r+=7),r=i-r;return s+(r+=7*o)},isNthWeekDay:function(e,t){var n=this.dayOfWeek();return 0===t&&n===e||this.nthWeekDay(e,t)===this.day},weekNumber:function(e){var n,r=(this.year<<12)+(this.month<<8)+(this.day<<3)+e;if(r in t.Time._wnCache)return t.Time._wnCache[r];var i=this.clone();i.isDate=!0;var o=this.year;12==i.month&&i.day>25?(n=t.Time.weekOneStarts(o+1,e),i.compare(n)<0?n=t.Time.weekOneStarts(o,e):o++):(n=t.Time.weekOneStarts(o,e),i.compare(n)<0&&(n=t.Time.weekOneStarts(--o,e)));var s=i.subtractDate(n).toSeconds()/86400,a=t.helpers.trunc(s/7)+1;return t.Time._wnCache[r]=a,a},addDuration:function(e){var t=e.isNegative?-1:1,n=this.second,r=this.minute,i=this.hour,o=this.day;n+=t*e.seconds,r+=t*e.minutes,i+=t*e.hours,o+=t*e.days,o+=7*t*e.weeks,this.second=n,this.minute=r,this.hour=i,this.day=o,this._cachedUnixTime=null},subtractDate:function(e){var n=this.toUnixTime()+this.utcOffset(),r=e.toUnixTime()+e.utcOffset();return t.Duration.fromSeconds(n-r)},subtractDateTz:function(e){var n=this.toUnixTime(),r=e.toUnixTime();return t.Duration.fromSeconds(n-r)},compare:function(e){var t=this.toUnixTime(),n=e.toUnixTime();return t>n?1:n>t?-1:0},compareDateOnlyTz:function(e,n){function r(e){return t.Time._cmp_attr(i,o,e)}var i=this.convertToZone(n),o=e.convertToZone(n),s=0;return 0!=(s=r("year"))||0!=(s=r("month"))||(s=r("day")),s},convertToZone:function(e){var n=this.clone(),r=this.zone.tzid==e.tzid;return this.isDate||r||t.Timezone.convert_time(n,this.zone,e),n.zone=e,n},utcOffset:function(){return this.zone==t.Timezone.localTimezone||this.zone==t.Timezone.utcTimezone?0:this.zone.utcOffset(this)},toICALString:function(){var e=this.toString();return e.length>10?t.design.icalendar.value["date-time"].toICAL(e):t.design.icalendar.value.date.toICAL(e)},toString:function(){var e=this.year+"-"+t.helpers.pad2(this.month)+"-"+t.helpers.pad2(this.day);return this.isDate||(e+="T"+t.helpers.pad2(this.hour)+":"+t.helpers.pad2(this.minute)+":"+t.helpers.pad2(this.second),this.zone===t.Timezone.utcTimezone&&(e+="Z")),e},toJSDate:function(){return this.zone==t.Timezone.localTimezone?this.isDate?new Date(this.year,this.month-1,this.day):new Date(this.year,this.month-1,this.day,this.hour,this.minute,this.second,0):new Date(1e3*this.toUnixTime())},_normalize:function(){return this._time.isDate,this._time.isDate&&(this._time.hour=0,this._time.minute=0,this._time.second=0),this.adjust(0,0,0,0),this},adjust:function(e,n,r,i,o){var s,a,l,u,c,d,h,f=0,p=0,m=o||this._time;if(m.isDate||(l=m.second+i,m.second=l%60,s=t.helpers.trunc(l/60),m.second<0&&(m.second+=60,s--),u=m.minute+r+s,m.minute=u%60,a=t.helpers.trunc(u/60),m.minute<0&&(m.minute+=60,a--),c=m.hour+n+a,m.hour=c%24,f=t.helpers.trunc(c/24),m.hour<0&&(m.hour+=24,f--)),m.month>12?p=t.helpers.trunc((m.month-1)/12):m.month<1&&(p=t.helpers.trunc(m.month/12)-1),m.year+=p,m.month-=12*p,(d=m.day+e+f)>0)for(;!(d<=(h=t.Time.daysInMonth(m.month,m.year)));)m.month++,m.month>12&&(m.year++,m.month=1),d-=h;else for(;d<=0;)1==m.month?(m.year--,m.month=12):m.month--,d+=t.Time.daysInMonth(m.month,m.year);return m.day=d,this._cachedUnixTime=null,this},fromUnixTime:function(e){this.zone=t.Timezone.utcTimezone;var n=t.Time.epochTime.clone();n.adjust(0,0,0,e),this.year=n.year,this.month=n.month,this.day=n.day,this.hour=n.hour,this.minute=n.minute,this.second=Math.floor(n.second),this._cachedUnixTime=null},toUnixTime:function(){if(null!==this._cachedUnixTime)return this._cachedUnixTime;var e=this.utcOffset(),t=Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second-e);return this._cachedUnixTime=t/1e3,this._cachedUnixTime},toJSON:function(){for(var e,t=["year","month","day","hour","minute","second","isDate"],n=Object.create(null),r=0,i=t.length;r12||(r=[0,31,28,31,30,31,30,31,31,30,31,30,31][e],2==e&&(r+=t.Time.isLeapYear(n))),r},t.Time.isLeapYear=function(e){return e<=1752?e%4==0:e%4==0&&e%100!=0||e%400==0},t.Time.fromDayOfYear=function(e,n){var r=n,i=e,o=new t.Time;o.auto_normalize=!1;var s=t.Time.isLeapYear(r)?1:0;if(i<1)return r--,s=t.Time.isLeapYear(r)?1:0,i+=t.Time.daysInYearPassedMonth[s][12],t.Time.fromDayOfYear(i,r);if(i>t.Time.daysInYearPassedMonth[s][12])return s=t.Time.isLeapYear(r)?1:0,i-=t.Time.daysInYearPassedMonth[s][12],r++,t.Time.fromDayOfYear(i,r);o.year=r,o.isDate=!0;for(var a=11;a>=0;a--)if(i>t.Time.daysInYearPassedMonth[s][a]){o.month=a+1,o.day=i-t.Time.daysInYearPassedMonth[s][a];break}return o.auto_normalize=!0,o},t.Time.fromStringv2=function(e){return new t.Time({year:parseInt(e.substr(0,4),10),month:parseInt(e.substr(5,2),10),day:parseInt(e.substr(8,2),10),isDate:!0})},t.Time.fromDateString=function(e){return new t.Time({year:t.helpers.strictParseInt(e.substr(0,4)),month:t.helpers.strictParseInt(e.substr(5,2)),day:t.helpers.strictParseInt(e.substr(8,2)),isDate:!0})},t.Time.fromDateTimeString=function(e,n){if(e.length<19)throw new Error('invalid date-time value: "'+e+'"');var r;return e[19]&&"Z"===e[19]?r="Z":n&&(r=n.getParameter("tzid")),new t.Time({year:t.helpers.strictParseInt(e.substr(0,4)),month:t.helpers.strictParseInt(e.substr(5,2)),day:t.helpers.strictParseInt(e.substr(8,2)),hour:t.helpers.strictParseInt(e.substr(11,2)),minute:t.helpers.strictParseInt(e.substr(14,2)),second:t.helpers.strictParseInt(e.substr(17,2)),timezone:r})},t.Time.fromString=function(e,n){return e.length>10?t.Time.fromDateTimeString(e,n):t.Time.fromDateString(e)},t.Time.fromJSDate=function(e,n){return(new t.Time).fromJSDate(e,n)},t.Time.fromData=function(e,n){return(new t.Time).fromData(e,n)},t.Time.now=function(){return t.Time.fromJSDate(new Date,!1)},t.Time.weekOneStarts=function(e,n){var r=t.Time.fromData({year:e,month:1,day:1,isDate:!0}),i=r.dayOfWeek(),o=n||t.Time.DEFAULT_WEEK_START;return i>t.Time.THURSDAY&&(r.day+=7),o>t.Time.THURSDAY&&(r.day-=7),r.day-=i-o,r},t.Time.getDominicalLetter=function(e){var n="GFEDCBA",r=(e+(e/4|0)+(e/400|0)-(e/100|0)-1)%7;return t.Time.isLeapYear(e)?n[(r+6)%7]+n[r]:n[r]},t.Time.epochTime=t.Time.fromData({year:1970,month:1,day:1,hour:0,minute:0,second:0,isDate:!1,timezone:"Z"}),t.Time._cmp_attr=function(e,t,n){return e[n]>t[n]?1:e[n]4?r(u,f?1:3,2):null,second:4==d?r(u,2,2):6==d?r(u,4,2):8==d?r(u,6,2):null};return l="Z"==l?t.Timezone.utcTimezone:l&&":"==l[3]?t.UtcOffset.fromString(l):null,new t.VCardTime(p,l,n)},function(){var e={SU:t.Time.SUNDAY,MO:t.Time.MONDAY,TU:t.Time.TUESDAY,WE:t.Time.WEDNESDAY,TH:t.Time.THURSDAY,FR:t.Time.FRIDAY,SA:t.Time.SATURDAY},n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);function i(e,n,r,i){var o=i;if("+"===i[0]&&(o=i.substr(1)),o=t.helpers.strictParseInt(o),void 0!==n&&i '+n);if(void 0!==r&&i>r)throw new Error(e+': invalid value "'+i+'" must be < '+n);return o}t.Recur=function(e){this.wrappedJSObject=this,this.parts={},e&&"object"==typeof e&&this.fromData(e)},t.Recur.prototype={parts:null,interval:1,wkst:t.Time.MONDAY,until:null,count:null,freq:null,icalclass:"icalrecur",icaltype:"recur",iterator:function(e){return new t.RecurIterator({rule:this,dtstart:e})},clone:function(){return new t.Recur(this.toJSON())},isFinite:function(){return!(!this.count&&!this.until)},isByCount:function(){return!(!this.count||this.until)},addComponent:function(e,t){var n=e.toUpperCase();n in this.parts?this.parts[n].push(t):this.parts[n]=[t]},setComponent:function(e,t){this.parts[e.toUpperCase()]=t.slice()},getComponent:function(e){var t=e.toUpperCase();return t in this.parts?this.parts[t].slice():[]},getNextOccurrence:function(e,t){var n,r=this.iterator(e);do{n=r.next()}while(n&&n.compare(t)<=0);return n&&t.zone&&(n.zone=t.zone),n},fromData:function(e){for(var n in e){var r=n.toUpperCase();r in u?Array.isArray(e[n])?this.parts[r]=e[n]:this.parts[r]=[e[n]]:this[n]=e[n]}this.interval&&"number"!=typeof this.interval&&l.INTERVAL(this.interval,this),this.wkst&&"number"!=typeof this.wkst&&(this.wkst=t.Recur.icalDayToNumericDay(this.wkst)),!this.until||this.until instanceof t.Time||(this.until=t.Time.fromString(this.until))},toJSON:function(){var e=Object.create(null);for(var n in e.freq=this.freq,this.count&&(e.count=this.count),this.interval>1&&(e.interval=this.interval),this.parts)if(this.parts.hasOwnProperty(n)){var r=this.parts[n];Array.isArray(r)&&1==r.length?e[n.toLowerCase()]=r[0]:e[n.toLowerCase()]=t.helpers.clone(this.parts[n])}return this.until&&(e.until=this.until.toString()),"wkst"in this&&this.wkst!==t.Time.DEFAULT_WEEK_START&&(e.wkst=t.Recur.numericDayToIcalDay(this.wkst)),e},toString:function(){var e="FREQ="+this.freq;for(var n in this.count&&(e+=";COUNT="+this.count),this.interval>1&&(e+=";INTERVAL="+this.interval),this.parts)this.parts.hasOwnProperty(n)&&(e+=";"+n+"="+this.parts[n]);return this.until&&(e+=";UNTIL="+this.until.toICALString()),"wkst"in this&&this.wkst!==t.Time.DEFAULT_WEEK_START&&(e+=";WKST="+t.Recur.numericDayToIcalDay(this.wkst)),e}},t.Recur.icalDayToNumericDay=function(n,r){var i=r||t.Time.SUNDAY;return(e[n]-i+7)%7+1},t.Recur.numericDayToIcalDay=function(e,r){var i=e+(r||t.Time.SUNDAY)-t.Time.SUNDAY;return i>7&&(i-=7),n[i]};var o=/^(SU|MO|TU|WE|TH|FR|SA)$/,s=/^([+-])?(5[0-3]|[1-4][0-9]|[1-9])?(SU|MO|TU|WE|TH|FR|SA)$/,a=["SECONDLY","MINUTELY","HOURLY","DAILY","WEEKLY","MONTHLY","YEARLY"],l={FREQ:function(e,t,n){if(-1===a.indexOf(e))throw new Error('invalid frequency "'+e+'" expected: "'+a.join(", ")+'"');t.freq=e},COUNT:function(e,n,r){n.count=t.helpers.strictParseInt(e)},INTERVAL:function(e,n,r){n.interval=t.helpers.strictParseInt(e),n.interval<1&&(n.interval=1)},UNTIL:function(e,n,r){e.length>10?n.until=t.design.icalendar.value["date-time"].fromICAL(e):n.until=t.design.icalendar.value.date.fromICAL(e),r||(n.until=t.Time.fromString(n.until))},WKST:function(e,n,r){if(!o.test(e))throw new Error('invalid WKST value "'+e+'"');n.wkst=t.Recur.icalDayToNumericDay(e)}},u={BYSECOND:i.bind(this,"BYSECOND",0,60),BYMINUTE:i.bind(this,"BYMINUTE",0,59),BYHOUR:i.bind(this,"BYHOUR",0,23),BYDAY:function(e){if(s.test(e))return e;throw new Error('invalid BYDAY value "'+e+'"')},BYMONTHDAY:i.bind(this,"BYMONTHDAY",-31,31),BYYEARDAY:i.bind(this,"BYYEARDAY",-366,366),BYWEEKNO:i.bind(this,"BYWEEKNO",-53,53),BYMONTH:i.bind(this,"BYMONTH",1,12),BYSETPOS:i.bind(this,"BYSETPOS",-366,366)};t.Recur.fromString=function(e){var n=t.Recur._stringToData(e,!1);return new t.Recur(n)},t.Recur.fromData=function(e){return new t.Recur(e)},t.Recur._stringToData=function(e,t){for(var n=Object.create(null),r=e.split(";"),i=r.length,o=0;o=0||r<0)&&(this.last.day+=r)}else{var i=t.Recur.numericDayToIcalDay(this.dtstart.dayOfWeek());e.BYDAY=[i]}if("YEARLY"==this.rule.freq){for(;this.expand_year_days(this.last.year),!(this.days.length>0);)this.increment_year(this.rule.interval);this._nextByYearDay()}if("MONTHLY"==this.rule.freq&&this.has_by_data("BYDAY")){var o=null,s=this.last.clone(),a=t.Time.daysInMonth(this.last.month,this.last.year);for(var l in this.by_data.BYDAY)if(this.by_data.BYDAY.hasOwnProperty(l)){this.last=s.clone();n=(u=this.ruleDayOfWeek(this.by_data.BYDAY[l]))[0];var u,c=u[1],d=this.last.nthWeekDay(c,n);if(n>=6||n<=-6)throw new Error("Malformed values in BYDAY part");if(d>a||d<=0){if(o&&o.month==s.month)continue;for(;d>a||d<=0;)this.increment_month(),a=t.Time.daysInMonth(this.last.month,this.last.year),d=this.last.nthWeekDay(c,n)}this.last.day=d,(!o||this.last.compare(o)<0)&&(o=this.last.clone())}if(this.last=o.clone(),this.has_by_data("BYMONTHDAY")&&this._byDayAndMonthDay(!0),this.last.day>a||0==this.last.day)throw new Error("Malformed values in BYDAY part")}else if(this.has_by_data("BYMONTHDAY")&&this.last.day<0){a=t.Time.daysInMonth(this.last.month,this.last.year);this.last.day=a+this.last.day+1}},next:function(){var e,t=this.last?this.last.clone():null;if(this.rule.count&&this.occurrence_number>=this.rule.count||this.rule.until&&this.last.compare(this.rule.until)>0)return this.completed=!0,null;if(0==this.occurrence_number&&this.last.compare(this.dtstart)>=0)return this.occurrence_number++,this.last;do{switch(e=1,this.rule.freq){case"SECONDLY":this.next_second();break;case"MINUTELY":this.next_minute();break;case"HOURLY":this.next_hour();break;case"DAILY":this.next_day();break;case"WEEKLY":this.next_week();break;case"MONTHLY":e=this.next_month();break;case"YEARLY":this.next_year();break;default:return null}}while(!this.check_contracting_rules()||this.last.compare(this.dtstart)<0||!e);if(0==this.last.compare(t))throw new Error("Same occurrence found twice, protecting you from death by recursion");return this.rule.until&&this.last.compare(this.rule.until)>0?(this.completed=!0,null):(this.occurrence_number++,this.last)},next_second:function(){return this.next_generic("BYSECOND","SECONDLY","second","minute")},increment_second:function(e){return this.increment_generic(e,"second",60,"minute")},next_minute:function(){return this.next_generic("BYMINUTE","MINUTELY","minute","hour","next_second")},increment_minute:function(e){return this.increment_generic(e,"minute",60,"hour")},next_hour:function(){return this.next_generic("BYHOUR","HOURLY","hour","monthday","next_minute")},increment_hour:function(e){this.increment_generic(e,"hour",24,"monthday")},next_day:function(){this.by_data;var e="DAILY"==this.rule.freq;return 0==this.next_hour()||(e?this.increment_monthday(this.rule.interval):this.increment_monthday(1)),0},next_week:function(){var e=0;if(0==this.next_weekday_by_week())return e;if(this.has_by_data("BYWEEKNO")){++this.by_indices.BYWEEKNO;this.by_indices.BYWEEKNO==this.by_data.BYWEEKNO.length&&(this.by_indices.BYWEEKNO=0,e=1),this.last.month=1,this.last.day=1;var t=this.by_data.BYWEEKNO[this.by_indices.BYWEEKNO];this.last.day+=7*t,e&&this.increment_year(1)}else this.increment_monthday(7*this.rule.interval);return e},normalizeByMonthDayRules:function(e,n,r){for(var i,o=t.Time.daysInMonth(n,e),s=[],a=0,l=r.length;ao)){if(i<0)i=o+(i+1);else if(0===i)continue;-1===s.indexOf(i)&&s.push(i)}return s.sort((function(e,t){return e-t}))},_byDayAndMonthDay:function(e){var n,r,i,o,s=this.by_data.BYDAY,a=0,l=s.length,u=0,c=this,d=this.last.day;function h(){for(o=t.Time.daysInMonth(c.last.month,c.last.year),n=c.normalizeByMonthDayRules(c.last.year,c.last.month,c.by_data.BYMONTHDAY),i=n.length;n[a]<=d&&(!e||n[a]!=d)&&ao)f();else{var m=n[a++];if(m>=r){d=m;for(var g=0;gn&&(this.last.day=1,this.increment_month(),this.is_day_in_byday(this.last)?this.has_by_data("BYSETPOS")&&!this.check_set_position(1)||(e=1):e=0)}else if(this.has_by_data("BYMONTHDAY")){this.by_indices.BYMONTHDAY++,this.by_indices.BYMONTHDAY>=this.by_data.BYMONTHDAY.length&&(this.by_indices.BYMONTHDAY=0,this.increment_month());n=t.Time.daysInMonth(this.last.month,this.last.year);(s=this.by_data.BYMONTHDAY[this.by_indices.BYMONTHDAY])<0&&(s=n+s+1),s>n?(this.last.day=1,e=this.is_day_in_byday(this.last)):this.last.day=s}else{this.increment_month();n=t.Time.daysInMonth(this.last.month,this.last.year);this.by_data.BYMONTHDAY[0]>n?e=0:this.last.day=this.by_data.BYMONTHDAY[0]}return e},next_weekday_by_week:function(){var e=0;if(0==this.next_hour())return e;if(!this.has_by_data("BYDAY"))return 1;for(;;){var n=new t.Time;this.by_indices.BYDAY++,this.by_indices.BYDAY==Object.keys(this.by_data.BYDAY).length&&(this.by_indices.BYDAY=0,e=1);var r=this.by_data.BYDAY[this.by_indices.BYDAY],i=this.ruleDayOfWeek(r)[1];(i-=this.rule.wkst)<0&&(i+=7),n.year=this.last.year,n.month=this.last.month,n.day=this.last.day;var o=n.startDoyWeek(this.rule.wkst);if(!(i+o<1)||e){var s=t.Time.fromDayOfYear(o+i,this.last.year);return this.last.year=s.year,this.last.month=s.month,this.last.day=s.day,e}}},next_year:function(){if(0==this.next_hour())return 0;if(++this.days_index==this.days.length){this.days_index=0;do{this.increment_year(this.rule.interval),this.expand_year_days(this.last.year)}while(0==this.days.length)}return this._nextByYearDay(),1},_nextByYearDay:function(){var e=this.days[this.days_index],n=this.last.year;e<1&&(e+=1,n+=1);var r=t.Time.fromDayOfYear(e,n);this.last.day=r.day,this.last.month=r.month},ruleDayOfWeek:function(e,n){var r=e.match(/([+-]?[0-9])?(MO|TU|WE|TH|FR|SA|SU)/);return r?[parseInt(r[1]||0,10),e=t.Recur.icalDayToNumericDay(r[2],n)]:[0,0]},next_generic:function(e,t,n,r,i){var o=e in this.by_data,s=this.rule.freq==t,a=0;if(i&&0==this[i]())return a;if(o){this.by_indices[e]++;this.by_indices[e];var l=this.by_data[e];this.by_indices[e]==l.length&&(this.by_indices[e]=0,a=1),this.last[n]=l[this.by_indices[e]]}else s&&this["increment_"+n](this.rule.interval);return o&&a&&s&&this["increment_"+r](1),a},increment_monthday:function(e){for(var n=0;nr&&(this.last.day-=r,this.increment_month())}},increment_month:function(){if(this.last.day=1,this.has_by_data("BYMONTH"))this.by_indices.BYMONTH++,this.by_indices.BYMONTH==this.by_data.BYMONTH.length&&(this.by_indices.BYMONTH=0,this.increment_year(1)),this.last.month=this.by_data.BYMONTH[this.by_indices.BYMONTH];else{"MONTHLY"==this.rule.freq?this.last.month+=this.rule.interval:this.last.month++,this.last.month--;var e=t.helpers.trunc(this.last.month/12);this.last.month%=12,this.last.month++,0!=e&&this.increment_year(e)}},increment_year:function(e){this.last.year+=e},increment_generic:function(e,n,r,i){this.last[n]+=e;var o=t.helpers.trunc(this.last[n]/r);this.last[n]%=r,0!=o&&this["increment_"+i](o)},has_by_data:function(e){return e in this.rule.parts},expand_year_days:function(e){var n=new t.Time;this.days=[];var r={},i=["BYDAY","BYWEEKNO","BYMONTHDAY","BYMONTH","BYYEARDAY"];for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];s in this.rule.parts&&(r[s]=this.rule.parts[s])}if("BYMONTH"in r&&"BYWEEKNO"in r){var a=1,l={};n.year=e,n.isDate=!0;for(var u=0;u0?(A=N+7*(M-1))<=E&&this.days.push(D+A):(A=H+7*(M+1))>0&&this.days.push(D+A)}}this.days.sort((function(e,t){return e-t}))}else if(2==p&&"BYDAY"in r&&"BYMONTHDAY"in r){var L=this.expand_by_day(e);for(var Y in L)if(L.hasOwnProperty(Y)){x=L[Y];var z=t.Time.fromDayOfYear(x,e);this.by_data.BYMONTHDAY.indexOf(z.day)>=0&&this.days.push(x)}}else if(3==p&&"BYDAY"in r&&"BYMONTHDAY"in r&&"BYMONTH"in r){L=this.expand_by_day(e);for(var Y in L)if(L.hasOwnProperty(Y)){x=L[Y],z=t.Time.fromDayOfYear(x,e);this.by_data.BYMONTH.indexOf(z.month)>=0&&this.by_data.BYMONTHDAY.indexOf(z.day)>=0&&this.days.push(x)}}else if(2==p&&"BYDAY"in r&&"BYWEEKNO"in r){L=this.expand_by_day(e);for(var Y in L)if(L.hasOwnProperty(Y)){x=L[Y];var B=(z=t.Time.fromDayOfYear(x,e)).weekNumber(this.rule.wkst);this.by_data.BYWEEKNO.indexOf(B)&&this.days.push(x)}}else 3==p&&"BYDAY"in r&&"BYWEEKNO"in r&&"BYMONTHDAY"in r||(this.days=1==p&&"BYYEARDAY"in r?this.days.concat(this.by_data.BYYEARDAY):[]);return 0},expand_by_day:function(e){var t=[],n=this.last.clone();n.year=e,n.month=1,n.day=1,n.isDate=!0;var r=n.dayOfWeek();n.month=12,n.day=31,n.isDate=!0;var i=n.dayOfWeek(),o=n.dayOfYear();for(var s in this.by_data.BYDAY)if(this.by_data.BYDAY.hasOwnProperty(s)){var a=this.by_data.BYDAY[s],l=this.ruleDayOfWeek(a),u=l[0],c=l[1];if(0==u)for(var d=(c+7-r)%7+1;d<=o;d+=7)t.push(d);else if(u>0){var h;h=c>=r?c-r+1:c-r+8,t.push(h+7*(u-1))}else{var f;u=-u,f=c<=i?o-i+c:o-i+c-7,t.push(f-7*(u-1))}}return t},is_day_in_byday:function(e){for(var t in this.by_data.BYDAY)if(this.by_data.BYDAY.hasOwnProperty(t)){var n=this.by_data.BYDAY[t],r=this.ruleDayOfWeek(n),i=r[0],o=r[1],s=e.dayOfWeek();if(0==i&&o==s||e.nthWeekDay(o,i)==e.day)return 1}return 0},check_set_position:function(e){return!!this.has_by_data("BYSETPOS")&&-1!==this.by_data.BYSETPOS.indexOf(e)},sort_byday_rules:function(e){for(var t=0;tthis.ruleDayOfWeek(e[t],this.rule.wkst)[1]){var r=e[t];e[t]=e[n],e[n]=r}}},check_contract_restriction:function(t,n){var r=e._indexMap[t],i=e._expandMap[this.rule.freq][r],o=!1;if(t in this.by_data&&i==e.CONTRACT){var s=this.by_data[t];for(var a in s)if(s.hasOwnProperty(a)&&s[a]==n){o=!0;break}}else o=!0;return o},check_contracting_rules:function(){var e=this.last.dayOfWeek(),n=this.last.weekNumber(this.rule.wkst),r=this.last.dayOfYear();return this.check_contract_restriction("BYSECOND",this.last.second)&&this.check_contract_restriction("BYMINUTE",this.last.minute)&&this.check_contract_restriction("BYHOUR",this.last.hour)&&this.check_contract_restriction("BYDAY",t.Recur.numericDayToIcalDay(e))&&this.check_contract_restriction("BYWEEKNO",n)&&this.check_contract_restriction("BYMONTHDAY",this.last.day)&&this.check_contract_restriction("BYMONTH",this.last.month)&&this.check_contract_restriction("BYYEARDAY",r)},setup_defaults:function(t,n,r){var i=e._indexMap[t];return e._expandMap[this.rule.freq][i]!=e.CONTRACT&&(t in this.by_data||(this.by_data[t]=[r]),this.rule.freq!=n)?this.by_data[t][0]:r},toJSON:function(){var e=Object.create(null);return e.initialized=this.initialized,e.rule=this.rule.toJSON(),e.dtstart=this.dtstart.toJSON(),e.by_data=this.by_data,e.days=this.days,e.last=this.last.toJSON(),e.by_indices=this.by_indices,e.occurrence_number=this.occurrence_number,e}},e._indexMap={BYSECOND:0,BYMINUTE:1,BYHOUR:2,BYDAY:3,BYMONTHDAY:4,BYYEARDAY:5,BYWEEKNO:6,BYMONTH:7,BYSETPOS:8},e._expandMap={SECONDLY:[1,1,1,1,1,1,1,1],MINUTELY:[2,1,1,1,1,1,1,1],HOURLY:[2,2,1,1,1,1,1,1],DAILY:[2,2,2,1,1,1,1,1],WEEKLY:[2,2,2,2,3,3,1,1],MONTHLY:[2,2,2,2,2,3,3,1],YEARLY:[2,2,2,2,2,2,2,2]},e.UNKNOWN=0,e.CONTRACT=1,e.EXPAND=2,e.ILLEGAL=3,e}(),t.RecurExpansion=function(){function e(e){return t.helpers.formatClassType(e,t.Time)}function n(e,t){return e.compare(t)}function r(e){this.ruleDates=[],this.exDates=[],this.fromData(e)}return r.prototype={complete:!1,ruleIterators:null,ruleDates:null,exDates:null,ruleDateInc:0,exDateInc:0,exDate:null,ruleDate:null,dtstart:null,last:null,fromData:function(n){var r=t.helpers.formatClassType(n.dtstart,t.Time);if(!r)throw new Error(".dtstart (ICAL.Time) must be given");if(this.dtstart=r,n.component)this._init(n.component);else{if(this.last=e(n.last)||r.clone(),!n.ruleIterators)throw new Error(".ruleIterators or .component must be given");this.ruleIterators=n.ruleIterators.map((function(e){return t.helpers.formatClassType(e,t.RecurIterator)})),this.ruleDateInc=n.ruleDateInc,this.exDateInc=n.exDateInc,n.ruleDates&&(this.ruleDates=n.ruleDates.map(e),this.ruleDate=this.ruleDates[this.ruleDateInc]),n.exDates&&(this.exDates=n.exDates.map(e),this.exDate=this.exDates[this.exDateInc]),void 0!==n.complete&&(this.complete=n.complete)}},next:function(){for(var e,t,n,r=0;;){if(r++>500)throw new Error("max tries have occured, rule may be impossible to forfill.");if(t=this.ruleDate,e=this._nextRecurrenceIter(this.last),!t&&!e){this.complete=!0;break}if((!t||e&&t.compare(e.last)>0)&&(t=e.last.clone(),e.next()),this.ruleDate===t&&this._nextRuleDay(),this.last=t,!this.exDate||((n=this.exDate.compare(this.last))<0&&this._nextExDay(),0!==n))return this.last;this._nextExDay()}},toJSON:function(){function e(e){return e.toJSON()}var t=Object.create(null);return t.ruleIterators=this.ruleIterators.map(e),this.ruleDates&&(t.ruleDates=this.ruleDates.map(e)),this.exDates&&(t.exDates=this.exDates.map(e)),t.ruleDateInc=this.ruleDateInc,t.exDateInc=this.exDateInc,t.last=this.last.toJSON(),t.dtstart=this.dtstart.toJSON(),t.complete=this.complete,t},_extractDates:function(e,r){function i(e){o=t.helpers.binsearchInsert(s,e,n),s.splice(o,0,e)}for(var o,s=[],a=e.getAllProperties(r),l=a.length,u=0;u0)&&(r=t);return r}},r}(),t.Event=function(){function e(e,n){e instanceof t.Component||(n=e,e=null),this.component=e||new t.Component("vevent"),this._rangeExceptionCache=Object.create(null),this.exceptions=Object.create(null),this.rangeExceptions=[],n&&n.strictExceptions&&(this.strictExceptions=n.strictExceptions),n&&n.exceptions?n.exceptions.forEach(this.relateException,this):this.component.parent&&!this.isRecurrenceException()&&this.component.parent.getAllSubcomponents("vevent").forEach((function(e){e.hasProperty("recurrence-id")&&this.relateException(e)}),this)}function n(e,t){return e[0]>t[0]?1:t[0]>e[0]?-1:0}return e.prototype={THISANDFUTURE:"THISANDFUTURE",exceptions:null,strictExceptions:!1,relateException:function(e){if(this.isRecurrenceException())throw new Error("cannot relate exception to exceptions");if(e instanceof t.Component&&(e=new t.Event(e)),this.strictExceptions&&e.uid!==this.uid)throw new Error("attempted to relate unrelated exception");var r=e.recurrenceId.toString();if(this.exceptions[r]=e,e.modifiesFuture()){var i=[e.recurrenceId.toUnixTime(),r],o=t.helpers.binsearchInsert(this.rangeExceptions,i,n);this.rangeExceptions.splice(o,0,i)}},modifiesFuture:function(){return!!this.component.hasProperty("recurrence-id")&&this.component.getFirstProperty("recurrence-id").getParameter("range")===this.THISANDFUTURE},findRangeException:function(e){if(!this.rangeExceptions.length)return null;var r=e.toUnixTime(),i=t.helpers.binsearchInsert(this.rangeExceptions,[r],n);if((i-=1)<0)return null;var o=this.rangeExceptions[i];return r2&&(s.children=arguments.length>3?l.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return T(e,s,r,i,null)}function T(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++c:i};return null==i&&null!=u.vnode&&u.vnode(o),o}function w(){return{current:null}}function D(e){return e.children}function S(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||y.test(t)?n:n+"px"}function C(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||S(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||S(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?k:x,o):e.removeEventListener(t,o?k:x,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function x(e){d=!0;try{return this.l[e.type+!1](u.event?u.event(e):e)}finally{d=!1}}function k(e){d=!0;try{return this.l[e.type+!0](u.event?u.event(e):e)}finally{d=!1}}function R(e,t){this.props=e,this.context=t}function A(e,t){if(null==t)return e.__?A(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&h.sort((function(e,t){return e.__v.__b-t.__v.__b})));P.__r=0}function N(e,t,n,r,i,o,s,a,l,u){var c,d,h,f,p,m,y,_=r&&r.__k||v,b=_.length;for(n.__k=[],c=0;c0?T(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(h=_[c])||h&&f.key==h.key&&f.type===h.type)_[c]=void 0;else for(d=0;d=0;t--)if((n=e.__k[t])&&(r=z(n)))return r;return null}function B(e,t,n,r,i,o,s,a,l){var c,d,h,f,p,m,g,v,y,b,E,T,w,S,C,x=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(c=u.__b)&&c(t);try{e:if("function"==typeof x){if(v=t.props,y=(c=x.contextType)&&r[c.__c],b=c?y?y.props.value:c.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:("prototype"in x&&x.prototype.render?t.__c=d=new x(v,b):(t.__c=d=new R(v,b),d.constructor=x,d.render=F),y&&y.sub(d),d.props=v,d.state||(d.state={}),d.context=b,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=x.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=_({},d.__s)),_(d.__s,x.getDerivedStateFromProps(v,d.__s))),f=d.props,p=d.state,d.__v=t,h)null==x.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==x.getDerivedStateFromProps&&v!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(v,b),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(v,d.__s,b)||t.__v===n.__v){for(t.__v!==n.__v&&(d.props=v,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),E=0;E3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),q(E(Ee,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function we(e,t){var n=E(Te,{__v:e,i:t});return n.containerInfo=t,n}(_e.prototype=new R).__a=function(e){var t=this,n=ye(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),be(t,e,r)):i()};n?n(o):o()}},_e.prototype.render=function(e){this.u=null,this.o=new Map;var t=L(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},_e.prototype.componentDidUpdate=_e.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){be(e,n,t)}))};var De="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Se=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ce="undefined"!=typeof document,xe=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};R.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(R.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var ke=u.event;function Re(){}function Ae(){return this.cancelBubble}function Oe(){return this.defaultPrevented}u.event=function(e){return ke&&(e=ke(e)),e.persist=Re,e.isPropagationStopped=Ae,e.isDefaultPrevented=Oe,e.nativeEvent=e};var Ie={configurable:!0,get:function(){return this.class}},Me=u.vnode;u.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var s=n[o];Ce&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==s||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===s?s="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!xe(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&Se.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===s&&(s=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=s)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=L(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=L(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Ie.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Ie))}e.$$typeof=De,Me&&Me(e)};var Pe=u.__r;u.__r=function(e){Pe&&Pe(e),e.__c};var Ne="undefined"!=typeof globalThis?globalThis:window;Ne.FullCalendarVDom?console.warn("FullCalendar VDOM already loaded"):Ne.FullCalendarVDom={Component:R,createElement:E,render:q,createRef:w,Fragment:D,createContext:function(e){var t=G(e),n=t.Provider;return t.Provider=function(){var e=this,t=!this.getChildContext,r=n.apply(this,arguments);if(t){var i=[];this.shouldComponentUpdate=function(t){e.props.value!==t.value&&i.forEach((function(e){e.context=t.value,e.forceUpdate()}))},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}}return r},t},createPortal:we,flushSync:function(e){e();var t=u.debounceRendering,n=[];function r(e){n.push(e)}u.debounceRendering=r,q(E(He,{}),document.createElement("div"));for(;n.length;)n.shift()();u.debounceRendering=t},unmountComponentAtNode:function(e){q(null,e)}};var He=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){return E("div",{})},t.prototype.componentDidMount=function(){this.setState({})},t}(R);if("undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Le=FullCalendarVDom.Component,Ye=FullCalendarVDom.createElement,ze=FullCalendarVDom.render,Be=FullCalendarVDom.createRef,Ue=FullCalendarVDom.Fragment,je=FullCalendarVDom.createContext,We=FullCalendarVDom.createPortal,Ve=FullCalendarVDom.flushSync,Fe=FullCalendarVDom.unmountComponentAtNode,qe=function(){function e(e,t){this.context=e,this.internalEventSource=t}return e.prototype.remove=function(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},e.prototype.refetch=function(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})},Object.defineProperty(e.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"format",{get:function(){return this.internalEventSource.meta.format},enumerable:!1,configurable:!0}),e}();function Ge(e){e.parentNode&&e.parentNode.removeChild(e)}function Ze(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(Ke(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function Ke(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}var Xe=/(top|left|right|bottom|width|height)$/i;function $e(e,t){for(var n in t)Je(e,n,t[n])}function Je(e,t,n){null==n?e.style[t]="":"number"==typeof n&&Xe.test(t)?e.style[t]=n+"px":e.style[t]=n}function Qe(e){var t,n;return null!==(n=null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])&&void 0!==n?n:e.target}function et(e){return e.getRootNode?e.getRootNode():document}var tt=0;function nt(){return"fc-dom-"+(tt+=1)}function rt(e){e.preventDefault()}function it(e,t,n,r){var i=function(e,t){return function(n){var r=Ze(n.target,e);r&&t.call(r,n,r)}}(n,r);return e.addEventListener(t,i),function(){e.removeEventListener(t,i)}}var ot=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function st(e){return s({onClick:e},at(e))}function at(e){return{tabIndex:0,onKeyDown:function(t){"Enter"!==t.key&&" "!==t.key||(e(t),t.preventDefault())}}}var lt=0;function ut(){return String(lt+=1)}function ct(){document.body.classList.add("fc-not-allowed")}function dt(){document.body.classList.remove("fc-not-allowed")}function ht(e,t,n){return n.func?n.func(e,t):function(e,t){if(!e&&!t)return 0;if(null==t)return-1;if(null==e)return 1;if("string"==typeof e||"string"==typeof t)return String(e).localeCompare(String(t));return e-t}(e[n.field],t[n.field])*(n.order||1)}function ft(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function pt(e,t,n){return"function"==typeof e?e.apply(void 0,t):"string"==typeof e?t.reduce((function(e,t,n){return e.replace("$"+n,t||"")}),e):n}function mt(e,t){return e-t}function gt(e){return e%1==0}function vt(e){var t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var yt=["sun","mon","tue","wed","thu","fri","sat"];function _t(e,t){var n=Rt(e);return n[2]+=7*t,At(n)}function bt(e,t){var n=Rt(e);return n[2]+=t,At(n)}function Et(e,t){var n=Rt(e);return n[6]+=t,At(n)}function Tt(e,t){return(t.valueOf()-e.valueOf())/864e5}function wt(e,t){return It(e)===It(t)?Math.round(Tt(e,t)):null}function Dt(e){return At([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function St(e,t,n,r){var i=At([t,0,1+Ct(t,n,r)]),o=Dt(e),s=Math.round(Tt(i,o));return Math.floor(s/7)+1}function Ct(e,t,n){var r=7+t-n;return-((7+At([e,0,r]).getUTCDay()-t)%7)+r-1}function xt(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function kt(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function Rt(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function At(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function Ot(e){return!isNaN(e.valueOf())}function It(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function Mt(e,t,n,r){return{instanceId:ut(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var Pt=Object.prototype.hasOwnProperty;function Nt(e,t){var n={};if(t)for(var r in t){for(var i=[],o=e.length-1;o>=0;o-=1){var s=e[o][r];if("object"==typeof s&&s)i.unshift(s);else if(void 0!==s){n[r]=s;break}}i.length&&(n[r]=Nt(i))}for(o=e.length-1;o>=0;o-=1){var a=e[o];for(var l in a)l in n||(n[l]=a[l])}return n}function Ht(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Lt(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Yt(e){for(var t={},n=0,r=e;n10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",rn(t,!0)))),r}function nn(e){return e.toISOString().replace(/T.*$/,"")}function rn(e,t){void 0===t&&(t=!1);var n=e<0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=Math.round(r%60);return t?n+ft(i,2)+":"+ft(o,2):"GMT"+n+i+(o?":"+ft(o,2):"")}function on(e,t,n){if(e===t)return!0;var r,i=e.length;if(i!==t.length)return!1;for(r=0;r1)||"numeric"!==i.year&&"2-digit"!==i.year||"numeric"!==i.month&&"2-digit"!==i.month||"numeric"!==i.day&&"2-digit"!==i.day||(a=1);var l=this.format(e,n),u=this.format(t,n);if(l===u)return l;var c=gn(function(e,t){var n={};for(var r in e)(!(r in un)||un[r]<=t)&&(n[r]=e[r]);return n}(i,a),o,n),d=c(e),h=c(t),f=function(e,t,n,r){var i=0;for(;i=Jt(t)&&(r=bt(r,1))}return e.start&&(n=Dt(e.start),r&&r<=n&&(r=bt(n,1))),{start:n,end:r}}function Jn(e,t,n,r){return"year"===r?Zt(n.diffWholeYears(e,t),"year"):"month"===r?Zt(n.diffWholeMonths(e,t),"month"):(o=t,s=Dt(i=e),a=Dt(o),{years:0,months:0,days:Math.round(Tt(s,a)),milliseconds:o.valueOf()-a.valueOf()-(i.valueOf()-s.valueOf())});var i,o,s,a}function Qn(e,t){var n,r,i=[],o=t.start;for(e.sort(er),n=0;no&&i.push({start:o,end:r.start}),r.end>o&&(o=r.end);return ot.start)&&(null===e.start||null===t.end||e.start=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function ir(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t=(n||t.end),isToday:t&&ir(t,r.start)}}function vr(e){return e.instance?e.instance.instanceId:e.def.defId+":"+e.range.start.toISOString()}function yr(e,t){var n=e.eventRange,r=n.def,i=n.instance,o=r.url;if(o)return{href:o};var s=t.emitter,a=t.options.eventInteractive;return null==a&&null==(a=r.interactive)&&(a=Boolean(s.hasHandlers("eventClick"))),a?at((function(e){s.trigger("eventClick",{el:e.target,event:new Hr(t,r,i),jsEvent:e,view:t.viewApi})})):{}}var _r={start:On,end:On,allDay:Boolean};function br(e,t,n){var r=function(e,t){var n=An(e,_r),r=n.refined,i=n.extra,o=r.start?t.createMarkerMeta(r.start):null,a=r.end?t.createMarkerMeta(r.end):null,l=r.allDay;null==l&&(l=o&&o.isTimeUnspecified&&(!a||a.isTimeUnspecified));return s({range:{start:o?o.marker:null,end:a?a.marker:null},allDay:l},i)}(e,t),i=r.range;if(!i.start)return null;if(!i.end){if(null==n)return null;i.end=t.add(i.start,n)}return r}function Er(e,t,n){return s(s({},Tr(e,t,n)),{timeZone:t.timeZone})}function Tr(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function wr(e,t,n){var r=Gn({editable:!1},n),i=Kn(r.refined,r.extra,"",e.allDay,!0,n);return{def:i,ui:ur(i,t),instance:Mt(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function Dr(e,t,n){n.emitter.trigger("select",s(s({},Sr(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Sr(e,t){for(var n,r,i={},o=0,a=t.pluginHooks.dateSpanTransforms;o=0;r-=1){var i=n[r].parseMeta(e);if(i)return{sourceDefId:r,meta:i}}return null}(o,t);if(a)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:o.defaultAllDay,eventDataTransform:o.eventDataTransform,success:o.success,failure:o.failure,publicId:o.id||"",sourceId:ut(),sourceDefId:a.sourceDefId,meta:a.meta,ui:Bn(o,t),extendedProps:s}}return null}function Mr(e){return s(s(s({},Yn),Or),e.pluginHooks.eventSourceRefiners)}function Pr(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var Nr=function(){function e(){}return e.prototype.getCurrentData=function(){return this.currentDataManager.getCurrentData()},e.prototype.dispatch=function(e){return this.currentDataManager.dispatch(e)},Object.defineProperty(e.prototype,"view",{get:function(){return this.getCurrentData().viewApi},enumerable:!1,configurable:!0}),e.prototype.batchRendering=function(e){e()},e.prototype.updateSize=function(){this.trigger("_resize",!0)},e.prototype.setOption=function(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})},e.prototype.getOption=function(e){return this.currentDataManager.currentCalendarOptionsInput[e]},e.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.getCurrentData().availableRawLocales)},e.prototype.on=function(e,t){var n=this.currentDataManager;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn("Unknown listener name '"+e+"'")},e.prototype.off=function(e,t){this.currentDataManager.emitter.off(e,t)},e.prototype.trigger=function(e){for(var t,n=[],r=1;r=1?Math.min(i,o):i}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=Et(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),tn(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?At(xt(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?At(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-kt(Rt(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Rt(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?kt(Rt(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(Rt(e))*60):new Date(e.valueOf()-(t||0))},e}(),Vr=[],Fr={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},qr=s(s({},Fr),{buttonHints:{prev:"Previous $0",next:"Next $0",today:function(e,t){return"day"===t?"Today":"This "+e}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show "+e+" more event"+(1===e?"":"s")}});function Gr(e){for(var t=e.length>0?e[0].code:"en",n=Vr.concat(e),r={en:qr},i=0,o=n;i0;i-=1){var o=r.slice(0,i).join("-");if(t[o])return t[o]}return null}(n,t)||qr;return Kr(e,n,r)}(e,t):Kr(e.code,[e.code],e)}function Kr(e,t,n){var r=Nt([Fr,n],["buttonText"]);delete r.code;var i=r.week;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}var Xr,$r={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function Jr(e,t){return In(function(e){var t;t=!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[];return t=t.map((function(e){return s(s({},$r),e)}))}(e),null,t)}function Qr(e,t){return e.left>=t.left&&e.left=t.top&&e.top
",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);var t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),Xr}var ni={defs:{},instances:{}},ri=function(){function e(){this.getKeysForEventDefs=sn(this._getKeysForEventDefs),this.splitDateSelection=sn(this._splitDateSpan),this.splitEventStore=sn(this._splitEventStore),this.splitIndividualUi=sn(this._splitIndividualUi),this.splitEventDrag=sn(this._splitInteraction),this.splitEventResize=sn(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),i=this.splitDateSelection(e.dateSelection),o=this.splitIndividualUi(e.eventUiBases,r),s=this.splitEventStore(e.eventStore,r),a=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),u={};for(var c in this.eventUiBuilders=Lt(n,(function(e,n){return t.eventUiBuilders[n]||sn(ii)})),n){var d=n[c],h=s[c]||ni,f=this.eventUiBuilders[c];u[c]={businessHours:d.businessHours||e.businessHours,dateSelection:i[c]||null,eventStore:h,eventUiBases:f(e.eventUiBases[""],d.ui,o[c]),eventSelection:h.instances[e.eventSelection]?e.eventSelection:"",eventDrag:a[c]||null,eventResize:l[c]||null}}return u},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);nn:!!t&&e>=t.end)}}function si(e,t){var n=["fc-day","fc-day-"+yt[e.dow]];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}var ai=En({year:"numeric",month:"long",day:"numeric"}),li=En({week:"long"});function ui(e,t,n,r){void 0===n&&(n="day"),void 0===r&&(r=!0);var i=e.dateEnv,o=e.options,a=e.calendarApi,l=i.format(t,"week"===n?li:ai);if(o.navLinks){var u=i.toDate(t),c=function(e){var r="day"===n?o.navLinkDayClick:"week"===n?o.navLinkWeekClick:null;"function"==typeof r?r.call(a,i.toDate(t),e):("string"==typeof r&&(n=r),a.zoomTo(t,n))};return s({title:pt(o.navLinkHint,[l,u],l),"data-navlink":""},r?st(c):{onClick:c})}return{"aria-label":l}}var ci,di=null;function hi(){return null===di&&(di=function(){var e=document.createElement("div");$e(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="
",document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return Ge(e),t}()),di}function fi(){return ci||(ci=function(){var e=document.createElement("div");e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",document.body.appendChild(e);var t=pi(e);return document.body.removeChild(e),t}()),ci}function pi(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function mi(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():gi(e),i=function(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,o=parseInt(n.borderTopWidth,10)||0,s=parseInt(n.borderBottomWidth,10)||0,a=pi(e),l=a.y-r-i,u={borderLeft:r,borderRight:i,borderTop:o,borderBottom:s,scrollbarBottom:a.x-o-s,scrollbarLeft:0,scrollbarRight:0};return hi()&&"rtl"===n.direction?u.scrollbarLeft=l:u.scrollbarRight=l,t&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}(e,t),o={left:r.left+i.borderLeft+i.scrollbarLeft,right:r.right-i.borderRight-i.scrollbarRight,top:r.top+i.borderTop,bottom:r.bottom-i.borderBottom-i.scrollbarBottom};return t&&(o.left+=i.paddingLeft,o.right-=i.paddingRight,o.top+=i.paddingTop,o.bottom-=i.paddingBottom),o}function gi(e){var t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function vi(e){for(var t=[];e instanceof HTMLElement;){var n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}var yi=function(){function e(){this.handlers={},this.thisContext=null}return e.prototype.setThisContext=function(e){this.thisContext=e},e.prototype.setOptions=function(e){this.options=e},e.prototype.on=function(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)},e.prototype.off=function(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((function(e){return e!==n}))):delete e[t]}(this.handlers,e,t)},e.prototype.trigger=function(e){for(var t=[],n=1;n=n[t]&&e=n[t]&&e0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()0},e.prototype.canScrollRight=function(){return this.getScrollLeft()=c.end?new Date(c.end.valueOf()-1):u),i=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(i.unit),s=this.buildRenderRange(this.trimHiddenDays(i.range),i.unit,o),a=s=this.trimHiddenDays(s),d.showNonCurrentDates||(a=tr(a,i.range)),a=tr(a=this.adjustActiveRange(a),r),l=nr(i.range,r),{validRange:r,currentRange:i.range,currentRangeUnit:i.unit,isRangeAllDay:o,activeRange:a,renderRange:s,slotMinTime:d.slotMinTime,slotMaxTime:d.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(i.duration)}},e.prototype.buildValidRange=function(){var e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.props,i=null,o=null,s=null;return r.duration?(i=r.duration,o=r.durationUnit,s=this.buildRangeFromDuration(e,t,i,o)):(n=this.props.dayCount)?(o="day",s=this.buildRangeFromDayCount(e,t,n)):(s=this.buildCustomVisibleRange(e))?o=r.dateEnv.greatestWholeUnit(s.start,s.end).unit:(o=en(i=this.getFallbackDuration()).unit,s=this.buildRangeFromDuration(e,t,i,o)),{duration:i,unit:o,range:s}},e.prototype.getFallbackDuration=function(){return Zt({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,i=t.slotMinTime,o=t.slotMaxTime,s=e.start,a=e.end;return r&&($t(i)<0&&(s=Dt(s),s=n.add(s,i)),$t(o)>1&&(a=bt(a=Dt(a),-1),a=n.add(a,o))),{start:s,end:a}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var i,o,s,a=this.props,l=a.dateEnv,u=a.dateAlignment;if(!u){var c=this.props.dateIncrement;u=c&&Jt(c)e.fetchRange.end}(e,t,n)})),t,!1,n)}function no(e,t,n,r,i){var o={};for(var s in e){var a=e[s];t[s]?o[s]=ro(a,n,r,i):o[s]=a}return o}function ro(e,t,n,r){var i=r.options,o=r.calendarApi,a=r.pluginHooks.eventSourceDefs[e.sourceDefId],l=ut();return a.fetch({eventSource:e,range:t,isRefetch:n,context:r},(function(n){var s=n.rawEvents;i.eventSourceSuccess&&(s=i.eventSourceSuccess.call(o,s,n.xhr)||s),e.success&&(s=e.success.call(o,s,n.xhr)||s),r.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:l,fetchRange:t,rawEvents:s})}),(function(n){console.warn(n.message,n),i.eventSourceFailure&&i.eventSourceFailure.call(o,n),e.failure&&e.failure(n),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:l,fetchRange:t,error:n})})),s(s({},e),{isFetching:!0,latestFetchId:l})}function io(e,t){return Ht(e,(function(e){return oo(e,t)}))}function oo(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function so(e,t,n,r,i){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,i,o){if(t&&n===t.latestFetchId){var s=In(function(e,t,n){var r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;i&&(e=ao(e,i));r&&(e=ao(e,r));return e}(i,t,o),t,o);return r&&(s=Vt(s,r,o)),Nn(lo(e,t.sourceId),s)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case"ADD_EVENTS":return function(e,t,n,r){n&&(t=Vt(t,n,r));return Nn(e,t)}(e,t.eventStore,r?r.activeRange:null,i);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return Nn(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Vt(e,r.activeRange,i):e;case"REMOVE_EVENTS":return function(e,t){var n=e.defs,r=e.instances,i={},o={};for(var s in n)t.defs[s]||(i[s]=n[s]);for(var a in r)!t.instances[a]&&i[r[a].defId]&&(o[a]=r[a]);return{defs:i,instances:o}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return lo(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Hn(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}function ao(e,t){var n;if(t){n=[];for(var r=0,i=e;r=200&&s.status<400){var e=!1,t=void 0;try{t=JSON.parse(s.responseText),e=!0}catch(e){}e?r(t,s):i("Failure parsing JSON",s)}else i("Request failed",s)},s.onerror=function(){i("Request failed",s)},s.send(o)}function _o(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function bo(e,t){for(var n=zt(t.getCurrentData().eventSources),r=[],i=0,o=e;i1)return{year:"numeric",month:"short",day:"numeric"};return{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}var So=function(){function e(e){var t=this;this.computeOptionsData=sn(this._computeOptionsData),this.computeCurrentViewData=sn(this._computeCurrentViewData),this.organizeRawLocales=sn(Gr),this.buildLocale=sn(Zr),this.buildPluginHooks=Pi(),this.buildDateEnv=sn(Co),this.buildTheme=sn(xo),this.parseToolbars=sn(po),this.buildViewSpecs=sn(Zi),this.buildDateProfileGenerator=an(ko),this.buildViewApi=sn(Ro),this.buildViewUiProps=an(Io),this.buildEventUiBySource=sn(Ao,Bt),this.buildEventUiBases=sn(Oo),this.parseContextBusinessHours=an(Po),this.buildTitle=sn(Do),this.emitter=new yi,this.actionRunner=new wo(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.getCurrentData=function(){return t.data},this.dispatch=function(e){t.actionRunner.request(e)},this.props=e,this.actionRunner.pause();var n={},r=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),i=r.calendarOptions.initialView||r.pluginHooks.initialView,o=this.computeCurrentViewData(i,r,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(o.options);var a,l,u,c=(a=r.calendarOptions,l=r.dateEnv,null!=(u=a.initialDate)?l.createMarker(u):Pr(a.now,l)),d=o.dateProfileGenerator.build(c);ir(d.activeRange,c)||(c=d.currentRange.start);for(var h={dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},f=0,p=r.pluginHooks.contextInit;fs.end&&(r+=this.insertEntry({index:e.index,thickness:e.thickness,span:{start:s.end,end:o.end}},i)),r?(n.push.apply(n,a([{index:e.index,thickness:e.thickness,span:zo(s,o)}],i)),r):(n.push(e),0)},e.prototype.insertEntryAt=function(e,t){var n=this.entriesByLevel,r=this.levelCoords;-1===t.lateral?(Bo(r,t.level,t.levelCoord),Bo(n,t.level,[e])):Bo(n[t.level],t.lateral,e),this.stackCnts[Yo(e)]=t.stackCnt},e.prototype.findInsertion=function(e){for(var t=this,n=t.levelCoords,r=t.entriesByLevel,i=t.strictOrder,o=t.stackCnts,s=n.length,a=0,l=-1,u=-1,c=null,d=0,h=0;h=a+e.thickness)break;for(var p=r[h],m=void 0,g=Uo(p,e.span.start,Lo),v=g[0]+g[1];(m=p[v])&&m.span.starta&&(a=y,c=m,l=h,u=v),y===a&&(d=Math.max(d,o[Yo(m)]+1)),v+=1}}var _=0;if(c)for(_=l+1;_n(e[i-1]))return[i,0];for(;rs))return[o,1];r=o+1}}return[r,0]}var jo=function(){function e(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}return e.prototype.destroy=function(){},e}();function Wo(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}function Vo(e){var t;return(t={})[e.component.uid]=e,t}var Fo={},qo=function(){function e(e,t){this.emitter=new yi}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),Go={},Zo={startTime:Zt,duration:Zt,create:Boolean,sourceId:String};function Ko(e){var t=An(e,Zo),n=t.refined,r=t.extra;return{startTime:n.startTime||null,duration:n.duration||null,create:null==n.create||n.create,sourceId:n.sourceId,leftoverProps:r}}var Xo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this,t=this.props.widgetGroups.map((function(t){return e.renderWidgetGroup(t)}));return Ye.apply(void 0,a(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,r=[],i=!0,o=0,s=e;o1){var v=i&&n.getClass("buttonGroup")||"";return Ye.apply(void 0,a(["div",{className:v}],r))}return r[0]},t}(ki),$o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.model,i=n.extraClassName,o=!1,s=r.sectionWidgets,a=s.center;return s.left?(o=!0,e=s.left):e=s.start,s.right?(o=!0,t=s.right):t=s.end,Ye("div",{className:[i||"","fc-toolbar",o?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",a||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return Ye(Xo,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})},t}(ki),Jo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={availableWidth:null},t.handleEl=function(e){t.el=e,Oi(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return o(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=e.aspectRatio,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],i="",o="";return n?null!==t.availableWidth?i=t.availableWidth/n:o=1/n*100+"%":i=e.height||"",Ye("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(" "),style:{height:i,paddingBottom:o}},e.children)},t.prototype.componentDidMount=function(){this.context.addResizeHandler(this.handleResize)},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleResize)},t.prototype.updateAvailableWidth=function(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})},t}(ki),Qo=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,i=r.context,o=ar(t);if(o&&r.isValidSegDownEl(e.target)){var s=Ze(e.target,".fc-event-forced-url"),a=s?s.querySelector("a[href]").href:"";i.emitter.trigger("eventClick",{el:t,event:new Hr(r.context,o.eventRange.def,o.eventRange.instance),jsEvent:e,view:i.viewApi}),a&&!e.defaultPrevented&&(window.location.href=a)}},n.destroy=it(t.el,"click",".fc-event",n.handleSegClick),n}return o(t,e),t}(jo),es=function(e){function t(t){var n,r,i,o,s,a=e.call(this,t)||this;return a.handleEventElRemove=function(e){e===a.currentSegEl&&a.handleSegLeave(null,a.currentSegEl)},a.handleSegEnter=function(e,t){ar(t)&&(a.currentSegEl=t,a.triggerEvent("eventMouseEnter",e,t))},a.handleSegLeave=function(e,t){a.currentSegEl&&(a.currentSegEl=null,a.triggerEvent("eventMouseLeave",e,t))},a.removeHoverListeners=(n=t.el,r=".fc-event",i=a.handleSegEnter,o=a.handleSegLeave,it(n,"mouseover",r,(function(e,t){if(t!==s){s=t,i(e,t);var n=function(e){s=null,o(e,t),t.removeEventListener("mouseleave",n)};t.addEventListener("mouseleave",n)}}))),a}return o(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,i=r.context,o=ar(n);t&&!r.isValidSegDownEl(t.target)||i.emitter.trigger(e,{el:n,event:new Hr(i,o.eventRange.def,o.eventRange.instance),jsEvent:t,view:i.viewApi})},t}(jo),ts=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=sn(Ci),t.buildViewPropTransformers=sn(rs),t.buildToolbarProps=sn(ns),t.headerRef=Be(),t.footerRef=Be(),t.interactionsStore={},t.state={viewLabelId:nt()},t.registerInteractiveComponent=function(e,n){var r=Wo(e,n),i=[Qo,es].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=i,Fo[e.uid]=r},t.unregisterInteractiveComponent=function(e){var n=t.interactionsStore[e.uid];if(n){for(var r=0,i=n;r1?ui(this.context,a):{},f=s(s(s({date:t.toDate(a),view:i},o.extraHookProps),{text:d}),u);return Ye(Li,{hookProps:f,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:ss,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,r){return Ye("th",s({ref:e,role:"columnheader",className:c.concat(t).join(" "),"data-date":u.isDisabled?void 0:nn(a),colSpan:o.colSpan},o.extraDataAttrs),Ye("div",{className:"fc-scrollgrid-sync-inner"},!u.isDisabled&&Ye("a",s({ref:n,className:["fc-col-header-cell-cushion",o.isSticky?"fc-sticky":""].join(" ")},h),r)))}))},t}(ki),ls=En({weekday:"long"}),us=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,r=t.theme,i=t.viewApi,o=t.options,a=bt(new Date(2592e5),e.dow),l={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},u=[os].concat(si(l,r),e.extraClassNames||[]),c=n.format(a,e.dayHeaderFormat),d=s(s(s(s({date:a},l),{view:i}),e.extraHookProps),{text:c});return Ye(Li,{hookProps:d,classNames:o.dayHeaderClassNames,content:o.dayHeaderContent,defaultContent:ss,didMount:o.dayHeaderDidMount,willUnmount:o.dayHeaderWillUnmount},(function(t,r,i,o){return Ye("th",s({ref:t,role:"columnheader",className:u.concat(r).join(" "),colSpan:e.colSpan},e.extraDataAttrs),Ye("div",{className:"fc-scrollgrid-sync-inner"},Ye("a",{"aria-label":n.format(a,ls),className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:i},o)))}))},t}(ki),cs=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=Pr(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return o(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return e.children(t.nowDate,t.todayRange)},t.prototype.componentDidMount=function(){this.setTimeout()},t.prototype.componentDidUpdate=function(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())},t.prototype.componentWillUnmount=function(){this.clearTimeout()},t.prototype.computeTiming=function(){var e=this.props,t=this.context,n=Et(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),i=t.dateEnv.add(r,Zt(1,e.unit)),o=i.valueOf()-n.valueOf();return o=Math.min(864e5,o),{currentState:{nowDate:r,todayRange:ds(r)},nextState:{nowDate:i,todayRange:ds(i)},waitMs:o}},t.prototype.setTimeout=function(){var e=this,t=this.computeTiming(),n=t.nextState,r=t.waitMs;this.timeoutId=setTimeout((function(){e.setState(n,(function(){e.setTimeout()}))}),r)},t.prototype.clearTimeout=function(){this.timeoutId&&clearTimeout(this.timeoutId)},t.contextType=Si,t}(Le);function ds(e){var t=Dt(e);return{start:t,end:bt(t,1)}}var hs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=sn(fs),t}return o(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,i=t.datesRepDistinctDays,o=t.renderIntro,s=this.createDayHeaderFormatter(e.options.dayHeaderFormat,i,n.length);return Ye(cs,{unit:"day"},(function(e,t){return Ye("tr",{role:"row"},o&&o("day"),n.map((function(e){return i?Ye(as,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:s}):Ye(us,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:s})})))}))},t}(ki);function fs(e,t,n){return e||function(e,t){return En(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}(t,n)}var ps=function(){function e(e,t){for(var n=e.start,r=e.end,i=[],o=[],s=-1;n=t.length?t[t.length-1]+1:t[n]},e}(),ms=function(){function e(e,t){var n,r,i,o=e.dates;if(t){for(r=o[0].getUTCDay(),n=1;nt)return!0}return!1},t.prototype.needsYScrolling=function(){if(Ss.test(this.props.overflowY))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),n=e.children,r=0;rt)return!0}return!1},t.prototype.getXScrollbarWidth=function(){return Ss.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return Ss.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(ki),xs=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,i=r.depths,o=r.currentMap,s=!1,a=!1;null!==e?(s=n in o,o[n]=e,i[n]=(i[n]||0)+1,a=!0):(i[n]-=1,i[n]||(delete o[n],delete t.callbackMap[n],s=!0)),t.masterCallback&&(s&&t.masterCallback(null,String(n)),a&&t.masterCallback(e,String(n)))}}return e.prototype.createRef=function(e){var t=this,n=this.callbackMap[e];return n||(n=this.callbackMap[e]=function(n){t.handleValue(n,String(e))}),n},e.prototype.collect=function(e,t,n){return function(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var i=[];null==n&&(n=Object.keys(e).length);for(var o=t;o=0&&e=0&&tt.eventRange.range.end?e:t}var oa=function(e){function t(t,n){void 0===n&&(n={});var r=e.call(this)||this;return r.isRendering=!1,r.isRendered=!1,r.currentClassNames=[],r.customContentRenderId=0,r.handleAction=function(e){switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":r.renderRunner.tryDrain()}},r.handleData=function(e){r.currentData=e,r.renderRunner.request(e.calendarOptions.rerenderDelay)},r.handleRenderRequest=function(){if(r.isRendering){r.isRendered=!0;var e=r.currentData;Ve((function(){ze(Ye(is,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,i,o){return r.setClassNames(t),r.setHeight(n),Ye(Yi.Provider,{value:r.customContentRenderId},Ye(ts,s({isHeightAuto:i,forPrint:o},e)))})),r.el)}))}else r.isRendered&&(r.isRendered=!1,Fe(r.el),r.setClassNames([]),r.setHeight(""))},r.el=t,r.renderRunner=new To(r.handleRenderRequest),new So({optionOverrides:n,calendarApi:r,onAction:r.handleAction,onData:r.handleData}),r}return o(t,e),Object.defineProperty(t.prototype,"view",{get:function(){return this.currentData.viewApi},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()},t.prototype.destroy=function(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())},t.prototype.updateSize=function(){var t=this;Ve((function(){e.prototype.updateSize.call(t)}))},t.prototype.batchRendering=function(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")},t.prototype.pauseRendering=function(){this.renderRunner.pause("pauseRendering")},t.prototype.resumeRendering=function(){this.renderRunner.resume("pauseRendering",!0)},t.prototype.resetOptions=function(e,t){this.currentDataManager.resetOptions(e,t)},t.prototype.setClassNames=function(e){if(!on(e,this.currentClassNames)){for(var t=this.el.classList,n=0,r=this.currentClassNames;n1,b=y.span.start===a;d+=y.levelCoord-c,c=y.levelCoord+y.thickness,_?(d+=y.thickness,b&&m.push({seg:Ta(p,y.span.start,y.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:y.levelCoord,marginTop:0})):b&&(m.push({seg:Ta(p,y.span.start,y.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:y.levelCoord,marginTop:d}),d=0)}i.push(u),o.push(m),s.push(d)}return{singleColPlacements:i,multiColPlacements:o,leftoverMargins:s}}(a.toRects(),e,s),p=f.singleColPlacements,m=f.multiColPlacements,g=f.leftoverMargins,v=[],y=[],_=0,b=u;_1,showWeekNumbers:t.showWeekNumbers,todayRange:p,dateProfile:n,cells:o,renderIntro:t.renderRowIntro,businessHourSegs:a[f],eventSelection:t.eventSelection,bgEventSegs:l[f].filter(Ca),fgEventSegs:u[f],dateSelectionSegs:c[f],eventDrag:d[f],eventResize:h[f],dayMaxEvents:i,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:t.forPrint})})))))})))},t.prototype.prepareHits=function(){this.rowPositions=new _i(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new _i(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.queryHit=function(e,t){var n=this.colPositions,r=this.rowPositions,i=n.leftToIndex(e),o=r.topToIndex(t);if(null!=o&&null!=i){var a=this.props.cells[o][i];return{dateProfile:this.props.dateProfile,dateSpan:s({range:this.getCellRange(o,i),allDay:!0},a.extraDateSpan),dayEl:this.getCellEl(o,i),rect:{left:n.lefts[i],right:n.rights[i],top:r.tops[o],bottom:r.bottoms[o]},layer:0}}return null},t.prototype.getCellEl=function(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:bt(n,1)}},t}(Ii);function Ca(e){return e.eventRange.def.allDay}var xa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return o(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(gs),ka=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new xa,t.tableRef=Be(),t}return o(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Ye(Sa,s({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))},t}(Ii),Ra=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=sn(Aa),t.headerRef=Be(),t.tableRef=Be(),t}return o(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,i=this.props,o=this.buildDayTableModel(i.dateProfile,r),s=n.dayHeaders&&Ye(hs,{ref:this.headerRef,dateProfile:i.dateProfile,dates:o.headerDates,datesRepDistinctDays:1===o.rowCnt}),a=function(t){return Ye(ka,{ref:e.tableRef,dateProfile:i.dateProfile,dayTableModel:o,businessHours:i.businessHours,dateSelection:i.dateSelection,eventStore:i.eventStore,eventUiBases:i.eventUiBases,eventSelection:i.eventSelection,eventDrag:i.eventDrag,eventResize:i.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!i.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:i.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(s,a,o.colCnt,n.dayMinWidth):this.renderSimpleLayout(s,a)},t}(sa);function Aa(e,t){var n=new ps(e.renderRange,t);return new ms(n,/year|month|week/.test(e.currentRangeUnit))}var Oa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.buildRenderRange=function(t,n,r){var i,o=this.props.dateEnv,s=e.prototype.buildRenderRange.call(this,t,n,r),a=s.start,l=s.end;(/^(year|month)$/.test(n)&&(a=o.startOfWeek(a),(i=o.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=_t(i,1))),this.props.monthMode&&this.props.fixedWeekCount)&&(l=_t(l,6-Math.ceil(Tt(a,l)/7)));return{start:a,end:l}},t}(Xi),Ia=Mi({initialView:"dayGridMonth",views:{dayGrid:{component:Ra,dateProfileGeneratorClass:Oa},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),Ma=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getKeyInfo=function(){return{allDay:{},timed:{}}},t.prototype.getKeysForDateSpan=function(e){return e.allDay?["allDay"]:["timed"]},t.prototype.getKeysForEventDef=function(e){return e.allDay?"background"===(t=e).ui.display||"inverse-background"===t.ui.display?["timed","allDay"]:["allDay"]:["timed"];var t},t}(ri),Pa=En({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function Na(e){var t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return Ye(Si.Consumer,null,(function(n){if(!e.isLabeled)return Ye("td",{className:t.join(" "),"data-time":e.isoTimeStr});var r=n.dateEnv,i=n.options,o=n.viewApi,s=null==i.slotLabelFormat?Pa:Array.isArray(i.slotLabelFormat)?En(i.slotLabelFormat[0]):En(i.slotLabelFormat),a={level:0,time:e.time,date:r.toDate(e.date),view:o,text:r.format(e.date,s)};return Ye(Li,{hookProps:a,classNames:i.slotLabelClassNames,content:i.slotLabelContent,defaultContent:Ha,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(function(n,r,i,o){return Ye("td",{ref:n,className:t.concat(r).join(" "),"data-time":e.isoTimeStr},Ye("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},Ye("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:i},o)))}))}))}function Ha(e){return e.text}var La=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){return this.props.slatMetas.map((function(e){return Ye("tr",{key:e.key},Ye(Na,s({},e)))}))},t}(ki),Ya=En({week:"short"}),za=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allDaySplitter=new Ma,t.headerElRef=Be(),t.rootElRef=Be(),t.scrollerElRef=Be(),t.state={slatCoords:null},t.handleScrollTopRequest=function(e){var n=t.scrollerElRef.current;n&&(n.scrollTop=e)},t.renderHeadAxis=function(e,n){void 0===n&&(n="");var r=t.context.options,i=t.props.dateProfile.renderRange,o=1===Tt(i.start,i.end)?ui(t.context,i.start,"week"):{};return r.weekNumbers&&"day"===e?Ye(Ks,{date:i.start,defaultFormat:Ya},(function(e,t,r,i){return Ye("th",{ref:e,"aria-hidden":!0,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(t).join(" ")},Ye("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:n}},Ye("a",s({ref:r,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},o),i)))})):Ye("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},Ye("div",{className:"fc-timegrid-axis-frame",style:{height:n}}))},t.renderTableRowAxis=function(e){var n=t.context,r=n.options,i=n.viewApi,o={text:r.allDayText,view:i};return Ye(Li,{hookProps:o,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:Ba,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(t,n,r,i){return Ye("td",{ref:t,"aria-hidden":!0,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Ye("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},Ye("span",{className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner",ref:r},i)))}))},t.handleSlatCoords=function(e){t.setState({slatCoords:e})},t}return o(t,e),t.prototype.renderSimpleLayout=function(e,t,n){var r=this.context,i=this.props,o=[],s=Ns(r.options);return e&&o.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(o.push({type:"body",key:"all-day",chunk:{content:t}}),o.push({type:"body",key:"all-day-divider",outerContent:Ye("tr",{role:"presentation",className:"fc-scrollgrid-section"},Ye("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),o.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),Ye(Fi,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,t){return Ye("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Ye(Ls,{liquid:!i.isHeightAuto&&!i.forPrint,collapsibleWidth:i.forPrint,cols:[{width:"shrink"}],sections:o}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r,i,o,s){var a=this,l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");var u=this.context,c=this.props,d=!c.forPrint&&Ns(u.options),h=!c.forPrint&&Hs(u.options),f=[];e&&f.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Ye("tr",{role:"presentation"},a.renderHeadAxis("day",e.rowSyncHeights[0]))}},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(f.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Ye("tr",{role:"presentation"},a.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:t}]}),f.push({key:"all-day-divider",type:"body",outerContent:Ye("tr",{role:"presentation",className:"fc-scrollgrid-section"},Ye("td",{colSpan:2,className:"fc-timegrid-divider "+u.theme.getClass("tableCellShaded")}))}));var p=u.options.nowIndicator;return f.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(u.options.expandRows),chunks:[{key:"axis",content:function(e){return Ye("div",{className:"fc-timegrid-axis-chunk"},Ye("table",{"aria-hidden":!0,style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,Ye("tbody",null,Ye(La,{slatMetas:o}))),Ye("div",{className:"fc-timegrid-now-indicator-container"},Ye(cs,{unit:p?"minute":"day"},(function(e){var t=p&&s&&s.safeComputeTop(e);return"number"==typeof t?Ye(Us,{isAxis:!0,date:e},(function(e,n,r,i){return Ye("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(n).join(" "),style:{top:t}},i)})):null}))))}},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),h&&f.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Ps},{key:"cols",content:Ps}]}),Ye(Fi,{viewSpec:u.viewSpec,elRef:this.rootElRef},(function(e,t){return Ye("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Ye(l,{liquid:!c.isHeightAuto&&!c.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:i}]}],sections:f}))}))},t.prototype.getAllDayMaxEventProps=function(){var e=this.context.options,t=e.dayMaxEvents,n=e.dayMaxEventRows;return!0!==t&&!0!==n||(t=void 0,n=5),{dayMaxEvents:t,dayMaxEventRows:n}},t}(Ii);function Ba(e){return e.text}var Ua=function(){function e(e,t,n){this.positions=e,this.dateProfile=t,this.slotDuration=n}return e.prototype.safeComputeTop=function(e){var t=this.dateProfile;if(ir(t.currentRange,e)){var n=Dt(e),r=e.valueOf()-n.valueOf();if(r>=Jt(t.slotMinTime)&&r0,_=Boolean(l)&&l.span.end-l.span.start=0;t-=1)if(null!==(r=Qt(n=Zt(hl[t]),e))&&r>1)return n;return e}(r),c=[];Jt(a)=e.getTime())&&(!t||n<=t.getTime())}function i(e){var t=e.startDate.toJSDate().getTime(),n=e.endDate.toJSDate().getTime();return e.endDate.isDate&&n>t&&(n-=1),{startTime:t,endTime:n}}var o=[];this.events.forEach((function(e){e.isRecurrenceException()&&o.push(e)}));var s={events:[],occurrences:[]};return this.events.filter((function(e){return!e.isRecurrenceException()})).forEach((function(e){var a=[];if(e.component.getAllProperties("exdate").forEach((function(e){var t=e.getFirstValue();a.push(t.toJSDate().getTime())})),e.isRecurring()){var l=e.iterator(),u=void 0,c=0,d=function(){if(c+=1,u=l.next()){var n=e.getOccurrenceDetails(u),d=i(n),h=d.startTime,f=d.endTime,p=-1!==a.indexOf(h),m=o.find((function(t){return t.uid===e.uid&&t.recurrenceId.toJSDate().getTime()===n.startDate.toJSDate().getTime()}));if(t&&h>t.getTime())return"break";r(h,f)&&(m?s.events.push(m):p||s.occurrences.push(n))}};do{if("break"===d())break}while(u&&(!n.maxIterations||c=200&&s.status<400?i(s.responseText,s):o("Request failed",s)},s.onerror=function(){return o("Request failed",s)},s.send(null)):l.completed?u(l.errorMessage,l.iCalExpander,l.xhr):l.callbacks.push(u)}}]});Go.touchMouseIgnoreWait=500;var kl=0,Rl=0,Al=!1,Ol=function(){function e(e){var t=this;this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=function(e){if(!t.shouldIgnoreMouse()&&function(e){return 0===e.button&&!e.ctrlKey}(e)&&t.tryStart(e)){var n=t.createEventFromMouse(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n),t.shouldIgnoreMove||document.addEventListener("mousemove",t.handleMouseMove),document.addEventListener("mouseup",t.handleMouseUp)}},this.handleMouseMove=function(e){var n=t.createEventFromMouse(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleMouseUp=function(e){document.removeEventListener("mousemove",t.handleMouseMove),document.removeEventListener("mouseup",t.handleMouseUp),t.emitter.trigger("pointerup",t.createEventFromMouse(e)),t.cleanup()},this.handleTouchStart=function(e){if(t.tryStart(e)){t.isTouchDragging=!0;var n=t.createEventFromTouch(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n);var r=e.target;t.shouldIgnoreMove||r.addEventListener("touchmove",t.handleTouchMove),r.addEventListener("touchend",t.handleTouchEnd),r.addEventListener("touchcancel",t.handleTouchEnd),window.addEventListener("scroll",t.handleTouchScroll,!0)}},this.handleTouchMove=function(e){var n=t.createEventFromTouch(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleTouchEnd=function(e){if(t.isDragging){var n=e.target;n.removeEventListener("touchmove",t.handleTouchMove),n.removeEventListener("touchend",t.handleTouchEnd),n.removeEventListener("touchcancel",t.handleTouchEnd),window.removeEventListener("scroll",t.handleTouchScroll,!0),t.emitter.trigger("pointerup",t.createEventFromTouch(e)),t.cleanup(),t.isTouchDragging=!1,kl+=1,setTimeout((function(){kl-=1}),Go.touchMouseIgnoreWait)}},this.handleTouchScroll=function(){t.wasTouchScroll=!0},this.handleScroll=function(e){if(!t.shouldIgnoreMove){var n=window.pageXOffset-t.prevScrollX+t.prevPageX,r=window.pageYOffset-t.prevScrollY+t.prevPageY;t.emitter.trigger("pointermove",{origEvent:e,isTouch:t.isTouchDragging,subjectEl:t.subjectEl,pageX:n,pageY:r,deltaX:n-t.origPageX,deltaY:r-t.origPageY})}},this.containerEl=e,this.emitter=new yi,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),1===(Rl+=1)&&window.addEventListener("touchmove",Il,{passive:!1})}return e.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),(Rl-=1)||window.removeEventListener("touchmove",Il,{passive:!1})},e.prototype.tryStart=function(e){var t=this.querySubjectEl(e),n=e.target;return!(!t||this.handleSelector&&!Ze(n,this.handleSelector))&&(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,!0)},e.prototype.cleanup=function(){Al=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()},e.prototype.querySubjectEl=function(e){return this.selector?Ze(e.target,this.selector):this.containerEl},e.prototype.shouldIgnoreMouse=function(){return kl||this.isTouchDragging},e.prototype.cancelTouchScroll=function(){this.isDragging&&(Al=!0)},e.prototype.initScrollWatch=function(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))},e.prototype.recordCoords=function(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.pageXOffset,this.prevScrollY=window.pageYOffset)},e.prototype.destroyScrollWatch=function(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)},e.prototype.createEventFromMouse=function(e,t){var n=0,r=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(n=e.pageX-this.origPageX,r=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:n,deltaY:r}},e.prototype.createEventFromTouch=function(e,t){var n,r,i=e.touches,o=0,s=0;return i&&i.length?(n=i[0].pageX,r=i[0].pageY):(n=e.pageX,r=e.pageY),t?(this.origPageX=n,this.origPageY=r):(o=n-this.origPageX,s=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:n,pageY:r,deltaX:o,deltaY:s}},e}();function Il(e){Al&&e.preventDefault()}var Ml=function(){function e(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}return e.prototype.start=function(e,t,n){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.pageXOffset,this.origScreenY=n-window.pageYOffset,this.deltaX=0,this.deltaY=0,this.updateElPosition()},e.prototype.handleMove=function(e,t){this.deltaX=e-window.pageXOffset-this.origScreenX,this.deltaY=t-window.pageYOffset-this.origScreenY,this.updateElPosition()},e.prototype.setIsVisible=function(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)},e.prototype.stop=function(e,t){var n=this,r=function(){n.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)},e.prototype.doRevertAnimation=function(e,t){var n=this.mirrorEl,r=this.sourceEl.getBoundingClientRect();n.style.transition="top "+t+"ms,left "+t+"ms",$e(n,{left:r.left,top:r.top}),function(e,t){var n=function(r){t(r),ot.forEach((function(t){e.removeEventListener(t,n)}))};ot.forEach((function(t){e.addEventListener(t,n)}))}(n,(function(){n.style.transition="",e()}))},e.prototype.cleanup=function(){this.mirrorEl&&(Ge(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},e.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&$e(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})},e.prototype.getMirrorEl=function(){var e=this.sourceElRect,t=this.mirrorEl;return t||((t=this.mirrorEl=this.sourceEl.cloneNode(!0)).classList.add("fc-unselectable"),t.classList.add("fc-event-dragging"),$e(t,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(t)),t},e}(),Pl=function(e){function t(t,n){var r=e.call(this)||this;return r.handleScroll=function(){r.scrollTop=r.scrollController.getScrollTop(),r.scrollLeft=r.scrollController.getScrollLeft(),r.handleScrollChange()},r.scrollController=t,r.doesListening=n,r.scrollTop=r.origScrollTop=t.getScrollTop(),r.scrollLeft=r.origScrollLeft=t.getScrollLeft(),r.scrollWidth=t.getScrollWidth(),r.scrollHeight=t.getScrollHeight(),r.clientWidth=t.getClientWidth(),r.clientHeight=t.getClientHeight(),r.clientRect=r.computeClientRect(),r.doesListening&&r.getEventTarget().addEventListener("scroll",r.handleScroll),r}return o(t,e),t.prototype.destroy=function(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)},t.prototype.getScrollTop=function(){return this.scrollTop},t.prototype.getScrollLeft=function(){return this.scrollLeft},t.prototype.setScrollTop=function(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())},t.prototype.setScrollLeft=function(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())},t.prototype.getClientWidth=function(){return this.clientWidth},t.prototype.getClientHeight=function(){return this.clientHeight},t.prototype.getScrollWidth=function(){return this.scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollHeight},t.prototype.handleScrollChange=function(){},t}(bi),Nl=function(e){function t(t,n){return e.call(this,new Ei(t),n)||this}return o(t,e),t.prototype.getEventTarget=function(){return this.scrollController.el},t.prototype.computeClientRect=function(){return mi(this.scrollController.el)},t}(Pl),Hl=function(e){function t(t){return e.call(this,new Ti,t)||this}return o(t,e),t.prototype.getEventTarget=function(){return window},t.prototype.computeClientRect=function(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}},t.prototype.handleScrollChange=function(){this.clientRect=this.computeClientRect()},t}(Pl),Ll="function"==typeof performance?performance.now:Date.now,Yl=function(){function e(){var e=this;this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=function(){if(e.isAnimating){var t=e.computeBestEdge(e.pointerScreenX+window.pageXOffset,e.pointerScreenY+window.pageYOffset);if(t){var n=Ll();e.handleSide(t,(n-e.msSinceRequest)/1e3),e.requestAnimation(n)}else e.isAnimating=!1}}}return e.prototype.start=function(e,t,n){this.isEnabled&&(this.scrollCaches=this.buildCaches(n),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))},e.prototype.handleMove=function(e,t){if(this.isEnabled){var n=e-window.pageXOffset,r=t-window.pageYOffset,i=null===this.pointerScreenY?0:r-this.pointerScreenY,o=null===this.pointerScreenX?0:n-this.pointerScreenX;i<0?this.everMovedUp=!0:i>0&&(this.everMovedDown=!0),o<0?this.everMovedLeft=!0:o>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(Ll()))}},e.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var e=0,t=this.scrollCaches;e=0&&u>=0&&c>=0&&d>=0&&(c<=n&&this.everMovedUp&&s.canScrollUp()&&(!r||r.distance>c)&&(r={scrollCache:s,name:"top",distance:c}),d<=n&&this.everMovedDown&&s.canScrollDown()&&(!r||r.distance>d)&&(r={scrollCache:s,name:"bottom",distance:d}),l<=n&&this.everMovedLeft&&s.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:s,name:"left",distance:l}),u<=n&&this.everMovedRight&&s.canScrollRight()&&(!r||r.distance>u)&&(r={scrollCache:s,name:"right",distance:u}))}return r},e.prototype.buildCaches=function(e){return this.queryScrollEls(e).map((function(e){return e===window?new Hl(!1):new Nl(e,!1)}))},e.prototype.queryScrollEls=function(e){for(var t=[],n=0,r=this.scrollQuery;n=t*t&&r.handleDistanceSurpassed(e)}r.isDragging&&("scroll"!==e.origEvent.type&&(r.mirror.handleMove(e.pageX,e.pageY),r.autoScroller.handleMove(e.pageX,e.pageY)),r.emitter.trigger("dragmove",e))}},r.onPointerUp=function(e){r.isInteracting&&(r.isInteracting=!1,function(e){e.classList.remove("fc-unselectable"),e.removeEventListener("selectstart",rt)}(document.body),function(e){e.removeEventListener("contextmenu",rt)}(document.body),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var i=r.pointer=new Ol(t);return i.emitter.on("pointerdown",r.onPointerDown),i.emitter.on("pointermove",r.onPointerMove),i.emitter.on("pointerup",r.onPointerUp),n&&(i.selector=n),r.mirror=new Ml,r.autoScroller=new Yl,r}return o(t,e),t.prototype.destroy=function(){this.pointer.destroy(),this.onPointerUp({})},t.prototype.startDelay=function(e){var t=this;"number"==typeof this.delay?this.delayTimeoutId=setTimeout((function(){t.delayTimeoutId=null,t.handleDelayEnd(e)}),this.delay):this.handleDelayEnd(e)},t.prototype.handleDelayEnd=function(e){this.isDelayEnded=!0,this.tryStartDrag(e)},t.prototype.handleDistanceSurpassed=function(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)},t.prototype.tryStartDrag=function(e){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY,this.containerEl),this.emitter.trigger("dragstart",e),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))},t.prototype.tryStopDrag=function(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))},t.prototype.stopDrag=function(e){this.isDragging=!1,this.emitter.trigger("dragend",e)},t.prototype.setIgnoreMove=function(e){this.pointer.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){this.mirror.setIsVisible(e)},t.prototype.setMirrorNeedsRevert=function(e){this.mirrorNeedsRevert=e},t.prototype.setAutoScrollEnabled=function(e){this.autoScroller.isEnabled=e},t}(qo),Bl=function(){function e(e){this.origRect=gi(e),this.scrollCaches=vi(e).map((function(e){return new Nl(e,!0)}))}return e.prototype.destroy=function(){for(var e=0,t=this.scrollCaches;e=0&&c=0&&di.layer)&&(m.componentId=o,m.context=s.context,m.rect.left+=l,m.rect.right+=l,m.rect.top+=u,m.rect.bottom+=u,i=m)}}}return i},e}();function jl(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&(n=e.dateSpan,r=t.dateSpan,i=n.range,o=r.range,(null===i.start?null:i.start.valueOf())===(null===o.start?null:o.start.valueOf())&&(null===i.end?null:i.end.valueOf())===(null===o.end?null:o.end.valueOf())&&n.allDay===r.allDay&&function(e,t){for(var n in t)if("range"!==n&&"allDay"!==n&&e[n]!==t[n])return!1;for(var n in e)if(!(n in t))return!1;return!0}(n,r));var n,r,i,o}function Wl(e,t){for(var n,r,i={},o=0,a=t.pluginHooks.datePointTransforms;or.start)return{endDelta:a};return null}(s,e,r.subjectEl.classList.contains("fc-event-resizer-start"),a.range)));l&&(u=xr(o,i.getCurrentData().eventUiBases,l,i),d.mutatedEvents=u,ys(d,e.dateProfile,i)||(c=!0,l=null,u=null,d.mutatedEvents=null)),u?i.dispatch({type:"SET_EVENT_RESIZE",state:d}):i.dispatch({type:"UNSET_EVENT_RESIZE"}),c?ct():dt(),t||(l&&jl(s,e)&&(l=null),n.validMutation=l,n.mutatedRelevantEvents=u)},n.handleDragEnd=function(e){var t=n.component.context,r=n.eventRange.def,i=n.eventRange.instance,o=new Hr(t,r,i),a=n.relevantEvents,l=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:o,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var u=new Hr(t,l.defs[r.defId],i?l.instances[i.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:l});var c={oldEvent:o,event:u,relatedEvents:Yr(l,t,i),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:a})}};t.emitter.trigger("eventResize",s(s({},c),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||Zt(0),endDelta:n.validMutation.endDelta||Zt(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",c)}else t.emitter.trigger("_noEventResize");n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var r=t.component,i=n.dragging=new zl(t.el);i.pointer.selector=".fc-event-resizer",i.touchScrollAllowed=!1,i.autoScroller.isEnabled=r.context.options.dragScroll;var o=n.hitDragging=new Ul(n.dragging,Vo(t));return o.emitter.on("pointerdown",n.handlePointerDown),o.emitter.on("dragstart",n.handleDragStart),o.emitter.on("hitupdate",n.handleHitUpdate),o.emitter.on("dragend",n.handleDragEnd),n}return o(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return Ze(e.subjectEl,".fc-event")},t}(jo);var Zl=function(){function e(e){var t=this;this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=function(e){e.jsEvent&&(t.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=function(e){var n=t.context.options.unselectCancel,r=Qe(e.origEvent);t.matchesCancel=!!Ze(r,n),t.matchesEvent=!!Ze(r,ql.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,i=n.getCurrentData();if(!r.wasTouchScroll){if(i.dateSelection&&!t.isRecentPointerDateSelect){var o=n.options.unselectAuto;!o||o&&t.matchesCancel||n.calendarApi.unselect(e)}i.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new Ol(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}return e.prototype.destroy=function(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()},e}(),Kl={fixedMirrorParent:On},Xl={dateClick:On,eventDragStart:On,eventDragStop:On,eventDrop:On,eventResizeStart:On,eventResizeStop:On,eventResize:On,drop:On,eventReceive:On,eventLeave:On},$l=function(){function e(e,t){var n=this;this.receivingContext=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(e){n.dragMeta=n.buildDragMeta(e.subjectEl)},this.handleHitUpdate=function(e,t,r){var i=n.hitDragging.dragging,o=null,a=null,l=!1,u={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:n.dragMeta.create};e&&(o=e.context,n.canDropElOnCalendar(r.subjectEl,o)&&(a=function(e,t,n){for(var r=s({},t.leftoverProps),i=0,o=n.pluginHooks.externalDefTransforms;i{document.querySelector(".fc-dayGridMonth-button").classList.remove("btn-icon"),document.querySelector(".fc-timeGridWeek-button").classList.remove("btn-icon"),document.querySelector(".fc-timeGridDay-button").classList.remove("btn-icon")},eventWillUnmount:e=>{if(null===e.event.source)return;if(!this.isKimaiSource(e.event))return;const t=r.AM.getInstance(e.element);null!==t&&t.dispose()},eventMouseEnter:e=>{const t=e.event;if(!this.isKimaiSource(t))return;const n=e.el,i=o.getFormattedDate(t.start)+" | "+o.formatTime(t.start)+" - "+(t.end?o.formatTime(t.end):""),s=this.renderEventPopoverContent(t);let a=r.AM.getInstance(n);null!==a?a.setContent({".popover-header":i,".popover-body":s}):a=new r.AM(n,{title:i,placement:"top",html:!0,content:s,trigger:"focus"}),a.show()},eventMouseLeave:e=>{this.isKimaiSource(e.event)&&this.hidePopover(e.el)},eventDidMount:e=>{e.el.addEventListener("contextmenu",(t=>{t.preventDefault();const n=e.event;if(!n.allDay){const e=this.options.url.actions(n.extendedProps.timesheet);i.get(e,{},(e=>{new Iu.A("calendar_contextMenu").createFromApi(t,e)}),(e=>{console.log("Failed to load actions for context menu",e)}))}}))}};if(!this.hasPermission("punch")&&this.hasPermission("create")&&void 0!==this.options.dragdrop){[].slice.call(document.querySelectorAll(this.options.dragdrop.container)).map((e=>new Jl(e,{itemSelector:this.options.dragdrop.items}))),u={...u,droppable:!0,drop:e=>{const t=e.draggedEl,n=t.parentElement;let r=JSON.parse(t.dataset.entry);const s=JSON.parse(n.dataset.routeReplacer);let l=n.dataset.route;for(const[e,t]of Object.entries(s))l=l.replace(e,r[t]);let u=e.date;if("dayGridMonth"===e.view.type){let e=this.options.defaultStartTime;if(null===e){const t=new Date;e=(t.getHours()<10?"0":"")+t.getHours()+":"+(t.getMinutes()<10?"0":"")+t.getMinutes()}u=o.addHumanDuration(u,e)}let c=o.addHumanDuration(u,this.options.slotDuration);this.hasPermission("punch")||(this.hasPermission("edit_begin")&&(r.begin=o.formatForAPI(u)),this.hasPermission("edit_end")&&(r.end=o.formatForAPI(c))),r=this.options.preparePayloadForUpdate(r),"PATCH"===n.dataset.method?i.patch(l,JSON.stringify(r),(e=>{const t=this.convertSourceForCalendar(e);this.getCalendar().addEvent(t,!0),a.success("action.update.success")})):i.post(l,JSON.stringify(r),(e=>{const t=this.convertSourceForCalendar(e);this.getCalendar().addEvent(t,!0),a.success("action.update.success")}))}}}!this.hasPermission("punch")&&this.hasPermission("create")&&(u={...u,dateClick:e=>{if("dayGridMonth"!==e.view.type)return;const t=this.options.url.create(e.dateStr);s.openUrlInModal(t)},selectable:!0,select:e=>{if("dayGridMonth"===e.view.type)return;const t=this.options.url.create(e.startStr,e.endStr);s.openUrlInModal(t)}}),this.hasPermission("edit")&&(u={...u,eventClick:e=>{const t=e.event;this.isKimaiSource(t)?(this.hidePopover(e.el),t.extendedProps.exported&&!this.hasPermission("edit_exported")||s.openUrlInModal(this.options.url.edit(t.id),(e=>{403!==e.status&&console.log(e)}))):e.jsEvent.preventDefault()}},this.hasPermission("punch")||(u={...u,dragRevertDuration:0,eventStartEditable:this.hasPermission("edit_begin"),eventDurationEditable:this.hasPermission("edit_end")||this.hasPermission("edit_duration"),eventDragStart:e=>{this.hidePopover(e.el)},eventDrop:e=>{this.changeHandler(e)},eventResizeStart:e=>{this.hidePopover(e.el)},eventResize:e=>{this.changeHandler(e)}})),void 0!==this.options.googleCalendarApiKey&&(u={...u,googleCalendarApiKey:this.options.googleCalendarApiKey});let c=[];for(const e of this.options.eventSources){let t={};if("timesheet"===e.type)t={...t,id:"kimai-"+e.id,events:(t,n,r)=>{const s=o.formatForAPI(t.start),a=o.formatForAPI(t.end);let l=e.url;l=l.replace("{from}",s),l=l.replace("__FROM__",s),l=l.replace("{to}",a),l=l.replace("__TO__",a),i.get(l,{},(e=>{let t=[];for(const n of e)t.push(this.convertSourceForCalendar(n));n(t)}),r)}};else if("google"===e.type)t={...t,id:"google-"+e.id,name:"google",editable:!1};else if("json"===e.type)t={...t,id:"json-"+e.id,editable:!1,events:(t,n,r)=>{const s=o.formatForAPI(t.start),a=o.formatForAPI(t.end);let l=e.url;l=l.replace("{from}",s),l=l.replace("__FROM__",s),l=l.replace("{to}",a),l=l.replace("__TO__",a),i.get(l,{},(e=>{let t=[];for(const n of e)t.push(n);n(t)}),r)}};else{if("ical"!==e.type){console.log("Unknown source type given, skipping to load events from: "+e.id);continue}t={...t,id:"ical-"+e.id,url:e.url,format:"ics",editable:!1}}void 0!==e.options&&(t={...t,...e.options}),c.push(t)}c.length>0&&(u={...u,eventSources:c}),this.calendar=new oa(t,u)}isKimaiSource(e){return null!==e&&(null!==e.source&&0===e.source.id.indexOf("kimai-"))}hasPermission(e){return this.options.permissions[e]}getCalendar(){return this.calendar}render(){this.calendar.render()}reloadEvents(){this.calendar.getEventSources().forEach((e=>e.refetch()))}convertSourceForCalendar(e){const t=this.kimai.getConfiguration().get("defaultColor");let n=e.activity.color;null!==n&&n!==t||(n=e.project.color,null!==n&&n!==t||(n=e.project.customer.color)),null===n&&(n=t);const r=this.kimai.getPlugin("date");let i=this.options.patterns.title;return i=i.replace("{project}",e.project.name),i=i.replace("{customer}",e.project.customer.name),i=i.replace("{description}",e.description??""),i=i.replace("{activity}",e.activity.name??""),i=null===e.end?i.replace("{duration}",""):i.replace("{duration}",r.formatDuration(e.duration)),""!==i&&null!==i||(i=e.activity.name),{id:e.id,timesheet:e.id,title:i,description:e.description,exported:e.exported,start:e.begin,end:e.end,activity:e.activity.name,project:e.project.name,customer:e.project.customer.name,tags:e.tags,color:n,textColor:Ou.A.calculateContrastColor(n)}}renderEventPopoverContent(e){const t=e.extendedProps,n=this.kimai.getPlugin("escape");let r="";if(null!==t.tags&&t.tags.length>0)for(let e of t.tags)r+=''+n.escapeForHtml(e)+"";return'\n
\n
    \n
  • '+this.options.translations.customer+": "+n.escapeForHtml(t.customer)+"
  • \n
  • "+this.options.translations.project+": "+n.escapeForHtml(t.project)+"
  • \n
  • "+this.options.translations.activity+": "+n.escapeForHtml(t.activity)+"
  • \n
"+(null!==t.description||t.tags.length>0?"
":"")+(t.description?"
"+n.escapeForHtml(t.description)+"
":"")+r+"\n
"}hidePopover(e){let t=r.AM.getInstance(e);null!==t&&t.hide()}changeHandler(e){const t=e.event;if(t.extendedProps.exported&&!this.hasPermission("edit_exported"))return void e.revert();const n=this.kimai.getPlugin("api"),r=this.kimai.getPlugin("alert"),i=this.kimai.getPlugin("date");let o={begin:i.formatForAPI(t.start)};null!==t.end&&void 0!==t.end?o.end=i.formatForAPI(t.end):o.end=null;const s=this.options.url.update(t.id);n.patch(s,JSON.stringify(o),(()=>{r.success("action.update.success")}),(t=>{e.revert(),n.handleError("action.update.error",t)}))}}},9997:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});class r{static calculateContrastColor(e){"#"===e.slice(0,1)&&(e=e.slice(1)),3===e.length&&(e=e.split("").map((function(e){return e+e})).join(""));return(299*parseInt(e.substring(0,2),16)+587*parseInt(e.substring(2,4),16)+114*parseInt(e.substring(4,6),16))/1e3>=128?"#000000":"#ffffff"}}},2758:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});class r{constructor(e){this.id=e}getContextMenuElement(){if(null===document.getElementById(this.id)){const e=document.createElement("div");e.id=this.id,e.classList.add("dropdown-menu","d-none"),document.body.appendChild(e)}return document.getElementById(this.id)}createFromApi(e,t){let n="";for(const e of t)if(!0===e.divider&&(n+=''),null!==e.url){if(n+='
"}this.createFromClickEvent(e,n)}createFromClickEvent(e,t){const n=this.getContextMenuElement();n.classList.contains("action-dropdown")||n.classList.add("action-dropdown"),n.innerHTML=t,n.style.position="fixed",n.style.top=e.clientY+"px",n.style.left=e.clientX+"px";const r=e=>{e.target.classList.contains("dropdown-toggle")||e.target.classList.contains("dropdown-divider")||(n.classList.remove("d-block"),n.classList.contains("d-none")||n.classList.add("d-none"),n.removeEventListener("click",r),document.removeEventListener("click",r))};n.addEventListener("click",r),document.addEventListener("click",r),n.classList.remove("d-none"),n.classList.contains("d-block")||n.classList.add("d-block")}static createForDataTable(e){[].slice.call(document.querySelectorAll(e)).map((e=>{null!==e.querySelector("td.actions div.dropdown-menu")&&e.addEventListener("contextmenu",(t=>{let n=t.target;for(;null!==n;){const e=n.tagName.toUpperCase();if("TH"===e||"TABLE"===e||"BODY"===e)return;if("TR"===e)break;n=n.parentNode}if(null===n||!n.matches("table.dataTable tbody tr"))return;const i=n.querySelector("td.actions div.dropdown-menu");if(null===i)return;t.preventDefault();new r(e.dataset.contextMenu).createFromClickEvent(t,i.innerHTML)}))}))}}},9336:function(e,t,n){"use strict";n.d(t,{aF:function(){return Un},go:function(){return Xn},AM:function(){return yr},y8:function(){return Wr},m_:function(){return mr}});var r={};n.r(r),n.d(r,{afterMain:function(){return w},afterRead:function(){return b},afterWrite:function(){return C},applyStyles:function(){return M},arrow:function(){return Q},auto:function(){return l},basePlacements:function(){return u},beforeMain:function(){return E},beforeRead:function(){return y},beforeWrite:function(){return D},bottom:function(){return o},clippingParents:function(){return h},computeStyles:function(){return re},createPopper:function(){return Me},createPopperBase:function(){return Ie},createPopperLite:function(){return Pe},detectOverflow:function(){return _e},end:function(){return d},eventListeners:function(){return oe},flip:function(){return be},hide:function(){return we},left:function(){return a},main:function(){return T},modifierPhases:function(){return x},offset:function(){return De},placements:function(){return v},popper:function(){return p},popperGenerator:function(){return Oe},popperOffsets:function(){return Se},preventOverflow:function(){return Ce},read:function(){return _},reference:function(){return m},right:function(){return s},start:function(){return c},top:function(){return i},variationPlacements:function(){return g},viewport:function(){return f},write:function(){return S}});var i="top",o="bottom",s="right",a="left",l="auto",u=[i,o,s,a],c="start",d="end",h="clippingParents",f="viewport",p="popper",m="reference",g=u.reduce((function(e,t){return e.concat([t+"-"+c,t+"-"+d])}),[]),v=[].concat(u,[l]).reduce((function(e,t){return e.concat([t,t+"-"+c,t+"-"+d])}),[]),y="beforeRead",_="read",b="afterRead",E="beforeMain",T="main",w="afterMain",D="beforeWrite",S="write",C="afterWrite",x=[y,_,b,E,T,w,D,S,C];function k(e){return e?(e.nodeName||"").toLowerCase():null}function R(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function A(e){return e instanceof R(e).Element||e instanceof Element}function O(e){return e instanceof R(e).HTMLElement||e instanceof HTMLElement}function I(e){return"undefined"!=typeof ShadowRoot&&(e instanceof R(e).ShadowRoot||e instanceof ShadowRoot)}var M={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];O(i)&&k(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});O(r)&&k(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function P(e){return e.split("-")[0]}var N=Math.max,H=Math.min,L=Math.round;function Y(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function z(){return!/^((?!chrome|android).)*safari/i.test(Y())}function B(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&O(e)&&(i=e.offsetWidth>0&&L(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&L(r.height)/e.offsetHeight||1);var s=(A(e)?R(e):window).visualViewport,a=!z()&&n,l=(r.left+(a&&s?s.offsetLeft:0))/i,u=(r.top+(a&&s?s.offsetTop:0))/o,c=r.width/i,d=r.height/o;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l,x:l,y:u}}function U(e){var t=B(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function j(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&I(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function W(e){return R(e).getComputedStyle(e)}function V(e){return["table","td","th"].indexOf(k(e))>=0}function F(e){return((A(e)?e.ownerDocument:e.document)||window.document).documentElement}function q(e){return"html"===k(e)?e:e.assignedSlot||e.parentNode||(I(e)?e.host:null)||F(e)}function G(e){return O(e)&&"fixed"!==W(e).position?e.offsetParent:null}function Z(e){for(var t=R(e),n=G(e);n&&V(n)&&"static"===W(n).position;)n=G(n);return n&&("html"===k(n)||"body"===k(n)&&"static"===W(n).position)?t:n||function(e){var t=/firefox/i.test(Y());if(/Trident/i.test(Y())&&O(e)&&"fixed"===W(e).position)return null;var n=q(e);for(I(n)&&(n=n.host);O(n)&&["html","body"].indexOf(k(n))<0;){var r=W(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function K(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function X(e,t,n){return N(e,H(t,n))}function $(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function J(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var Q={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,l=e.options,c=n.elements.arrow,d=n.modifiersData.popperOffsets,h=P(n.placement),f=K(h),p=[a,s].indexOf(h)>=0?"height":"width";if(c&&d){var m=function(e,t){return $("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:J(e,u))}(l.padding,n),g=U(c),v="y"===f?i:a,y="y"===f?o:s,_=n.rects.reference[p]+n.rects.reference[f]-d[f]-n.rects.popper[p],b=d[f]-n.rects.reference[f],E=Z(c),T=E?"y"===f?E.clientHeight||0:E.clientWidth||0:0,w=_/2-b/2,D=m[v],S=T-g[p]-m[y],C=T/2-g[p]/2+w,x=X(D,C,S),k=f;n.modifiersData[r]=((t={})[k]=x,t.centerOffset=x-C,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&j(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ee(e){return e.split("-")[1]}var te={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ne(e){var t,n=e.popper,r=e.popperRect,l=e.placement,u=e.variation,c=e.offsets,h=e.position,f=e.gpuAcceleration,p=e.adaptive,m=e.roundOffsets,g=e.isFixed,v=c.x,y=void 0===v?0:v,_=c.y,b=void 0===_?0:_,E="function"==typeof m?m({x:y,y:b}):{x:y,y:b};y=E.x,b=E.y;var T=c.hasOwnProperty("x"),w=c.hasOwnProperty("y"),D=a,S=i,C=window;if(p){var x=Z(n),k="clientHeight",A="clientWidth";if(x===R(n)&&"static"!==W(x=F(n)).position&&"absolute"===h&&(k="scrollHeight",A="scrollWidth"),l===i||(l===a||l===s)&&u===d)S=o,b-=(g&&x===C&&C.visualViewport?C.visualViewport.height:x[k])-r.height,b*=f?1:-1;if(l===a||(l===i||l===o)&&u===d)D=s,y-=(g&&x===C&&C.visualViewport?C.visualViewport.width:x[A])-r.width,y*=f?1:-1}var O,I=Object.assign({position:h},p&&te),M=!0===m?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:L(n*i)/i||0,y:L(r*i)/i||0}}({x:y,y:b},R(n)):{x:y,y:b};return y=M.x,b=M.y,f?Object.assign({},I,((O={})[S]=w?"0":"",O[D]=T?"0":"",O.transform=(C.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",O)):Object.assign({},I,((t={})[S]=w?b+"px":"",t[D]=T?y+"px":"",t.transform="",t))}var re={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,s=void 0===o||o,a=n.roundOffsets,l=void 0===a||a,u={placement:P(t.placement),variation:ee(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ne(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ne(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},ie={passive:!0};var oe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,s=r.resize,a=void 0===s||s,l=R(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach((function(e){e.addEventListener("scroll",n.update,ie)})),a&&l.addEventListener("resize",n.update,ie),function(){o&&u.forEach((function(e){e.removeEventListener("scroll",n.update,ie)})),a&&l.removeEventListener("resize",n.update,ie)}},data:{}},se={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var le={start:"end",end:"start"};function ue(e){return e.replace(/start|end/g,(function(e){return le[e]}))}function ce(e){var t=R(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function de(e){return B(F(e)).left+ce(e).scrollLeft}function he(e){var t=W(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function fe(e){return["html","body","#document"].indexOf(k(e))>=0?e.ownerDocument.body:O(e)&&he(e)?e:fe(q(e))}function pe(e,t){var n;void 0===t&&(t=[]);var r=fe(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=R(r),s=i?[o].concat(o.visualViewport||[],he(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(pe(q(s)))}function me(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ge(e,t,n){return t===f?me(function(e,t){var n=R(e),r=F(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var u=z();(u||!u&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+de(e),y:l}}(e,n)):A(t)?function(e,t){var n=B(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):me(function(e){var t,n=F(e),r=ce(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=N(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=N(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+de(e),l=-r.scrollTop;return"rtl"===W(i||n).direction&&(a+=N(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(F(e)))}function ve(e,t,n,r){var i="clippingParents"===t?function(e){var t=pe(q(e)),n=["absolute","fixed"].indexOf(W(e).position)>=0&&O(e)?Z(e):e;return A(n)?t.filter((function(e){return A(e)&&j(e,n)&&"body"!==k(e)})):[]}(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce((function(t,n){var i=ge(e,n,r);return t.top=N(i.top,t.top),t.right=H(i.right,t.right),t.bottom=H(i.bottom,t.bottom),t.left=N(i.left,t.left),t}),ge(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ye(e){var t,n=e.reference,r=e.element,l=e.placement,u=l?P(l):null,h=l?ee(l):null,f=n.x+n.width/2-r.width/2,p=n.y+n.height/2-r.height/2;switch(u){case i:t={x:f,y:n.y-r.height};break;case o:t={x:f,y:n.y+n.height};break;case s:t={x:n.x+n.width,y:p};break;case a:t={x:n.x-r.width,y:p};break;default:t={x:n.x,y:n.y}}var m=u?K(u):null;if(null!=m){var g="y"===m?"height":"width";switch(h){case c:t[m]=t[m]-(n[g]/2-r[g]/2);break;case d:t[m]=t[m]+(n[g]/2-r[g]/2)}}return t}function _e(e,t){void 0===t&&(t={});var n=t,r=n.placement,a=void 0===r?e.placement:r,l=n.strategy,c=void 0===l?e.strategy:l,d=n.boundary,g=void 0===d?h:d,v=n.rootBoundary,y=void 0===v?f:v,_=n.elementContext,b=void 0===_?p:_,E=n.altBoundary,T=void 0!==E&&E,w=n.padding,D=void 0===w?0:w,S=$("number"!=typeof D?D:J(D,u)),C=b===p?m:p,x=e.rects.popper,k=e.elements[T?C:b],R=ve(A(k)?k:k.contextElement||F(e.elements.popper),g,y,c),O=B(e.elements.reference),I=ye({reference:O,element:x,strategy:"absolute",placement:a}),M=me(Object.assign({},x,I)),P=b===p?M:O,N={top:R.top-P.top+S.top,bottom:P.bottom-R.bottom+S.bottom,left:R.left-P.left+S.left,right:P.right-R.right+S.right},H=e.modifiersData.offset;if(b===p&&H){var L=H[a];Object.keys(N).forEach((function(e){var t=[s,o].indexOf(e)>=0?1:-1,n=[i,o].indexOf(e)>=0?"y":"x";N[e]+=L[n]*t}))}return N}var be={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var d=n.mainAxis,h=void 0===d||d,f=n.altAxis,p=void 0===f||f,m=n.fallbackPlacements,y=n.padding,_=n.boundary,b=n.rootBoundary,E=n.altBoundary,T=n.flipVariations,w=void 0===T||T,D=n.allowedAutoPlacements,S=t.options.placement,C=P(S),x=m||(C===S||!w?[ae(S)]:function(e){if(P(e)===l)return[];var t=ae(e);return[ue(e),t,ue(t)]}(S)),k=[S].concat(x).reduce((function(e,n){return e.concat(P(n)===l?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?v:l,d=ee(r),h=d?a?g:g.filter((function(e){return ee(e)===d})):u,f=h.filter((function(e){return c.indexOf(e)>=0}));0===f.length&&(f=h);var p=f.reduce((function(t,n){return t[n]=_e(e,{placement:n,boundary:i,rootBoundary:o,padding:s})[P(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:_,rootBoundary:b,padding:y,flipVariations:w,allowedAutoPlacements:D}):n)}),[]),R=t.rects.reference,A=t.rects.popper,O=new Map,I=!0,M=k[0],N=0;N=0,B=z?"width":"height",U=_e(t,{placement:H,boundary:_,rootBoundary:b,altBoundary:E,padding:y}),j=z?Y?s:a:Y?o:i;R[B]>A[B]&&(j=ae(j));var W=ae(j),V=[];if(h&&V.push(U[L]<=0),p&&V.push(U[j]<=0,U[W]<=0),V.every((function(e){return e}))){M=H,I=!1;break}O.set(H,V)}if(I)for(var F=function(e){var t=k.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return M=t,"break"},q=w?3:1;q>0;q--){if("break"===F(q))break}t.placement!==M&&(t.modifiersData[r]._skip=!0,t.placement=M,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Ee(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Te(e){return[i,s,o,a].some((function(t){return e[t]>=0}))}var we={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=_e(t,{elementContext:"reference"}),a=_e(t,{altBoundary:!0}),l=Ee(s,r),u=Ee(a,i,o),c=Te(l),d=Te(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}};var De={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,l=void 0===o?[0,0]:o,u=v.reduce((function(e,n){return e[n]=function(e,t,n){var r=P(e),o=[a,i].indexOf(r)>=0?-1:1,l="function"==typeof n?n(Object.assign({},t,{placement:e})):n,u=l[0],c=l[1];return u=u||0,c=(c||0)*o,[a,s].indexOf(r)>=0?{x:c,y:u}:{x:u,y:c}}(n,t.rects,l),e}),{}),c=u[t.placement],d=c.x,h=c.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=h),t.modifiersData[r]=u}};var Se={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ye({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var Ce={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,l=n.mainAxis,u=void 0===l||l,d=n.altAxis,h=void 0!==d&&d,f=n.boundary,p=n.rootBoundary,m=n.altBoundary,g=n.padding,v=n.tether,y=void 0===v||v,_=n.tetherOffset,b=void 0===_?0:_,E=_e(t,{boundary:f,rootBoundary:p,padding:g,altBoundary:m}),T=P(t.placement),w=ee(t.placement),D=!w,S=K(T),C="x"===S?"y":"x",x=t.modifiersData.popperOffsets,k=t.rects.reference,R=t.rects.popper,A="function"==typeof b?b(Object.assign({},t.rects,{placement:t.placement})):b,O="number"==typeof A?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,M={x:0,y:0};if(x){if(u){var L,Y="y"===S?i:a,z="y"===S?o:s,B="y"===S?"height":"width",j=x[S],W=j+E[Y],V=j-E[z],F=y?-R[B]/2:0,q=w===c?k[B]:R[B],G=w===c?-R[B]:-k[B],$=t.elements.arrow,J=y&&$?U($):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=Q[Y],ne=Q[z],re=X(0,k[B],J[B]),ie=D?k[B]/2-F-re-te-O.mainAxis:q-re-te-O.mainAxis,oe=D?-k[B]/2+F+re+ne+O.mainAxis:G+re+ne+O.mainAxis,se=t.elements.arrow&&Z(t.elements.arrow),ae=se?"y"===S?se.clientTop||0:se.clientLeft||0:0,le=null!=(L=null==I?void 0:I[S])?L:0,ue=j+oe-le,ce=X(y?H(W,j+ie-le-ae):W,j,y?N(V,ue):V);x[S]=ce,M[S]=ce-j}if(h){var de,he="x"===S?i:a,fe="x"===S?o:s,pe=x[C],me="y"===C?"height":"width",ge=pe+E[he],ve=pe-E[fe],ye=-1!==[i,a].indexOf(T),be=null!=(de=null==I?void 0:I[C])?de:0,Ee=ye?ge:pe-k[me]-R[me]-be+O.altAxis,Te=ye?pe+k[me]+R[me]-be-O.altAxis:ve,we=y&&ye?function(e,t,n){var r=X(e,t,n);return r>n?n:r}(Ee,pe,Te):X(y?Ee:ge,pe,y?Te:ve);x[C]=we,M[C]=we-pe}t.modifiersData[r]=M}},requiresIfExists:["offset"]};function xe(e,t,n){void 0===n&&(n=!1);var r,i,o=O(t),s=O(t)&&function(e){var t=e.getBoundingClientRect(),n=L(t.width)/e.offsetWidth||1,r=L(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=F(t),l=B(e,s,n),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!n)&&(("body"!==k(t)||he(a))&&(u=(r=t)!==R(r)&&O(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:ce(r)),O(t)?((c=B(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=de(a))),{x:l.left+u.scrollLeft-c.x,y:l.top+u.scrollTop-c.y,width:l.width,height:l.height}}function ke(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var Re={placement:"bottom",modifiers:[],strategy:"absolute"};function Ae(){for(var e=arguments.length,t=new Array(e),n=0;nNe.has(e)&&Ne.get(e).get(t)||null,remove(e,t){if(!Ne.has(e))return;const n=Ne.get(e);n.delete(t),0===n.size&&Ne.delete(e)}},Le="transitionend",Ye=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),e),ze=e=>{e.dispatchEvent(new Event(Le))},Be=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),Ue=e=>Be(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(Ye(e)):null,je=e=>{if(!Be(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const t=e.closest("summary");if(t&&t.parentNode!==n)return!1;if(null===t)return!1}return t},We=e=>!e||e.nodeType!==Node.ELEMENT_NODE||(!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))),Ve=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?Ve(e.parentNode):null},Fe=()=>{},qe=e=>{e.offsetHeight},Ge=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Ze=[],Ke=()=>"rtl"===document.documentElement.dir,Xe=e=>{var t;t=()=>{const t=Ge();if(t){const n=e.NAME,r=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=r,e.jQueryInterface)}},"loading"===document.readyState?(Ze.length||document.addEventListener("DOMContentLoaded",(()=>{for(const e of Ze)e()})),Ze.push(t)):t()},$e=(e,t=[],n=e)=>"function"==typeof e?e(...t):n,Je=(e,t,n=!0)=>{if(!n)return void $e(e);const r=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const r=Number.parseFloat(t),i=Number.parseFloat(n);return r||i?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0})(t)+5;let i=!1;const o=({target:n})=>{n===t&&(i=!0,t.removeEventListener(Le,o),$e(e))};t.addEventListener(Le,o),setTimeout((()=>{i||ze(t)}),r)},Qe=(e,t,n,r)=>{const i=e.length;let o=e.indexOf(t);return-1===o?!n&&r?e[i-1]:e[0]:(o+=n?1:-1,r&&(o=(o+i)%i),e[Math.max(0,Math.min(o,i-1))])},et=/[^.]*(?=\..*)\.|.*/,tt=/\..*/,nt=/::\d+$/,rt={};let it=1;const ot={mouseenter:"mouseover",mouseleave:"mouseout"},st=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function at(e,t){return t&&`${t}::${it++}`||e.uidEvent||it++}function lt(e){const t=at(e);return e.uidEvent=t,rt[t]=rt[t]||{},rt[t]}function ut(e,t,n=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===n))}function ct(e,t,n){const r="string"==typeof t,i=r?n:t||n;let o=pt(e);return st.has(o)||(o=e),[r,i,o]}function dt(e,t,n,r,i){if("string"!=typeof t||!e)return;let[o,s,a]=ct(t,n,r);if(t in ot){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};s=e(s)}const l=lt(e),u=l[a]||(l[a]={}),c=ut(u,s,o?n:null);if(c)return void(c.oneOff=c.oneOff&&i);const d=at(s,t.replace(et,"")),h=o?function(e,t,n){return function r(i){const o=e.querySelectorAll(t);for(let{target:s}=i;s&&s!==this;s=s.parentNode)for(const a of o)if(a===s)return gt(i,{delegateTarget:s}),r.oneOff&&mt.off(e,i.type,t,n),n.apply(s,[i])}}(e,n,s):function(e,t){return function n(r){return gt(r,{delegateTarget:e}),n.oneOff&&mt.off(e,r.type,t),t.apply(e,[r])}}(e,s);h.delegationSelector=o?n:null,h.callable=s,h.oneOff=i,h.uidEvent=d,u[d]=h,e.addEventListener(a,h,o)}function ht(e,t,n,r,i){const o=ut(t[n],r,i);o&&(e.removeEventListener(n,o,Boolean(i)),delete t[n][o.uidEvent])}function ft(e,t,n,r){const i=t[n]||{};for(const[o,s]of Object.entries(i))o.includes(r)&&ht(e,t,n,s.callable,s.delegationSelector)}function pt(e){return e=e.replace(tt,""),ot[e]||e}const mt={on(e,t,n,r){dt(e,t,n,r,!1)},one(e,t,n,r){dt(e,t,n,r,!0)},off(e,t,n,r){if("string"!=typeof t||!e)return;const[i,o,s]=ct(t,n,r),a=s!==t,l=lt(e),u=l[s]||{},c=t.startsWith(".");if(void 0===o){if(c)for(const n of Object.keys(l))ft(e,l,n,t.slice(1));for(const[n,r]of Object.entries(u)){const i=n.replace(nt,"");a&&!t.includes(i)||ht(e,l,s,r.callable,r.delegationSelector)}}else{if(!Object.keys(u).length)return;ht(e,l,s,o,i?n:null)}},trigger(e,t,n){if("string"!=typeof t||!e)return null;const r=Ge();let i=null,o=!0,s=!0,a=!1;t!==pt(t)&&r&&(i=r.Event(t,n),r(e).trigger(i),o=!i.isPropagationStopped(),s=!i.isImmediatePropagationStopped(),a=i.isDefaultPrevented());const l=gt(new Event(t,{bubbles:o,cancelable:!0}),n);return a&&l.preventDefault(),s&&e.dispatchEvent(l),l.defaultPrevented&&i&&i.preventDefault(),l}};function gt(e,t={}){for(const[n,r]of Object.entries(t))try{e[n]=r}catch(t){Object.defineProperty(e,n,{configurable:!0,get:()=>r})}return e}function vt(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function yt(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}const _t={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${yt(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${yt(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter((e=>e.startsWith("bs")&&!e.startsWith("bsConfig")));for(const r of n){let n=r.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),t[n]=vt(e.dataset[r])}return t},getDataAttribute:(e,t)=>vt(e.getAttribute(`data-bs-${yt(t)}`))};class bt{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const n=Be(t)?_t.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...Be(t)?_t.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[r,i]of Object.entries(t)){const t=e[r],o=Be(t)?"element":null==(n=t)?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(i).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${r}" provided type "${o}" but expected type "${i}".`)}var n}}class Et extends bt{constructor(e,t){super(),(e=Ue(e))&&(this._element=e,this._config=this._getConfig(t),He.set(this._element,this.constructor.DATA_KEY,this))}dispose(){He.remove(this._element,this.constructor.DATA_KEY),mt.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){Je(e,t,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return He.get(Ue(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const Tt=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return t?t.split(",").map((e=>Ye(e))).join(","):null},wt={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const n=[];let r=e.parentNode.closest(t);for(;r;)n.push(r),r=r.parentNode.closest(t);return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((e=>`${e}:not([tabindex^="-"])`)).join(",");return this.find(t,e).filter((e=>!We(e)&&je(e)))},getSelectorFromElement(e){const t=Tt(e);return t&&wt.findOne(t)?t:null},getElementFromSelector(e){const t=Tt(e);return t?wt.findOne(t):null},getMultipleElementsFromSelector(e){const t=Tt(e);return t?wt.find(t):[]}},Dt=(e,t="hide")=>{const n=`click.dismiss${e.EVENT_KEY}`,r=e.NAME;mt.on(document,n,`[data-bs-dismiss="${r}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),We(this))return;const i=wt.getElementFromSelector(this)||this.closest(`.${r}`);e.getOrCreateInstance(i)[t]()}))};class St extends Et{static get NAME(){return"alert"}close(){if(mt.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,e)}_destroyElement(){this._element.remove(),mt.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(e){return this.each((function(){const t=St.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}Dt(St,"close"),Xe(St);const Ct='[data-bs-toggle="button"]';class xt extends Et{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each((function(){const t=xt.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}mt.on(document,"click.bs.button.data-api",Ct,(e=>{e.preventDefault();const t=e.target.closest(Ct);xt.getOrCreateInstance(t).toggle()})),Xe(xt);const kt=".bs.swipe",Rt={endCallback:null,leftCallback:null,rightCallback:null},At={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Ot extends bt{constructor(e,t){super(),this._element=e,e&&Ot.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Rt}static get DefaultType(){return At}static get NAME(){return"swipe"}dispose(){mt.off(this._element,kt)}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),$e(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&$e(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(mt.on(this._element,"pointerdown.bs.swipe",(e=>this._start(e))),mt.on(this._element,"pointerup.bs.swipe",(e=>this._end(e))),this._element.classList.add("pointer-event")):(mt.on(this._element,"touchstart.bs.swipe",(e=>this._start(e))),mt.on(this._element,"touchmove.bs.swipe",(e=>this._move(e))),mt.on(this._element,"touchend.bs.swipe",(e=>this._end(e))))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&("pen"===e.pointerType||"touch"===e.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const It="next",Mt="prev",Pt="left",Nt="right",Ht="slid.bs.carousel",Lt="carousel",Yt="active",zt=".active",Bt=".carousel-item",Ut={ArrowLeft:Nt,ArrowRight:Pt},jt={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Wt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Vt extends Et{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=wt.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Lt&&this.cycle()}static get Default(){return jt}static get DefaultType(){return Wt}static get NAME(){return"carousel"}next(){this._slide(It)}nextWhenVisible(){!document.hidden&&je(this._element)&&this.next()}prev(){this._slide(Mt)}pause(){this._isSliding&&ze(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?mt.one(this._element,Ht,(()=>this.cycle())):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void mt.one(this._element,Ht,(()=>this.to(e)));const n=this._getItemIndex(this._getActive());if(n===e)return;const r=e>n?It:Mt;this._slide(r,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&mt.on(this._element,"keydown.bs.carousel",(e=>this._keydown(e))),"hover"===this._config.pause&&(mt.on(this._element,"mouseenter.bs.carousel",(()=>this.pause())),mt.on(this._element,"mouseleave.bs.carousel",(()=>this._maybeEnableCycle()))),this._config.touch&&Ot.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of wt.find(".carousel-item img",this._element))mt.on(e,"dragstart.bs.carousel",(e=>e.preventDefault()));const e={leftCallback:()=>this._slide(this._directionToOrder(Pt)),rightCallback:()=>this._slide(this._directionToOrder(Nt)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new Ot(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=Ut[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=wt.findOne(zt,this._indicatorsElement);t.classList.remove(Yt),t.removeAttribute("aria-current");const n=wt.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(Yt),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const n=this._getActive(),r=e===It,i=t||Qe(this._getItems(),n,r,this._config.wrap);if(i===n)return;const o=this._getItemIndex(i),s=t=>mt.trigger(this._element,t,{relatedTarget:i,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:o});if(s("slide.bs.carousel").defaultPrevented)return;if(!n||!i)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=i;const l=r?"carousel-item-start":"carousel-item-end",u=r?"carousel-item-next":"carousel-item-prev";i.classList.add(u),qe(i),n.classList.add(l),i.classList.add(l);this._queueCallback((()=>{i.classList.remove(l,u),i.classList.add(Yt),n.classList.remove(Yt,u,l),this._isSliding=!1,s(Ht)}),n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return wt.findOne(".active.carousel-item",this._element)}_getItems(){return wt.find(Bt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return Ke()?e===Pt?Mt:It:e===Pt?It:Mt}_orderToDirection(e){return Ke()?e===Mt?Pt:Nt:e===Mt?Nt:Pt}static jQueryInterface(e){return this.each((function(){const t=Vt.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)}))}}mt.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",(function(e){const t=wt.getElementFromSelector(this);if(!t||!t.classList.contains(Lt))return;e.preventDefault();const n=Vt.getOrCreateInstance(t),r=this.getAttribute("data-bs-slide-to");return r?(n.to(r),void n._maybeEnableCycle()):"next"===_t.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())})),mt.on(window,"load.bs.carousel.data-api",(()=>{const e=wt.find('[data-bs-ride="carousel"]');for(const t of e)Vt.getOrCreateInstance(t)})),Xe(Vt);const Ft="show",qt="collapse",Gt="collapsing",Zt='[data-bs-toggle="collapse"]',Kt={parent:null,toggle:!0},Xt={parent:"(null|element)",toggle:"boolean"};class $t extends Et{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=wt.find(Zt);for(const e of n){const t=wt.getSelectorFromElement(e),n=wt.find(t).filter((e=>e===this._element));null!==t&&n.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Kt}static get DefaultType(){return Xt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((e=>e!==this._element)).map((e=>$t.getOrCreateInstance(e,{toggle:!1})))),e.length&&e[0]._isTransitioning)return;if(mt.trigger(this._element,"show.bs.collapse").defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove(qt),this._element.classList.add(Gt),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Gt),this._element.classList.add(qt,Ft),this._element.style[t]="",mt.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[t]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(mt.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,qe(this._element),this._element.classList.add(Gt),this._element.classList.remove(qt,Ft);for(const e of this._triggerArray){const t=wt.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0;this._element.style[e]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Gt),this._element.classList.add(qt),mt.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}_isShown(e=this._element){return e.classList.contains(Ft)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=Ue(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(Zt);for(const t of e){const e=wt.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=wt.find(":scope .collapse .collapse",this._config.parent);return wt.find(e,this._config.parent).filter((e=>!t.includes(e)))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const n of e)n.classList.toggle("collapsed",!t),n.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each((function(){const n=$t.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e]()}}))}}mt.on(document,"click.bs.collapse.data-api",Zt,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of wt.getMultipleElementsFromSelector(this))$t.getOrCreateInstance(e,{toggle:!1}).toggle()})),Xe($t);const Jt="dropdown",Qt="ArrowUp",en="ArrowDown",tn="click.bs.dropdown.data-api",nn="keydown.bs.dropdown.data-api",rn="show",on='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',sn=`${on}.show`,an=".dropdown-menu",ln=Ke()?"top-end":"top-start",un=Ke()?"top-start":"top-end",cn=Ke()?"bottom-end":"bottom-start",dn=Ke()?"bottom-start":"bottom-end",hn=Ke()?"left-start":"right-start",fn=Ke()?"right-start":"left-start",pn={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},mn={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class gn extends Et{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=wt.next(this._element,an)[0]||wt.prev(this._element,an)[0]||wt.findOne(an,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return pn}static get DefaultType(){return mn}static get NAME(){return Jt}toggle(){return this._isShown()?this.hide():this.show()}show(){if(We(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!mt.trigger(this._element,"show.bs.dropdown",e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const e of[].concat(...document.body.children))mt.on(e,"mouseover",Fe);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(rn),this._element.classList.add(rn),mt.trigger(this._element,"shown.bs.dropdown",e)}}hide(){if(We(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!mt.trigger(this._element,"hide.bs.dropdown",e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.off(e,"mouseover",Fe);this._popper&&this._popper.destroy(),this._menu.classList.remove(rn),this._element.classList.remove(rn),this._element.setAttribute("aria-expanded","false"),_t.removeDataAttribute(this._menu,"popper"),mt.trigger(this._element,"hidden.bs.dropdown",e)}}_getConfig(e){if("object"==typeof(e=super._getConfig(e)).reference&&!Be(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${Jt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(void 0===r)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=this._parent:Be(this._config.reference)?e=Ue(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Me(e,this._menu,t)}_isShown(){return this._menu.classList.contains(rn)}_getPlacement(){const e=this._parent;if(e.classList.contains("dropend"))return hn;if(e.classList.contains("dropstart"))return fn;if(e.classList.contains("dropup-center"))return"top";if(e.classList.contains("dropdown-center"))return"bottom";const t="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return e.classList.contains("dropup")?t?un:ln:t?dn:cn}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(_t.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...$e(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const n=wt.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((e=>je(e)));n.length&&Qe(n,t,e===en,!n.includes(t)).focus()}static jQueryInterface(e){return this.each((function(){const t=gn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}static clearMenus(e){if(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const t=wt.find(sn);for(const n of t){const t=gn.getInstance(n);if(!t||!1===t._config.autoClose)continue;const r=e.composedPath(),i=r.includes(t._menu);if(r.includes(t._element)||"inside"===t._config.autoClose&&!i||"outside"===t._config.autoClose&&i)continue;if(t._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const o={relatedTarget:t._element};"click"===e.type&&(o.clickEvent=e),t._completeHide(o)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),n="Escape"===e.key,r=[Qt,en].includes(e.key);if(!r&&!n)return;if(t&&!n)return;e.preventDefault();const i=this.matches(on)?this:wt.prev(this,on)[0]||wt.next(this,on)[0]||wt.findOne(on,e.delegateTarget.parentNode),o=gn.getOrCreateInstance(i);if(r)return e.stopPropagation(),o.show(),void o._selectMenuItem(e);o._isShown()&&(e.stopPropagation(),o.hide(),i.focus())}}mt.on(document,nn,on,gn.dataApiKeydownHandler),mt.on(document,nn,an,gn.dataApiKeydownHandler),mt.on(document,tn,gn.clearMenus),mt.on(document,"keyup.bs.dropdown.data-api",gn.clearMenus),mt.on(document,tn,on,(function(e){e.preventDefault(),gn.getOrCreateInstance(this).toggle()})),Xe(gn);const vn="backdrop",yn="show",_n="mousedown.bs.backdrop",bn={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},En={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Tn extends bt{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return bn}static get DefaultType(){return En}static get NAME(){return vn}show(e){if(!this._config.isVisible)return void $e(e);this._append();const t=this._getElement();this._config.isAnimated&&qe(t),t.classList.add(yn),this._emulateAnimation((()=>{$e(e)}))}hide(e){this._config.isVisible?(this._getElement().classList.remove(yn),this._emulateAnimation((()=>{this.dispose(),$e(e)}))):$e(e)}dispose(){this._isAppended&&(mt.off(this._element,_n),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=Ue(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),mt.on(e,_n,(()=>{$e(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(e){Je(e,this._getElement(),this._config.isAnimated)}}const wn=".bs.focustrap",Dn="backward",Sn={autofocus:!0,trapElement:null},Cn={autofocus:"boolean",trapElement:"element"};class xn extends bt{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Sn}static get DefaultType(){return Cn}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),mt.off(document,wn),mt.on(document,"focusin.bs.focustrap",(e=>this._handleFocusin(e))),mt.on(document,"keydown.tab.bs.focustrap",(e=>this._handleKeydown(e))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,mt.off(document,wn))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const n=wt.focusableChildren(t);0===n.length?t.focus():this._lastTabNavDirection===Dn?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?Dn:"forward")}}const kn=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Rn=".sticky-top",An="padding-right",On="margin-right";class In{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,An,(t=>t+e)),this._setElementAttributes(kn,An,(t=>t+e)),this._setElementAttributes(Rn,On,(t=>t-e))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,An),this._resetElementAttributes(kn,An),this._resetElementAttributes(Rn,On)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,n){const r=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+r)return;this._saveInitialAttribute(e,t);const i=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${n(Number.parseFloat(i))}px`)}))}_saveInitialAttribute(e,t){const n=e.style.getPropertyValue(t);n&&_t.setDataAttribute(e,t,n)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,(e=>{const n=_t.getDataAttribute(e,t);null!==n?(_t.removeDataAttribute(e,t),e.style.setProperty(t,n)):e.style.removeProperty(t)}))}_applyManipulationCallback(e,t){if(Be(e))t(e);else for(const n of wt.find(e,this._element))t(n)}}const Mn=".bs.modal",Pn="hidden.bs.modal",Nn="show.bs.modal",Hn="modal-open",Ln="show",Yn="modal-static",zn={backdrop:!0,focus:!0,keyboard:!0},Bn={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Un extends Et{constructor(e,t){super(e,t),this._dialog=wt.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new In,this._addEventListeners()}static get Default(){return zn}static get DefaultType(){return Bn}static get NAME(){return"modal"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||this._isTransitioning)return;mt.trigger(this._element,Nn,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Hn),this._adjustDialog(),this._backdrop.show((()=>this._showElement(e))))}hide(){if(!this._isShown||this._isTransitioning)return;mt.trigger(this._element,"hide.bs.modal").defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Ln),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated()))}dispose(){mt.off(window,Mn),mt.off(this._dialog,Mn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Tn({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new xn({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=wt.findOne(".modal-body",this._dialog);t&&(t.scrollTop=0),qe(this._element),this._element.classList.add(Ln);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,mt.trigger(this._element,"shown.bs.modal",{relatedTarget:e})}),this._dialog,this._isAnimated())}_addEventListeners(){mt.on(this._element,"keydown.dismiss.bs.modal",(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),mt.on(window,"resize.bs.modal",(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),mt.on(this._element,"mousedown.dismiss.bs.modal",(e=>{mt.one(this._element,"click.dismiss.bs.modal",(t=>{this._element===e.target&&this._element===t.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Hn),this._resetAdjustments(),this._scrollBar.reset(),mt.trigger(this._element,Pn)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(mt.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains(Yn)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(Yn),this._queueCallback((()=>{this._element.classList.remove(Yn),this._queueCallback((()=>{this._element.style.overflowY=t}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),n=t>0;if(n&&!e){const e=Ke()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!n&&e){const e=Ke()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each((function(){const n=Un.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e](t)}}))}}mt.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(e){const t=wt.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),mt.one(t,Nn,(e=>{e.defaultPrevented||mt.one(t,Pn,(()=>{je(this)&&this.focus()}))}));const n=wt.findOne(".modal.show");n&&Un.getInstance(n).hide();Un.getOrCreateInstance(t).toggle(this)})),Dt(Un),Xe(Un);const jn="show",Wn="showing",Vn="hiding",Fn=".offcanvas.show",qn="hidePrevented.bs.offcanvas",Gn="hidden.bs.offcanvas",Zn={backdrop:!0,keyboard:!0,scroll:!1},Kn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Xn extends Et{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Zn}static get DefaultType(){return Kn}static get NAME(){return"offcanvas"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown)return;if(mt.trigger(this._element,"show.bs.offcanvas",{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new In).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Wn);this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(jn),this._element.classList.remove(Wn),mt.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:e})}),this._element,!0)}hide(){if(!this._isShown)return;if(mt.trigger(this._element,"hide.bs.offcanvas").defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Vn),this._backdrop.hide();this._queueCallback((()=>{this._element.classList.remove(jn,Vn),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new In).reset(),mt.trigger(this._element,Gn)}),this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=Boolean(this._config.backdrop);return new Tn({className:"offcanvas-backdrop",isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{"static"!==this._config.backdrop?this.hide():mt.trigger(this._element,qn)}:null})}_initializeFocusTrap(){return new xn({trapElement:this._element})}_addEventListeners(){mt.on(this._element,"keydown.dismiss.bs.offcanvas",(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():mt.trigger(this._element,qn))}))}static jQueryInterface(e){return this.each((function(){const t=Xn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}mt.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(e){const t=wt.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),We(this))return;mt.one(t,Gn,(()=>{je(this)&&this.focus()}));const n=wt.findOne(Fn);n&&n!==t&&Xn.getInstance(n).hide();Xn.getOrCreateInstance(t).toggle(this)})),mt.on(window,"load.bs.offcanvas.data-api",(()=>{for(const e of wt.find(Fn))Xn.getOrCreateInstance(e).show()})),mt.on(window,"resize.bs.offcanvas",(()=>{for(const e of wt.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&Xn.getOrCreateInstance(e).hide()})),Dt(Xn),Xe(Xn);const $n={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Jn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Qn=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,er=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?!Jn.has(n)||Boolean(Qn.test(e.nodeValue)):t.filter((e=>e instanceof RegExp)).some((e=>e.test(n)))};const tr={allowList:$n,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},nr={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},rr={entry:"(string|element|function|null)",selector:"(string|element)"};class ir extends bt{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return tr}static get DefaultType(){return nr}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((e=>this._resolvePossibleFunction(e))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[t,n]of Object.entries(this._config.content))this._setContent(e,n,t);const t=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&t.classList.add(...n.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,n]of Object.entries(e))super._typeCheckConfig({selector:t,entry:n},rr)}_setContent(e,t,n){const r=wt.findOne(n,e);r&&((t=this._resolvePossibleFunction(t))?Be(t)?this._putElementInTemplate(Ue(t),r):this._config.html?r.innerHTML=this._maybeSanitize(t):r.textContent=t:r.remove())}_maybeSanitize(e){return this._config.sanitize?function(e,t,n){if(!e.length)return e;if(n&&"function"==typeof n)return n(e);const r=(new window.DOMParser).parseFromString(e,"text/html"),i=[].concat(...r.body.querySelectorAll("*"));for(const e of i){const n=e.nodeName.toLowerCase();if(!Object.keys(t).includes(n)){e.remove();continue}const r=[].concat(...e.attributes),i=[].concat(t["*"]||[],t[n]||[]);for(const t of r)er(t,i)||e.removeAttribute(t.nodeName)}return r.body.innerHTML}(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return $e(e,[this])}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}}const or=new Set(["sanitize","allowList","sanitizeFn"]),sr="fade",ar="show",lr=".modal",ur="hide.bs.modal",cr="hover",dr="focus",hr={AUTO:"auto",TOP:"top",RIGHT:Ke()?"left":"right",BOTTOM:"bottom",LEFT:Ke()?"right":"left"},fr={allowList:$n,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},pr={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class mr extends Et{constructor(e,t){if(void 0===r)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return fr}static get DefaultType(){return pr}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),mt.off(this._element.closest(lr),ur,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const e=mt.trigger(this._element,this.constructor.eventName("show")),t=(Ve(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:r}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(r.append(n),mt.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add(ar),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.on(e,"mouseover",Fe);this._queueCallback((()=>{mt.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(mt.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;if(this._getTipElement().classList.remove(ar),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))mt.off(e,"mouseover",Fe);this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this._isHovered=null;this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),mt.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(sr,ar),t.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e})(this.constructor.NAME).toString();return t.setAttribute("id",n),this._isAnimated()&&t.classList.add(sr),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new ir({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(sr)}_isShown(){return this.tip&&this.tip.classList.contains(ar)}_createPopper(e){const t=$e(this._config.placement,[this,e,this._element]),n=hr[t.toUpperCase()];return Me(this._element,e,this._getPopperConfig(n))}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_resolvePossibleFunction(e){return $e(e,[this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:e=>{this._getTipElement().setAttribute("data-popper-placement",e.state.placement)}}]};return{...t,...$e(this._config.popperConfig,[t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if("click"===t)mt.on(this._element,this.constructor.eventName("click"),this._config.selector,(e=>{this._initializeOnDelegatedTarget(e).toggle()}));else if("manual"!==t){const e=t===cr?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=t===cr?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");mt.on(this._element,e,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusin"===e.type?dr:cr]=!0,t._enter()})),mt.on(this._element,n,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusout"===e.type?dr:cr]=t._element.contains(e.relatedTarget),t._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},mt.on(this._element.closest(lr),ur,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=_t.getDataAttributes(this._element);for(const e of Object.keys(t))or.has(e)&&delete t[e];return e={...t,..."object"==typeof e&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=!1===e.container?document.body:Ue(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,n]of Object.entries(this._config))this.constructor.Default[t]!==n&&(e[t]=n);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each((function(){const t=mr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}Xe(mr);const gr={...mr.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},vr={...mr.DefaultType,content:"(null|string|element|function)"};class yr extends mr{static get Default(){return gr}static get DefaultType(){return vr}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each((function(){const t=yr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}Xe(yr);const _r="click.bs.scrollspy",br="active",Er="[href]",Tr={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},wr={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Dr extends Et{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Tr}static get DefaultType(){return wr}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=Ue(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,"string"==typeof e.threshold&&(e.threshold=e.threshold.split(",").map((e=>Number.parseFloat(e)))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(mt.off(this._config.target,_r),mt.on(this._config.target,_r,Er,(e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const n=this._rootElement||window,r=t.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:r,behavior:"smooth"});n.scrollTop=r}})))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((e=>this._observerCallback(e)),e)}_observerCallback(e){const t=e=>this._targetLinks.get(`#${e.target.id}`),n=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(t(e))},r=(this._rootElement||document.documentElement).scrollTop,i=r>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=r;for(const o of e){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(o));continue}const e=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(i&&e){if(n(o),!r)return}else i||e||n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=wt.find(Er,this._config.target);for(const t of e){if(!t.hash||We(t))continue;const e=wt.findOne(decodeURI(t.hash),this._element);je(e)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,e))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(br),this._activateParents(e),mt.trigger(this._element,"activate.bs.scrollspy",{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("dropdown-item"))wt.findOne(".dropdown-toggle",e.closest(".dropdown")).classList.add(br);else for(const t of wt.parents(e,".nav, .list-group"))for(const e of wt.prev(t,".nav-link, .nav-item > .nav-link, .list-group-item"))e.classList.add(br)}_clearActiveClass(e){e.classList.remove(br);const t=wt.find("[href].active",e);for(const e of t)e.classList.remove(br)}static jQueryInterface(e){return this.each((function(){const t=Dr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}mt.on(window,"load.bs.scrollspy.data-api",(()=>{for(const e of wt.find('[data-bs-spy="scroll"]'))Dr.getOrCreateInstance(e)})),Xe(Dr);const Sr="ArrowLeft",Cr="ArrowRight",xr="ArrowUp",kr="ArrowDown",Rr="Home",Ar="End",Or="active",Ir="fade",Mr="show",Pr=".dropdown-toggle",Nr='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Hr=`.nav-link:not(.dropdown-toggle), .list-group-item:not(.dropdown-toggle), [role="tab"]:not(.dropdown-toggle), ${Nr}`;class Lr extends Et{constructor(e){super(e),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),mt.on(this._element,"keydown.bs.tab",(e=>this._keydown(e))))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),n=t?mt.trigger(t,"hide.bs.tab",{relatedTarget:e}):null;mt.trigger(e,"show.bs.tab",{relatedTarget:t}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(Or),this._activate(wt.getElementFromSelector(e));this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),mt.trigger(e,"shown.bs.tab",{relatedTarget:t})):e.classList.add(Mr)}),e,e.classList.contains(Ir))}_deactivate(e,t){if(!e)return;e.classList.remove(Or),e.blur(),this._deactivate(wt.getElementFromSelector(e));this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),mt.trigger(e,"hidden.bs.tab",{relatedTarget:t})):e.classList.remove(Mr)}),e,e.classList.contains(Ir))}_keydown(e){if(![Sr,Cr,xr,kr,Rr,Ar].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter((e=>!We(e)));let n;if([Rr,Ar].includes(e.key))n=t[e.key===Rr?0:t.length-1];else{const r=[Cr,kr].includes(e.key);n=Qe(t,e.target,r,!0)}n&&(n.focus({preventScroll:!0}),Lr.getOrCreateInstance(n).show())}_getChildren(){return wt.find(Hr,this._parent)}_getActiveElem(){return this._getChildren().find((e=>this._elemIsActive(e)))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute("aria-selected",t),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=wt.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const n=this._getOuterElement(e);if(!n.classList.contains("dropdown"))return;const r=(e,r)=>{const i=wt.findOne(e,n);i&&i.classList.toggle(r,t)};r(Pr,Or),r(".dropdown-menu",Mr),n.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains(Or)}_getInnerElement(e){return e.matches(Hr)?e:wt.findOne(Hr,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each((function(){const t=Lr.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}mt.on(document,"click.bs.tab",Nr,(function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),We(this)||Lr.getOrCreateInstance(this).show()})),mt.on(window,"load.bs.tab",(()=>{for(const e of wt.find('.active[data-bs-toggle="tab"], .active[data-bs-toggle="pill"], .active[data-bs-toggle="list"]'))Lr.getOrCreateInstance(e)})),Xe(Lr);const Yr="hide",zr="show",Br="showing",Ur={animation:"boolean",autohide:"boolean",delay:"number"},jr={animation:!0,autohide:!0,delay:5e3};class Wr extends Et{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return jr}static get DefaultType(){return Ur}static get NAME(){return"toast"}show(){if(mt.trigger(this._element,"show.bs.toast").defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(Yr),qe(this._element),this._element.classList.add(zr,Br),this._queueCallback((()=>{this._element.classList.remove(Br),mt.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element,this._config.animation)}hide(){if(!this.isShown())return;if(mt.trigger(this._element,"hide.bs.toast").defaultPrevented)return;this._element.classList.add(Br),this._queueCallback((()=>{this._element.classList.add(Yr),this._element.classList.remove(Br,zr),mt.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(zr),super.dispose()}isShown(){return this._element.classList.contains(zr)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){mt.on(this._element,"mouseover.bs.toast",(e=>this._onInteraction(e,!0))),mt.on(this._element,"mouseout.bs.toast",(e=>this._onInteraction(e,!1))),mt.on(this._element,"focusin.bs.toast",(e=>this._onInteraction(e,!0))),mt.on(this._element,"focusout.bs.toast",(e=>this._onInteraction(e,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each((function(){const t=Wr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}Dt(Wr),Xe(Wr)},6225:function(e){var t,n,r,i;(t=e.exports).foldLength=75,t.newLineChar="\r\n",t.helpers={updateTimezones:function(e){var n,r,i,o,s,a;if(!e||"vcalendar"!==e.name)return e;for(n=e.getAllSubcomponents(),r=[],i={},s=0;s0&&"\\"===e[n-1]))return n;n+=1}return-1},binsearchInsert:function(e,t,n){if(!e.length)return 0;for(var r,i,o=0,s=e.length-1;o<=s;)if((i=n(t,e[r=o+Math.floor((s-o)/2)]))<0)s=r-1;else{if(!(i>0))break;o=r+1}return i<0?r:i>0?r+1:r},dumpn:function(){t.debug&&("undefined"!=typeof console&&"log"in console?t.helpers.dumpn=function(e){console.log(e)}:t.helpers.dumpn=function(e){dump(e+"\n")},t.helpers.dumpn(arguments[0]))},clone:function(e,n){if(e&&"object"==typeof e){if(e instanceof Date)return new Date(e.getTime());if("clone"in e)return e.clone();if(Array.isArray(e)){for(var r=[],i=0;i65535?2:1:(n+=t.newLineChar+" "+r.substring(0,i),r=r.substring(i),i=o=0)}return n.substr(t.newLineChar.length+1)},pad2:function(e){switch("string"!=typeof e&&("number"==typeof e&&(e=parseInt(e)),e=String(e)),e.length){case 0:return"00";case 1:return"0"+e;default:return e}},trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)},inherits:function(e,n,r){function i(){}i.prototype=e.prototype,n.prototype=new i,r&&t.helpers.extend(r,n.prototype)},extend:function(e,t){for(var n in e){var r=Object.getOwnPropertyDescriptor(e,n);r&&!Object.getOwnPropertyDescriptor(t,n)&&Object.defineProperty(t,n,r)}return t}},t.design=function(){"use strict";var e=/\\\\|\\,|\\[Nn]/g,n=/\\|,|\n/g;function r(e,t){return{matches:/.*/,fromICAL:function(t,n){return function(e,t,n){if(-1===e.indexOf("\\"))return e;n&&(t=new RegExp(t.source+"|\\\\"+n));return e.replace(t,p)}(t,e,n)},toICAL:function(e,n){var r=t;return n&&(r=new RegExp(r.source+"|"+n)),e.replace(r,(function(e){switch(e){case"\\":return"\\\\";case";":return"\\;";case",":return"\\,";case"\n":return"\\n";default:return e}}))}}}var i={defaultType:"text"},o={defaultType:"text",multiValue:","},s={defaultType:"text",structuredValue:";"},a={defaultType:"integer"},l={defaultType:"date-time",allowedTypes:["date-time","date"]},u={defaultType:"date-time"},c={defaultType:"uri"},d={defaultType:"utc-offset"},h={defaultType:"recur"},f={defaultType:"date-and-or-time",allowedTypes:["date-time","date","text"]};function p(e){switch(e){case"\\\\":return"\\";case"\\;":return";";case"\\,":return",";case"\\n":case"\\N":return"\n";default:return e}}var m={categories:o,url:c,version:i,uid:i},g={boolean:{values:["TRUE","FALSE"],fromICAL:function(e){return"TRUE"===e},toICAL:function(e){return e?"TRUE":"FALSE"}},float:{matches:/^[+-]?\d+\.\d+$/,fromICAL:function(e){var n=parseFloat(e);return t.helpers.isStrictlyNaN(n)?0:n},toICAL:function(e){return String(e)}},integer:{fromICAL:function(e){var n=parseInt(e);return t.helpers.isStrictlyNaN(n)?0:n},toICAL:function(e){return String(e)}},"utc-offset":{toICAL:function(e){return e.length<7?e.substr(0,3)+e.substr(4,2):e.substr(0,3)+e.substr(4,2)+e.substr(7,2)},fromICAL:function(e){return e.length<6?e.substr(0,3)+":"+e.substr(3,2):e.substr(0,3)+":"+e.substr(3,2)+":"+e.substr(5,2)},decorate:function(e){return t.UtcOffset.fromString(e)},undecorate:function(e){return e.toString()}}},v=t.helpers.extend(g,{text:r(/\\\\|\\;|\\,|\\[Nn]/g,/\\|;|,|\n/g),uri:{},binary:{decorate:function(e){return t.Binary.fromString(e)},undecorate:function(e){return e.toString()}},"cal-address":{},date:{decorate:function(e,n){return C.strict?t.Time.fromDateString(e,n):t.Time.fromString(e,n)},undecorate:function(e){return e.toString()},fromICAL:function(e){return!C.strict&&e.length>=15?v["date-time"].fromICAL(e):e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2)},toICAL:function(e){var t=e.length;return 10==t?e.substr(0,4)+e.substr(5,2)+e.substr(8,2):t>=19?v["date-time"].toICAL(e):e}},"date-time":{fromICAL:function(e){if(C.strict||8!=e.length){var t=e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2)+"T"+e.substr(9,2)+":"+e.substr(11,2)+":"+e.substr(13,2);return e[15]&&"Z"===e[15]&&(t+="Z"),t}return v.date.fromICAL(e)},toICAL:function(e){var t=e.length;if(10!=t||C.strict){if(t>=19){var n=e.substr(0,4)+e.substr(5,2)+e.substr(8,5)+e.substr(14,2)+e.substr(17,2);return e[19]&&"Z"===e[19]&&(n+="Z"),n}return e}return v.date.toICAL(e)},decorate:function(e,n){return C.strict?t.Time.fromDateTimeString(e,n):t.Time.fromString(e,n)},undecorate:function(e){return e.toString()}},duration:{decorate:function(e){return t.Duration.fromString(e)},undecorate:function(e){return e.toString()}},period:{fromICAL:function(e){var n=e.split("/");return n[0]=v["date-time"].fromICAL(n[0]),t.Duration.isValueString(n[1])||(n[1]=v["date-time"].fromICAL(n[1])),n},toICAL:function(e){return C.strict||10!=e[0].length?e[0]=v["date-time"].toICAL(e[0]):e[0]=v.date.toICAL(e[0]),t.Duration.isValueString(e[1])||(C.strict||10!=e[1].length?e[1]=v["date-time"].toICAL(e[1]):e[1]=v.date.toICAL(e[1])),e.join("/")},decorate:function(e,n){return t.Period.fromJSON(e,n,!C.strict)},undecorate:function(e){return e.toJSON()}},recur:{fromICAL:function(e){return t.Recur._stringToData(e,!0)},toICAL:function(e){var n="";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];"until"==r?i=i.length>10?v["date-time"].toICAL(i):v.date.toICAL(i):"wkst"==r?"number"==typeof i&&(i=t.Recur.numericDayToIcalDay(i)):Array.isArray(i)&&(i=i.join(",")),n+=r.toUpperCase()+"="+i+";"}return n.substr(0,n.length-1)},decorate:function(e){return t.Recur.fromData(e)},undecorate:function(e){return e.toJSON()}},time:{fromICAL:function(e){if(e.length<6)return e;var t=e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2);return"Z"===e[6]&&(t+="Z"),t},toICAL:function(e){if(e.length<8)return e;var t=e.substr(0,2)+e.substr(3,2)+e.substr(6,2);return"Z"===e[8]&&(t+="Z"),t}}}),y=t.helpers.extend(m,{action:i,attach:{defaultType:"uri"},attendee:{defaultType:"cal-address"},calscale:i,class:i,comment:i,completed:u,contact:i,created:u,description:i,dtend:l,dtstamp:u,dtstart:l,due:l,duration:{defaultType:"duration"},exdate:{defaultType:"date-time",allowedTypes:["date-time","date"],multiValue:","},exrule:h,freebusy:{defaultType:"period",multiValue:","},geo:{defaultType:"float",structuredValue:";"},"last-modified":u,location:i,method:i,organizer:{defaultType:"cal-address"},"percent-complete":a,priority:a,prodid:i,"related-to":i,repeat:a,rdate:{defaultType:"date-time",allowedTypes:["date-time","date","period"],multiValue:",",detectType:function(e){return-1!==e.indexOf("/")?"period":-1===e.indexOf("T")?"date":"date-time"}},"recurrence-id":l,resources:o,"request-status":s,rrule:h,sequence:a,status:i,summary:i,transp:i,trigger:{defaultType:"duration",allowedTypes:["duration","date-time"]},tzoffsetfrom:d,tzoffsetto:d,tzurl:c,tzid:i,tzname:i}),_=t.helpers.extend(g,{text:r(e,n),uri:r(e,n),date:{decorate:function(e){return t.VCardTime.fromDateAndOrTimeString(e,"date")},undecorate:function(e){return e.toString()},fromICAL:function(e){return 8==e.length?v.date.fromICAL(e):"-"==e[0]&&6==e.length?e.substr(0,4)+"-"+e.substr(4):e},toICAL:function(e){return 10==e.length?v.date.toICAL(e):"-"==e[0]&&7==e.length?e.substr(0,4)+e.substr(5):e}},time:{decorate:function(e){return t.VCardTime.fromDateAndOrTimeString("T"+e,"time")},undecorate:function(e){return e.toString()},fromICAL:function(e){var t=_.time._splitZone(e,!0),n=t[0],r=t[1];return 6==r.length?r=r.substr(0,2)+":"+r.substr(2,2)+":"+r.substr(4,2):4==r.length&&"-"!=r[0]?r=r.substr(0,2)+":"+r.substr(2,2):5==r.length&&(r=r.substr(0,3)+":"+r.substr(3,2)),5!=n.length||"-"!=n[0]&&"+"!=n[0]||(n=n.substr(0,3)+":"+n.substr(3)),r+n},toICAL:function(e){var t=_.time._splitZone(e),n=t[0],r=t[1];return 8==r.length?r=r.substr(0,2)+r.substr(3,2)+r.substr(6,2):5==r.length&&"-"!=r[0]?r=r.substr(0,2)+r.substr(3,2):6==r.length&&(r=r.substr(0,3)+r.substr(4,2)),6!=n.length||"-"!=n[0]&&"+"!=n[0]||(n=n.substr(0,3)+n.substr(4)),r+n},_splitZone:function(e,t){var n,r,i=e.length-1,o=e.length-(t?5:6),s=e[o];return"Z"==e[i]?(n=e[i],r=e.substr(0,i)):e.length>6&&("-"==s||"+"==s)?(n=e.substr(o),r=e.substr(0,o)):(n="",r=e),[n,r]}},"date-time":{decorate:function(e){return t.VCardTime.fromDateAndOrTimeString(e,"date-time")},undecorate:function(e){return e.toString()},fromICAL:function(e){return _["date-and-or-time"].fromICAL(e)},toICAL:function(e){return _["date-and-or-time"].toICAL(e)}},"date-and-or-time":{decorate:function(e){return t.VCardTime.fromDateAndOrTimeString(e,"date-and-or-time")},undecorate:function(e){return e.toString()},fromICAL:function(e){var t=e.split("T");return(t[0]?_.date.fromICAL(t[0]):"")+(t[1]?"T"+_.time.fromICAL(t[1]):"")},toICAL:function(e){var t=e.split("T");return _.date.toICAL(t[0])+(t[1]?"T"+_.time.toICAL(t[1]):"")}},timestamp:v["date-time"],"language-tag":{matches:/^[a-zA-Z0-9-]+$/}}),b=t.helpers.extend(m,{adr:{defaultType:"text",structuredValue:";",multiValue:","},anniversary:f,bday:f,caladruri:c,caluri:c,clientpidmap:s,email:i,fburl:c,fn:i,gender:s,geo:c,impp:c,key:c,kind:i,lang:{defaultType:"language-tag"},logo:c,member:c,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:o,note:i,org:{defaultType:"text",structuredValue:";"},photo:c,related:c,rev:{defaultType:"timestamp"},role:i,sound:c,source:c,tel:{defaultType:"uri",allowedTypes:["uri","text"]},title:i,tz:{defaultType:"text",allowedTypes:["text","utc-offset","uri"]},xml:i}),E=t.helpers.extend(g,{binary:v.binary,date:_.date,"date-time":_["date-time"],"phone-number":{},uri:v.uri,text:v.text,time:v.time,vcard:v.text,"utc-offset":{toICAL:function(e){return e.substr(0,7)},fromICAL:function(e){return e.substr(0,7)},decorate:function(e){return t.UtcOffset.fromString(e)},undecorate:function(e){return e.toString()}}}),T=t.helpers.extend(m,{fn:i,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:o,photo:{defaultType:"binary",allowedTypes:["binary","uri"]},bday:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(e){return-1===e.indexOf("T")?"date":"date-time"}},adr:{defaultType:"text",structuredValue:";",multiValue:","},label:i,tel:{defaultType:"phone-number"},email:i,mailer:i,tz:{defaultType:"utc-offset",allowedTypes:["utc-offset","text"]},geo:{defaultType:"float",structuredValue:";"},title:i,role:i,logo:{defaultType:"binary",allowedTypes:["binary","uri"]},agent:{defaultType:"vcard",allowedTypes:["vcard","text","uri"]},org:s,note:o,prodid:i,rev:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(e){return-1===e.indexOf("T")?"date":"date-time"}},"sort-string":i,sound:{defaultType:"binary",allowedTypes:["binary","uri"]},class:i,key:{defaultType:"binary",allowedTypes:["binary","text"]}}),w={value:v,param:{cutype:{values:["INDIVIDUAL","GROUP","RESOURCE","ROOM","UNKNOWN"],allowXName:!0,allowIanaToken:!0},"delegated-from":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},"delegated-to":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},encoding:{values:["8BIT","BASE64"]},fbtype:{values:["FREE","BUSY","BUSY-UNAVAILABLE","BUSY-TENTATIVE"],allowXName:!0,allowIanaToken:!0},member:{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},partstat:{values:["NEEDS-ACTION","ACCEPTED","DECLINED","TENTATIVE","DELEGATED","COMPLETED","IN-PROCESS"],allowXName:!0,allowIanaToken:!0},range:{values:["THISANDFUTURE"]},related:{values:["START","END"]},reltype:{values:["PARENT","CHILD","SIBLING"],allowXName:!0,allowIanaToken:!0},role:{values:["REQ-PARTICIPANT","CHAIR","OPT-PARTICIPANT","NON-PARTICIPANT"],allowXName:!0,allowIanaToken:!0},rsvp:{values:["TRUE","FALSE"]},"sent-by":{valueType:"cal-address"},tzid:{matches:/^\//},value:{values:["binary","boolean","cal-address","date","date-time","duration","float","integer","period","recur","text","time","uri","utc-offset"],allowXName:!0,allowIanaToken:!0}},property:y},D={value:_,param:{type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","time","date-time","date-and-or-time","timestamp","boolean","integer","float","utc-offset","language-tag"],allowXName:!0,allowIanaToken:!0}},property:b},S={value:E,param:{type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","date-time","phone-number","time","boolean","integer","float","utc-offset","vcard","binary"],allowXName:!0,allowIanaToken:!0}},property:T},C={strict:!0,defaultSet:w,defaultType:"unknown",components:{vcard:D,vcard3:S,vevent:w,vtodo:w,vjournal:w,valarm:w,vtimezone:w,daylight:w,standard:w},icalendar:w,vcard:D,vcard3:S,getDesignSet:function(e){return e&&e in C.components?C.components[e]:C.defaultSet}};return C}(),t.stringify=function(){"use strict";var e="\r\n",n="unknown",r=t.design,i=t.helpers;function o(t){"string"==typeof t[0]&&(t=[t]);for(var n=0,r=t.length,i="";n0&&("version"!==t[1][0][0]||"4.0"!==t[1][0][3])&&(c="vcard3"),n=n||r.getDesignSet(c);l1)throw new i("invalid ical body. component began but did not end");return t=null,1==n.length?n[0]:n}i.prototype=Error.prototype,o.property=function(e,t){var r={component:[[],[]],designSet:t||n.defaultSet};return o._handleContentLine(e,r),r.component[1][0]},o.component=function(e){return o(e)},o.ParserError=i,o._handleContentLine=function(e,t){var r,s,a,l,u,c,d=e.indexOf(":"),h=e.indexOf(";"),f={};if(-1!==h&&-1!==d&&h>d&&(h=-1),-1!==h){if(a=e.substring(0,h).toLowerCase(),-1==(u=o._parseParameters(e.substring(h),0,t.designSet))[2])throw new i("Invalid parameters in '"+e+"'");if(f=u[0],r=u[1].length+u[2]+h,-1===(s=e.substring(r).indexOf(":")))throw new i("Missing parameter value in '"+e+"'");l=e.substring(r+s+1)}else{if(-1===d)throw new i('invalid line (no token ";" or ":") "'+e+'"');if(a=e.substring(0,d).toLowerCase(),l=e.substring(d+1),"begin"===a){var p=[l.toLowerCase(),[],[]];return 1===t.stack.length?t.component.push(p):t.component[2].push(p),t.stack.push(t.component),t.component=p,void(t.designSet||(t.designSet=n.getDesignSet(t.component[0])))}if("end"===a)return void(t.component=t.stack.pop())}var m,g,v=!1,y=!1;a in t.designSet.property&&("multiValue"in(m=t.designSet.property[a])&&(v=m.multiValue),"structuredValue"in m&&(y=m.structuredValue),l&&"detectType"in m&&(c=m.detectType(l))),c||(c="value"in f?f.value.toLowerCase():m?m.defaultType:"unknown"),delete f.value,v&&y?g=[a,f,c,l=o._parseMultiValue(l,y,c,[],v,t.designSet,y)]:v?(g=[a,f,c],o._parseMultiValue(l,v,c,g,null,t.designSet,!1)):g=y?[a,f,c,l=o._parseMultiValue(l,y,c,[],null,t.designSet,y)]:[a,f,c,l=o._parseValue(l,c,t.designSet,!1)],"vcard"!==t.component[0]||0!==t.component[1].length||"version"===a&&"4.0"===l||(t.designSet=n.getDesignSet("vcard3")),t.component[1].push(g)},o._parseValue=function(e,t,n,r){return t in n.value&&"fromICAL"in n.value[t]?n.value[t].fromICAL(e,r):e},o._parseParameters=function(e,t,n){for(var s,a,l,u,c,d,h=t,f=0,p={},m=-1;!1!==f&&-1!==(f=r.unescapedIndexOf(e,"=",f+1));){if(0==(s=e.substr(h+1,f-h-1)).length)throw new i("Empty parameter name in '"+e+"'");if(d=!1,c=!1,u=(a=s.toLowerCase())in n.param&&n.param[a].valueType?n.param[a].valueType:"text",a in n.param&&(c=n.param[a].multiValue,n.param[a].multiValueSeparateDQuote&&(d=o._rfc6868Escape('"'+c+'"'))),'"'===e[f+1]){if(m=f+2,f=r.unescapedIndexOf(e,'"',m),c&&-1!=f)for(var g=!0;g;)e[f+1]==c&&'"'==e[f+2]?f=r.unescapedIndexOf(e,'"',f+3):g=!1;if(-1===f)throw new i('invalid line (no matching double quote) "'+e+'"');l=e.substr(m,f-m),-1===(h=r.unescapedIndexOf(e,";",f))&&(f=!1)}else{m=f+1;var v=r.unescapedIndexOf(e,";",m),y=r.unescapedIndexOf(e,":",m);-1!==y&&v>y?(v=y,f=!1):-1===v?(v=-1===y?e.length:y,f=!1):(h=v,f=v),l=e.substr(m,v-m)}if(l=o._rfc6868Escape(l),c){var _=d||c;l=o._parseMultiValue(l,_,u,[],null,n)}else l=o._parseValue(l,u,n);c&&a in p?Array.isArray(p[a])?p[a].push(l):p[a]=[p[a],l]:p[a]=l}return[p,l,m]},o._rfc6868Escape=function(e){return e.replace(/\^['n^]/g,(function(e){return s[e]}))};var s={"^'":'"',"^n":"\n","^^":"^"};return o._parseMultiValue=function(e,t,n,i,s,a,l){var u,c=0,d=0;if(0===t.length)return e;for(;-1!==(c=r.unescapedIndexOf(e,t,d));)u=e.substr(d,c-d),u=s?o._parseMultiValue(u,s,n,[],null,a,l):o._parseValue(u,n,a,l),i.push(u),d=c+t.length;return u=e.substr(d),u=s?o._parseMultiValue(u,s,n,[],null,a,l):o._parseValue(u,n,a,l),i.push(u),1==i.length?i[0]:i},o._eachLine=function(t,n){var r,i,o,s=t.length,a=t.search(e),l=a;do{o=(l=t.indexOf("\n",a)+1)>1&&"\r"===t[l-2]?2:1,0===l&&(l=s,o=0)," "===(i=t[a])||"\t"===i?r+=t.substr(a+1,l-a-(o+1)):(r&&n(null,r),r=t.substr(a,l-a-o)),a=l}while(l!==s);(r=r.trim()).length&&n(null,r)},o}(),t.Component=function(){"use strict";function e(e,t){"string"==typeof e&&(e=[e,[],[]]),this.jCal=e,this.parent=t||null}return e.prototype={_hydratedPropertyCount:0,_hydratedComponentCount:0,get name(){return this.jCal[0]},get _designSet(){return this.parent&&this.parent._designSet||t.design.getDesignSet(this.name)},_hydrateComponent:function(t){if(this._components||(this._components=[],this._hydratedComponentCount=0),this._components[t])return this._components[t];var n=new e(this.jCal[2][t],this);return this._hydratedComponentCount++,this._components[t]=n},_hydrateProperty:function(e){if(this._properties||(this._properties=[],this._hydratedPropertyCount=0),this._properties[e])return this._properties[e];var n=new t.Property(this.jCal[1][e],this);return this._hydratedPropertyCount++,this._properties[e]=n},getFirstSubcomponent:function(e){if(e)for(var t=0,n=this.jCal[2],r=n.length;t=0;o--)n&&i[o][0]!==n||this._removeObjectByIndex(e,r,o)},addSubcomponent:function(e){this._components||(this._components=[],this._hydratedComponentCount=0),e.parent&&e.parent.removeSubcomponent(e);var t=this.jCal[2].push(e.jCal);return this._components[t-1]=e,this._hydratedComponentCount++,e.parent=this,e},removeSubcomponent:function(e){var t=this._removeObject(2,"_components",e);return t&&this._hydratedComponentCount--,t},removeAllSubcomponents:function(e){var t=this._removeAllObjects(2,"_components",e);return this._hydratedComponentCount=0,t},addProperty:function(e){if(!(e instanceof t.Property))throw new TypeError("must instance of ICAL.Property");this._properties||(this._properties=[],this._hydratedPropertyCount=0),e.parent&&e.parent.removeProperty(e);var n=this.jCal[1].push(e.jCal);return this._properties[n-1]=e,this._hydratedPropertyCount++,e.parent=this,e},addPropertyWithValue:function(e,n){var r=new t.Property(e);return r.setValue(n),this.addProperty(r),r},updatePropertyWithValue:function(e,t){var n=this.getFirstProperty(e);return n?n.setValue(t):n=this.addPropertyWithValue(e,t),n},removeProperty:function(e){var t=this._removeObject(1,"_properties",e);return t&&this._hydratedPropertyCount--,t},removeAllProperties:function(e){var t=this._removeAllObjects(1,"_properties",e);return this._hydratedPropertyCount=0,t},toJSON:function(){return this.jCal},toString:function(){return t.stringify.component(this.jCal,this._designSet)}},e.fromString=function(n){return new e(t.parse.component(n))},e}(),t.Property=function(){"use strict";var e=t.design;function n(t,n){this._parent=n||null,"string"==typeof t?(this.jCal=[t,{},e.defaultType],this.jCal[2]=this.getDefaultType()):this.jCal=t,this._updateType()}return n.prototype={get type(){return this.jCal[2]},get name(){return this.jCal[0]},get parent(){return this._parent},set parent(t){var n=!this._parent||t&&t._designSet!=this._parent._designSet;return this._parent=t,this.type==e.defaultType&&n&&(this.jCal[2]=this.getDefaultType(),this._updateType()),t},get _designSet(){return this.parent?this.parent._designSet:e.defaultSet},_updateType:function(){var e=this._designSet;if(this.type in e.value){e.value[this.type];"decorate"in e.value[this.type]?this.isDecorated=!0:this.isDecorated=!1,this.name in e.property&&(this.isMultiValue="multiValue"in e.property[this.name],this.isStructuredValue="structuredValue"in e.property[this.name])}},_hydrateValue:function(e){return this._values&&this._values[e]?this._values[e]:this.jCal.length<=3+e?null:this.isDecorated?(this._values||(this._values=[]),this._values[e]=this._decorate(this.jCal[3+e])):this.jCal[3+e]},_decorate:function(e){return this._designSet.value[this.type].decorate(e,this)},_undecorate:function(e){return this._designSet.value[this.type].undecorate(e,this)},_setDecoratedValue:function(e,t){this._values||(this._values=[]),"object"==typeof e&&"icaltype"in e?(this.jCal[3+t]=this._undecorate(e),this._values[t]=e):(this.jCal[3+t]=e,this._values[t]=this._decorate(e))},getParameter:function(e){return e in this.jCal[1]?this.jCal[1][e]:void 0},getFirstParameter:function(e){var t=this.getParameter(e);return Array.isArray(t)?t[0]:t},setParameter:function(e,t){var n=e.toLowerCase();"string"==typeof t&&n in this._designSet.param&&"multiValue"in this._designSet.param[n]&&(t=[t]),this.jCal[1][e]=t},removeParameter:function(e){delete this.jCal[1][e]},getDefaultType:function(){var t=this.jCal[0],n=this._designSet;if(t in n.property){var r=n.property[t];if("defaultType"in r)return r.defaultType}return e.defaultType},resetType:function(e){this.removeAllValues(),this.jCal[2]=e,this._updateType()},getFirstValue:function(){return this._hydrateValue(0)},getValues:function(){var e=this.jCal.length-3;if(e<1)return[];for(var t=0,n=[];t0&&"object"==typeof e[0]&&"icaltype"in e[0]&&this.resetType(e[0].icaltype),this.isDecorated)for(;nn)-(n>t)},_normalize:function(){for(var e=this.toSeconds(),t=this.factor;e<-43200;)e+=97200;for(;e>50400;)e-=97200;this.fromSeconds(e),0==e&&(this.factor=t)},toICALString:function(){return t.design.icalendar.value["utc-offset"].toICAL(this.toString())},toString:function(){return(1==this.factor?"+":"-")+t.helpers.pad2(this.hours)+":"+t.helpers.pad2(this.minutes)}},e.fromString=function(e){var n={};return n.factor="+"===e[0]?1:-1,n.hours=t.helpers.strictParseInt(e.substr(1,2)),n.minutes=t.helpers.strictParseInt(e.substr(4,2)),new t.UtcOffset(n)},e.fromSeconds=function(t){var n=new e;return n.fromSeconds(t),n},e}(),t.Binary=function(){function e(e){this.value=e}return e.prototype={icaltype:"binary",decodeValue:function(){return this._b64_decode(this.value)},setEncodedValue:function(e){this.value=this._b64_encode(e)},_b64_encode:function(e){var t,n,r,i,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,l=0,u="",c=[];if(!e)return e;do{t=(o=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,c[l++]=s.charAt(t)+s.charAt(n)+s.charAt(r)+s.charAt(i)}while(a>16&255,n=s>>8&255,r=255&s,c[u++]=64==i?String.fromCharCode(t):64==o?String.fromCharCode(t,n):String.fromCharCode(t,n,r)}while(ln)-(t=0?i=r:o=-1,-1==o&&-1!=i)break;if((r+=o)<0)return 0;if(r>=this.changes.length)break}var a=this.changes[i];if(a.utcOffset-a.prevUtcOffset<0&&i>0){var l=t.helpers.clone(a,!0);if(t.Timezone.adjust_change(l,0,0,0,l.prevUtcOffset),t.Timezone._compare_change_fn(n,l)<0){var u=this.changes[i-1];0!=a.is_daylight&&0==u.is_daylight&&(a=u)}}return a.utcOffset},_findNearbyChange:function(e){var n=t.helpers.binsearchInsert(this.changes,e,t.Timezone._compare_change_fn);return n>=this.changes.length?this.changes.length-1:n},_ensureCoverage:function(e){if(-1==t.Timezone._minimumExpansionYear){var n=t.Time.now();t.Timezone._minimumExpansionYear=n.year}var r=e;if(rt.Timezone.MAX_YEAR&&(r=t.Timezone.MAX_YEAR),!this.changes.length||this.expandedUntilYearn)&&h);)i.year=h.year,i.month=h.month,i.day=h.day,i.hour=h.hour,i.minute=h.minute,i.second=h.second,i.isDate=h.isDate,t.Timezone.adjust_change(i,0,0,0,-i.prevUtcOffset),r.push(i)}}else(i=a()).year=o.year,i.month=o.month,i.day=o.day,i.hour=o.hour,i.minute=o.minute,i.second=o.second,t.Timezone.adjust_change(i,0,0,0,-i.prevUtcOffset),r.push(i);return r},toString:function(){return this.tznames?this.tznames:this.tzid}},t.Timezone._compare_change_fn=function(e,t){return e.yeart.year?1:e.montht.month?1:e.dayt.day?1:e.hourt.hour?1:e.minutet.minute?1:e.secondt.second?1:0},t.Timezone.convert_time=function(e,n,r){if(e.isDate||n.tzid==r.tzid||n==t.Timezone.localTimezone||r==t.Timezone.localTimezone)return e.zone=r,e;var i=n.utcOffset(e);return e.adjust(0,0,0,-i),i=r.utcOffset(e),e.adjust(0,0,0,i),null},t.Timezone.fromData=function(e){return(new t.Timezone).fromData(e)},t.Timezone.utcTimezone=t.Timezone.fromData({tzid:"UTC"}),t.Timezone.localTimezone=t.Timezone.fromData({tzid:"floating"}),t.Timezone.adjust_change=function(e,n,r,i,o){return t.Time.prototype.adjust.call(e,n,r,i,o,e)},t.Timezone._minimumExpansionYear=-1,t.Timezone.MAX_YEAR=2035,t.Timezone.EXTRA_COVERAGE=5,t.TimezoneService=((i={get count(){return Object.keys(r).length},reset:function(){r=Object.create(null);var e=t.Timezone.utcTimezone;r.Z=e,r.UTC=e,r.GMT=e},has:function(e){return!!r[e]},get:function(e){return r[e]},register:function(e,n){if(e instanceof t.Component&&"vtimezone"===e.name&&(e=(n=new t.Timezone(e)).tzid),!(n instanceof t.Timezone))throw new TypeError("timezone must be ICAL.Timezone or ICAL.Component");r[e]=n},remove:function(e){return delete r[e]}}).reset(),i),t.Time=function(e,t){this.wrappedJSObject=this;var n=this._time=Object.create(null);n.year=0,n.month=1,n.day=1,n.hour=0,n.minute=0,n.second=0,n.isDate=!1,this.fromData(e,t)},t.Time._dowCache={},t.Time._wnCache={},t.Time.prototype={icalclass:"icaltime",_cachedUnixTime:null,get icaltype(){return this.isDate?"date":"date-time"},zone:null,_pendingNormalization:!1,clone:function(){return new t.Time(this._time,this.zone)},reset:function(){this.fromData(t.Time.epochTime),this.zone=t.Timezone.utcTimezone},resetTo:function(e,t,n,r,i,o,s){this.fromData({year:e,month:t,day:n,hour:r,minute:i,second:o,zone:s})},fromJSDate:function(e,n){return e?n?(this.zone=t.Timezone.utcTimezone,this.year=e.getUTCFullYear(),this.month=e.getUTCMonth()+1,this.day=e.getUTCDate(),this.hour=e.getUTCHours(),this.minute=e.getUTCMinutes(),this.second=e.getUTCSeconds()):(this.zone=t.Timezone.localTimezone,this.year=e.getFullYear(),this.month=e.getMonth()+1,this.day=e.getDate(),this.hour=e.getHours(),this.minute=e.getMinutes(),this.second=e.getSeconds()):this.reset(),this._cachedUnixTime=null,this},fromData:function(e,n){if(e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if("icaltype"===r)continue;this[r]=e[r]}if(n&&(this.zone=n),e&&!("isDate"in e)?this.isDate=!("hour"in e):e&&"isDate"in e&&(this.isDate=e.isDate),e&&"timezone"in e){var i=t.TimezoneService.get(e.timezone);this.zone=i||t.Timezone.localTimezone}return e&&"zone"in e&&(this.zone=e.zone),this.zone||(this.zone=t.Timezone.localTimezone),this._cachedUnixTime=null,this},dayOfWeek:function(e){var n=e||t.Time.SUNDAY,r=(this.year<<12)+(this.month<<8)+(this.day<<3)+n;if(r in t.Time._dowCache)return t.Time._dowCache[r];var i=this.day,o=this.month+(this.month<3?12:0),s=this.year-(this.month<3?1:0),a=i+s+t.helpers.trunc(26*(o+1)/10)+t.helpers.trunc(s/4);return a=((a+=6*t.helpers.trunc(s/100)+t.helpers.trunc(s/400))+7-n)%7+1,t.Time._dowCache[r]=a,a},dayOfYear:function(){var e=t.Time.isLeapYear(this.year)?1:0;return t.Time.daysInYearPassedMonth[e][this.month-1]+this.day},startOfWeek:function(e){var n=e||t.Time.SUNDAY,r=this.clone();return r.day-=(this.dayOfWeek()+7-n)%7,r.isDate=!0,r.hour=0,r.minute=0,r.second=0,r},endOfWeek:function(e){var n=e||t.Time.SUNDAY,r=this.clone();return r.day+=(7-this.dayOfWeek()+n-t.Time.SUNDAY)%7,r.isDate=!0,r.hour=0,r.minute=0,r.second=0,r},startOfMonth:function(){var e=this.clone();return e.day=1,e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e},endOfMonth:function(){var e=this.clone();return e.day=t.Time.daysInMonth(e.month,e.year),e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e},startOfYear:function(){var e=this.clone();return e.day=1,e.month=1,e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e},endOfYear:function(){var e=this.clone();return e.day=31,e.month=12,e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e},startDoyWeek:function(e){var n=e||t.Time.SUNDAY,r=this.dayOfWeek()-n;return r<0&&(r+=7),this.dayOfYear()-r},getDominicalLetter:function(){return t.Time.getDominicalLetter(this.year)},nthWeekDay:function(e,n){var r,i=t.Time.daysInMonth(this.month,this.year),o=n,s=0,a=this.clone();if(o>=0){a.day=1,0!=o&&o--,s=a.day;var l=e-a.dayOfWeek();l<0&&(l+=7),s+=l,s-=e,r=e}else a.day=i,o++,(r=a.dayOfWeek()-e)<0&&(r+=7),r=i-r;return s+(r+=7*o)},isNthWeekDay:function(e,t){var n=this.dayOfWeek();return 0===t&&n===e||this.nthWeekDay(e,t)===this.day},weekNumber:function(e){var n,r=(this.year<<12)+(this.month<<8)+(this.day<<3)+e;if(r in t.Time._wnCache)return t.Time._wnCache[r];var i=this.clone();i.isDate=!0;var o=this.year;12==i.month&&i.day>25?(n=t.Time.weekOneStarts(o+1,e),i.compare(n)<0?n=t.Time.weekOneStarts(o,e):o++):(n=t.Time.weekOneStarts(o,e),i.compare(n)<0&&(n=t.Time.weekOneStarts(--o,e)));var s=i.subtractDate(n).toSeconds()/86400,a=t.helpers.trunc(s/7)+1;return t.Time._wnCache[r]=a,a},addDuration:function(e){var t=e.isNegative?-1:1,n=this.second,r=this.minute,i=this.hour,o=this.day;n+=t*e.seconds,r+=t*e.minutes,i+=t*e.hours,o+=t*e.days,o+=7*t*e.weeks,this.second=n,this.minute=r,this.hour=i,this.day=o,this._cachedUnixTime=null},subtractDate:function(e){var n=this.toUnixTime()+this.utcOffset(),r=e.toUnixTime()+e.utcOffset();return t.Duration.fromSeconds(n-r)},subtractDateTz:function(e){var n=this.toUnixTime(),r=e.toUnixTime();return t.Duration.fromSeconds(n-r)},compare:function(e){var t=this.toUnixTime(),n=e.toUnixTime();return t>n?1:n>t?-1:0},compareDateOnlyTz:function(e,n){function r(e){return t.Time._cmp_attr(i,o,e)}var i=this.convertToZone(n),o=e.convertToZone(n),s=0;return 0!=(s=r("year"))||0!=(s=r("month"))||(s=r("day")),s},convertToZone:function(e){var n=this.clone(),r=this.zone.tzid==e.tzid;return this.isDate||r||t.Timezone.convert_time(n,this.zone,e),n.zone=e,n},utcOffset:function(){return this.zone==t.Timezone.localTimezone||this.zone==t.Timezone.utcTimezone?0:this.zone.utcOffset(this)},toICALString:function(){var e=this.toString();return e.length>10?t.design.icalendar.value["date-time"].toICAL(e):t.design.icalendar.value.date.toICAL(e)},toString:function(){var e=this.year+"-"+t.helpers.pad2(this.month)+"-"+t.helpers.pad2(this.day);return this.isDate||(e+="T"+t.helpers.pad2(this.hour)+":"+t.helpers.pad2(this.minute)+":"+t.helpers.pad2(this.second),this.zone===t.Timezone.utcTimezone&&(e+="Z")),e},toJSDate:function(){return this.zone==t.Timezone.localTimezone?this.isDate?new Date(this.year,this.month-1,this.day):new Date(this.year,this.month-1,this.day,this.hour,this.minute,this.second,0):new Date(1e3*this.toUnixTime())},_normalize:function(){return this._time.isDate,this._time.isDate&&(this._time.hour=0,this._time.minute=0,this._time.second=0),this.adjust(0,0,0,0),this},adjust:function(e,n,r,i,o){var s,a,l,u,c,d,h,f=0,p=0,m=o||this._time;if(m.isDate||(l=m.second+i,m.second=l%60,s=t.helpers.trunc(l/60),m.second<0&&(m.second+=60,s--),u=m.minute+r+s,m.minute=u%60,a=t.helpers.trunc(u/60),m.minute<0&&(m.minute+=60,a--),c=m.hour+n+a,m.hour=c%24,f=t.helpers.trunc(c/24),m.hour<0&&(m.hour+=24,f--)),m.month>12?p=t.helpers.trunc((m.month-1)/12):m.month<1&&(p=t.helpers.trunc(m.month/12)-1),m.year+=p,m.month-=12*p,(d=m.day+e+f)>0)for(;!(d<=(h=t.Time.daysInMonth(m.month,m.year)));)m.month++,m.month>12&&(m.year++,m.month=1),d-=h;else for(;d<=0;)1==m.month?(m.year--,m.month=12):m.month--,d+=t.Time.daysInMonth(m.month,m.year);return m.day=d,this._cachedUnixTime=null,this},fromUnixTime:function(e){this.zone=t.Timezone.utcTimezone;var n=t.Time.epochTime.clone();n.adjust(0,0,0,e),this.year=n.year,this.month=n.month,this.day=n.day,this.hour=n.hour,this.minute=n.minute,this.second=Math.floor(n.second),this._cachedUnixTime=null},toUnixTime:function(){if(null!==this._cachedUnixTime)return this._cachedUnixTime;var e=this.utcOffset(),t=Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second-e);return this._cachedUnixTime=t/1e3,this._cachedUnixTime},toJSON:function(){for(var e,t=["year","month","day","hour","minute","second","isDate"],n=Object.create(null),r=0,i=t.length;r12||(r=[0,31,28,31,30,31,30,31,31,30,31,30,31][e],2==e&&(r+=t.Time.isLeapYear(n))),r},t.Time.isLeapYear=function(e){return e<=1752?e%4==0:e%4==0&&e%100!=0||e%400==0},t.Time.fromDayOfYear=function(e,n){var r=n,i=e,o=new t.Time;o.auto_normalize=!1;var s=t.Time.isLeapYear(r)?1:0;if(i<1)return r--,s=t.Time.isLeapYear(r)?1:0,i+=t.Time.daysInYearPassedMonth[s][12],t.Time.fromDayOfYear(i,r);if(i>t.Time.daysInYearPassedMonth[s][12])return s=t.Time.isLeapYear(r)?1:0,i-=t.Time.daysInYearPassedMonth[s][12],r++,t.Time.fromDayOfYear(i,r);o.year=r,o.isDate=!0;for(var a=11;a>=0;a--)if(i>t.Time.daysInYearPassedMonth[s][a]){o.month=a+1,o.day=i-t.Time.daysInYearPassedMonth[s][a];break}return o.auto_normalize=!0,o},t.Time.fromStringv2=function(e){return new t.Time({year:parseInt(e.substr(0,4),10),month:parseInt(e.substr(5,2),10),day:parseInt(e.substr(8,2),10),isDate:!0})},t.Time.fromDateString=function(e){return new t.Time({year:t.helpers.strictParseInt(e.substr(0,4)),month:t.helpers.strictParseInt(e.substr(5,2)),day:t.helpers.strictParseInt(e.substr(8,2)),isDate:!0})},t.Time.fromDateTimeString=function(e,n){if(e.length<19)throw new Error('invalid date-time value: "'+e+'"');var r;return e[19]&&"Z"===e[19]?r="Z":n&&(r=n.getParameter("tzid")),new t.Time({year:t.helpers.strictParseInt(e.substr(0,4)),month:t.helpers.strictParseInt(e.substr(5,2)),day:t.helpers.strictParseInt(e.substr(8,2)),hour:t.helpers.strictParseInt(e.substr(11,2)),minute:t.helpers.strictParseInt(e.substr(14,2)),second:t.helpers.strictParseInt(e.substr(17,2)),timezone:r})},t.Time.fromString=function(e,n){return e.length>10?t.Time.fromDateTimeString(e,n):t.Time.fromDateString(e)},t.Time.fromJSDate=function(e,n){return(new t.Time).fromJSDate(e,n)},t.Time.fromData=function(e,n){return(new t.Time).fromData(e,n)},t.Time.now=function(){return t.Time.fromJSDate(new Date,!1)},t.Time.weekOneStarts=function(e,n){var r=t.Time.fromData({year:e,month:1,day:1,isDate:!0}),i=r.dayOfWeek(),o=n||t.Time.DEFAULT_WEEK_START;return i>t.Time.THURSDAY&&(r.day+=7),o>t.Time.THURSDAY&&(r.day-=7),r.day-=i-o,r},t.Time.getDominicalLetter=function(e){var n="GFEDCBA",r=(e+(e/4|0)+(e/400|0)-(e/100|0)-1)%7;return t.Time.isLeapYear(e)?n[(r+6)%7]+n[r]:n[r]},t.Time.epochTime=t.Time.fromData({year:1970,month:1,day:1,hour:0,minute:0,second:0,isDate:!1,timezone:"Z"}),t.Time._cmp_attr=function(e,t,n){return e[n]>t[n]?1:e[n]4?r(u,f?1:3,2):null,second:4==d?r(u,2,2):6==d?r(u,4,2):8==d?r(u,6,2):null};return l="Z"==l?t.Timezone.utcTimezone:l&&":"==l[3]?t.UtcOffset.fromString(l):null,new t.VCardTime(p,l,n)},function(){var e={SU:t.Time.SUNDAY,MO:t.Time.MONDAY,TU:t.Time.TUESDAY,WE:t.Time.WEDNESDAY,TH:t.Time.THURSDAY,FR:t.Time.FRIDAY,SA:t.Time.SATURDAY},n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);function i(e,n,r,i){var o=i;if("+"===i[0]&&(o=i.substr(1)),o=t.helpers.strictParseInt(o),void 0!==n&&i '+n);if(void 0!==r&&i>r)throw new Error(e+': invalid value "'+i+'" must be < '+n);return o}t.Recur=function(e){this.wrappedJSObject=this,this.parts={},e&&"object"==typeof e&&this.fromData(e)},t.Recur.prototype={parts:null,interval:1,wkst:t.Time.MONDAY,until:null,count:null,freq:null,icalclass:"icalrecur",icaltype:"recur",iterator:function(e){return new t.RecurIterator({rule:this,dtstart:e})},clone:function(){return new t.Recur(this.toJSON())},isFinite:function(){return!(!this.count&&!this.until)},isByCount:function(){return!(!this.count||this.until)},addComponent:function(e,t){var n=e.toUpperCase();n in this.parts?this.parts[n].push(t):this.parts[n]=[t]},setComponent:function(e,t){this.parts[e.toUpperCase()]=t.slice()},getComponent:function(e){var t=e.toUpperCase();return t in this.parts?this.parts[t].slice():[]},getNextOccurrence:function(e,t){var n,r=this.iterator(e);do{n=r.next()}while(n&&n.compare(t)<=0);return n&&t.zone&&(n.zone=t.zone),n},fromData:function(e){for(var n in e){var r=n.toUpperCase();r in u?Array.isArray(e[n])?this.parts[r]=e[n]:this.parts[r]=[e[n]]:this[n]=e[n]}this.interval&&"number"!=typeof this.interval&&l.INTERVAL(this.interval,this),this.wkst&&"number"!=typeof this.wkst&&(this.wkst=t.Recur.icalDayToNumericDay(this.wkst)),!this.until||this.until instanceof t.Time||(this.until=t.Time.fromString(this.until))},toJSON:function(){var e=Object.create(null);for(var n in e.freq=this.freq,this.count&&(e.count=this.count),this.interval>1&&(e.interval=this.interval),this.parts)if(this.parts.hasOwnProperty(n)){var r=this.parts[n];Array.isArray(r)&&1==r.length?e[n.toLowerCase()]=r[0]:e[n.toLowerCase()]=t.helpers.clone(this.parts[n])}return this.until&&(e.until=this.until.toString()),"wkst"in this&&this.wkst!==t.Time.DEFAULT_WEEK_START&&(e.wkst=t.Recur.numericDayToIcalDay(this.wkst)),e},toString:function(){var e="FREQ="+this.freq;for(var n in this.count&&(e+=";COUNT="+this.count),this.interval>1&&(e+=";INTERVAL="+this.interval),this.parts)this.parts.hasOwnProperty(n)&&(e+=";"+n+"="+this.parts[n]);return this.until&&(e+=";UNTIL="+this.until.toICALString()),"wkst"in this&&this.wkst!==t.Time.DEFAULT_WEEK_START&&(e+=";WKST="+t.Recur.numericDayToIcalDay(this.wkst)),e}},t.Recur.icalDayToNumericDay=function(n,r){var i=r||t.Time.SUNDAY;return(e[n]-i+7)%7+1},t.Recur.numericDayToIcalDay=function(e,r){var i=e+(r||t.Time.SUNDAY)-t.Time.SUNDAY;return i>7&&(i-=7),n[i]};var o=/^(SU|MO|TU|WE|TH|FR|SA)$/,s=/^([+-])?(5[0-3]|[1-4][0-9]|[1-9])?(SU|MO|TU|WE|TH|FR|SA)$/,a=["SECONDLY","MINUTELY","HOURLY","DAILY","WEEKLY","MONTHLY","YEARLY"],l={FREQ:function(e,t,n){if(-1===a.indexOf(e))throw new Error('invalid frequency "'+e+'" expected: "'+a.join(", ")+'"');t.freq=e},COUNT:function(e,n,r){n.count=t.helpers.strictParseInt(e)},INTERVAL:function(e,n,r){n.interval=t.helpers.strictParseInt(e),n.interval<1&&(n.interval=1)},UNTIL:function(e,n,r){e.length>10?n.until=t.design.icalendar.value["date-time"].fromICAL(e):n.until=t.design.icalendar.value.date.fromICAL(e),r||(n.until=t.Time.fromString(n.until))},WKST:function(e,n,r){if(!o.test(e))throw new Error('invalid WKST value "'+e+'"');n.wkst=t.Recur.icalDayToNumericDay(e)}},u={BYSECOND:i.bind(this,"BYSECOND",0,60),BYMINUTE:i.bind(this,"BYMINUTE",0,59),BYHOUR:i.bind(this,"BYHOUR",0,23),BYDAY:function(e){if(s.test(e))return e;throw new Error('invalid BYDAY value "'+e+'"')},BYMONTHDAY:i.bind(this,"BYMONTHDAY",-31,31),BYYEARDAY:i.bind(this,"BYYEARDAY",-366,366),BYWEEKNO:i.bind(this,"BYWEEKNO",-53,53),BYMONTH:i.bind(this,"BYMONTH",1,12),BYSETPOS:i.bind(this,"BYSETPOS",-366,366)};t.Recur.fromString=function(e){var n=t.Recur._stringToData(e,!1);return new t.Recur(n)},t.Recur.fromData=function(e){return new t.Recur(e)},t.Recur._stringToData=function(e,t){for(var n=Object.create(null),r=e.split(";"),i=r.length,o=0;o=0||r<0)&&(this.last.day+=r)}else{var i=t.Recur.numericDayToIcalDay(this.dtstart.dayOfWeek());e.BYDAY=[i]}if("YEARLY"==this.rule.freq){for(;this.expand_year_days(this.last.year),!(this.days.length>0);)this.increment_year(this.rule.interval);this._nextByYearDay()}if("MONTHLY"==this.rule.freq&&this.has_by_data("BYDAY")){var o=null,s=this.last.clone(),a=t.Time.daysInMonth(this.last.month,this.last.year);for(var l in this.by_data.BYDAY)if(this.by_data.BYDAY.hasOwnProperty(l)){this.last=s.clone();n=(u=this.ruleDayOfWeek(this.by_data.BYDAY[l]))[0];var u,c=u[1],d=this.last.nthWeekDay(c,n);if(n>=6||n<=-6)throw new Error("Malformed values in BYDAY part");if(d>a||d<=0){if(o&&o.month==s.month)continue;for(;d>a||d<=0;)this.increment_month(),a=t.Time.daysInMonth(this.last.month,this.last.year),d=this.last.nthWeekDay(c,n)}this.last.day=d,(!o||this.last.compare(o)<0)&&(o=this.last.clone())}if(this.last=o.clone(),this.has_by_data("BYMONTHDAY")&&this._byDayAndMonthDay(!0),this.last.day>a||0==this.last.day)throw new Error("Malformed values in BYDAY part")}else if(this.has_by_data("BYMONTHDAY")&&this.last.day<0){a=t.Time.daysInMonth(this.last.month,this.last.year);this.last.day=a+this.last.day+1}},next:function(){var e,t=this.last?this.last.clone():null;if(this.rule.count&&this.occurrence_number>=this.rule.count||this.rule.until&&this.last.compare(this.rule.until)>0)return this.completed=!0,null;if(0==this.occurrence_number&&this.last.compare(this.dtstart)>=0)return this.occurrence_number++,this.last;do{switch(e=1,this.rule.freq){case"SECONDLY":this.next_second();break;case"MINUTELY":this.next_minute();break;case"HOURLY":this.next_hour();break;case"DAILY":this.next_day();break;case"WEEKLY":this.next_week();break;case"MONTHLY":e=this.next_month();break;case"YEARLY":this.next_year();break;default:return null}}while(!this.check_contracting_rules()||this.last.compare(this.dtstart)<0||!e);if(0==this.last.compare(t))throw new Error("Same occurrence found twice, protecting you from death by recursion");return this.rule.until&&this.last.compare(this.rule.until)>0?(this.completed=!0,null):(this.occurrence_number++,this.last)},next_second:function(){return this.next_generic("BYSECOND","SECONDLY","second","minute")},increment_second:function(e){return this.increment_generic(e,"second",60,"minute")},next_minute:function(){return this.next_generic("BYMINUTE","MINUTELY","minute","hour","next_second")},increment_minute:function(e){return this.increment_generic(e,"minute",60,"hour")},next_hour:function(){return this.next_generic("BYHOUR","HOURLY","hour","monthday","next_minute")},increment_hour:function(e){this.increment_generic(e,"hour",24,"monthday")},next_day:function(){this.by_data;var e="DAILY"==this.rule.freq;return 0==this.next_hour()||(e?this.increment_monthday(this.rule.interval):this.increment_monthday(1)),0},next_week:function(){var e=0;if(0==this.next_weekday_by_week())return e;if(this.has_by_data("BYWEEKNO")){++this.by_indices.BYWEEKNO;this.by_indices.BYWEEKNO==this.by_data.BYWEEKNO.length&&(this.by_indices.BYWEEKNO=0,e=1),this.last.month=1,this.last.day=1;var t=this.by_data.BYWEEKNO[this.by_indices.BYWEEKNO];this.last.day+=7*t,e&&this.increment_year(1)}else this.increment_monthday(7*this.rule.interval);return e},normalizeByMonthDayRules:function(e,n,r){for(var i,o=t.Time.daysInMonth(n,e),s=[],a=0,l=r.length;ao)){if(i<0)i=o+(i+1);else if(0===i)continue;-1===s.indexOf(i)&&s.push(i)}return s.sort((function(e,t){return e-t}))},_byDayAndMonthDay:function(e){var n,r,i,o,s=this.by_data.BYDAY,a=0,l=s.length,u=0,c=this,d=this.last.day;function h(){for(o=t.Time.daysInMonth(c.last.month,c.last.year),n=c.normalizeByMonthDayRules(c.last.year,c.last.month,c.by_data.BYMONTHDAY),i=n.length;n[a]<=d&&(!e||n[a]!=d)&&ao)f();else{var m=n[a++];if(m>=r){d=m;for(var g=0;gn&&(this.last.day=1,this.increment_month(),this.is_day_in_byday(this.last)?this.has_by_data("BYSETPOS")&&!this.check_set_position(1)||(e=1):e=0)}else if(this.has_by_data("BYMONTHDAY")){this.by_indices.BYMONTHDAY++,this.by_indices.BYMONTHDAY>=this.by_data.BYMONTHDAY.length&&(this.by_indices.BYMONTHDAY=0,this.increment_month());n=t.Time.daysInMonth(this.last.month,this.last.year);(s=this.by_data.BYMONTHDAY[this.by_indices.BYMONTHDAY])<0&&(s=n+s+1),s>n?(this.last.day=1,e=this.is_day_in_byday(this.last)):this.last.day=s}else{this.increment_month();n=t.Time.daysInMonth(this.last.month,this.last.year);this.by_data.BYMONTHDAY[0]>n?e=0:this.last.day=this.by_data.BYMONTHDAY[0]}return e},next_weekday_by_week:function(){var e=0;if(0==this.next_hour())return e;if(!this.has_by_data("BYDAY"))return 1;for(;;){var n=new t.Time;this.by_indices.BYDAY++,this.by_indices.BYDAY==Object.keys(this.by_data.BYDAY).length&&(this.by_indices.BYDAY=0,e=1);var r=this.by_data.BYDAY[this.by_indices.BYDAY],i=this.ruleDayOfWeek(r)[1];(i-=this.rule.wkst)<0&&(i+=7),n.year=this.last.year,n.month=this.last.month,n.day=this.last.day;var o=n.startDoyWeek(this.rule.wkst);if(!(i+o<1)||e){var s=t.Time.fromDayOfYear(o+i,this.last.year);return this.last.year=s.year,this.last.month=s.month,this.last.day=s.day,e}}},next_year:function(){if(0==this.next_hour())return 0;if(++this.days_index==this.days.length){this.days_index=0;do{this.increment_year(this.rule.interval),this.expand_year_days(this.last.year)}while(0==this.days.length)}return this._nextByYearDay(),1},_nextByYearDay:function(){var e=this.days[this.days_index],n=this.last.year;e<1&&(e+=1,n+=1);var r=t.Time.fromDayOfYear(e,n);this.last.day=r.day,this.last.month=r.month},ruleDayOfWeek:function(e,n){var r=e.match(/([+-]?[0-9])?(MO|TU|WE|TH|FR|SA|SU)/);return r?[parseInt(r[1]||0,10),e=t.Recur.icalDayToNumericDay(r[2],n)]:[0,0]},next_generic:function(e,t,n,r,i){var o=e in this.by_data,s=this.rule.freq==t,a=0;if(i&&0==this[i]())return a;if(o){this.by_indices[e]++;this.by_indices[e];var l=this.by_data[e];this.by_indices[e]==l.length&&(this.by_indices[e]=0,a=1),this.last[n]=l[this.by_indices[e]]}else s&&this["increment_"+n](this.rule.interval);return o&&a&&s&&this["increment_"+r](1),a},increment_monthday:function(e){for(var n=0;nr&&(this.last.day-=r,this.increment_month())}},increment_month:function(){if(this.last.day=1,this.has_by_data("BYMONTH"))this.by_indices.BYMONTH++,this.by_indices.BYMONTH==this.by_data.BYMONTH.length&&(this.by_indices.BYMONTH=0,this.increment_year(1)),this.last.month=this.by_data.BYMONTH[this.by_indices.BYMONTH];else{"MONTHLY"==this.rule.freq?this.last.month+=this.rule.interval:this.last.month++,this.last.month--;var e=t.helpers.trunc(this.last.month/12);this.last.month%=12,this.last.month++,0!=e&&this.increment_year(e)}},increment_year:function(e){this.last.year+=e},increment_generic:function(e,n,r,i){this.last[n]+=e;var o=t.helpers.trunc(this.last[n]/r);this.last[n]%=r,0!=o&&this["increment_"+i](o)},has_by_data:function(e){return e in this.rule.parts},expand_year_days:function(e){var n=new t.Time;this.days=[];var r={},i=["BYDAY","BYWEEKNO","BYMONTHDAY","BYMONTH","BYYEARDAY"];for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];s in this.rule.parts&&(r[s]=this.rule.parts[s])}if("BYMONTH"in r&&"BYWEEKNO"in r){var a=1,l={};n.year=e,n.isDate=!0;for(var u=0;u0?(A=N+7*(M-1))<=E&&this.days.push(D+A):(A=H+7*(M+1))>0&&this.days.push(D+A)}}this.days.sort((function(e,t){return e-t}))}else if(2==p&&"BYDAY"in r&&"BYMONTHDAY"in r){var L=this.expand_by_day(e);for(var Y in L)if(L.hasOwnProperty(Y)){x=L[Y];var z=t.Time.fromDayOfYear(x,e);this.by_data.BYMONTHDAY.indexOf(z.day)>=0&&this.days.push(x)}}else if(3==p&&"BYDAY"in r&&"BYMONTHDAY"in r&&"BYMONTH"in r){L=this.expand_by_day(e);for(var Y in L)if(L.hasOwnProperty(Y)){x=L[Y],z=t.Time.fromDayOfYear(x,e);this.by_data.BYMONTH.indexOf(z.month)>=0&&this.by_data.BYMONTHDAY.indexOf(z.day)>=0&&this.days.push(x)}}else if(2==p&&"BYDAY"in r&&"BYWEEKNO"in r){L=this.expand_by_day(e);for(var Y in L)if(L.hasOwnProperty(Y)){x=L[Y];var B=(z=t.Time.fromDayOfYear(x,e)).weekNumber(this.rule.wkst);this.by_data.BYWEEKNO.indexOf(B)&&this.days.push(x)}}else 3==p&&"BYDAY"in r&&"BYWEEKNO"in r&&"BYMONTHDAY"in r||(this.days=1==p&&"BYYEARDAY"in r?this.days.concat(this.by_data.BYYEARDAY):[]);return 0},expand_by_day:function(e){var t=[],n=this.last.clone();n.year=e,n.month=1,n.day=1,n.isDate=!0;var r=n.dayOfWeek();n.month=12,n.day=31,n.isDate=!0;var i=n.dayOfWeek(),o=n.dayOfYear();for(var s in this.by_data.BYDAY)if(this.by_data.BYDAY.hasOwnProperty(s)){var a=this.by_data.BYDAY[s],l=this.ruleDayOfWeek(a),u=l[0],c=l[1];if(0==u)for(var d=(c+7-r)%7+1;d<=o;d+=7)t.push(d);else if(u>0){var h;h=c>=r?c-r+1:c-r+8,t.push(h+7*(u-1))}else{var f;u=-u,f=c<=i?o-i+c:o-i+c-7,t.push(f-7*(u-1))}}return t},is_day_in_byday:function(e){for(var t in this.by_data.BYDAY)if(this.by_data.BYDAY.hasOwnProperty(t)){var n=this.by_data.BYDAY[t],r=this.ruleDayOfWeek(n),i=r[0],o=r[1],s=e.dayOfWeek();if(0==i&&o==s||e.nthWeekDay(o,i)==e.day)return 1}return 0},check_set_position:function(e){return!!this.has_by_data("BYSETPOS")&&-1!==this.by_data.BYSETPOS.indexOf(e)},sort_byday_rules:function(e){for(var t=0;tthis.ruleDayOfWeek(e[t],this.rule.wkst)[1]){var r=e[t];e[t]=e[n],e[n]=r}}},check_contract_restriction:function(t,n){var r=e._indexMap[t],i=e._expandMap[this.rule.freq][r],o=!1;if(t in this.by_data&&i==e.CONTRACT){var s=this.by_data[t];for(var a in s)if(s.hasOwnProperty(a)&&s[a]==n){o=!0;break}}else o=!0;return o},check_contracting_rules:function(){var e=this.last.dayOfWeek(),n=this.last.weekNumber(this.rule.wkst),r=this.last.dayOfYear();return this.check_contract_restriction("BYSECOND",this.last.second)&&this.check_contract_restriction("BYMINUTE",this.last.minute)&&this.check_contract_restriction("BYHOUR",this.last.hour)&&this.check_contract_restriction("BYDAY",t.Recur.numericDayToIcalDay(e))&&this.check_contract_restriction("BYWEEKNO",n)&&this.check_contract_restriction("BYMONTHDAY",this.last.day)&&this.check_contract_restriction("BYMONTH",this.last.month)&&this.check_contract_restriction("BYYEARDAY",r)},setup_defaults:function(t,n,r){var i=e._indexMap[t];return e._expandMap[this.rule.freq][i]!=e.CONTRACT&&(t in this.by_data||(this.by_data[t]=[r]),this.rule.freq!=n)?this.by_data[t][0]:r},toJSON:function(){var e=Object.create(null);return e.initialized=this.initialized,e.rule=this.rule.toJSON(),e.dtstart=this.dtstart.toJSON(),e.by_data=this.by_data,e.days=this.days,e.last=this.last.toJSON(),e.by_indices=this.by_indices,e.occurrence_number=this.occurrence_number,e}},e._indexMap={BYSECOND:0,BYMINUTE:1,BYHOUR:2,BYDAY:3,BYMONTHDAY:4,BYYEARDAY:5,BYWEEKNO:6,BYMONTH:7,BYSETPOS:8},e._expandMap={SECONDLY:[1,1,1,1,1,1,1,1],MINUTELY:[2,1,1,1,1,1,1,1],HOURLY:[2,2,1,1,1,1,1,1],DAILY:[2,2,2,1,1,1,1,1],WEEKLY:[2,2,2,2,3,3,1,1],MONTHLY:[2,2,2,2,2,3,3,1],YEARLY:[2,2,2,2,2,2,2,2]},e.UNKNOWN=0,e.CONTRACT=1,e.EXPAND=2,e.ILLEGAL=3,e}(),t.RecurExpansion=function(){function e(e){return t.helpers.formatClassType(e,t.Time)}function n(e,t){return e.compare(t)}function r(e){this.ruleDates=[],this.exDates=[],this.fromData(e)}return r.prototype={complete:!1,ruleIterators:null,ruleDates:null,exDates:null,ruleDateInc:0,exDateInc:0,exDate:null,ruleDate:null,dtstart:null,last:null,fromData:function(n){var r=t.helpers.formatClassType(n.dtstart,t.Time);if(!r)throw new Error(".dtstart (ICAL.Time) must be given");if(this.dtstart=r,n.component)this._init(n.component);else{if(this.last=e(n.last)||r.clone(),!n.ruleIterators)throw new Error(".ruleIterators or .component must be given");this.ruleIterators=n.ruleIterators.map((function(e){return t.helpers.formatClassType(e,t.RecurIterator)})),this.ruleDateInc=n.ruleDateInc,this.exDateInc=n.exDateInc,n.ruleDates&&(this.ruleDates=n.ruleDates.map(e),this.ruleDate=this.ruleDates[this.ruleDateInc]),n.exDates&&(this.exDates=n.exDates.map(e),this.exDate=this.exDates[this.exDateInc]),void 0!==n.complete&&(this.complete=n.complete)}},next:function(){for(var e,t,n,r=0;;){if(r++>500)throw new Error("max tries have occured, rule may be impossible to forfill.");if(t=this.ruleDate,e=this._nextRecurrenceIter(this.last),!t&&!e){this.complete=!0;break}if((!t||e&&t.compare(e.last)>0)&&(t=e.last.clone(),e.next()),this.ruleDate===t&&this._nextRuleDay(),this.last=t,!this.exDate||((n=this.exDate.compare(this.last))<0&&this._nextExDay(),0!==n))return this.last;this._nextExDay()}},toJSON:function(){function e(e){return e.toJSON()}var t=Object.create(null);return t.ruleIterators=this.ruleIterators.map(e),this.ruleDates&&(t.ruleDates=this.ruleDates.map(e)),this.exDates&&(t.exDates=this.exDates.map(e)),t.ruleDateInc=this.ruleDateInc,t.exDateInc=this.exDateInc,t.last=this.last.toJSON(),t.dtstart=this.dtstart.toJSON(),t.complete=this.complete,t},_extractDates:function(e,r){function i(e){o=t.helpers.binsearchInsert(s,e,n),s.splice(o,0,e)}for(var o,s=[],a=e.getAllProperties(r),l=a.length,u=0;u0)&&(r=t);return r}},r}(),t.Event=function(){function e(e,n){e instanceof t.Component||(n=e,e=null),this.component=e||new t.Component("vevent"),this._rangeExceptionCache=Object.create(null),this.exceptions=Object.create(null),this.rangeExceptions=[],n&&n.strictExceptions&&(this.strictExceptions=n.strictExceptions),n&&n.exceptions?n.exceptions.forEach(this.relateException,this):this.component.parent&&!this.isRecurrenceException()&&this.component.parent.getAllSubcomponents("vevent").forEach((function(e){e.hasProperty("recurrence-id")&&this.relateException(e)}),this)}function n(e,t){return e[0]>t[0]?1:t[0]>e[0]?-1:0}return e.prototype={THISANDFUTURE:"THISANDFUTURE",exceptions:null,strictExceptions:!1,relateException:function(e){if(this.isRecurrenceException())throw new Error("cannot relate exception to exceptions");if(e instanceof t.Component&&(e=new t.Event(e)),this.strictExceptions&&e.uid!==this.uid)throw new Error("attempted to relate unrelated exception");var r=e.recurrenceId.toString();if(this.exceptions[r]=e,e.modifiesFuture()){var i=[e.recurrenceId.toUnixTime(),r],o=t.helpers.binsearchInsert(this.rangeExceptions,i,n);this.rangeExceptions.splice(o,0,i)}},modifiesFuture:function(){return!!this.component.hasProperty("recurrence-id")&&this.component.getFirstProperty("recurrence-id").getParameter("range")===this.THISANDFUTURE},findRangeException:function(e){if(!this.rangeExceptions.length)return null;var r=e.toUnixTime(),i=t.helpers.binsearchInsert(this.rangeExceptions,[r],n);if((i-=1)<0)return null;var o=this.rangeExceptions[i];return rMath.max(Math.min(t,i),e);function o(t){return n(s(2.55*t),0,255)}function a(t){return n(s(255*t),0,255)}function r(t){return n(s(t/2.55)/100,0,1)}function h(t){return n(s(100*t),0,100)}const l={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},c=[..."0123456789ABCDEF"],d=t=>c[15&t],u=t=>c[(240&t)>>4]+c[15&t],f=t=>(240&t)>>4==(15&t);function g(t){var e=(t=>f(t.r)&&f(t.g)&&f(t.b)&&f(t.a))(t)?d:u;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const p=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function m(t,e,i){const s=e*Math.min(i,1-i),n=(e,n=(e+t/30)%12)=>i-s*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function x(t,e,i){const s=(s,n=(s+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0);return[s(5),s(3),s(1)]}function b(t,e,i){const s=m(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)s[n]*=1-e-i,s[n]+=e;return s}function _(t){const e=t.r/255,i=t.g/255,s=t.b/255,n=Math.max(e,i,s),o=Math.min(e,i,s),a=(n+o)/2;let r,h,l;return n!==o&&(l=n-o,h=a>.5?l/(2-n-o):l/(n+o),r=function(t,e,i,s,n){return t===n?(e-i)/s+(e>16&255,o>>8&255,255&o]}return t}(),P.transparent=[0,0,0,0]);const e=P[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const C=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const A=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,O=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function T(t,e,i){if(t){let s=_(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,0===e?360:1)),s=v(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function R(t,e){return t?Object.assign(e||{},t):t}function E(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=a(t[3]))):(e=R(t,{r:0,g:0,b:0,a:1})).a=a(e.a),e}function I(t){return"r"===t.charAt(0)?function(t){const e=C.exec(t);let i,s,a,r=255;if(e){if(e[7]!==i){const t=+e[7];r=e[8]?o(t):n(255*t,0,255)}return i=+e[1],s=+e[3],a=+e[5],i=255&(e[2]?o(i):n(i,0,255)),s=255&(e[4]?o(s):n(s,0,255)),a=255&(e[6]?o(a):n(a,0,255)),{r:i,g:s,b:a,a:r}}}(t):M(t)}class L{constructor(t){if(t instanceof L)return t;const e=typeof t;let i;var s,n,o;"object"===e?i=E(t):"string"===e&&(o=(s=t).length,"#"===s[0]&&(4===o||5===o?n={r:255&17*l[s[1]],g:255&17*l[s[2]],b:255&17*l[s[3]],a:5===o?17*l[s[4]]:255}:7!==o&&9!==o||(n={r:l[s[1]]<<4|l[s[2]],g:l[s[3]]<<4|l[s[4]],b:l[s[5]]<<4|l[s[6]],a:9===o?l[s[7]]<<4|l[s[8]]:255})),i=n||D(t)||I(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=R(this._rgb);return t&&(t.a=r(t.a)),t}set rgb(t){this._rgb=E(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${r(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?g(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=_(t),i=e[0],s=h(e[1]),n=h(e[2]);return t.a<255?`hsla(${i}, ${s}%, ${n}%, ${r(t.a)})`:`hsl(${i}, ${s}%, ${n}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,s=t.rgb;let n;const o=e===n?.5:e,a=2*o-1,r=i.a-s.a,h=((a*r==-1?a:(a+r)/(1+a*r))+1)/2;n=1-h,i.r=255&h*i.r+n*s.r+.5,i.g=255&h*i.g+n*s.g+.5,i.b=255&h*i.b+n*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const s=O(r(t.r)),n=O(r(t.g)),o=O(r(t.b));return{r:a(A(s+i*(O(r(e.r))-s))),g:a(A(n+i*(O(r(e.g))-n))),b:a(A(o+i*(O(r(e.b))-o))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new L(this.rgb)}alpha(t){return this._rgb.a=a(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=s(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return T(this._rgb,2,t),this}darken(t){return T(this._rgb,2,-t),this}saturate(t){return T(this._rgb,1,t),this}desaturate(t){return T(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=_(t);i[0]=w(i[0]+e),i=v(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function z(){}const F=(()=>{let t=0;return()=>t++})();function B(t){return null==t}function W(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function H(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function V(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function j(t,e){return V(t)?t:e}function N(t,e){return void 0===t?e:t}const $=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Y(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function U(t,e,i,s){let n,o,a;if(W(t))if(o=t.length,s)for(n=o-1;n>=0;n--)e.call(i,t[n],n);else for(n=0;nt,x:t=>t.x,y:t=>t.y};function et(t,e){const i=tt[e]||(tt[e]=function(t){const e=function(t){const e=t.split("."),i=[];let s="";for(const t of e)s+=t,s.endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function it(t){return t.charAt(0).toUpperCase()+t.slice(1)}const st=t=>void 0!==t,nt=t=>"function"==typeof t,ot=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};const at=Math.PI,rt=2*at,ht=rt+at,lt=Number.POSITIVE_INFINITY,ct=at/180,dt=at/2,ut=at/4,ft=2*at/3,gt=Math.log10,pt=Math.sign;function mt(t,e,i){return Math.abs(t-e)h&&l=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function Ot(t,e,i){i=i||(i=>t[i]1;)s=o+n>>1,i(s)?o=s:n=s;return{lo:o,hi:n}}const Tt=(t,e,i,s)=>Ot(t,i,s?s=>{const n=t[s][e];return nt[s][e]Ot(t,i,(s=>t[s][e]>=i));const Et=["push","pop","shift","splice","unshift"];function It(t,e){const i=t._chartjs;if(!i)return;const s=i.listeners,n=s.indexOf(e);-1!==n&&s.splice(n,1),s.length>0||(Et.forEach((e=>{delete t[e]})),delete t._chartjs)}function Lt(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const zt="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function Ft(t,e){let i=[],s=!1;return function(...n){i=n,s||(s=!0,zt.call(window,(()=>{s=!1,t.apply(e,i)})))}}const Bt=t=>"start"===t?"left":"end"===t?"right":"center",Wt=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function Ht(t,e,i){const s=e.length;let n=0,o=s;if(t._sorted){const{iScale:a,_parsed:r}=t,h=a.axis,{min:l,max:c,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(n=Ct(Math.min(Tt(r,h,l).lo,i?s:Tt(e,h,a.getPixelForValue(l)).lo),0,s-1)),o=u?Ct(Math.max(Tt(r,a.axis,c,!0).hi+1,i?0:Tt(e,h,a.getPixelForValue(c),!0).hi+1),n,s)-n:s-n}return{start:n,count:o}}function Vt(t){const{xScale:e,yScale:i,_scaleRanges:s}=t,n={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!s)return t._scaleRanges=n,!0;const o=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==i.min||s.ymax!==i.max;return Object.assign(s,n),o}const jt=t=>0===t||1===t,Nt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*rt/i),$t=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*rt/i)+1,Yt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*dt),easeOutSine:t=>Math.sin(t*dt),easeInOutSine:t=>-.5*(Math.cos(at*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>jt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>jt(t)?t:Nt(t,.075,.3),easeOutElastic:t=>jt(t)?t:$t(t,.075,.3),easeInOutElastic(t){const e=.1125;return jt(t)?t:t<.5?.5*Nt(2*t,e,.45):.5+.5*$t(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Yt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*Yt.easeInBounce(2*t):.5*Yt.easeOutBounce(2*t-1)+.5};function Ut(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Xt(t){return Ut(t)?t:new L(t)}function qt(t){return Ut(t)?t:new L(t).saturate(.5).darken(.1).hexString()}const Kt=["x","y","borderWidth","radius","tension"],Zt=["color","borderColor","backgroundColor"];const Gt=new Map;function Jt(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let s=Gt.get(i);return s||(s=new Intl.NumberFormat(t,e),Gt.set(i,s)),s}(e,i).format(t)}const Qt={values:t=>W(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const s=this.chart.options.locale;let n,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(n="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const a=gt(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),h={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(h,this.options.ticks.format),Jt(t,s,h)},logarithmic(t,e,i){if(0===t)return"0";const s=i[e].significand||t/Math.pow(10,Math.floor(gt(t)));return[1,2,3,5,10,15].includes(s)||e>.8*i.length?Qt.numeric.call(this,t,e,i):""}};var te={formatters:Qt};const ee=Object.create(null),ie=Object.create(null);function se(t,e){if(!e)return t;const i=e.split(".");for(let e=0,s=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>qt(e.backgroundColor),this.hoverBorderColor=(t,e)=>qt(e.borderColor),this.hoverColor=(t,e)=>qt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return ne(this,t,e)}get(t){return se(this,t)}describe(t,e){return ne(ie,t,e)}override(t,e){return ne(ee,t,e)}route(t,e,i,s){const n=se(this,t),o=se(this,i),a="_"+e;Object.defineProperties(n,{[a]:{value:n[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=o[s];return H(t)?Object.assign({},e,t):N(t,e)},set(t){this[a]=t}}})}apply(t){t.forEach((t=>t(this)))}}var ae=new oe({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:Zt},numbers:{type:"number",properties:Kt}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:te.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function re(t,e,i,s,n){let o=e[n];return o||(o=e[n]=t.measureText(n).width,i.push(n)),o>s&&(s=o),s}function he(t,e,i){const s=t.currentDevicePixelRatio,n=0!==i?Math.max(i/2,.5):0;return Math.round((e-n)*s)/s+n}function le(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function ce(t,e,i,s){de(t,e,i,s,null)}function de(t,e,i,s,n){let o,a,r,h,l,c,d,u;const f=e.pointStyle,g=e.rotation,p=e.radius;let m=(g||0)*ct;if(f&&"object"==typeof f&&(o=f.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,s),t.rotate(m),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void t.restore();if(!(isNaN(p)||p<=0)){switch(t.beginPath(),f){default:n?t.ellipse(i,s,n/2,p,0,0,rt):t.arc(i,s,p,0,rt),t.closePath();break;case"triangle":c=n?n/2:p,t.moveTo(i+Math.sin(m)*c,s-Math.cos(m)*p),m+=ft,t.lineTo(i+Math.sin(m)*c,s-Math.cos(m)*p),m+=ft,t.lineTo(i+Math.sin(m)*c,s-Math.cos(m)*p),t.closePath();break;case"rectRounded":l=.516*p,h=p-l,a=Math.cos(m+ut)*h,d=Math.cos(m+ut)*(n?n/2-l:h),r=Math.sin(m+ut)*h,u=Math.sin(m+ut)*(n?n/2-l:h),t.arc(i-d,s-r,l,m-at,m-dt),t.arc(i+u,s-a,l,m-dt,m),t.arc(i+d,s+r,l,m,m+dt),t.arc(i-u,s+a,l,m+dt,m+at),t.closePath();break;case"rect":if(!g){h=Math.SQRT1_2*p,c=n?n/2:h,t.rect(i-c,s-h,2*c,2*h);break}m+=ut;case"rectRot":d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+u,s-a),t.lineTo(i+d,s+r),t.lineTo(i-u,s+a),t.closePath();break;case"crossRot":m+=ut;case"cross":d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+d,s+r),t.moveTo(i+u,s-a),t.lineTo(i-u,s+a);break;case"star":d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+d,s+r),t.moveTo(i+u,s-a),t.lineTo(i-u,s+a),m+=ut,d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+d,s+r),t.moveTo(i+u,s-a),t.lineTo(i-u,s+a);break;case"line":a=n?n/2:Math.cos(m)*p,r=Math.sin(m)*p,t.moveTo(i-a,s-r),t.lineTo(i+a,s+r);break;case"dash":t.moveTo(i,s),t.lineTo(i+Math.cos(m)*(n?n/2:p),s+Math.sin(m)*p);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function ue(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let h,l;for(t.save(),t.font=n.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),B(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),h=0;hN(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of n)i[t]=+o(t)||0;return i}function Se(t){return ke(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Pe(t){return ke(t,["topLeft","topRight","bottomLeft","bottomRight"])}function De(t){const e=Se(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ce(t,e){t=t||{},e=e||ae.font;let i=N(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let s=N(t.style,e.style);s&&!(""+s).match(we)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:N(t.family,e.family),lineHeight:Me(N(t.lineHeight,e.lineHeight),i),size:i,style:s,weight:N(t.weight,e.weight),string:""};return n.string=function(t){return!t||B(t.size)||B(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(n),n}function Ae(t,e,i,s){let n,o,a,r=!0;for(n=0,o=t.length;nt[0])){const o=i||t;void 0===s&&(s=je("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:s,_getTarget:n,override:i=>Te([i,...t],e,o,s)};return new Proxy(a,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,s)=>ze(i,s,(()=>function(t,e,i,s){let n;for(const o of e)if(n=je(Ie(o,t),i),void 0!==n)return Le(t,n)?He(i,s,t,n):n}(s,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ne(t).includes(e),ownKeys:t=>Ne(t),set(t,e,i){const s=t._storage||(t._storage=n());return t[e]=s[e]=i,delete t._keys,!0}})}function Re(t,e,i,s){const n={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Ee(t,s),setContext:e=>Re(t,e,i,s),override:n=>Re(t.override(n),e,i,s)};return new Proxy(n,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>ze(t,e,(()=>function(t,e,i){const{_proxy:s,_context:n,_subProxy:o,_descriptors:a}=t;let r=s[e];nt(r)&&a.isScriptable(e)&&(r=function(t,e,i,s){const{_proxy:n,_context:o,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let h=e(o,a||s);r.delete(t),Le(t,h)&&(h=He(n._scopes,n,t,h));return h}(e,r,t,i));W(r)&&r.length&&(r=function(t,e,i,s){const{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=i;if(void 0!==o.index&&s(t))return e[o.index%e.length];if(H(e[0])){const i=e,s=n._scopes.filter((t=>t!==i));e=[];for(const h of i){const i=He(s,n,t,h);e.push(Re(i,o,a&&a[t],r))}}return e}(e,r,t,a.isIndexable));Le(e,r)&&(r=Re(r,n,o&&o[e],a));return r}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,s)=>(t[i]=s,delete e[i],!0)})}function Ee(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:s=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:s,isScriptable:nt(i)?i:()=>i,isIndexable:nt(s)?s:()=>s}}const Ie=(t,e)=>t?t+it(e):e,Le=(t,e)=>H(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function ze(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const s=i();return t[e]=s,s}function Fe(t,e,i){return nt(t)?t(e,i):t}const Be=(t,e)=>!0===t?e:"string"==typeof t?et(e,t):void 0;function We(t,e,i,s,n){for(const o of e){const e=Be(i,o);if(e){t.add(e);const o=Fe(e._fallback,i,n);if(void 0!==o&&o!==i&&o!==s)return o}else if(!1===e&&void 0!==s&&i!==s)return null}return!1}function He(t,e,i,s){const n=e._rootScopes,o=Fe(e._fallback,i,s),a=[...t,...n],r=new Set;r.add(s);let h=Ve(r,a,i,o||i,s);return null!==h&&((void 0===o||o===i||(h=Ve(r,a,o,h,s),null!==h))&&Te(Array.from(r),[""],n,o,(()=>function(t,e,i){const s=t._getTarget();e in s||(s[e]={});const n=s[e];if(W(n)&&H(i))return i;return n||{}}(e,i,s))))}function Ve(t,e,i,s,n){for(;i;)i=We(t,e,i,s,n);return i}function je(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function Ne(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function $e(t,e,i,s){const{iScale:n}=t,{key:o="r"}=this._parsing,a=new Array(s);let r,h,l,c;for(r=0,h=s;re"x"===t?"y":"x";function qe(t,e,i,s){const n=t.skip?e:t,o=e,a=i.skip?e:i,r=kt(o,n),h=kt(a,o);let l=r/(r+h),c=h/(r+h);l=isNaN(l)?0:l,c=isNaN(c)?0:c;const d=s*l,u=s*c;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function Ke(t,e="x"){const i=Xe(e),s=t.length,n=Array(s).fill(0),o=Array(s);let a,r,h,l=Ue(t,0);for(a=0;a!t.skip))),"monotone"===e.cubicInterpolationMode)Ke(t,n);else{let i=s?t[t.length-1]:t[0];for(o=0,a=t.length;ot.ownerDocument.defaultView.getComputedStyle(t,null);const ii=["top","right","bottom","left"];function si(t,e,i){const s={};i=i?"-"+i:"";for(let n=0;n<4;n++){const o=ii[n];s[o]=parseFloat(t[e+"-"+o+i])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}function ni(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:s}=e,n=ei(i),o="border-box"===n.boxSizing,a=si(n,"padding"),r=si(n,"border","width"),{x:h,y:l,box:c}=function(t,e){const i=t.touches,s=i&&i.length?i[0]:t,{offsetX:n,offsetY:o}=s;let a,r,h=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(n,o,t.target))a=n,r=o;else{const t=e.getBoundingClientRect();a=s.clientX-t.left,r=s.clientY-t.top,h=!0}return{x:a,y:r,box:h}}(t,i),d=a.left+(c&&r.left),u=a.top+(c&&r.top);let{width:f,height:g}=e;return o&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((h-d)/f*i.width/s),y:Math.round((l-u)/g*i.height/s)}}const oi=t=>Math.round(10*t)/10;function ai(t,e,i,s){const n=ei(t),o=si(n,"margin"),a=ti(n.maxWidth,t,"clientWidth")||lt,r=ti(n.maxHeight,t,"clientHeight")||lt,h=function(t,e,i){let s,n;if(void 0===e||void 0===i){const o=t&&Qe(t);if(o){const t=o.getBoundingClientRect(),a=ei(o),r=si(a,"border","width"),h=si(a,"padding");e=t.width-h.width-r.width,i=t.height-h.height-r.height,s=ti(a.maxWidth,o,"clientWidth"),n=ti(a.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:s||lt,maxHeight:n||lt}}(t,e,i);let{width:l,height:c}=h;if("content-box"===n.boxSizing){const t=si(n,"border","width"),e=si(n,"padding");l-=e.width+t.width,c-=e.height+t.height}l=Math.max(0,l-o.width),c=Math.max(0,s?l/s:c-o.height),l=oi(Math.min(l,a,h.maxWidth)),c=oi(Math.min(c,r,h.maxHeight)),l&&!c&&(c=oi(l/2));return(void 0!==e||void 0!==i)&&s&&h.height&&c>h.height&&(c=h.height,l=oi(Math.floor(c*s))),{width:l,height:c}}function ri(t,e,i){const s=e||1,n=Math.floor(t.height*s),o=Math.floor(t.width*s);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==s||a.height!==n||a.width!==o)&&(t.currentDevicePixelRatio=s,a.height=n,a.width=o,t.ctx.setTransform(s,0,0,s,0,0),!0)}const hi=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Je()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function li(t,e){const i=function(t,e){return ei(t).getPropertyValue(e)}(t,e),s=i&&i.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function ci(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function di(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:"middle"===s?i<.5?t.y:e.y:"after"===s?i<1?t.y:e.y:i>0?e.y:t.y}}function ui(t,e,i,s){const n={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},a=ci(t,n,i),r=ci(n,o,i),h=ci(o,e,i),l=ci(a,r,i),c=ci(r,h,i);return ci(l,c,i)}function fi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function gi(t,e){let i,s;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,s=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=s)}function pi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mi(t){return"angle"===t?{between:Dt,compare:St,normalize:Pt}:{between:At,compare:(t,e)=>t-e,normalize:t=>t}}function xi({start:t,end:e,count:i,loop:s,style:n}){return{start:t%i,end:e%i,loop:s&&(e-t+1)%i==0,style:n}}function bi(t,e,i){if(!i)return[t];const{property:s,start:n,end:o}=i,a=e.length,{compare:r,between:h,normalize:l}=mi(s),{start:c,end:d,loop:u,style:f}=function(t,e,i){const{property:s,start:n,end:o}=i,{between:a,normalize:r}=mi(s),h=e.length;let l,c,{start:d,end:u,loop:f}=t;if(f){for(d+=h,u+=h,l=0,c=h;lb||h(n,x,p)&&0!==r(n,x),v=()=>!b||0===r(o,p)||h(o,x,p);for(let t=c,i=c;t<=d;++t)m=e[t%a],m.skip||(p=l(m[s]),p!==x&&(b=h(p,n,o),null===_&&y()&&(_=0===r(p,n)?t:i),null!==_&&v()&&(g.push(xi({start:_,end:t,loop:u,count:a,style:f})),_=null),i=t,x=p));return null!==_&&g.push(xi({start:_,end:d,loop:u,count:a,style:f})),g}function _i(t,e){const i=[],s=t.segments;for(let n=0;ns({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=zt.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,s)=>{if(!i.running||!i.items.length)return;const n=i.items;let o,a=n.length-1,r=!1;for(;a>=0;--a)o=n[a],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),r=!0):(n[a]=n[n.length-1],n.pop());r&&(s.draw(),this._notify(s,i,t,"progress")),n.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=n.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ki=new Mi;const Si="transparent",Pi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const s=Xt(t||Si),n=s.valid&&Xt(e||Si);return n&&n.valid?n.mix(s,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Di{constructor(t,e,i,s){const n=e[i];s=Ae([t.to,s,n,t.from]);const o=Ae([t.from,n,s]);this._active=!0,this._fn=t.fn||Pi[t.type||typeof o],this._easing=Yt[t.easing]||Yt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],n=i-this._start,o=this._duration-n;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=Ae([t.to,e,s,t.from]),this._from=Ae([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,n=this._from,o=this._loop,a=this._to;let r;if(this._active=n!==a&&(o||e1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[s]=this._fn(n,a,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t{const n=t[s];if(!H(n))return;const o={};for(const t of e)o[t]=n[t];(W(n.properties)&&n.properties||[s]).forEach((t=>{t!==s&&i.has(t)||i.set(t,o)}))}))}_animateOptions(t,e){const i=e.options,s=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!s)return[];const n=this._createAnimations(s,i);return i.$shared&&function(t,e){const i=[],s=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),n}_createAnimations(t,e){const i=this._properties,s=[],n=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let r;for(r=o.length-1;r>=0;--r){const h=o[r];if("$"===h.charAt(0))continue;if("options"===h){s.push(...this._animateOptions(t,e));continue}const l=e[h];let c=n[h];const d=i.get(h);if(c){if(d&&c.active()){c.update(d,l,a);continue}c.cancel()}d&&d.duration?(n[h]=c=new Di(d,t,h,l),s.push(c)):t[h]=l}return s}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ki.add(this._chart,i),!0):void 0}}function Ai(t,e){const i=t&&t.options||{},s=i.reverse,n=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:s?o:n,end:s?n:o}}function Oi(t,e){const i=[],s=t._getSortedDatasetMetas(e);let n,o;for(n=0,o=s.length;n0||!i&&e<0)return n.index}return null}function Li(t,e){const{chart:i,_cachedMeta:s}=t,n=i._stacks||(i._stacks={}),{iScale:o,vScale:a,index:r}=s,h=o.axis,l=a.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,a,s),d=e.length;let u;for(let t=0;ti[t].axis===e)).shift()}function Fi(t,e){const i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[s]||void 0===e[s][i])return;delete e[s][i],void 0!==e[s]._visualValues&&void 0!==e[s]._visualValues[i]&&delete e[s]._visualValues[i]}}}const Bi=t=>"reset"===t||"none"===t,Wi=(t,e)=>e?t:Object.assign({},t);class Hi{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ri(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Fi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,n=e.xAxisID=N(i.xAxisID,zi(t,"x")),o=e.yAxisID=N(i.yAxisID,zi(t,"y")),a=e.rAxisID=N(i.rAxisID,zi(t,"r")),r=e.indexAxis,h=e.iAxisID=s(r,n,o,a),l=e.vAxisID=s(r,o,n,a);e.xScale=this.getScaleForId(n),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(h),e.vScale=this.getScaleForId(l)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&It(this._data,this),t._stacked&&Fi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(H(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:i,vScale:s}=e,n="x"===i.axis?"x":"y",o="x"===s.axis?"x":"y",a=Object.keys(t),r=new Array(a.length);let h,l,c;for(h=0,l=a.length;h{const e="_onData"+it(t),i=s[t];Object.defineProperty(s,t,{configurable:!0,enumerable:!1,value(...t){const n=i.apply(this,t);return s._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),n}})})))),this._syncList=[],this._data=e}var s,n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const n=e._stacked;e._stacked=Ri(e.vScale,e),e.stack!==i.stack&&(s=!0,Fi(e),e.stack=i.stack),this._resyncElements(t),(s||n!==e._stacked)&&(Li(this,e._parsed),e._stacked=Ri(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:s}=this,{iScale:n,_stacked:o}=i,a=n.axis;let r,h,l,c=0===t&&e===s.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=s,i._sorted=!0,l=s;else{l=W(s[t])?this.parseArrayData(i,s,t,e):H(s[t])?this.parseObjectData(i,s,t,e):this.parsePrimitiveData(i,s,t,e);const n=()=>null===h[a]||d&&h[a]t&&!e.hidden&&e._stacked&&{keys:Oi(i,!0),values:null})(e,i,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:l,max:c}=function(t){const{min:e,max:i,minDefined:s,maxDefined:n}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}(a);let d,u;function f(){u=s[d];const e=u[a.axis];return!V(u[t.axis])||l>e||c=0;--d)if(!f()){this.updateRangeFromParsed(h,t,u,r);break}return h}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,n,o;for(s=0,n=e.length;s=0&&tthis.getContext(i,s,e)),c);return f.$shared&&(f.$shared=r,n[o]=Object.freeze(Wi(f,r))),f}_resolveAnimations(t,e,i){const s=this.chart,n=this._cachedDataOpts,o=`animation-${e}`,a=n[o];if(a)return a;let r;if(!1!==s.options.animation){const s=this.chart.config,n=s.datasetAnimationScopeKeys(this._type,e),o=s.getOptionScopes(this.getDataset(),n);r=s.createResolver(o,this.getContext(t,i,e))}const h=new Ci(s,r&&r.animations);return r&&r._cacheable&&(n[o]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Bi(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,n=this.getSharedOptions(i),o=this.includeOptions(e,n)||n!==s;return this.updateSharedOptions(n,e,i),{sharedOptions:n,includeOptions:o}}updateElement(t,e,i,s){Bi(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!Bi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const n=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const s=i.length,n=e.length,o=Math.min(n,s);o&&this.parse(0,o),n>s?this._insertElements(s,n-s,t):n{for(t.length+=e,a=t.length-1;a>=o;a--)t[a]=t[a-e]};for(r(n),a=t;at-e)))}return t._cache.$bar}(e,t.type);let s,n,o,a,r=e._length;const h=()=>{32767!==o&&-32768!==o&&(st(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(s=0,n=i.length;sMath.abs(r)&&(h=r,l=a),e[i.axis]=l,e._custom={barStart:h,barEnd:l,start:n,end:o,min:a,max:r}}(t,e,i,s):e[i.axis]=i.parse(t,s),e}function Ni(t,e,i,s){const n=t.iScale,o=t.vScale,a=n.getLabels(),r=n===o,h=[];let l,c,d,u;for(l=i,c=i+s;lt.x,i="left",s="right"):(e=t.baset.controller.options.grouped)),n=i.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(e),r=a&&a[i.axis],h=t=>{const e=t._parsed.find((t=>t[i.axis]===r)),s=e&&e[t.vScale.axis];if(B(s)||isNaN(s))return!0};for(const i of s)if((void 0===e||!h(i))&&((!1===n||-1===o.indexOf(i.stack)||void 0===n&&void 0===i.stack)&&o.push(i.stack),i.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const s=this._getStacks(t,i),n=void 0!==e?s.indexOf(e):-1;return-1===n?s.length-1:n}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let n,o;for(n=0,o=e.data.length;n=i?1:-1)}(d,e,a)*o,u===a&&(m-=d/2);const t=e.getPixelForDecimal(0),n=e.getPixelForDecimal(1),h=Math.min(t,n),f=Math.max(t,n);m=Math.max(Math.min(m,f),h),c=m+d,i&&!l&&(r._stacks[e.axis]._visualValues[s]=e.getValueForPixel(c)-e.getValueForPixel(m))}if(m===e.getPixelForValue(a)){const t=pt(d)*e.getLineWidthForValue(a)/2;m+=t,d-=t}return{size:d,base:m,head:c,center:c+d/2}}_calculateBarIndexPixels(t,e){const i=e.scale,s=this.options,n=s.skipNull,o=N(s.maxBarThickness,1/0);let a,r;if(e.grouped){const i=n?this._getStackCount(t):e.stackCount,h="flex"===s.barThickness?function(t,e,i,s){const n=e.pixels,o=n[t];let a=t>0?n[t-1]:null,r=t"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:s,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=i;else{let n,o,a=t=>+i[t];if(H(i[t])){const{key:t="value"}=this._parsing;a=e=>+et(i[e],t)}for(n=t,o=t+e;nDt(t,r,h,!0)?1:Math.max(e,e*i,s,s*i),g=(t,e,s)=>Dt(t,r,h,!0)?-1:Math.min(e,e*i,s,s*i),p=f(0,l,d),m=f(dt,c,u),x=g(at,l,d),b=g(at+dt,c,u);s=(p-x)/2,n=(m-b)/2,o=-(p+x)/2,a=-(m+b)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}(u,d,r),x=(i.width-o)/f,b=(i.height-o)/g,_=Math.max(Math.min(x,b)/2,0),y=$(this.options.radius,_),v=(y-Math.max(y*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*y,this.offsetY=m*y,s.total=this.calculateTotal(),this.outerRadius=y-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*c,0),this.updateElements(n,0,n.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,n=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*n/rt)}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,a=o.chartArea,r=o.options.animation,h=(a.left+a.right)/2,l=(a.top+a.bottom)/2,c=n&&r.animateScale,d=c?0:this.innerRadius,u=c?0:this.outerRadius,{sharedOptions:f,includeOptions:g}=this._getSharedOptions(e,s);let p,m=this._getRotation();for(p=0;p0&&!isNaN(t)?rt*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=Jt(e._parsed[t],i.options.locale);return{label:s[t]||"",value:n}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,n,o,a,r;if(!t)for(s=0,n=i.data.datasets.length;s0&&this.getParsed(e-1);for(let i=0;i=x){b.skip=!0;continue}const y=this.getParsed(i),v=B(y[u]),w=b[d]=o.getPixelForValue(y[d],i),M=b[u]=n||v?a.getBasePixel():a.getPixelForValue(r?this.applyStack(a,y,r):y[u],i);b.skip=isNaN(w)||isNaN(M)||v,b.stop=i>0&&Math.abs(y[d]-_[d])>p,g&&(b.parsed=y,b.raw=h.data[i]),c&&(b.options=l||this.resolveDataElementOptions(i,f.active?"active":s)),m||this.updateElement(f,i,b,s),_=y}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const n=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,n,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class Ji extends Hi{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:s,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=Jt(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:n}}parseObjectData(t,e,i,s){return $e.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(se.max&&(e.max=s))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),n=Math.max(s/2,0),o=(n-Math.max(i.cutoutPercentage?n/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=n-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,a=o.options.animation,r=this._cachedMeta.rScale,h=r.xCenter,l=r.yCenter,c=r.getIndexAngle(0)-.5*at;let d,u=c;const f=360/this.countVisibleElements();for(d=0;d{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?yt(this.resolveDataElementOptions(t,e).angle||i):0}}class Qi extends Zi{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}function ts(t,e,i,s){const{controller:n,data:o,_sorted:a}=t,r=n._cachedMeta.iScale;if(r&&e===r.axis&&"r"!==e&&a&&o.length){const t=r._reversePixels?Rt:Tt;if(!s)return t(o,e,i);if(n._sharedOptions){const s=o[0],n="function"==typeof s.getRange&&s.getRange(e);if(n){const s=t(o,e,i-n),a=t(o,e,i+n);return{lo:s.lo,hi:a.hi}}}}return{lo:0,hi:o.length-1}}function es(t,e,i,s,n){const o=t.getSortedVisibleDatasetMetas(),a=i[e];for(let t=0,i=o.length;t{t[a]&&t[a](e[i],n)&&(o.push({element:t,datasetIndex:s,index:h}),r=r||t.inRange(e.x,e.y,n))})),s&&!r?[]:o}var as={evaluateInteractionItems:es,modes:{index(t,e,i,s){const n=ni(e,t),o=i.axis||"x",a=i.includeInvisible||!1,r=i.intersect?is(t,n,o,s,a):ns(t,n,o,!1,s,a),h=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&h.push({element:i,datasetIndex:t.index,index:e})})),h):[]},dataset(t,e,i,s){const n=ni(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;let r=i.intersect?is(t,n,o,s,a):ns(t,n,o,!1,s,a);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;tis(t,ni(e,t),i.axis||"xy",s,i.includeInvisible||!1),nearest(t,e,i,s){const n=ni(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;return ns(t,n,o,i.intersect,s,a)},x:(t,e,i,s)=>os(t,ni(e,t),"x",i.intersect,s),y:(t,e,i,s)=>os(t,ni(e,t),"y",i.intersect,s)}};const rs=["left","top","right","bottom"];function hs(t,e){return t.filter((t=>t.pos===e))}function ls(t,e){return t.filter((t=>-1===rs.indexOf(t.pos)&&t.box.axis===e))}function cs(t,e){return t.sort(((t,i)=>{const s=e?i:t,n=e?t:i;return s.weight===n.weight?s.index-n.index:s.weight-n.weight}))}function ds(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:s,stackWeight:n}=i;if(!t||!rs.includes(s))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=n}return e}(t),{vBoxMaxWidth:s,hBoxMaxHeight:n}=e;let o,a,r;for(o=0,a=t.length;o{s[t]=Math.max(e[t],i[t])})),s}return s(t?["left","right"]:["top","bottom"])}function ms(t,e,i,s){const n=[];let o,a,r,h,l,c;for(o=0,a=t.length,l=0;ot.box.fullSize)),!0),s=cs(hs(e,"left"),!0),n=cs(hs(e,"right")),o=cs(hs(e,"top"),!0),a=cs(hs(e,"bottom")),r=ls(e,"x"),h=ls(e,"y");return{fullSize:i,leftAndTop:s.concat(o),rightAndBottom:n.concat(h).concat(a).concat(r),chartArea:hs(e,"chartArea"),vertical:s.concat(n).concat(h),horizontal:o.concat(a).concat(r)}}(t.boxes),h=r.vertical,l=r.horizontal;U(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const c=h.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/c,hBoxMaxHeight:a/2}),u=Object.assign({},n);fs(u,De(s));const f=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),g=ds(h.concat(l),d);ms(r.fullSize,f,d,g),ms(h,f,d,g),ms(l,f,d,g)&&ms(h,f,d,g),function(t){const e=t.maxPadding;function i(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),bs(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,bs(r.rightAndBottom,f,d,g),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},U(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})}))}};class ys{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class vs extends ys{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ws={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ms=t=>null===t||""===t;const ks=!!hi&&{passive:!0};function Ss(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,ks)}function Ps(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function Ds(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Ps(i.addedNodes,s),e=e&&!Ps(i.removedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}function Cs(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Ps(i.removedNodes,s),e=e&&!Ps(i.addedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}const As=new Map;let Os=0;function Ts(){const t=window.devicePixelRatio;t!==Os&&(Os=t,As.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Rs(t,e,i){const s=t.canvas,n=s&&Qe(s);if(!n)return;const o=Ft(((t,e)=>{const s=n.clientWidth;i(t,e),s{const e=t[0],i=e.contentRect.width,s=e.contentRect.height;0===i&&0===s||o(i,s)}));return a.observe(n),function(t,e){As.size||window.addEventListener("resize",Ts),As.set(t,e)}(t,o),a}function Es(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){As.delete(t),As.size||window.removeEventListener("resize",Ts)}(t)}function Is(t,e,i){const s=t.canvas,n=Ft((e=>{null!==t.ctx&&i(function(t,e){const i=ws[t.type]||t.type,{x:s,y:n}=ni(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==n?n:null}}(e,t))}),t);return function(t,e,i){t&&t.addEventListener(e,i,ks)}(s,e,n),n}class Ls extends ys{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,s=t.getAttribute("height"),n=t.getAttribute("width");if(t.$chartjs={initial:{height:s,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Ms(n)){const e=li(t,"width");void 0!==e&&(t.width=e)}if(Ms(s))if(""===t.style.height)t.height=t.width/(e||2);else{const e=li(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const s=i[t];B(s)?e.removeAttribute(t):e.setAttribute(t,s)}));const s=i.style||{};return Object.keys(s).forEach((t=>{e.style[t]=s[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),n={attach:Ds,detach:Cs,resize:Rs}[e]||Is;s[e]=n(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];if(!s)return;({attach:Es,detach:Es,resize:Es}[e]||Ss)(t,e,s),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return ai(t,e,i,s)}isAttached(t){const e=t&&Qe(t);return!(!e||!e.isConnected)}}class zs{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return bt(this.x)&&bt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const s={};return t.forEach((t=>{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),s}}function Fs(t,e){const i=t.options.ticks,s=function(t){const e=t.options.offset,i=t._tickSize(),s=t._length/i+(e?0:1),n=t._maxLength/i;return Math.floor(Math.min(s,n))}(t),n=Math.min(i.maxTicksLimit||s,s),o=i.major.enabled?function(t){const e=[];let i,s;for(i=0,s=t.length;in)return function(t,e,i,s){let n,o=0,a=i[0];for(s=Math.ceil(s),n=0;nt-e)).pop(),e}(s);for(let t=0,e=o.length-1;tn)return e}return Math.max(n,1)}(o,e,n);if(a>0){let t,i;const s=a>1?Math.round((h-r)/(a-1)):null;for(Bs(e,l,c,B(s)?0:r-s,r),t=0,i=a-1;t"top"===e||"left"===e?t[e]+i:t[e]-i,Hs=(t,e)=>Math.min(e||t,t);function Vs(t,e){const i=[],s=t.length/e,n=t.length;let o=0;for(;oa+r)))return l}function Ns(t){return t.drawTicks?t.tickLength:0}function $s(t,e){if(!t.display)return 0;const i=Ce(t.font,e),s=De(t.padding);return(W(t.text)?t.text.length:1)*i.lineHeight+s.height}function Ys(t,e,i){let s=Bt(t);return(i&&"right"!==e||!i&&"right"===e)&&(s=(t=>"left"===t?"right":"right"===t?"left":t)(s)),s}class Us extends zs{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=j(t,Number.POSITIVE_INFINITY),e=j(e,Number.NEGATIVE_INFINITY),i=j(i,Number.POSITIVE_INFINITY),s=j(s,Number.NEGATIVE_INFINITY),{min:j(t,i),max:j(e,s),minDefined:V(t),maxDefined:V(e)}}getMinMax(t){let e,{min:i,max:s,minDefined:n,maxDefined:o}=this.getUserBounds();if(n&&o)return{min:i,max:s};const a=this.getMatchingVisibleMetas();for(let r=0,h=a.length;rs?s:i,s=n&&i>s?i:s,{min:j(i,j(s,i)),max:j(s,j(i,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Y(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:n,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:s,max:n}=t,o=$(e,(n-s)/2),a=(t,e)=>i&&0===t?0:t+e;return{min:a(s,-Math.abs(o)),max:a(n,o)}}(this,n,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=a=n||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const l=this._getLabelSizes(),c=l.widest.width,d=l.highest.height,u=Ct(this.chart.width-c,0,this.maxWidth);o=t.offset?this.maxWidth/i:u/(i-1),c+6>o&&(o=u/(i-(t.offset?.5:1)),a=this.maxHeight-Ns(t.grid)-e.padding-$s(t.title,this.chart.options.font),r=Math.sqrt(c*c+d*d),h=vt(Math.min(Math.asin(Ct((l.highest.height+6)/o,-1,1)),Math.asin(Ct(a/r,-1,1))-Math.asin(Ct(d/r,-1,1)))),h=Math.max(s,Math.min(n,h))),this.labelRotation=h}afterCalculateLabelRotation(){Y(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Y(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:n}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const o=$s(s,e.options.font);if(a?(t.width=this.maxWidth,t.height=Ns(n)+o):(t.height=this.maxHeight,t.width=Ns(n)+o),i.display&&this.ticks.length){const{first:e,last:s,widest:n,highest:o}=this._getLabelSizes(),r=2*i.padding,h=yt(this.labelRotation),l=Math.cos(h),c=Math.sin(h);if(a){const e=i.mirror?0:c*n.width+l*o.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:l*n.width+c*o.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,s,c,l)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){const{ticks:{align:n,padding:o},position:a}=this.options,r=0!==this.labelRotation,h="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,l=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,d=0;r?h?(c=s*t.width,d=i*e.height):(c=i*t.height,d=s*e.width):"start"===n?d=e.width:"end"===n?c=t.width:"inner"!==n&&(c=t.width/2,d=e.width/2),this.paddingLeft=Math.max((c-a+o)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-l+o)*this.width/(this.width-l),0)}else{let i=e.height/2,s=t.height/2;"start"===n?(i=0,s=t.height):"end"===n&&(i=e.height,s=0),this.paddingTop=i+o,this.paddingBottom=s+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Y(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,s=i.length/2;let n;if(s>e){for(n=0;n({width:o[t]||0,height:a[t]||0});return{first:M(0),last:M(e-1),widest:M(v),highest:M(w),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Ct(this._alignToPixels?he(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ta*s?a/i:r/s:r*s0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:n,position:o,border:a}=s,r=n.offset,h=this.isHorizontal(),l=this.ticks.length+(r?1:0),c=Ns(n),d=[],u=a.setContext(this.getContext()),f=u.display?u.width:0,g=f/2,p=function(t){return he(i,t,f)};let m,x,b,_,y,v,w,M,k,S,P,D;if("top"===o)m=p(this.bottom),v=this.bottom-c,M=m-g,S=p(t.top)+g,D=t.bottom;else if("bottom"===o)m=p(this.top),S=t.top,D=p(t.bottom)-g,v=m+g,M=this.top+c;else if("left"===o)m=p(this.right),y=this.right-c,w=m-g,k=p(t.left)+g,P=t.right;else if("right"===o)m=p(this.left),k=t.left,P=p(t.right)-g,y=m+g,w=this.left+c;else if("x"===e){if("center"===o)m=p((t.top+t.bottom)/2+.5);else if(H(o)){const t=Object.keys(o)[0],e=o[t];m=p(this.chart.scales[t].getPixelForValue(e))}S=t.top,D=t.bottom,v=m+g,M=v+c}else if("y"===e){if("center"===o)m=p((t.left+t.right)/2);else if(H(o)){const t=Object.keys(o)[0],e=o[t];m=p(this.chart.scales[t].getPixelForValue(e))}y=m-g,w=y-c,k=t.left,P=t.right}const C=N(s.ticks.maxTicksLimit,l),A=Math.max(1,Math.ceil(l/C));for(x=0;x0&&(o-=s/2)}d={left:o,top:n,width:s+e.width,height:i+e.height,color:t.backdropColor}}p.push({label:_,font:k,textOffset:D,options:{rotation:g,color:i,strokeColor:r,strokeWidth:l,textAlign:u,textBaseline:C,translation:[y,v],backdrop:d}})}return p}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-yt(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:s,padding:n}}=this.options,o=t+n,a=this._getLabelSizes().widest.width;let r,h;return"left"===e?s?(h=this.right+n,"near"===i?r="left":"center"===i?(r="center",h+=a/2):(r="right",h+=a)):(h=this.right-o,"near"===i?r="right":"center"===i?(r="center",h-=a/2):(r="left",h=this.left)):"right"===e?s?(h=this.left+n,"near"===i?r="right":"center"===i?(r="center",h-=a/2):(r="left",h-=a)):(h=this.left+o,"near"===i?r="left":"center"===i?(r="center",h+=a/2):(r="right",h=this.right)):r="right",{textAlign:r,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:s,width:n,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,n,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,o;const a=(t,e,s)=>{s.width&&s.color&&(i.save(),i.lineWidth=s.width,i.strokeStyle=s.color,i.setLineDash(s.borderDash||[]),i.lineDashOffset=s.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(n=0,o=s.length;n{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let n,o;for(n=0,o=e.length;n{const s=i.split("."),n=s.pop(),o=[t].concat(s).join("."),a=e[i].split("."),r=a.pop(),h=a.join(".");ae.route(o,n,h,r)}))}(e,t.defaultRoutes);t.descriptors&&ae.describe(e,t.descriptors)}(t,o,i),this.override&&ae.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in ae[s]&&(delete ae[s][i],this.override&&delete ee[i])}}class qs{constructor(){this.controllers=new Xs(Hi,"datasets",!0),this.elements=new Xs(zs,"elements"),this.plugins=new Xs(Object,"plugins"),this.scales=new Xs(Us,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const s=i||this._getRegistryForType(e);i||s.isForType(e)||s===this.plugins&&e.id?this._exec(t,s,e):U(e,(e=>{const s=i||this._getRegistryForType(e);this._exec(t,s,e)}))}))}_exec(t,e,i){const s=it(t);Y(i["before"+s],[],i),e[t](i),Y(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function Gs(t,e){return e||!1!==t?!0===t?{}:t:null}function Js(t,{plugin:e,local:i},s,n){const o=t.pluginScopeKeys(e),a=t.getOptionScopes(s,o);return i&&e.defaults&&a.push(e.defaults),t.createResolver(a,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Qs(t,e){const i=ae.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function tn(t){if("x"===t||"y"===t||"r"===t)return t}function en(t,...e){if(tn(t))return t;for(const s of e){const e=s.axis||("top"===(i=s.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&tn(t[0].toLowerCase());if(e)return e}var i;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function sn(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function nn(t,e){const i=ee[t.type]||{scales:{}},s=e.scales||{},n=Qs(t.type,e),o=Object.create(null);return Object.keys(s).forEach((e=>{const a=s[e];if(!H(a))return console.error(`Invalid scale configuration for scale: ${e}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const r=en(e,a,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return sn(t,"x",i[0])||sn(t,"y",i[0])}return{}}(e,t),ae.scales[a.type]),h=function(t,e){return t===e?"_index_":"_value_"}(r,n),l=i.scales||{};o[e]=J(Object.create(null),[{axis:r},a,l[r],l[h]])})),t.data.datasets.forEach((i=>{const n=i.type||t.type,a=i.indexAxis||Qs(n,e),r=(ee[n]||{}).scales||{};Object.keys(r).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),n=i[e+"AxisID"]||e;o[n]=o[n]||Object.create(null),J(o[n],[{axis:e},s[n],r[t]])}))})),Object.keys(o).forEach((t=>{const e=o[t];J(e,[ae.scales[e.type],ae.scale])})),o}function on(t){const e=t.options||(t.options={});e.plugins=N(e.plugins,{}),e.scales=nn(t,e)}function an(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const rn=new Map,hn=new Set;function ln(t,e){let i=rn.get(t);return i||(i=e(),rn.set(t,i),hn.add(i)),i}const cn=(t,e,i)=>{const s=et(e,i);void 0!==s&&t.add(s)};class dn{constructor(t){this._config=function(t){return(t=t||{}).data=an(t.data),on(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=an(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),on(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ln(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return ln(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return ln(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return ln(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return s&&!e||(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:n}=this,o=this._cachedScopes(t,i),a=o.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>cn(r,t,e)))),e.forEach((t=>cn(r,s,t))),e.forEach((t=>cn(r,ee[n]||{},t))),e.forEach((t=>cn(r,ae,t))),e.forEach((t=>cn(r,ie,t)))}));const h=Array.from(r);return 0===h.length&&h.push(Object.create(null)),hn.has(e)&&o.set(e,h),h}chartOptionScopes(){const{options:t,type:e}=this;return[t,ee[e]||{},ae.datasets[e]||{},{type:e},ae,ie]}resolveNamedOptions(t,e,i,s=[""]){const n={$shared:!0},{resolver:o,subPrefixes:a}=un(this._resolverCache,t,s);let r=o;if(function(t,e){const{isScriptable:i,isIndexable:s}=Ee(t);for(const n of e){const e=i(n),o=s(n),a=(o||e)&&t[n];if(e&&(nt(a)||fn(a))||o&&W(a))return!0}return!1}(o,e)){n.$shared=!1;r=Re(o,i=nt(i)?i():i,this.createResolver(t,i,a))}for(const t of e)n[t]=r[t];return n}createResolver(t,e,i=[""],s){const{resolver:n}=un(this._resolverCache,t,i);return H(e)?Re(n,e,void 0,s):n}}function un(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));const n=i.join();let o=s.get(n);if(!o){o={resolver:Te(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},s.set(n,o)}return o}const fn=t=>H(t)&&Object.getOwnPropertyNames(t).some((e=>nt(t[e])));const gn=["top","bottom","left","right","chartArea"];function pn(t,e){return"top"===t||"bottom"===t||-1===gn.indexOf(t)&&"x"===e}function mn(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function xn(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Y(i&&i.onComplete,[t],e)}function bn(t){const e=t.chart,i=e.options.animation;Y(i&&i.onProgress,[t],e)}function _n(t){return Je()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const yn={},vn=t=>{const e=_n(t);return Object.values(yn).filter((t=>t.canvas===e)).pop()};function wn(t,e,i){const s=Object.keys(t);for(const n of s){const s=+n;if(s>=e){const o=t[n];delete t[n],(i>0||s>e)&&(t[s+i]=o)}}}function Mn(t,e,i){return t.options.clip?t[i]:e[i]}class kn{static defaults=ae;static instances=yn;static overrides=ee;static registry=Ks;static version="4.4.7";static getChart=vn;static register(...t){Ks.add(...t),Sn()}static unregister(...t){Ks.remove(...t),Sn()}constructor(t,e){const i=this.config=new dn(e),s=_n(t),n=vn(s);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Je()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?vs:Ls}(s)),this.platform.updateConfig(i);const a=this.platform.acquireContext(s,o.aspectRatio),r=a&&a.canvas,h=r&&r.height,l=r&&r.width;this.id=F(),this.ctx=a,this.canvas=r,this.width=l,this.height=h,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Zs,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...s){return e?(clearTimeout(i),i=setTimeout(t,e,s)):t.apply(this,s),e}}((t=>this.update(t)),o.resizeDelay||0),this._dataChanges=[],yn[this.id]=this,a&&r?(ki.listen(this,"complete",xn),ki.listen(this,"progress",bn),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:n}=this;return B(t)?e&&n?n:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Ks}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ri(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return le(this.canvas,this.ctx),this}stop(){return ki.stop(this),this}resize(t,e){ki.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,s=this.canvas,n=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,e,n),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,ri(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),Y(i.onResize,[this,o],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){U(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let n=[];e&&(n=n.concat(Object.keys(e).map((t=>{const i=e[t],s=en(t,i),n="r"===s,o="x"===s;return{options:i,dposition:n?"chartArea":o?"bottom":"left",dtype:n?"radialLinear":o?"category":"linear"}})))),U(n,(e=>{const n=e.options,o=n.id,a=en(o,n),r=N(n.type,e.dtype);void 0!==n.position&&pn(n.position,a)===pn(e.dposition)||(n.position=e.dposition),s[o]=!0;let h=null;if(o in i&&i[o].type===r)h=i[o];else{h=new(Ks.getScale(r))({id:o,type:r,ctx:this.ctx,chart:this}),i[h.id]=h}h.init(n,t)})),U(s,((t,e)=>{t||delete i[e]})),U(i,(t=>{_s.configure(this,t,t.options),_s.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(mn("z","_idx"));const{_active:a,_lastEvent:r}=this;r?this._eventHandler(r,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){U(this.scales,(t=>{_s.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);ot(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:n}of e){wn(t,s,"_removeElements"===i?-n:n)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),s=i(0);for(let t=1;tt.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;_s.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],U(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,s=!i.disabled,n=function(t,e){const{xScale:i,yScale:s}=t;return i&&s?{left:Mn(i,e,"left"),right:Mn(i,e,"right"),top:Mn(s,e,"top"),bottom:Mn(s,e,"bottom")}:e}(t,this.chartArea),o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(s&&fe(e,{left:!1===i.left?0:n.left-i.left,right:!1===i.right?this.width:n.right+i.right,top:!1===i.top?0:n.top-i.top,bottom:!1===i.bottom?this.height:n.bottom+i.bottom}),t.controller.draw(),s&&ge(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return ue(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const n=as.modes[e];return"function"==typeof n?n(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter((t=>t&&t._dataset===e)).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Oe(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",n=this.getDatasetMeta(t),o=n.controller._resolveAnimations(void 0,s);st(e)?(n.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(n,{visible:i}),this.update((e=>e.datasetIndex===t?s:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ki.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,s),t[i]=s},s=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};U(this.options.events,(t=>i(t,s)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(i,s)=>{t[i]&&(e.removeEventListener(this,i,s),delete t[i])},n=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",n),i("detach",o)};o=()=>{this.attached=!1,s("resize",n),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){U(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},U(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let n,o,a,r;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+s+"DatasetHoverStyle"]()),a=0,r=t.length;a{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!X(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,i){const s=this.options.hover,n=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=n(e,t),a=i?t:n(t,e);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;const n=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(n||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:n}=this,o=e,a=this._getActiveElements(t,s,i,o),r=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),h=function(t,e,i,s){return i&&"mouseout"!==t.type?s?e:t:null}(t,this._lastEvent,i,r);i&&(this._lastEvent=null,Y(n.onHover,[t,a,this],this),r&&Y(n.onClick,[t,a,this],this));const l=!X(a,s);return(l||e)&&(this._active=a,this._updateHoverStyles(a,s,e)),this._lastEvent=h,l}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,s)}}function Sn(){return U(kn.instances,(t=>t._plugins.invalidate()))}function Pn(t,e,i,s){const n=ke(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,a=Math.min(o,s*e/2),r=t=>{const e=(i-Math.min(o,t))*s/2;return Ct(t,0,Math.min(o,e))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:Ct(n.innerStart,0,a),innerEnd:Ct(n.innerEnd,0,a)}}function Dn(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function Cn(t,e,i,s,n,o){const{x:a,y:r,startAngle:h,pixelMargin:l,innerRadius:c}=e,d=Math.max(e.outerRadius+s+i-l,0),u=c>0?c+s+i+l:0;let f=0;const g=n-h;if(s){const t=((c>0?c-s:0)+(d>0?d-s:0))/2;f=(g-(0!==t?g*t/(t+s):g))/2}const p=(g-Math.max(.001,g*d-i/at)/d)/2,m=h+p+f,x=n-p-f,{outerStart:b,outerEnd:_,innerStart:y,innerEnd:v}=Pn(e,u,d,x-m),w=d-b,M=d-_,k=m+b/w,S=x-_/M,P=u+y,D=u+v,C=m+y/P,A=x-v/D;if(t.beginPath(),o){const e=(k+S)/2;if(t.arc(a,r,d,k,e),t.arc(a,r,d,e,S),_>0){const e=Dn(M,S,a,r);t.arc(e.x,e.y,_,S,x+dt)}const i=Dn(D,x,a,r);if(t.lineTo(i.x,i.y),v>0){const e=Dn(D,A,a,r);t.arc(e.x,e.y,v,x+dt,A+Math.PI)}const s=(x-v/u+(m+y/u))/2;if(t.arc(a,r,u,x-v/u,s,!0),t.arc(a,r,u,s,m+y/u,!0),y>0){const e=Dn(P,C,a,r);t.arc(e.x,e.y,y,C+Math.PI,m-dt)}const n=Dn(w,m,a,r);if(t.lineTo(n.x,n.y),b>0){const e=Dn(w,k,a,r);t.arc(e.x,e.y,b,m-dt,k)}}else{t.moveTo(a,r);const e=Math.cos(k)*d+a,i=Math.sin(k)*d+r;t.lineTo(e,i);const s=Math.cos(S)*d+a,n=Math.sin(S)*d+r;t.lineTo(s,n)}t.closePath()}function An(t,e,i,s,n){const{fullCircles:o,startAngle:a,circumference:r,options:h}=e,{borderWidth:l,borderJoinStyle:c,borderDash:d,borderDashOffset:u}=h,f="inner"===h.borderAlign;if(!l)return;t.setLineDash(d||[]),t.lineDashOffset=u,f?(t.lineWidth=2*l,t.lineJoin=c||"round"):(t.lineWidth=l,t.lineJoin=c||"bevel");let g=e.endAngle;if(o){Cn(t,e,i,s,g,n);for(let e=0;en?(l=n/h,t.arc(o,a,h,i+l,s-l,!0)):t.arc(o,a,n,i+dt,s-dt),t.closePath(),t.clip()}(t,e,g),o||(Cn(t,e,i,s,g,n),t.stroke())}class On extends zs{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.getProps(["x","y"],i),{angle:n,distance:o}=Mt(s,{x:t,y:e}),{startAngle:a,endAngle:r,innerRadius:h,outerRadius:l,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=(this.options.spacing+this.options.borderWidth)/2,u=N(c,r-a),f=Dt(n,a,r)&&a!==r,g=u>=rt||f,p=At(o,h+d,l+d);return g&&p}getCenterPoint(t){const{x:e,y:i,startAngle:s,endAngle:n,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:r,spacing:h}=this.options,l=(s+n)/2,c=(o+a+h+r)/2;return{x:e+Math.cos(l)*c,y:i+Math.sin(l)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,s=(e.offset||0)/4,n=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>rt?Math.floor(i/rt):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*s,Math.sin(a)*s);const r=s*(1-Math.sin(Math.min(at,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,s,n){const{fullCircles:o,startAngle:a,circumference:r}=e;let h=e.endAngle;if(o){Cn(t,e,i,s,h,n);for(let e=0;er&&o>r;return{count:s,start:h,loop:e.loop,ilen:l(a+(l?r-t:t))%o,_=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(h&&(d=n[b(0)],t.moveTo(d.x,d.y)),c=0;c<=r;++c){if(d=n[b(c)],d.skip)continue;const e=d.x,i=d.y,s=0|e;s===u?(ig&&(g=i),m=(x*m+e)/++x):(_(),t.lineTo(e,i),u=s,x=0,f=g=i),p=i}_()}function zn(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?Ln:In}const Fn="function"==typeof Path2D;function Bn(t,e,i,s){Fn&&!e.options.segment?function(t,e,i,s){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,s)&&n.closePath()),Tn(t,e.options),t.stroke(n)}(t,e,i,s):function(t,e,i,s){const{segments:n,options:o}=e,a=zn(e);for(const r of n)Tn(t,o,r.style),t.beginPath(),a(t,e,r,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}(t,e,i,s)}class Wn extends zs{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;Ge(this._points,i,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,s=t.options.spanGaps,n=i.length;if(!n)return[];const o=!!t._loop,{start:a,end:r}=function(t,e,i,s){let n=0,o=e-1;if(i&&!s)for(;nn&&t[o%e].skip;)o--;return o%=e,{start:n,end:o}}(i,n,o,s);return yi(t,!0===s?[{start:a,end:r,loop:o}]:function(t,e,i,s){const n=t.length,o=[];let a,r=e,h=t[e];for(a=e+1;a<=i;++a){const i=t[a%n];i.skip||i.stop?h.skip||(s=!1,o.push({start:e%n,end:(a-1)%n,loop:s}),e=r=i.stop?a:null):(r=a,h.skip&&(e=a)),h=i}return null!==r&&o.push({start:e%n,end:r%n,loop:s}),o}(i,a,rt.replace("rgb(","rgba(").replace(")",", 0.5)")));function Gn(t){return Kn[t%Kn.length]}function Jn(t){return Zn[t%Zn.length]}function Qn(t){let e=0;return(i,s)=>{const n=t.getDatasetMeta(s).controller;n instanceof Zi?e=function(t,e){return t.backgroundColor=t.data.map((()=>Gn(e++))),e}(i,e):n instanceof Ji?e=function(t,e){return t.backgroundColor=t.data.map((()=>Jn(e++))),e}(i,e):n&&(e=function(t,e){return t.borderColor=Gn(e),t.backgroundColor=Jn(e),++e}(i,e))}}function to(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var eo={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(!i.enabled)return;const{data:{datasets:s},options:n}=t.config,{elements:o}=n,a=to(s)||(r=n)&&(r.borderColor||r.backgroundColor)||o&&to(o)||"rgba(0,0,0,0.1)"!==ae.borderColor||"rgba(0,0,0,0.1)"!==ae.backgroundColor;var r;if(!i.forceOverride&&a)return;const h=Qn(t);s.forEach(h)}};const io=(t,e)=>{let{boxHeight:i=e,boxWidth:s=e}=t;return t.usePointStyle&&(i=Math.min(i,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:i,itemHeight:Math.max(e,i)}};class so extends zs{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=Y(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,s=Ce(i.font),n=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:r}=io(i,n);let h,l;e.font=s.string,this.isHorizontal()?(h=this.maxWidth,l=this._fitRows(o,n,a,r)+10):(l=this.maxHeight,h=this._fitCols(o,s,a,r)+10),this.width=Math.min(h,t.maxWidth||this.maxWidth),this.height=Math.min(l,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){const{ctx:n,maxWidth:o,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],h=this.lineWidths=[0],l=s+a;let c=t;n.textAlign="left",n.textBaseline="middle";let d=-1,u=-l;return this.legendItems.forEach(((t,f)=>{const g=i+e/2+n.measureText(t.text).width;(0===f||h[h.length-1]+g+2*a>o)&&(c+=l,h[h.length-(f>0?0:1)]=0,u+=l,d++),r[f]={left:0,top:u,row:d,width:g,height:s},h[h.length-1]+=g+a})),c}_fitCols(t,e,i,s){const{ctx:n,maxHeight:o,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],h=this.columnSizes=[],l=o-t;let c=a,d=0,u=0,f=0,g=0;return this.legendItems.forEach(((t,o)=>{const{itemWidth:p,itemHeight:m}=function(t,e,i,s,n){const o=function(t,e,i,s){let n=t.text;n&&"string"!=typeof n&&(n=n.reduce(((t,e)=>t.length>e.length?t:e)));return e+i.size/2+s.measureText(n).width}(s,t,e,i),a=function(t,e,i){let s=t;"string"!=typeof e.text&&(s=no(e,i));return s}(n,s,e.lineHeight);return{itemWidth:o,itemHeight:a}}(i,e,n,t,s);o>0&&u+m+2*a>l&&(c+=d+a,h.push({width:d,height:u}),f+=d+a,g++,d=u=0),r[o]={left:f,top:u,col:g,width:p,height:m},d=Math.max(d,p),u+=m+a})),c+=d,h.push({width:d,height:u}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:n}}=this,o=fi(n,this.left,this.width);if(this.isHorizontal()){let n=0,a=Wt(i,this.left+s,this.right-this.lineWidths[n]);for(const r of e)n!==r.row&&(n=r.row,a=Wt(i,this.left+s,this.right-this.lineWidths[n])),r.top+=this.top+t+s,r.left=o.leftForLtr(o.x(a),r.width),a+=r.width+s}else{let n=0,a=Wt(i,this.top+t+s,this.bottom-this.columnSizes[n].height);for(const r of e)r.col!==n&&(n=r.col,a=Wt(i,this.top+t+s,this.bottom-this.columnSizes[n].height)),r.top=a,r.left+=this.left+s,r.left=o.leftForLtr(o.x(r.left),r.width),a+=r.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;fe(t,this),this._draw(),ge(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:n,labels:o}=t,a=ae.color,r=fi(t.rtl,this.left,this.width),h=Ce(o.font),{padding:l}=o,c=h.size,d=c/2;let u;this.drawTitle(),s.textAlign=r.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=h.string;const{boxWidth:f,boxHeight:g,itemHeight:p}=io(o,c),m=this.isHorizontal(),x=this._computeTitleHeight();u=m?{x:Wt(n,this.left+l,this.right-i[0]),y:this.top+l+x,line:0}:{x:this.left+l,y:Wt(n,this.top+x+l,this.bottom-e[0].height),line:0},gi(this.ctx,t.textDirection);const b=p+l;this.legendItems.forEach(((_,y)=>{s.strokeStyle=_.fontColor,s.fillStyle=_.fontColor;const v=s.measureText(_.text).width,w=r.textAlign(_.textAlign||(_.textAlign=o.textAlign)),M=f+d+v;let k=u.x,S=u.y;r.setWidth(this.width),m?y>0&&k+M+l>this.right&&(S=u.y+=b,u.line++,k=u.x=Wt(n,this.left+l,this.right-i[u.line])):y>0&&S+b>this.bottom&&(k=u.x=k+e[u.line].width+l,u.line++,S=u.y=Wt(n,this.top+x+l,this.bottom-e[u.line].height));if(function(t,e,i){if(isNaN(f)||f<=0||isNaN(g)||g<0)return;s.save();const n=N(i.lineWidth,1);if(s.fillStyle=N(i.fillStyle,a),s.lineCap=N(i.lineCap,"butt"),s.lineDashOffset=N(i.lineDashOffset,0),s.lineJoin=N(i.lineJoin,"miter"),s.lineWidth=n,s.strokeStyle=N(i.strokeStyle,a),s.setLineDash(N(i.lineDash,[])),o.usePointStyle){const a={radius:g*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},h=r.xPlus(t,f/2);de(s,a,h,e+d,o.pointStyleWidth&&f)}else{const o=e+Math.max((c-g)/2,0),a=r.leftForLtr(t,f),h=Pe(i.borderRadius);s.beginPath(),Object.values(h).some((t=>0!==t))?ye(s,{x:a,y:o,w:f,h:g,radius:h}):s.rect(a,o,f,g),s.fill(),0!==n&&s.stroke()}s.restore()}(r.x(k),S,_),k=((t,e,i,s)=>t===(s?"left":"right")?i:"center"===t?(e+i)/2:e)(w,k+f+d,m?k+M:this.right,t.rtl),function(t,e,i){_e(s,i.text,t,e+p/2,h,{strikethrough:i.hidden,textAlign:r.textAlign(i.textAlign)})}(r.x(k),S,_),m)u.x+=M+l;else if("string"!=typeof _.text){const t=h.lineHeight;u.y+=no(_,t)+l}else u.y+=b})),pi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=Ce(e.font),s=De(e.padding);if(!e.display)return;const n=fi(t.rtl,this.left,this.width),o=this.ctx,a=e.position,r=i.size/2,h=s.top+r;let l,c=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),l=this.top+h,c=Wt(t.align,c,this.right-d);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);l=h+Wt(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=Wt(a,c,c+d);o.textAlign=n.textAlign(Bt(a)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,_e(o,e.text,u,l,i)}_computeTitleHeight(){const t=this.options.title,e=Ce(t.font),i=De(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,n;if(At(t,this.left,this.right)&&At(e,this.top,this.bottom))for(n=this.legendHitBoxes,i=0;it.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:s,textAlign:n,color:o,useBorderRadius:a,borderRadius:r}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const h=t.controller.getStyle(i?0:void 0),l=De(h.borderWidth);return{text:e[t.index].label,fillStyle:h.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:h.borderCapStyle,lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:h.borderColor,pointStyle:s||h.pointStyle,rotation:h.rotation,textAlign:n||h.textAlign,borderRadius:a&&(r||h.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class ao extends zs{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const s=W(i.text)?i.text.length:1;this._padding=De(i.padding);const n=s*Ce(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=n:this.width=n}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:s,right:n,options:o}=this,a=o.align;let r,h,l,c=0;return this.isHorizontal()?(h=Wt(a,i,n),l=e+t,r=n-i):("left"===o.position?(h=i+t,l=Wt(a,s,e),c=-.5*at):(h=n-t,l=Wt(a,e,s),c=.5*at),r=s-e),{titleX:h,titleY:l,maxWidth:r,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=Ce(e.font),s=i.lineHeight/2+this._padding.top,{titleX:n,titleY:o,maxWidth:a,rotation:r}=this._drawArgs(s);_e(t,e.text,0,0,i,{color:e.color,maxWidth:a,rotation:r,textAlign:Bt(e.align),textBaseline:"middle",translation:[n,o]})}}var ro={id:"title",_element:ao,start(t,e,i){!function(t,e){const i=new ao({ctx:t.ctx,options:e,chart:t});_s.configure(t,i,e),_s.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;_s.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const s=t.titleBlock;_s.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};new WeakMap;const ho={average(t){if(!t.length)return!1;let e,i,s=new Set,n=0,o=0;for(e=0,i=t.length;et+e))/s.size,y:n/o}},nearest(t,e){if(!t.length)return!1;let i,s,n,o=e.x,a=e.y,r=Number.POSITIVE_INFINITY;for(i=0,s=t.length;i-1?t.split("\n"):t}function uo(t,e){const{element:i,datasetIndex:s,index:n}=e,o=t.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:t,label:a,parsed:o.getParsed(n),raw:t.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:i}}function fo(t,e){const i=t.chart.ctx,{body:s,footer:n,title:o}=t,{boxWidth:a,boxHeight:r}=e,h=Ce(e.bodyFont),l=Ce(e.titleFont),c=Ce(e.footerFont),d=o.length,u=n.length,f=s.length,g=De(e.padding);let p=g.height,m=0,x=s.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(x+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*l.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),x){p+=f*(e.displayColors?Math.max(r,h.lineHeight):h.lineHeight)+(x-f)*h.lineHeight+(x-1)*e.bodySpacing}u&&(p+=e.footerMarginTop+u*c.lineHeight+(u-1)*e.footerSpacing);let b=0;const _=function(t){m=Math.max(m,i.measureText(t).width+b)};return i.save(),i.font=l.string,U(t.title,_),i.font=h.string,U(t.beforeBody.concat(t.afterBody),_),b=e.displayColors?a+2+e.boxPadding:0,U(s,(t=>{U(t.before,_),U(t.lines,_),U(t.after,_)})),b=0,i.font=c.string,U(t.footer,_),i.restore(),m+=g.width,{width:m,height:p}}function go(t,e,i,s){const{x:n,width:o}=i,{width:a,chartArea:{left:r,right:h}}=t;let l="center";return"center"===s?l=n<=(r+h)/2?"left":"right":n<=o/2?l="left":n>=a-o/2&&(l="right"),function(t,e,i,s){const{x:n,width:o}=s,a=i.caretSize+i.caretPadding;return"left"===t&&n+o+a>e.width||"right"===t&&n-o-a<0||void 0}(l,t,e,i)&&(l="center"),l}function po(t,e,i){const s=i.yAlign||e.yAlign||function(t,e){const{y:i,height:s}=e;return it.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||go(t,e,i,s),yAlign:s}}function mo(t,e,i,s){const{caretSize:n,caretPadding:o,cornerRadius:a}=t,{xAlign:r,yAlign:h}=i,l=n+o,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:f}=Pe(a);let g=function(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}(e,r);const p=function(t,e,i){let{y:s,height:n}=t;return"top"===e?s+=i:s-="bottom"===e?n+i:n/2,s}(e,h,l);return"center"===h?"left"===r?g+=l:"right"===r&&(g-=l):"left"===r?g-=Math.max(c,u)+n:"right"===r&&(g+=Math.max(d,f)+n),{x:Ct(g,0,s.width-e.width),y:Ct(p,0,s.height-e.height)}}function xo(t,e,i){const s=De(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-s.right:t.x+s.left}function bo(t){return lo([],co(t))}function _o(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const yo={beforeTitle:z,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex{const e={before:[],lines:[],after:[]},n=_o(i,t);lo(e.before,co(vo(n,"beforeLabel",this,t))),lo(e.lines,vo(n,"label",this,t)),lo(e.after,co(vo(n,"afterLabel",this,t))),s.push(e)})),s}getAfterBody(t,e){return bo(vo(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,s=vo(i,"beforeFooter",this,t),n=vo(i,"footer",this,t),o=vo(i,"afterFooter",this,t);let a=[];return a=lo(a,co(s)),a=lo(a,co(n)),a=lo(a,co(o)),a}_createItems(t){const e=this._active,i=this.chart.data,s=[],n=[],o=[];let a,r,h=[];for(a=0,r=e.length;at.filter(e,s,n,i)))),t.itemSort&&(h=h.sort(((e,s)=>t.itemSort(e,s,i)))),U(h,(e=>{const i=_o(t.callbacks,e);s.push(vo(i,"labelColor",this,e)),n.push(vo(i,"labelPointStyle",this,e)),o.push(vo(i,"labelTextColor",this,e))})),this.labelColors=s,this.labelPointStyles=n,this.labelTextColors=o,this.dataPoints=h,h}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let n,o=[];if(s.length){const t=ho[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=fo(this,i),a=Object.assign({},t,e),r=po(this.chart,i,a),h=mo(i,a,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,n={opacity:1,x:h.x,y:h.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=o,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const n=this.getCaretPosition(t,i,s);e.lineTo(n.x1,n.y1),e.lineTo(n.x2,n.y2),e.lineTo(n.x3,n.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:n}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:r,topRight:h,bottomLeft:l,bottomRight:c}=Pe(a),{x:d,y:u}=t,{width:f,height:g}=e;let p,m,x,b,_,y;return"center"===n?(_=u+g/2,"left"===s?(p=d,m=p-o,b=_+o,y=_-o):(p=d+f,m=p+o,b=_-o,y=_+o),x=p):(m="left"===s?d+Math.max(r,l)+o:"right"===s?d+f-Math.max(h,c)-o:this.caretX,"top"===n?(b=u,_=b-o,p=m-o,x=m+o):(b=u+g,_=b+o,p=m+o,x=m-o),y=b),{x1:p,x2:m,x3:x,y1:b,y2:_,y3:y}}drawTitle(t,e,i){const s=this.title,n=s.length;let o,a,r;if(n){const h=fi(i.rtl,this.x,this.width);for(t.x=xo(this,i.titleAlign,i),e.textAlign=h.textAlign(i.titleAlign),e.textBaseline="middle",o=Ce(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,r=0;r0!==t))?(t.beginPath(),t.fillStyle=n.multiKeyBackground,ye(t,{x:e,y:f,w:h,h:r,radius:a}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),ye(t,{x:i,y:f+1,w:h-2,h:r-2,radius:a}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(e,f,h,r),t.strokeRect(e,f,h,r),t.fillStyle=o.backgroundColor,t.fillRect(i,f+1,h-2,r-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:n,bodyAlign:o,displayColors:a,boxHeight:r,boxWidth:h,boxPadding:l}=i,c=Ce(i.bodyFont);let d=c.lineHeight,u=0;const f=fi(i.rtl,this.x,this.width),g=function(i){e.fillText(i,f.x(t.x+u),t.y+d/2),t.y+=d+n},p=f.textAlign(o);let m,x,b,_,y,v,w;for(e.textAlign=o,e.textBaseline="middle",e.font=c.string,t.x=xo(this,p,i),e.fillStyle=i.bodyColor,U(this.beforeBody,g),u=a&&"right"!==p?"center"===o?h/2+l:h+2+l:0,_=0,v=s.length;_0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,n=i&&i.y;if(s||n){const i=ho[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=fo(this,t),a=Object.assign({},i,this._size),r=po(e,t,a),h=mo(t,a,r,e);s._to===h.x&&n._to===h.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},n={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=De(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(n,t,s,e),gi(t,e.textDirection),n.y+=o.top,this.drawTitle(n,t,e),this.drawBody(n,t,e),this.drawFooter(n,t,e),pi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),n=!X(i,s),o=this._positionChanged(s,e);(n||o)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,n=this._active||[],o=this._getActiveElements(t,n,e,i),a=this._positionChanged(o,t),r=e||!X(o,n)||a;return r&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,i,s){const n=this.options;if("mouseout"===t.type)return[];if(!s)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const o=this.chart.getElementsAtEventForMode(t,n.mode,n,i);return n.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:s,options:n}=this,o=ho[n.position].call(this,t,e);return!1!==o&&(i!==o.x||s!==o.y)}}var Mo={id:"tooltip",_element:wo,positioners:ho,afterInit(t,e,i){i&&(t.tooltip=new wo({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:yo},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function ko(t,e,i,s){const n=t.indexOf(e);if(-1===n)return((t,e,i,s)=>("string"==typeof e?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,s);return n!==t.lastIndexOf(e)?i:n}function So(t){const e=this.getLabels();return t>=0&&tnull===t?null:Ct(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:ko(i,t,N(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,s=[];let n=this.getLabels();n=0===t&&e===n.length-1?n:n.slice(t,e+1),this._valueRange=Math.max(n.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)s.push({value:i});return s}getLabelForValue(t){return So.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Do(t,e){const i=[],{bounds:s,step:n,min:o,max:a,precision:r,count:h,maxTicks:l,maxDigits:c,includeBounds:d}=t,u=n||1,f=l-1,{min:g,max:p}=e,m=!B(o),x=!B(a),b=!B(h),_=(p-g)/(c+1);let y,v,w,M,k=xt((p-g)/f/u)*u;if(k<1e-14&&!m&&!x)return[{value:g},{value:p}];M=Math.ceil(p/k)-Math.floor(g/k),M>f&&(k=xt(M*k/f/u)*u),B(r)||(y=Math.pow(10,r),k=Math.ceil(k*y)/y),"ticks"===s?(v=Math.floor(g/k)*k,w=Math.ceil(p/k)*k):(v=g,w=p),m&&x&&n&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((a-o)/n,k/1e3)?(M=Math.round(Math.min((a-o)/k,l)),k=(a-o)/M,v=o,w=a):b?(v=m?o:v,w=x?a:w,M=h-1,k=(w-v)/M):(M=(w-v)/k,M=mt(M,Math.round(M),k/1e3)?Math.round(M):Math.ceil(M));const S=Math.max(wt(k),wt(v));y=Math.pow(10,B(r)?S:r),v=Math.round(v*y)/y,w=Math.round(w*y)/y;let P=0;for(m&&(d&&v!==o?(i.push({value:o}),va)break;i.push({value:t})}return x&&d&&w!==a?i.length&&mt(i[i.length-1].value,a,Co(a,_,t))?i[i.length-1].value=a:i.push({value:a}):x&&w!==a||i.push({value:w}),i}function Co(t,e,{horizontal:i,minRotation:s}){const n=yt(s),o=(i?Math.sin(n):Math.cos(n))||.001,a=.75*e*(""+t).length;return Math.min(e/o,a)}class Ao extends Us{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return B(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:s,max:n}=this;const o=t=>s=e?s:t,a=t=>n=i?n:t;if(t){const t=pt(s),e=pt(n);t<0&&e<0?a(0):t>0&&e>0&&o(0)}if(s===n){let e=0===n?1:Math.abs(.05*n);a(n+e),t||o(s-e)}this.min=s,this.max=n}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:s}=t;return s?(e=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s=Do({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&_t(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Jt(t,this.chart.options.locale,this.options.ticks.format)}}class Oo extends Ao{static id="linear";static defaults={ticks:{callback:te.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=V(t)?t:0,this.max=V(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=yt(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,n.lineHeight/s))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}te.formatters.logarithmic;te.formatters.numeric;kn.register(On,Wn,qn,Vn,Ki,Zi,Gi,Qi,Po,Oo,oo,ro,Mo,eo),i.g.Chart=kn}},function(t){var e;e=5579,t(t.s=e)}]); \ No newline at end of file diff --git a/public/build/chart.7e725b75.js.LICENSE.txt b/public/build/chart.62631acc.js.LICENSE.txt similarity index 100% rename from public/build/chart.7e725b75.js.LICENSE.txt rename to public/build/chart.62631acc.js.LICENSE.txt diff --git a/public/build/chart.7e725b75.js b/public/build/chart.7e725b75.js deleted file mode 100644 index f2dd5f9b..00000000 --- a/public/build/chart.7e725b75.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see chart.7e725b75.js.LICENSE.txt */ -"use strict";(self.webpackChunkkimai2=self.webpackChunkkimai2||[]).push([[65],{5579:function(t,e,i){function s(t){return t+.5|0}const n=(t,e,i)=>Math.max(Math.min(t,i),e);function o(t){return n(s(2.55*t),0,255)}function a(t){return n(s(255*t),0,255)}function r(t){return n(s(t/2.55)/100,0,1)}function h(t){return n(s(100*t),0,100)}const l={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},c=[..."0123456789ABCDEF"],d=t=>c[15&t],u=t=>c[(240&t)>>4]+c[15&t],f=t=>(240&t)>>4==(15&t);function g(t){var e=(t=>f(t.r)&&f(t.g)&&f(t.b)&&f(t.a))(t)?d:u;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const p=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function m(t,e,i){const s=e*Math.min(i,1-i),n=(e,n=(e+t/30)%12)=>i-s*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function x(t,e,i){const s=(s,n=(s+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0);return[s(5),s(3),s(1)]}function b(t,e,i){const s=m(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)s[n]*=1-e-i,s[n]+=e;return s}function _(t){const e=t.r/255,i=t.g/255,s=t.b/255,n=Math.max(e,i,s),o=Math.min(e,i,s),a=(n+o)/2;let r,h,l;return n!==o&&(l=n-o,h=a>.5?l/(2-n-o):l/(n+o),r=function(t,e,i,s,n){return t===n?(e-i)/s+(e>16&255,o>>8&255,255&o]}return t}(),P.transparent=[0,0,0,0]);const e=P[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const C=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const A=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,O=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function T(t,e,i){if(t){let s=_(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,0===e?360:1)),s=v(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function R(t,e){return t?Object.assign(e||{},t):t}function E(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=a(t[3]))):(e=R(t,{r:0,g:0,b:0,a:1})).a=a(e.a),e}function I(t){return"r"===t.charAt(0)?function(t){const e=C.exec(t);let i,s,a,r=255;if(e){if(e[7]!==i){const t=+e[7];r=e[8]?o(t):n(255*t,0,255)}return i=+e[1],s=+e[3],a=+e[5],i=255&(e[2]?o(i):n(i,0,255)),s=255&(e[4]?o(s):n(s,0,255)),a=255&(e[6]?o(a):n(a,0,255)),{r:i,g:s,b:a,a:r}}}(t):M(t)}class L{constructor(t){if(t instanceof L)return t;const e=typeof t;let i;var s,n,o;"object"===e?i=E(t):"string"===e&&(o=(s=t).length,"#"===s[0]&&(4===o||5===o?n={r:255&17*l[s[1]],g:255&17*l[s[2]],b:255&17*l[s[3]],a:5===o?17*l[s[4]]:255}:7!==o&&9!==o||(n={r:l[s[1]]<<4|l[s[2]],g:l[s[3]]<<4|l[s[4]],b:l[s[5]]<<4|l[s[6]],a:9===o?l[s[7]]<<4|l[s[8]]:255})),i=n||D(t)||I(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=R(this._rgb);return t&&(t.a=r(t.a)),t}set rgb(t){this._rgb=E(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${r(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?g(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=_(t),i=e[0],s=h(e[1]),n=h(e[2]);return t.a<255?`hsla(${i}, ${s}%, ${n}%, ${r(t.a)})`:`hsl(${i}, ${s}%, ${n}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,s=t.rgb;let n;const o=e===n?.5:e,a=2*o-1,r=i.a-s.a,h=((a*r==-1?a:(a+r)/(1+a*r))+1)/2;n=1-h,i.r=255&h*i.r+n*s.r+.5,i.g=255&h*i.g+n*s.g+.5,i.b=255&h*i.b+n*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const s=O(r(t.r)),n=O(r(t.g)),o=O(r(t.b));return{r:a(A(s+i*(O(r(e.r))-s))),g:a(A(n+i*(O(r(e.g))-n))),b:a(A(o+i*(O(r(e.b))-o))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new L(this.rgb)}alpha(t){return this._rgb.a=a(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=s(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return T(this._rgb,2,t),this}darken(t){return T(this._rgb,2,-t),this}saturate(t){return T(this._rgb,1,t),this}desaturate(t){return T(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=_(t);i[0]=w(i[0]+e),i=v(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function z(){}const F=(()=>{let t=0;return()=>t++})();function B(t){return null==t}function W(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function H(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function V(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function j(t,e){return V(t)?t:e}function N(t,e){return void 0===t?e:t}const $=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Y(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function U(t,e,i,s){let n,o,a;if(W(t))if(o=t.length,s)for(n=o-1;n>=0;n--)e.call(i,t[n],n);else for(n=0;nt,x:t=>t.x,y:t=>t.y};function et(t,e){const i=tt[e]||(tt[e]=function(t){const e=function(t){const e=t.split("."),i=[];let s="";for(const t of e)s+=t,s.endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function it(t){return t.charAt(0).toUpperCase()+t.slice(1)}const st=t=>void 0!==t,nt=t=>"function"==typeof t,ot=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};const at=Math.PI,rt=2*at,ht=rt+at,lt=Number.POSITIVE_INFINITY,ct=at/180,dt=at/2,ut=at/4,ft=2*at/3,gt=Math.log10,pt=Math.sign;function mt(t,e,i){return Math.abs(t-e)h&&l=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function Ot(t,e,i){i=i||(i=>t[i]1;)s=o+n>>1,i(s)?o=s:n=s;return{lo:o,hi:n}}const Tt=(t,e,i,s)=>Ot(t,i,s?s=>{const n=t[s][e];return nt[s][e]Ot(t,i,(s=>t[s][e]>=i));const Et=["push","pop","shift","splice","unshift"];function It(t,e){const i=t._chartjs;if(!i)return;const s=i.listeners,n=s.indexOf(e);-1!==n&&s.splice(n,1),s.length>0||(Et.forEach((e=>{delete t[e]})),delete t._chartjs)}function Lt(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const zt="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function Ft(t,e){let i=[],s=!1;return function(...n){i=n,s||(s=!0,zt.call(window,(()=>{s=!1,t.apply(e,i)})))}}const Bt=t=>"start"===t?"left":"end"===t?"right":"center",Wt=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function Ht(t,e,i){const s=e.length;let n=0,o=s;if(t._sorted){const{iScale:a,_parsed:r}=t,h=a.axis,{min:l,max:c,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(n=Ct(Math.min(Tt(r,h,l).lo,i?s:Tt(e,h,a.getPixelForValue(l)).lo),0,s-1)),o=u?Ct(Math.max(Tt(r,a.axis,c,!0).hi+1,i?0:Tt(e,h,a.getPixelForValue(c),!0).hi+1),n,s)-n:s-n}return{start:n,count:o}}function Vt(t){const{xScale:e,yScale:i,_scaleRanges:s}=t,n={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!s)return t._scaleRanges=n,!0;const o=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==i.min||s.ymax!==i.max;return Object.assign(s,n),o}const jt=t=>0===t||1===t,Nt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*rt/i),$t=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*rt/i)+1,Yt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*dt),easeOutSine:t=>Math.sin(t*dt),easeInOutSine:t=>-.5*(Math.cos(at*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>jt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>jt(t)?t:Nt(t,.075,.3),easeOutElastic:t=>jt(t)?t:$t(t,.075,.3),easeInOutElastic(t){const e=.1125;return jt(t)?t:t<.5?.5*Nt(2*t,e,.45):.5+.5*$t(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Yt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*Yt.easeInBounce(2*t):.5*Yt.easeOutBounce(2*t-1)+.5};function Ut(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Xt(t){return Ut(t)?t:new L(t)}function qt(t){return Ut(t)?t:new L(t).saturate(.5).darken(.1).hexString()}const Kt=["x","y","borderWidth","radius","tension"],Zt=["color","borderColor","backgroundColor"];const Gt=new Map;function Jt(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let s=Gt.get(i);return s||(s=new Intl.NumberFormat(t,e),Gt.set(i,s)),s}(e,i).format(t)}const Qt={values:t=>W(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const s=this.chart.options.locale;let n,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(n="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const a=gt(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),h={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(h,this.options.ticks.format),Jt(t,s,h)},logarithmic(t,e,i){if(0===t)return"0";const s=i[e].significand||t/Math.pow(10,Math.floor(gt(t)));return[1,2,3,5,10,15].includes(s)||e>.8*i.length?Qt.numeric.call(this,t,e,i):""}};var te={formatters:Qt};const ee=Object.create(null),ie=Object.create(null);function se(t,e){if(!e)return t;const i=e.split(".");for(let e=0,s=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>qt(e.backgroundColor),this.hoverBorderColor=(t,e)=>qt(e.borderColor),this.hoverColor=(t,e)=>qt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return ne(this,t,e)}get(t){return se(this,t)}describe(t,e){return ne(ie,t,e)}override(t,e){return ne(ee,t,e)}route(t,e,i,s){const n=se(this,t),o=se(this,i),a="_"+e;Object.defineProperties(n,{[a]:{value:n[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=o[s];return H(t)?Object.assign({},e,t):N(t,e)},set(t){this[a]=t}}})}apply(t){t.forEach((t=>t(this)))}}var ae=new oe({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:Zt},numbers:{type:"number",properties:Kt}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:te.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function re(t,e,i,s,n){let o=e[n];return o||(o=e[n]=t.measureText(n).width,i.push(n)),o>s&&(s=o),s}function he(t,e,i){const s=t.currentDevicePixelRatio,n=0!==i?Math.max(i/2,.5):0;return Math.round((e-n)*s)/s+n}function le(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function ce(t,e,i,s){de(t,e,i,s,null)}function de(t,e,i,s,n){let o,a,r,h,l,c,d,u;const f=e.pointStyle,g=e.rotation,p=e.radius;let m=(g||0)*ct;if(f&&"object"==typeof f&&(o=f.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,s),t.rotate(m),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void t.restore();if(!(isNaN(p)||p<=0)){switch(t.beginPath(),f){default:n?t.ellipse(i,s,n/2,p,0,0,rt):t.arc(i,s,p,0,rt),t.closePath();break;case"triangle":c=n?n/2:p,t.moveTo(i+Math.sin(m)*c,s-Math.cos(m)*p),m+=ft,t.lineTo(i+Math.sin(m)*c,s-Math.cos(m)*p),m+=ft,t.lineTo(i+Math.sin(m)*c,s-Math.cos(m)*p),t.closePath();break;case"rectRounded":l=.516*p,h=p-l,a=Math.cos(m+ut)*h,d=Math.cos(m+ut)*(n?n/2-l:h),r=Math.sin(m+ut)*h,u=Math.sin(m+ut)*(n?n/2-l:h),t.arc(i-d,s-r,l,m-at,m-dt),t.arc(i+u,s-a,l,m-dt,m),t.arc(i+d,s+r,l,m,m+dt),t.arc(i-u,s+a,l,m+dt,m+at),t.closePath();break;case"rect":if(!g){h=Math.SQRT1_2*p,c=n?n/2:h,t.rect(i-c,s-h,2*c,2*h);break}m+=ut;case"rectRot":d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+u,s-a),t.lineTo(i+d,s+r),t.lineTo(i-u,s+a),t.closePath();break;case"crossRot":m+=ut;case"cross":d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+d,s+r),t.moveTo(i+u,s-a),t.lineTo(i-u,s+a);break;case"star":d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+d,s+r),t.moveTo(i+u,s-a),t.lineTo(i-u,s+a),m+=ut,d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-r),t.lineTo(i+d,s+r),t.moveTo(i+u,s-a),t.lineTo(i-u,s+a);break;case"line":a=n?n/2:Math.cos(m)*p,r=Math.sin(m)*p,t.moveTo(i-a,s-r),t.lineTo(i+a,s+r);break;case"dash":t.moveTo(i,s),t.lineTo(i+Math.cos(m)*(n?n/2:p),s+Math.sin(m)*p);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function ue(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let h,l;for(t.save(),t.font=n.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),B(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),h=0;hN(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of n)i[t]=+o(t)||0;return i}function Se(t){return ke(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Pe(t){return ke(t,["topLeft","topRight","bottomLeft","bottomRight"])}function De(t){const e=Se(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ce(t,e){t=t||{},e=e||ae.font;let i=N(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let s=N(t.style,e.style);s&&!(""+s).match(we)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:N(t.family,e.family),lineHeight:Me(N(t.lineHeight,e.lineHeight),i),size:i,style:s,weight:N(t.weight,e.weight),string:""};return n.string=function(t){return!t||B(t.size)||B(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(n),n}function Ae(t,e,i,s){let n,o,a,r=!0;for(n=0,o=t.length;nt[0])){const o=i||t;void 0===s&&(s=je("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:s,_getTarget:n,override:i=>Te([i,...t],e,o,s)};return new Proxy(a,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,s)=>ze(i,s,(()=>function(t,e,i,s){let n;for(const o of e)if(n=je(Ie(o,t),i),void 0!==n)return Le(t,n)?He(i,s,t,n):n}(s,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ne(t).includes(e),ownKeys:t=>Ne(t),set(t,e,i){const s=t._storage||(t._storage=n());return t[e]=s[e]=i,delete t._keys,!0}})}function Re(t,e,i,s){const n={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Ee(t,s),setContext:e=>Re(t,e,i,s),override:n=>Re(t.override(n),e,i,s)};return new Proxy(n,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>ze(t,e,(()=>function(t,e,i){const{_proxy:s,_context:n,_subProxy:o,_descriptors:a}=t;let r=s[e];nt(r)&&a.isScriptable(e)&&(r=function(t,e,i,s){const{_proxy:n,_context:o,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let h=e(o,a||s);r.delete(t),Le(t,h)&&(h=He(n._scopes,n,t,h));return h}(e,r,t,i));W(r)&&r.length&&(r=function(t,e,i,s){const{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=i;if(void 0!==o.index&&s(t))return e[o.index%e.length];if(H(e[0])){const i=e,s=n._scopes.filter((t=>t!==i));e=[];for(const h of i){const i=He(s,n,t,h);e.push(Re(i,o,a&&a[t],r))}}return e}(e,r,t,a.isIndexable));Le(e,r)&&(r=Re(r,n,o&&o[e],a));return r}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,s)=>(t[i]=s,delete e[i],!0)})}function Ee(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:s=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:s,isScriptable:nt(i)?i:()=>i,isIndexable:nt(s)?s:()=>s}}const Ie=(t,e)=>t?t+it(e):e,Le=(t,e)=>H(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function ze(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const s=i();return t[e]=s,s}function Fe(t,e,i){return nt(t)?t(e,i):t}const Be=(t,e)=>!0===t?e:"string"==typeof t?et(e,t):void 0;function We(t,e,i,s,n){for(const o of e){const e=Be(i,o);if(e){t.add(e);const o=Fe(e._fallback,i,n);if(void 0!==o&&o!==i&&o!==s)return o}else if(!1===e&&void 0!==s&&i!==s)return null}return!1}function He(t,e,i,s){const n=e._rootScopes,o=Fe(e._fallback,i,s),a=[...t,...n],r=new Set;r.add(s);let h=Ve(r,a,i,o||i,s);return null!==h&&((void 0===o||o===i||(h=Ve(r,a,o,h,s),null!==h))&&Te(Array.from(r),[""],n,o,(()=>function(t,e,i){const s=t._getTarget();e in s||(s[e]={});const n=s[e];if(W(n)&&H(i))return i;return n||{}}(e,i,s))))}function Ve(t,e,i,s,n){for(;i;)i=We(t,e,i,s,n);return i}function je(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function Ne(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function $e(t,e,i,s){const{iScale:n}=t,{key:o="r"}=this._parsing,a=new Array(s);let r,h,l,c;for(r=0,h=s;re"x"===t?"y":"x";function qe(t,e,i,s){const n=t.skip?e:t,o=e,a=i.skip?e:i,r=kt(o,n),h=kt(a,o);let l=r/(r+h),c=h/(r+h);l=isNaN(l)?0:l,c=isNaN(c)?0:c;const d=s*l,u=s*c;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function Ke(t,e="x"){const i=Xe(e),s=t.length,n=Array(s).fill(0),o=Array(s);let a,r,h,l=Ue(t,0);for(a=0;a!t.skip))),"monotone"===e.cubicInterpolationMode)Ke(t,n);else{let i=s?t[t.length-1]:t[0];for(o=0,a=t.length;ot.ownerDocument.defaultView.getComputedStyle(t,null);const ii=["top","right","bottom","left"];function si(t,e,i){const s={};i=i?"-"+i:"";for(let n=0;n<4;n++){const o=ii[n];s[o]=parseFloat(t[e+"-"+o+i])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}function ni(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:s}=e,n=ei(i),o="border-box"===n.boxSizing,a=si(n,"padding"),r=si(n,"border","width"),{x:h,y:l,box:c}=function(t,e){const i=t.touches,s=i&&i.length?i[0]:t,{offsetX:n,offsetY:o}=s;let a,r,h=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(n,o,t.target))a=n,r=o;else{const t=e.getBoundingClientRect();a=s.clientX-t.left,r=s.clientY-t.top,h=!0}return{x:a,y:r,box:h}}(t,i),d=a.left+(c&&r.left),u=a.top+(c&&r.top);let{width:f,height:g}=e;return o&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((h-d)/f*i.width/s),y:Math.round((l-u)/g*i.height/s)}}const oi=t=>Math.round(10*t)/10;function ai(t,e,i,s){const n=ei(t),o=si(n,"margin"),a=ti(n.maxWidth,t,"clientWidth")||lt,r=ti(n.maxHeight,t,"clientHeight")||lt,h=function(t,e,i){let s,n;if(void 0===e||void 0===i){const o=t&&Qe(t);if(o){const t=o.getBoundingClientRect(),a=ei(o),r=si(a,"border","width"),h=si(a,"padding");e=t.width-h.width-r.width,i=t.height-h.height-r.height,s=ti(a.maxWidth,o,"clientWidth"),n=ti(a.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:s||lt,maxHeight:n||lt}}(t,e,i);let{width:l,height:c}=h;if("content-box"===n.boxSizing){const t=si(n,"border","width"),e=si(n,"padding");l-=e.width+t.width,c-=e.height+t.height}l=Math.max(0,l-o.width),c=Math.max(0,s?l/s:c-o.height),l=oi(Math.min(l,a,h.maxWidth)),c=oi(Math.min(c,r,h.maxHeight)),l&&!c&&(c=oi(l/2));return(void 0!==e||void 0!==i)&&s&&h.height&&c>h.height&&(c=h.height,l=oi(Math.floor(c*s))),{width:l,height:c}}function ri(t,e,i){const s=e||1,n=Math.floor(t.height*s),o=Math.floor(t.width*s);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==s||a.height!==n||a.width!==o)&&(t.currentDevicePixelRatio=s,a.height=n,a.width=o,t.ctx.setTransform(s,0,0,s,0,0),!0)}const hi=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Je()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function li(t,e){const i=function(t,e){return ei(t).getPropertyValue(e)}(t,e),s=i&&i.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function ci(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function di(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:"middle"===s?i<.5?t.y:e.y:"after"===s?i<1?t.y:e.y:i>0?e.y:t.y}}function ui(t,e,i,s){const n={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},a=ci(t,n,i),r=ci(n,o,i),h=ci(o,e,i),l=ci(a,r,i),c=ci(r,h,i);return ci(l,c,i)}function fi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function gi(t,e){let i,s;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,s=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=s)}function pi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mi(t){return"angle"===t?{between:Dt,compare:St,normalize:Pt}:{between:At,compare:(t,e)=>t-e,normalize:t=>t}}function xi({start:t,end:e,count:i,loop:s,style:n}){return{start:t%i,end:e%i,loop:s&&(e-t+1)%i==0,style:n}}function bi(t,e,i){if(!i)return[t];const{property:s,start:n,end:o}=i,a=e.length,{compare:r,between:h,normalize:l}=mi(s),{start:c,end:d,loop:u,style:f}=function(t,e,i){const{property:s,start:n,end:o}=i,{between:a,normalize:r}=mi(s),h=e.length;let l,c,{start:d,end:u,loop:f}=t;if(f){for(d+=h,u+=h,l=0,c=h;lb||h(n,x,p)&&0!==r(n,x),v=()=>!b||0===r(o,p)||h(o,x,p);for(let t=c,i=c;t<=d;++t)m=e[t%a],m.skip||(p=l(m[s]),p!==x&&(b=h(p,n,o),null===_&&y()&&(_=0===r(p,n)?t:i),null!==_&&v()&&(g.push(xi({start:_,end:t,loop:u,count:a,style:f})),_=null),i=t,x=p));return null!==_&&g.push(xi({start:_,end:d,loop:u,count:a,style:f})),g}function _i(t,e){const i=[],s=t.segments;for(let n=0;ns({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=zt.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,s)=>{if(!i.running||!i.items.length)return;const n=i.items;let o,a=n.length-1,r=!1;for(;a>=0;--a)o=n[a],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),r=!0):(n[a]=n[n.length-1],n.pop());r&&(s.draw(),this._notify(s,i,t,"progress")),n.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=n.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ki=new Mi;const Si="transparent",Pi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const s=Xt(t||Si),n=s.valid&&Xt(e||Si);return n&&n.valid?n.mix(s,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Di{constructor(t,e,i,s){const n=e[i];s=Ae([t.to,s,n,t.from]);const o=Ae([t.from,n,s]);this._active=!0,this._fn=t.fn||Pi[t.type||typeof o],this._easing=Yt[t.easing]||Yt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],n=i-this._start,o=this._duration-n;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=Ae([t.to,e,s,t.from]),this._from=Ae([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,n=this._from,o=this._loop,a=this._to;let r;if(this._active=n!==a&&(o||e1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[s]=this._fn(n,a,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t{const n=t[s];if(!H(n))return;const o={};for(const t of e)o[t]=n[t];(W(n.properties)&&n.properties||[s]).forEach((t=>{t!==s&&i.has(t)||i.set(t,o)}))}))}_animateOptions(t,e){const i=e.options,s=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!s)return[];const n=this._createAnimations(s,i);return i.$shared&&function(t,e){const i=[],s=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),n}_createAnimations(t,e){const i=this._properties,s=[],n=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let r;for(r=o.length-1;r>=0;--r){const h=o[r];if("$"===h.charAt(0))continue;if("options"===h){s.push(...this._animateOptions(t,e));continue}const l=e[h];let c=n[h];const d=i.get(h);if(c){if(d&&c.active()){c.update(d,l,a);continue}c.cancel()}d&&d.duration?(n[h]=c=new Di(d,t,h,l),s.push(c)):t[h]=l}return s}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ki.add(this._chart,i),!0):void 0}}function Ai(t,e){const i=t&&t.options||{},s=i.reverse,n=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:s?o:n,end:s?n:o}}function Oi(t,e){const i=[],s=t._getSortedDatasetMetas(e);let n,o;for(n=0,o=s.length;n0||!i&&e<0)return n.index}return null}function Li(t,e){const{chart:i,_cachedMeta:s}=t,n=i._stacks||(i._stacks={}),{iScale:o,vScale:a,index:r}=s,h=o.axis,l=a.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,a,s),d=e.length;let u;for(let t=0;ti[t].axis===e)).shift()}function Fi(t,e){const i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[s]||void 0===e[s][i])return;delete e[s][i],void 0!==e[s]._visualValues&&void 0!==e[s]._visualValues[i]&&delete e[s]._visualValues[i]}}}const Bi=t=>"reset"===t||"none"===t,Wi=(t,e)=>e?t:Object.assign({},t);class Hi{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ri(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Fi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,n=e.xAxisID=N(i.xAxisID,zi(t,"x")),o=e.yAxisID=N(i.yAxisID,zi(t,"y")),a=e.rAxisID=N(i.rAxisID,zi(t,"r")),r=e.indexAxis,h=e.iAxisID=s(r,n,o,a),l=e.vAxisID=s(r,o,n,a);e.xScale=this.getScaleForId(n),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(h),e.vScale=this.getScaleForId(l)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&It(this._data,this),t._stacked&&Fi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(H(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:i,vScale:s}=e,n="x"===i.axis?"x":"y",o="x"===s.axis?"x":"y",a=Object.keys(t),r=new Array(a.length);let h,l,c;for(h=0,l=a.length;h{const e="_onData"+it(t),i=s[t];Object.defineProperty(s,t,{configurable:!0,enumerable:!1,value(...t){const n=i.apply(this,t);return s._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),n}})})))),this._syncList=[],this._data=e}var s,n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const n=e._stacked;e._stacked=Ri(e.vScale,e),e.stack!==i.stack&&(s=!0,Fi(e),e.stack=i.stack),this._resyncElements(t),(s||n!==e._stacked)&&(Li(this,e._parsed),e._stacked=Ri(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:s}=this,{iScale:n,_stacked:o}=i,a=n.axis;let r,h,l,c=0===t&&e===s.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=s,i._sorted=!0,l=s;else{l=W(s[t])?this.parseArrayData(i,s,t,e):H(s[t])?this.parseObjectData(i,s,t,e):this.parsePrimitiveData(i,s,t,e);const n=()=>null===h[a]||d&&h[a]t&&!e.hidden&&e._stacked&&{keys:Oi(i,!0),values:null})(e,i,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:l,max:c}=function(t){const{min:e,max:i,minDefined:s,maxDefined:n}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}(a);let d,u;function f(){u=s[d];const e=u[a.axis];return!V(u[t.axis])||l>e||c=0;--d)if(!f()){this.updateRangeFromParsed(h,t,u,r);break}return h}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,n,o;for(s=0,n=e.length;s=0&&tthis.getContext(i,s,e)),c);return f.$shared&&(f.$shared=r,n[o]=Object.freeze(Wi(f,r))),f}_resolveAnimations(t,e,i){const s=this.chart,n=this._cachedDataOpts,o=`animation-${e}`,a=n[o];if(a)return a;let r;if(!1!==s.options.animation){const s=this.chart.config,n=s.datasetAnimationScopeKeys(this._type,e),o=s.getOptionScopes(this.getDataset(),n);r=s.createResolver(o,this.getContext(t,i,e))}const h=new Ci(s,r&&r.animations);return r&&r._cacheable&&(n[o]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Bi(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,n=this.getSharedOptions(i),o=this.includeOptions(e,n)||n!==s;return this.updateSharedOptions(n,e,i),{sharedOptions:n,includeOptions:o}}updateElement(t,e,i,s){Bi(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!Bi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const n=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const s=i.length,n=e.length,o=Math.min(n,s);o&&this.parse(0,o),n>s?this._insertElements(s,n-s,t):n{for(t.length+=e,a=t.length-1;a>=o;a--)t[a]=t[a-e]};for(r(n),a=t;at-e)))}return t._cache.$bar}(e,t.type);let s,n,o,a,r=e._length;const h=()=>{32767!==o&&-32768!==o&&(st(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(s=0,n=i.length;sMath.abs(r)&&(h=r,l=a),e[i.axis]=l,e._custom={barStart:h,barEnd:l,start:n,end:o,min:a,max:r}}(t,e,i,s):e[i.axis]=i.parse(t,s),e}function Ni(t,e,i,s){const n=t.iScale,o=t.vScale,a=n.getLabels(),r=n===o,h=[];let l,c,d,u;for(l=i,c=i+s;lt.x,i="left",s="right"):(e=t.baset.controller.options.grouped)),n=i.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(e),r=a&&a[i.axis],h=t=>{const e=t._parsed.find((t=>t[i.axis]===r)),s=e&&e[t.vScale.axis];if(B(s)||isNaN(s))return!0};for(const i of s)if((void 0===e||!h(i))&&((!1===n||-1===o.indexOf(i.stack)||void 0===n&&void 0===i.stack)&&o.push(i.stack),i.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const s=this._getStacks(t,i),n=void 0!==e?s.indexOf(e):-1;return-1===n?s.length-1:n}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let n,o;for(n=0,o=e.data.length;n=i?1:-1)}(d,e,a)*o,u===a&&(m-=d/2);const t=e.getPixelForDecimal(0),n=e.getPixelForDecimal(1),h=Math.min(t,n),f=Math.max(t,n);m=Math.max(Math.min(m,f),h),c=m+d,i&&!l&&(r._stacks[e.axis]._visualValues[s]=e.getValueForPixel(c)-e.getValueForPixel(m))}if(m===e.getPixelForValue(a)){const t=pt(d)*e.getLineWidthForValue(a)/2;m+=t,d-=t}return{size:d,base:m,head:c,center:c+d/2}}_calculateBarIndexPixels(t,e){const i=e.scale,s=this.options,n=s.skipNull,o=N(s.maxBarThickness,1/0);let a,r;if(e.grouped){const i=n?this._getStackCount(t):e.stackCount,h="flex"===s.barThickness?function(t,e,i,s){const n=e.pixels,o=n[t];let a=t>0?n[t-1]:null,r=t"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:s,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=i;else{let n,o,a=t=>+i[t];if(H(i[t])){const{key:t="value"}=this._parsing;a=e=>+et(i[e],t)}for(n=t,o=t+e;nDt(t,r,h,!0)?1:Math.max(e,e*i,s,s*i),g=(t,e,s)=>Dt(t,r,h,!0)?-1:Math.min(e,e*i,s,s*i),p=f(0,l,d),m=f(dt,c,u),x=g(at,l,d),b=g(at+dt,c,u);s=(p-x)/2,n=(m-b)/2,o=-(p+x)/2,a=-(m+b)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}(u,d,r),x=(i.width-o)/f,b=(i.height-o)/g,_=Math.max(Math.min(x,b)/2,0),y=$(this.options.radius,_),v=(y-Math.max(y*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*y,this.offsetY=m*y,s.total=this.calculateTotal(),this.outerRadius=y-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*c,0),this.updateElements(n,0,n.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,n=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*n/rt)}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,a=o.chartArea,r=o.options.animation,h=(a.left+a.right)/2,l=(a.top+a.bottom)/2,c=n&&r.animateScale,d=c?0:this.innerRadius,u=c?0:this.outerRadius,{sharedOptions:f,includeOptions:g}=this._getSharedOptions(e,s);let p,m=this._getRotation();for(p=0;p0&&!isNaN(t)?rt*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=Jt(e._parsed[t],i.options.locale);return{label:s[t]||"",value:n}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,n,o,a,r;if(!t)for(s=0,n=i.data.datasets.length;s0&&this.getParsed(e-1);for(let i=0;i=x){b.skip=!0;continue}const y=this.getParsed(i),v=B(y[u]),w=b[d]=o.getPixelForValue(y[d],i),M=b[u]=n||v?a.getBasePixel():a.getPixelForValue(r?this.applyStack(a,y,r):y[u],i);b.skip=isNaN(w)||isNaN(M)||v,b.stop=i>0&&Math.abs(y[d]-_[d])>p,g&&(b.parsed=y,b.raw=h.data[i]),c&&(b.options=l||this.resolveDataElementOptions(i,f.active?"active":s)),m||this.updateElement(f,i,b,s),_=y}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const n=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,n,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class Ji extends Hi{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:s,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=Jt(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:n}}parseObjectData(t,e,i,s){return $e.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(se.max&&(e.max=s))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),n=Math.max(s/2,0),o=(n-Math.max(i.cutoutPercentage?n/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=n-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,a=o.options.animation,r=this._cachedMeta.rScale,h=r.xCenter,l=r.yCenter,c=r.getIndexAngle(0)-.5*at;let d,u=c;const f=360/this.countVisibleElements();for(d=0;d{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?yt(this.resolveDataElementOptions(t,e).angle||i):0}}class Qi extends Zi{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}function ts(t,e,i,s){const{controller:n,data:o,_sorted:a}=t,r=n._cachedMeta.iScale;if(r&&e===r.axis&&"r"!==e&&a&&o.length){const t=r._reversePixels?Rt:Tt;if(!s)return t(o,e,i);if(n._sharedOptions){const s=o[0],n="function"==typeof s.getRange&&s.getRange(e);if(n){const s=t(o,e,i-n),a=t(o,e,i+n);return{lo:s.lo,hi:a.hi}}}}return{lo:0,hi:o.length-1}}function es(t,e,i,s,n){const o=t.getSortedVisibleDatasetMetas(),a=i[e];for(let t=0,i=o.length;t{t[a]&&t[a](e[i],n)&&(o.push({element:t,datasetIndex:s,index:h}),r=r||t.inRange(e.x,e.y,n))})),s&&!r?[]:o}var as={evaluateInteractionItems:es,modes:{index(t,e,i,s){const n=ni(e,t),o=i.axis||"x",a=i.includeInvisible||!1,r=i.intersect?is(t,n,o,s,a):ns(t,n,o,!1,s,a),h=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&h.push({element:i,datasetIndex:t.index,index:e})})),h):[]},dataset(t,e,i,s){const n=ni(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;let r=i.intersect?is(t,n,o,s,a):ns(t,n,o,!1,s,a);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;tis(t,ni(e,t),i.axis||"xy",s,i.includeInvisible||!1),nearest(t,e,i,s){const n=ni(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;return ns(t,n,o,i.intersect,s,a)},x:(t,e,i,s)=>os(t,ni(e,t),"x",i.intersect,s),y:(t,e,i,s)=>os(t,ni(e,t),"y",i.intersect,s)}};const rs=["left","top","right","bottom"];function hs(t,e){return t.filter((t=>t.pos===e))}function ls(t,e){return t.filter((t=>-1===rs.indexOf(t.pos)&&t.box.axis===e))}function cs(t,e){return t.sort(((t,i)=>{const s=e?i:t,n=e?t:i;return s.weight===n.weight?s.index-n.index:s.weight-n.weight}))}function ds(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:s,stackWeight:n}=i;if(!t||!rs.includes(s))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=n}return e}(t),{vBoxMaxWidth:s,hBoxMaxHeight:n}=e;let o,a,r;for(o=0,a=t.length;o{s[t]=Math.max(e[t],i[t])})),s}return s(t?["left","right"]:["top","bottom"])}function ms(t,e,i,s){const n=[];let o,a,r,h,l,c;for(o=0,a=t.length,l=0;ot.box.fullSize)),!0),s=cs(hs(e,"left"),!0),n=cs(hs(e,"right")),o=cs(hs(e,"top"),!0),a=cs(hs(e,"bottom")),r=ls(e,"x"),h=ls(e,"y");return{fullSize:i,leftAndTop:s.concat(o),rightAndBottom:n.concat(h).concat(a).concat(r),chartArea:hs(e,"chartArea"),vertical:s.concat(n).concat(h),horizontal:o.concat(a).concat(r)}}(t.boxes),h=r.vertical,l=r.horizontal;U(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const c=h.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/c,hBoxMaxHeight:a/2}),u=Object.assign({},n);fs(u,De(s));const f=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),g=ds(h.concat(l),d);ms(r.fullSize,f,d,g),ms(h,f,d,g),ms(l,f,d,g)&&ms(h,f,d,g),function(t){const e=t.maxPadding;function i(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),bs(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,bs(r.rightAndBottom,f,d,g),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},U(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})}))}};class ys{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class vs extends ys{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ws={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ms=t=>null===t||""===t;const ks=!!hi&&{passive:!0};function Ss(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,ks)}function Ps(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function Ds(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Ps(i.addedNodes,s),e=e&&!Ps(i.removedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}function Cs(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Ps(i.removedNodes,s),e=e&&!Ps(i.addedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}const As=new Map;let Os=0;function Ts(){const t=window.devicePixelRatio;t!==Os&&(Os=t,As.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Rs(t,e,i){const s=t.canvas,n=s&&Qe(s);if(!n)return;const o=Ft(((t,e)=>{const s=n.clientWidth;i(t,e),s{const e=t[0],i=e.contentRect.width,s=e.contentRect.height;0===i&&0===s||o(i,s)}));return a.observe(n),function(t,e){As.size||window.addEventListener("resize",Ts),As.set(t,e)}(t,o),a}function Es(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){As.delete(t),As.size||window.removeEventListener("resize",Ts)}(t)}function Is(t,e,i){const s=t.canvas,n=Ft((e=>{null!==t.ctx&&i(function(t,e){const i=ws[t.type]||t.type,{x:s,y:n}=ni(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==n?n:null}}(e,t))}),t);return function(t,e,i){t&&t.addEventListener(e,i,ks)}(s,e,n),n}class Ls extends ys{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,s=t.getAttribute("height"),n=t.getAttribute("width");if(t.$chartjs={initial:{height:s,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Ms(n)){const e=li(t,"width");void 0!==e&&(t.width=e)}if(Ms(s))if(""===t.style.height)t.height=t.width/(e||2);else{const e=li(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const s=i[t];B(s)?e.removeAttribute(t):e.setAttribute(t,s)}));const s=i.style||{};return Object.keys(s).forEach((t=>{e.style[t]=s[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),n={attach:Ds,detach:Cs,resize:Rs}[e]||Is;s[e]=n(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];if(!s)return;({attach:Es,detach:Es,resize:Es}[e]||Ss)(t,e,s),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return ai(t,e,i,s)}isAttached(t){const e=t&&Qe(t);return!(!e||!e.isConnected)}}class zs{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return bt(this.x)&&bt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const s={};return t.forEach((t=>{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),s}}function Fs(t,e){const i=t.options.ticks,s=function(t){const e=t.options.offset,i=t._tickSize(),s=t._length/i+(e?0:1),n=t._maxLength/i;return Math.floor(Math.min(s,n))}(t),n=Math.min(i.maxTicksLimit||s,s),o=i.major.enabled?function(t){const e=[];let i,s;for(i=0,s=t.length;in)return function(t,e,i,s){let n,o=0,a=i[0];for(s=Math.ceil(s),n=0;nt-e)).pop(),e}(s);for(let t=0,e=o.length-1;tn)return e}return Math.max(n,1)}(o,e,n);if(a>0){let t,i;const s=a>1?Math.round((h-r)/(a-1)):null;for(Bs(e,l,c,B(s)?0:r-s,r),t=0,i=a-1;t"top"===e||"left"===e?t[e]+i:t[e]-i,Hs=(t,e)=>Math.min(e||t,t);function Vs(t,e){const i=[],s=t.length/e,n=t.length;let o=0;for(;oa+r)))return l}function Ns(t){return t.drawTicks?t.tickLength:0}function $s(t,e){if(!t.display)return 0;const i=Ce(t.font,e),s=De(t.padding);return(W(t.text)?t.text.length:1)*i.lineHeight+s.height}function Ys(t,e,i){let s=Bt(t);return(i&&"right"!==e||!i&&"right"===e)&&(s=(t=>"left"===t?"right":"right"===t?"left":t)(s)),s}class Us extends zs{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=j(t,Number.POSITIVE_INFINITY),e=j(e,Number.NEGATIVE_INFINITY),i=j(i,Number.POSITIVE_INFINITY),s=j(s,Number.NEGATIVE_INFINITY),{min:j(t,i),max:j(e,s),minDefined:V(t),maxDefined:V(e)}}getMinMax(t){let e,{min:i,max:s,minDefined:n,maxDefined:o}=this.getUserBounds();if(n&&o)return{min:i,max:s};const a=this.getMatchingVisibleMetas();for(let r=0,h=a.length;rs?s:i,s=n&&i>s?i:s,{min:j(i,j(s,i)),max:j(s,j(i,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Y(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:n,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:s,max:n}=t,o=$(e,(n-s)/2),a=(t,e)=>i&&0===t?0:t+e;return{min:a(s,-Math.abs(o)),max:a(n,o)}}(this,n,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=a=n||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const l=this._getLabelSizes(),c=l.widest.width,d=l.highest.height,u=Ct(this.chart.width-c,0,this.maxWidth);o=t.offset?this.maxWidth/i:u/(i-1),c+6>o&&(o=u/(i-(t.offset?.5:1)),a=this.maxHeight-Ns(t.grid)-e.padding-$s(t.title,this.chart.options.font),r=Math.sqrt(c*c+d*d),h=vt(Math.min(Math.asin(Ct((l.highest.height+6)/o,-1,1)),Math.asin(Ct(a/r,-1,1))-Math.asin(Ct(d/r,-1,1)))),h=Math.max(s,Math.min(n,h))),this.labelRotation=h}afterCalculateLabelRotation(){Y(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Y(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:n}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const o=$s(s,e.options.font);if(a?(t.width=this.maxWidth,t.height=Ns(n)+o):(t.height=this.maxHeight,t.width=Ns(n)+o),i.display&&this.ticks.length){const{first:e,last:s,widest:n,highest:o}=this._getLabelSizes(),r=2*i.padding,h=yt(this.labelRotation),l=Math.cos(h),c=Math.sin(h);if(a){const e=i.mirror?0:c*n.width+l*o.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:l*n.width+c*o.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,s,c,l)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){const{ticks:{align:n,padding:o},position:a}=this.options,r=0!==this.labelRotation,h="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,l=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,d=0;r?h?(c=s*t.width,d=i*e.height):(c=i*t.height,d=s*e.width):"start"===n?d=e.width:"end"===n?c=t.width:"inner"!==n&&(c=t.width/2,d=e.width/2),this.paddingLeft=Math.max((c-a+o)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-l+o)*this.width/(this.width-l),0)}else{let i=e.height/2,s=t.height/2;"start"===n?(i=0,s=t.height):"end"===n&&(i=e.height,s=0),this.paddingTop=i+o,this.paddingBottom=s+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Y(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,s=i.length/2;let n;if(s>e){for(n=0;n({width:o[t]||0,height:a[t]||0});return{first:M(0),last:M(e-1),widest:M(v),highest:M(w),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Ct(this._alignToPixels?he(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ta*s?a/i:r/s:r*s0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:n,position:o,border:a}=s,r=n.offset,h=this.isHorizontal(),l=this.ticks.length+(r?1:0),c=Ns(n),d=[],u=a.setContext(this.getContext()),f=u.display?u.width:0,g=f/2,p=function(t){return he(i,t,f)};let m,x,b,_,y,v,w,M,k,S,P,D;if("top"===o)m=p(this.bottom),v=this.bottom-c,M=m-g,S=p(t.top)+g,D=t.bottom;else if("bottom"===o)m=p(this.top),S=t.top,D=p(t.bottom)-g,v=m+g,M=this.top+c;else if("left"===o)m=p(this.right),y=this.right-c,w=m-g,k=p(t.left)+g,P=t.right;else if("right"===o)m=p(this.left),k=t.left,P=p(t.right)-g,y=m+g,w=this.left+c;else if("x"===e){if("center"===o)m=p((t.top+t.bottom)/2+.5);else if(H(o)){const t=Object.keys(o)[0],e=o[t];m=p(this.chart.scales[t].getPixelForValue(e))}S=t.top,D=t.bottom,v=m+g,M=v+c}else if("y"===e){if("center"===o)m=p((t.left+t.right)/2);else if(H(o)){const t=Object.keys(o)[0],e=o[t];m=p(this.chart.scales[t].getPixelForValue(e))}y=m-g,w=y-c,k=t.left,P=t.right}const C=N(s.ticks.maxTicksLimit,l),A=Math.max(1,Math.ceil(l/C));for(x=0;x0&&(o-=s/2)}d={left:o,top:n,width:s+e.width,height:i+e.height,color:t.backdropColor}}p.push({label:_,font:k,textOffset:D,options:{rotation:g,color:i,strokeColor:r,strokeWidth:l,textAlign:u,textBaseline:C,translation:[y,v],backdrop:d}})}return p}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-yt(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:s,padding:n}}=this.options,o=t+n,a=this._getLabelSizes().widest.width;let r,h;return"left"===e?s?(h=this.right+n,"near"===i?r="left":"center"===i?(r="center",h+=a/2):(r="right",h+=a)):(h=this.right-o,"near"===i?r="right":"center"===i?(r="center",h-=a/2):(r="left",h=this.left)):"right"===e?s?(h=this.left+n,"near"===i?r="right":"center"===i?(r="center",h-=a/2):(r="left",h-=a)):(h=this.left+o,"near"===i?r="left":"center"===i?(r="center",h+=a/2):(r="right",h=this.right)):r="right",{textAlign:r,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:s,width:n,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,n,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,o;const a=(t,e,s)=>{s.width&&s.color&&(i.save(),i.lineWidth=s.width,i.strokeStyle=s.color,i.setLineDash(s.borderDash||[]),i.lineDashOffset=s.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(n=0,o=s.length;n{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let n,o;for(n=0,o=e.length;n{const s=i.split("."),n=s.pop(),o=[t].concat(s).join("."),a=e[i].split("."),r=a.pop(),h=a.join(".");ae.route(o,n,h,r)}))}(e,t.defaultRoutes);t.descriptors&&ae.describe(e,t.descriptors)}(t,o,i),this.override&&ae.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in ae[s]&&(delete ae[s][i],this.override&&delete ee[i])}}class qs{constructor(){this.controllers=new Xs(Hi,"datasets",!0),this.elements=new Xs(zs,"elements"),this.plugins=new Xs(Object,"plugins"),this.scales=new Xs(Us,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const s=i||this._getRegistryForType(e);i||s.isForType(e)||s===this.plugins&&e.id?this._exec(t,s,e):U(e,(e=>{const s=i||this._getRegistryForType(e);this._exec(t,s,e)}))}))}_exec(t,e,i){const s=it(t);Y(i["before"+s],[],i),e[t](i),Y(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function Gs(t,e){return e||!1!==t?!0===t?{}:t:null}function Js(t,{plugin:e,local:i},s,n){const o=t.pluginScopeKeys(e),a=t.getOptionScopes(s,o);return i&&e.defaults&&a.push(e.defaults),t.createResolver(a,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Qs(t,e){const i=ae.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function tn(t){if("x"===t||"y"===t||"r"===t)return t}function en(t,...e){if(tn(t))return t;for(const s of e){const e=s.axis||("top"===(i=s.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&tn(t[0].toLowerCase());if(e)return e}var i;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function sn(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function nn(t,e){const i=ee[t.type]||{scales:{}},s=e.scales||{},n=Qs(t.type,e),o=Object.create(null);return Object.keys(s).forEach((e=>{const a=s[e];if(!H(a))return console.error(`Invalid scale configuration for scale: ${e}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const r=en(e,a,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return sn(t,"x",i[0])||sn(t,"y",i[0])}return{}}(e,t),ae.scales[a.type]),h=function(t,e){return t===e?"_index_":"_value_"}(r,n),l=i.scales||{};o[e]=J(Object.create(null),[{axis:r},a,l[r],l[h]])})),t.data.datasets.forEach((i=>{const n=i.type||t.type,a=i.indexAxis||Qs(n,e),r=(ee[n]||{}).scales||{};Object.keys(r).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),n=i[e+"AxisID"]||e;o[n]=o[n]||Object.create(null),J(o[n],[{axis:e},s[n],r[t]])}))})),Object.keys(o).forEach((t=>{const e=o[t];J(e,[ae.scales[e.type],ae.scale])})),o}function on(t){const e=t.options||(t.options={});e.plugins=N(e.plugins,{}),e.scales=nn(t,e)}function an(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const rn=new Map,hn=new Set;function ln(t,e){let i=rn.get(t);return i||(i=e(),rn.set(t,i),hn.add(i)),i}const cn=(t,e,i)=>{const s=et(e,i);void 0!==s&&t.add(s)};class dn{constructor(t){this._config=function(t){return(t=t||{}).data=an(t.data),on(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=an(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),on(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ln(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return ln(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return ln(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return ln(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return s&&!e||(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:n}=this,o=this._cachedScopes(t,i),a=o.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>cn(r,t,e)))),e.forEach((t=>cn(r,s,t))),e.forEach((t=>cn(r,ee[n]||{},t))),e.forEach((t=>cn(r,ae,t))),e.forEach((t=>cn(r,ie,t)))}));const h=Array.from(r);return 0===h.length&&h.push(Object.create(null)),hn.has(e)&&o.set(e,h),h}chartOptionScopes(){const{options:t,type:e}=this;return[t,ee[e]||{},ae.datasets[e]||{},{type:e},ae,ie]}resolveNamedOptions(t,e,i,s=[""]){const n={$shared:!0},{resolver:o,subPrefixes:a}=un(this._resolverCache,t,s);let r=o;if(function(t,e){const{isScriptable:i,isIndexable:s}=Ee(t);for(const n of e){const e=i(n),o=s(n),a=(o||e)&&t[n];if(e&&(nt(a)||fn(a))||o&&W(a))return!0}return!1}(o,e)){n.$shared=!1;r=Re(o,i=nt(i)?i():i,this.createResolver(t,i,a))}for(const t of e)n[t]=r[t];return n}createResolver(t,e,i=[""],s){const{resolver:n}=un(this._resolverCache,t,i);return H(e)?Re(n,e,void 0,s):n}}function un(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));const n=i.join();let o=s.get(n);if(!o){o={resolver:Te(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},s.set(n,o)}return o}const fn=t=>H(t)&&Object.getOwnPropertyNames(t).some((e=>nt(t[e])));const gn=["top","bottom","left","right","chartArea"];function pn(t,e){return"top"===t||"bottom"===t||-1===gn.indexOf(t)&&"x"===e}function mn(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function xn(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Y(i&&i.onComplete,[t],e)}function bn(t){const e=t.chart,i=e.options.animation;Y(i&&i.onProgress,[t],e)}function _n(t){return Je()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const yn={},vn=t=>{const e=_n(t);return Object.values(yn).filter((t=>t.canvas===e)).pop()};function wn(t,e,i){const s=Object.keys(t);for(const n of s){const s=+n;if(s>=e){const o=t[n];delete t[n],(i>0||s>e)&&(t[s+i]=o)}}}function Mn(t,e,i){return t.options.clip?t[i]:e[i]}class kn{static defaults=ae;static instances=yn;static overrides=ee;static registry=Ks;static version="4.4.7";static getChart=vn;static register(...t){Ks.add(...t),Sn()}static unregister(...t){Ks.remove(...t),Sn()}constructor(t,e){const i=this.config=new dn(e),s=_n(t),n=vn(s);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Je()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?vs:Ls}(s)),this.platform.updateConfig(i);const a=this.platform.acquireContext(s,o.aspectRatio),r=a&&a.canvas,h=r&&r.height,l=r&&r.width;this.id=F(),this.ctx=a,this.canvas=r,this.width=l,this.height=h,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Zs,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...s){return e?(clearTimeout(i),i=setTimeout(t,e,s)):t.apply(this,s),e}}((t=>this.update(t)),o.resizeDelay||0),this._dataChanges=[],yn[this.id]=this,a&&r?(ki.listen(this,"complete",xn),ki.listen(this,"progress",bn),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:n}=this;return B(t)?e&&n?n:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Ks}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ri(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return le(this.canvas,this.ctx),this}stop(){return ki.stop(this),this}resize(t,e){ki.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,s=this.canvas,n=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,e,n),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,ri(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),Y(i.onResize,[this,o],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){U(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let n=[];e&&(n=n.concat(Object.keys(e).map((t=>{const i=e[t],s=en(t,i),n="r"===s,o="x"===s;return{options:i,dposition:n?"chartArea":o?"bottom":"left",dtype:n?"radialLinear":o?"category":"linear"}})))),U(n,(e=>{const n=e.options,o=n.id,a=en(o,n),r=N(n.type,e.dtype);void 0!==n.position&&pn(n.position,a)===pn(e.dposition)||(n.position=e.dposition),s[o]=!0;let h=null;if(o in i&&i[o].type===r)h=i[o];else{h=new(Ks.getScale(r))({id:o,type:r,ctx:this.ctx,chart:this}),i[h.id]=h}h.init(n,t)})),U(s,((t,e)=>{t||delete i[e]})),U(i,(t=>{_s.configure(this,t,t.options),_s.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(mn("z","_idx"));const{_active:a,_lastEvent:r}=this;r?this._eventHandler(r,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){U(this.scales,(t=>{_s.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);ot(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:n}of e){wn(t,s,"_removeElements"===i?-n:n)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),s=i(0);for(let t=1;tt.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;_s.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],U(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,s=!i.disabled,n=function(t,e){const{xScale:i,yScale:s}=t;return i&&s?{left:Mn(i,e,"left"),right:Mn(i,e,"right"),top:Mn(s,e,"top"),bottom:Mn(s,e,"bottom")}:e}(t,this.chartArea),o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(s&&fe(e,{left:!1===i.left?0:n.left-i.left,right:!1===i.right?this.width:n.right+i.right,top:!1===i.top?0:n.top-i.top,bottom:!1===i.bottom?this.height:n.bottom+i.bottom}),t.controller.draw(),s&&ge(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return ue(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const n=as.modes[e];return"function"==typeof n?n(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter((t=>t&&t._dataset===e)).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Oe(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",n=this.getDatasetMeta(t),o=n.controller._resolveAnimations(void 0,s);st(e)?(n.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(n,{visible:i}),this.update((e=>e.datasetIndex===t?s:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ki.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,s),t[i]=s},s=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};U(this.options.events,(t=>i(t,s)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(i,s)=>{t[i]&&(e.removeEventListener(this,i,s),delete t[i])},n=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",n),i("detach",o)};o=()=>{this.attached=!1,s("resize",n),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){U(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},U(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let n,o,a,r;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+s+"DatasetHoverStyle"]()),a=0,r=t.length;a{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!X(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,i){const s=this.options.hover,n=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=n(e,t),a=i?t:n(t,e);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;const n=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(n||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:n}=this,o=e,a=this._getActiveElements(t,s,i,o),r=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),h=function(t,e,i,s){return i&&"mouseout"!==t.type?s?e:t:null}(t,this._lastEvent,i,r);i&&(this._lastEvent=null,Y(n.onHover,[t,a,this],this),r&&Y(n.onClick,[t,a,this],this));const l=!X(a,s);return(l||e)&&(this._active=a,this._updateHoverStyles(a,s,e)),this._lastEvent=h,l}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,s)}}function Sn(){return U(kn.instances,(t=>t._plugins.invalidate()))}function Pn(t,e,i,s){const n=ke(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,a=Math.min(o,s*e/2),r=t=>{const e=(i-Math.min(o,t))*s/2;return Ct(t,0,Math.min(o,e))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:Ct(n.innerStart,0,a),innerEnd:Ct(n.innerEnd,0,a)}}function Dn(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function Cn(t,e,i,s,n,o){const{x:a,y:r,startAngle:h,pixelMargin:l,innerRadius:c}=e,d=Math.max(e.outerRadius+s+i-l,0),u=c>0?c+s+i+l:0;let f=0;const g=n-h;if(s){const t=((c>0?c-s:0)+(d>0?d-s:0))/2;f=(g-(0!==t?g*t/(t+s):g))/2}const p=(g-Math.max(.001,g*d-i/at)/d)/2,m=h+p+f,x=n-p-f,{outerStart:b,outerEnd:_,innerStart:y,innerEnd:v}=Pn(e,u,d,x-m),w=d-b,M=d-_,k=m+b/w,S=x-_/M,P=u+y,D=u+v,C=m+y/P,A=x-v/D;if(t.beginPath(),o){const e=(k+S)/2;if(t.arc(a,r,d,k,e),t.arc(a,r,d,e,S),_>0){const e=Dn(M,S,a,r);t.arc(e.x,e.y,_,S,x+dt)}const i=Dn(D,x,a,r);if(t.lineTo(i.x,i.y),v>0){const e=Dn(D,A,a,r);t.arc(e.x,e.y,v,x+dt,A+Math.PI)}const s=(x-v/u+(m+y/u))/2;if(t.arc(a,r,u,x-v/u,s,!0),t.arc(a,r,u,s,m+y/u,!0),y>0){const e=Dn(P,C,a,r);t.arc(e.x,e.y,y,C+Math.PI,m-dt)}const n=Dn(w,m,a,r);if(t.lineTo(n.x,n.y),b>0){const e=Dn(w,k,a,r);t.arc(e.x,e.y,b,m-dt,k)}}else{t.moveTo(a,r);const e=Math.cos(k)*d+a,i=Math.sin(k)*d+r;t.lineTo(e,i);const s=Math.cos(S)*d+a,n=Math.sin(S)*d+r;t.lineTo(s,n)}t.closePath()}function An(t,e,i,s,n){const{fullCircles:o,startAngle:a,circumference:r,options:h}=e,{borderWidth:l,borderJoinStyle:c,borderDash:d,borderDashOffset:u}=h,f="inner"===h.borderAlign;if(!l)return;t.setLineDash(d||[]),t.lineDashOffset=u,f?(t.lineWidth=2*l,t.lineJoin=c||"round"):(t.lineWidth=l,t.lineJoin=c||"bevel");let g=e.endAngle;if(o){Cn(t,e,i,s,g,n);for(let e=0;en?(l=n/h,t.arc(o,a,h,i+l,s-l,!0)):t.arc(o,a,n,i+dt,s-dt),t.closePath(),t.clip()}(t,e,g),o||(Cn(t,e,i,s,g,n),t.stroke())}class On extends zs{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.getProps(["x","y"],i),{angle:n,distance:o}=Mt(s,{x:t,y:e}),{startAngle:a,endAngle:r,innerRadius:h,outerRadius:l,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=(this.options.spacing+this.options.borderWidth)/2,u=N(c,r-a),f=Dt(n,a,r)&&a!==r,g=u>=rt||f,p=At(o,h+d,l+d);return g&&p}getCenterPoint(t){const{x:e,y:i,startAngle:s,endAngle:n,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:r,spacing:h}=this.options,l=(s+n)/2,c=(o+a+h+r)/2;return{x:e+Math.cos(l)*c,y:i+Math.sin(l)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,s=(e.offset||0)/4,n=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>rt?Math.floor(i/rt):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*s,Math.sin(a)*s);const r=s*(1-Math.sin(Math.min(at,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,s,n){const{fullCircles:o,startAngle:a,circumference:r}=e;let h=e.endAngle;if(o){Cn(t,e,i,s,h,n);for(let e=0;er&&o>r;return{count:s,start:h,loop:e.loop,ilen:l(a+(l?r-t:t))%o,_=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(h&&(d=n[b(0)],t.moveTo(d.x,d.y)),c=0;c<=r;++c){if(d=n[b(c)],d.skip)continue;const e=d.x,i=d.y,s=0|e;s===u?(ig&&(g=i),m=(x*m+e)/++x):(_(),t.lineTo(e,i),u=s,x=0,f=g=i),p=i}_()}function zn(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?Ln:In}const Fn="function"==typeof Path2D;function Bn(t,e,i,s){Fn&&!e.options.segment?function(t,e,i,s){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,s)&&n.closePath()),Tn(t,e.options),t.stroke(n)}(t,e,i,s):function(t,e,i,s){const{segments:n,options:o}=e,a=zn(e);for(const r of n)Tn(t,o,r.style),t.beginPath(),a(t,e,r,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}(t,e,i,s)}class Wn extends zs{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;Ge(this._points,i,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,s=t.options.spanGaps,n=i.length;if(!n)return[];const o=!!t._loop,{start:a,end:r}=function(t,e,i,s){let n=0,o=e-1;if(i&&!s)for(;nn&&t[o%e].skip;)o--;return o%=e,{start:n,end:o}}(i,n,o,s);return yi(t,!0===s?[{start:a,end:r,loop:o}]:function(t,e,i,s){const n=t.length,o=[];let a,r=e,h=t[e];for(a=e+1;a<=i;++a){const i=t[a%n];i.skip||i.stop?h.skip||(s=!1,o.push({start:e%n,end:(a-1)%n,loop:s}),e=r=i.stop?a:null):(r=a,h.skip&&(e=a)),h=i}return null!==r&&o.push({start:e%n,end:r%n,loop:s}),o}(i,a,rt.replace("rgb(","rgba(").replace(")",", 0.5)")));function Gn(t){return Kn[t%Kn.length]}function Jn(t){return Zn[t%Zn.length]}function Qn(t){let e=0;return(i,s)=>{const n=t.getDatasetMeta(s).controller;n instanceof Zi?e=function(t,e){return t.backgroundColor=t.data.map((()=>Gn(e++))),e}(i,e):n instanceof Ji?e=function(t,e){return t.backgroundColor=t.data.map((()=>Jn(e++))),e}(i,e):n&&(e=function(t,e){return t.borderColor=Gn(e),t.backgroundColor=Jn(e),++e}(i,e))}}function to(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var eo={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(!i.enabled)return;const{data:{datasets:s},options:n}=t.config,{elements:o}=n,a=to(s)||(r=n)&&(r.borderColor||r.backgroundColor)||o&&to(o)||"rgba(0,0,0,0.1)"!==ae.borderColor||"rgba(0,0,0,0.1)"!==ae.backgroundColor;var r;if(!i.forceOverride&&a)return;const h=Qn(t);s.forEach(h)}};const io=(t,e)=>{let{boxHeight:i=e,boxWidth:s=e}=t;return t.usePointStyle&&(i=Math.min(i,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:i,itemHeight:Math.max(e,i)}};class so extends zs{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=Y(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,s=Ce(i.font),n=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:r}=io(i,n);let h,l;e.font=s.string,this.isHorizontal()?(h=this.maxWidth,l=this._fitRows(o,n,a,r)+10):(l=this.maxHeight,h=this._fitCols(o,s,a,r)+10),this.width=Math.min(h,t.maxWidth||this.maxWidth),this.height=Math.min(l,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){const{ctx:n,maxWidth:o,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],h=this.lineWidths=[0],l=s+a;let c=t;n.textAlign="left",n.textBaseline="middle";let d=-1,u=-l;return this.legendItems.forEach(((t,f)=>{const g=i+e/2+n.measureText(t.text).width;(0===f||h[h.length-1]+g+2*a>o)&&(c+=l,h[h.length-(f>0?0:1)]=0,u+=l,d++),r[f]={left:0,top:u,row:d,width:g,height:s},h[h.length-1]+=g+a})),c}_fitCols(t,e,i,s){const{ctx:n,maxHeight:o,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],h=this.columnSizes=[],l=o-t;let c=a,d=0,u=0,f=0,g=0;return this.legendItems.forEach(((t,o)=>{const{itemWidth:p,itemHeight:m}=function(t,e,i,s,n){const o=function(t,e,i,s){let n=t.text;n&&"string"!=typeof n&&(n=n.reduce(((t,e)=>t.length>e.length?t:e)));return e+i.size/2+s.measureText(n).width}(s,t,e,i),a=function(t,e,i){let s=t;"string"!=typeof e.text&&(s=no(e,i));return s}(n,s,e.lineHeight);return{itemWidth:o,itemHeight:a}}(i,e,n,t,s);o>0&&u+m+2*a>l&&(c+=d+a,h.push({width:d,height:u}),f+=d+a,g++,d=u=0),r[o]={left:f,top:u,col:g,width:p,height:m},d=Math.max(d,p),u+=m+a})),c+=d,h.push({width:d,height:u}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:n}}=this,o=fi(n,this.left,this.width);if(this.isHorizontal()){let n=0,a=Wt(i,this.left+s,this.right-this.lineWidths[n]);for(const r of e)n!==r.row&&(n=r.row,a=Wt(i,this.left+s,this.right-this.lineWidths[n])),r.top+=this.top+t+s,r.left=o.leftForLtr(o.x(a),r.width),a+=r.width+s}else{let n=0,a=Wt(i,this.top+t+s,this.bottom-this.columnSizes[n].height);for(const r of e)r.col!==n&&(n=r.col,a=Wt(i,this.top+t+s,this.bottom-this.columnSizes[n].height)),r.top=a,r.left+=this.left+s,r.left=o.leftForLtr(o.x(r.left),r.width),a+=r.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;fe(t,this),this._draw(),ge(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:n,labels:o}=t,a=ae.color,r=fi(t.rtl,this.left,this.width),h=Ce(o.font),{padding:l}=o,c=h.size,d=c/2;let u;this.drawTitle(),s.textAlign=r.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=h.string;const{boxWidth:f,boxHeight:g,itemHeight:p}=io(o,c),m=this.isHorizontal(),x=this._computeTitleHeight();u=m?{x:Wt(n,this.left+l,this.right-i[0]),y:this.top+l+x,line:0}:{x:this.left+l,y:Wt(n,this.top+x+l,this.bottom-e[0].height),line:0},gi(this.ctx,t.textDirection);const b=p+l;this.legendItems.forEach(((_,y)=>{s.strokeStyle=_.fontColor,s.fillStyle=_.fontColor;const v=s.measureText(_.text).width,w=r.textAlign(_.textAlign||(_.textAlign=o.textAlign)),M=f+d+v;let k=u.x,S=u.y;r.setWidth(this.width),m?y>0&&k+M+l>this.right&&(S=u.y+=b,u.line++,k=u.x=Wt(n,this.left+l,this.right-i[u.line])):y>0&&S+b>this.bottom&&(k=u.x=k+e[u.line].width+l,u.line++,S=u.y=Wt(n,this.top+x+l,this.bottom-e[u.line].height));if(function(t,e,i){if(isNaN(f)||f<=0||isNaN(g)||g<0)return;s.save();const n=N(i.lineWidth,1);if(s.fillStyle=N(i.fillStyle,a),s.lineCap=N(i.lineCap,"butt"),s.lineDashOffset=N(i.lineDashOffset,0),s.lineJoin=N(i.lineJoin,"miter"),s.lineWidth=n,s.strokeStyle=N(i.strokeStyle,a),s.setLineDash(N(i.lineDash,[])),o.usePointStyle){const a={radius:g*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},h=r.xPlus(t,f/2);de(s,a,h,e+d,o.pointStyleWidth&&f)}else{const o=e+Math.max((c-g)/2,0),a=r.leftForLtr(t,f),h=Pe(i.borderRadius);s.beginPath(),Object.values(h).some((t=>0!==t))?ye(s,{x:a,y:o,w:f,h:g,radius:h}):s.rect(a,o,f,g),s.fill(),0!==n&&s.stroke()}s.restore()}(r.x(k),S,_),k=((t,e,i,s)=>t===(s?"left":"right")?i:"center"===t?(e+i)/2:e)(w,k+f+d,m?k+M:this.right,t.rtl),function(t,e,i){_e(s,i.text,t,e+p/2,h,{strikethrough:i.hidden,textAlign:r.textAlign(i.textAlign)})}(r.x(k),S,_),m)u.x+=M+l;else if("string"!=typeof _.text){const t=h.lineHeight;u.y+=no(_,t)+l}else u.y+=b})),pi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=Ce(e.font),s=De(e.padding);if(!e.display)return;const n=fi(t.rtl,this.left,this.width),o=this.ctx,a=e.position,r=i.size/2,h=s.top+r;let l,c=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),l=this.top+h,c=Wt(t.align,c,this.right-d);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);l=h+Wt(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=Wt(a,c,c+d);o.textAlign=n.textAlign(Bt(a)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,_e(o,e.text,u,l,i)}_computeTitleHeight(){const t=this.options.title,e=Ce(t.font),i=De(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,n;if(At(t,this.left,this.right)&&At(e,this.top,this.bottom))for(n=this.legendHitBoxes,i=0;it.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:s,textAlign:n,color:o,useBorderRadius:a,borderRadius:r}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const h=t.controller.getStyle(i?0:void 0),l=De(h.borderWidth);return{text:e[t.index].label,fillStyle:h.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:h.borderCapStyle,lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:h.borderColor,pointStyle:s||h.pointStyle,rotation:h.rotation,textAlign:n||h.textAlign,borderRadius:a&&(r||h.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class ao extends zs{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const s=W(i.text)?i.text.length:1;this._padding=De(i.padding);const n=s*Ce(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=n:this.width=n}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:s,right:n,options:o}=this,a=o.align;let r,h,l,c=0;return this.isHorizontal()?(h=Wt(a,i,n),l=e+t,r=n-i):("left"===o.position?(h=i+t,l=Wt(a,s,e),c=-.5*at):(h=n-t,l=Wt(a,e,s),c=.5*at),r=s-e),{titleX:h,titleY:l,maxWidth:r,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=Ce(e.font),s=i.lineHeight/2+this._padding.top,{titleX:n,titleY:o,maxWidth:a,rotation:r}=this._drawArgs(s);_e(t,e.text,0,0,i,{color:e.color,maxWidth:a,rotation:r,textAlign:Bt(e.align),textBaseline:"middle",translation:[n,o]})}}var ro={id:"title",_element:ao,start(t,e,i){!function(t,e){const i=new ao({ctx:t.ctx,options:e,chart:t});_s.configure(t,i,e),_s.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;_s.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const s=t.titleBlock;_s.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};new WeakMap;const ho={average(t){if(!t.length)return!1;let e,i,s=new Set,n=0,o=0;for(e=0,i=t.length;et+e))/s.size,y:n/o}},nearest(t,e){if(!t.length)return!1;let i,s,n,o=e.x,a=e.y,r=Number.POSITIVE_INFINITY;for(i=0,s=t.length;i-1?t.split("\n"):t}function uo(t,e){const{element:i,datasetIndex:s,index:n}=e,o=t.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:t,label:a,parsed:o.getParsed(n),raw:t.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:i}}function fo(t,e){const i=t.chart.ctx,{body:s,footer:n,title:o}=t,{boxWidth:a,boxHeight:r}=e,h=Ce(e.bodyFont),l=Ce(e.titleFont),c=Ce(e.footerFont),d=o.length,u=n.length,f=s.length,g=De(e.padding);let p=g.height,m=0,x=s.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(x+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*l.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),x){p+=f*(e.displayColors?Math.max(r,h.lineHeight):h.lineHeight)+(x-f)*h.lineHeight+(x-1)*e.bodySpacing}u&&(p+=e.footerMarginTop+u*c.lineHeight+(u-1)*e.footerSpacing);let b=0;const _=function(t){m=Math.max(m,i.measureText(t).width+b)};return i.save(),i.font=l.string,U(t.title,_),i.font=h.string,U(t.beforeBody.concat(t.afterBody),_),b=e.displayColors?a+2+e.boxPadding:0,U(s,(t=>{U(t.before,_),U(t.lines,_),U(t.after,_)})),b=0,i.font=c.string,U(t.footer,_),i.restore(),m+=g.width,{width:m,height:p}}function go(t,e,i,s){const{x:n,width:o}=i,{width:a,chartArea:{left:r,right:h}}=t;let l="center";return"center"===s?l=n<=(r+h)/2?"left":"right":n<=o/2?l="left":n>=a-o/2&&(l="right"),function(t,e,i,s){const{x:n,width:o}=s,a=i.caretSize+i.caretPadding;return"left"===t&&n+o+a>e.width||"right"===t&&n-o-a<0||void 0}(l,t,e,i)&&(l="center"),l}function po(t,e,i){const s=i.yAlign||e.yAlign||function(t,e){const{y:i,height:s}=e;return it.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||go(t,e,i,s),yAlign:s}}function mo(t,e,i,s){const{caretSize:n,caretPadding:o,cornerRadius:a}=t,{xAlign:r,yAlign:h}=i,l=n+o,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:f}=Pe(a);let g=function(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}(e,r);const p=function(t,e,i){let{y:s,height:n}=t;return"top"===e?s+=i:s-="bottom"===e?n+i:n/2,s}(e,h,l);return"center"===h?"left"===r?g+=l:"right"===r&&(g-=l):"left"===r?g-=Math.max(c,u)+n:"right"===r&&(g+=Math.max(d,f)+n),{x:Ct(g,0,s.width-e.width),y:Ct(p,0,s.height-e.height)}}function xo(t,e,i){const s=De(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-s.right:t.x+s.left}function bo(t){return lo([],co(t))}function _o(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const yo={beforeTitle:z,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex{const e={before:[],lines:[],after:[]},n=_o(i,t);lo(e.before,co(vo(n,"beforeLabel",this,t))),lo(e.lines,vo(n,"label",this,t)),lo(e.after,co(vo(n,"afterLabel",this,t))),s.push(e)})),s}getAfterBody(t,e){return bo(vo(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,s=vo(i,"beforeFooter",this,t),n=vo(i,"footer",this,t),o=vo(i,"afterFooter",this,t);let a=[];return a=lo(a,co(s)),a=lo(a,co(n)),a=lo(a,co(o)),a}_createItems(t){const e=this._active,i=this.chart.data,s=[],n=[],o=[];let a,r,h=[];for(a=0,r=e.length;at.filter(e,s,n,i)))),t.itemSort&&(h=h.sort(((e,s)=>t.itemSort(e,s,i)))),U(h,(e=>{const i=_o(t.callbacks,e);s.push(vo(i,"labelColor",this,e)),n.push(vo(i,"labelPointStyle",this,e)),o.push(vo(i,"labelTextColor",this,e))})),this.labelColors=s,this.labelPointStyles=n,this.labelTextColors=o,this.dataPoints=h,h}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let n,o=[];if(s.length){const t=ho[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=fo(this,i),a=Object.assign({},t,e),r=po(this.chart,i,a),h=mo(i,a,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,n={opacity:1,x:h.x,y:h.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=o,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const n=this.getCaretPosition(t,i,s);e.lineTo(n.x1,n.y1),e.lineTo(n.x2,n.y2),e.lineTo(n.x3,n.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:n}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:r,topRight:h,bottomLeft:l,bottomRight:c}=Pe(a),{x:d,y:u}=t,{width:f,height:g}=e;let p,m,x,b,_,y;return"center"===n?(_=u+g/2,"left"===s?(p=d,m=p-o,b=_+o,y=_-o):(p=d+f,m=p+o,b=_-o,y=_+o),x=p):(m="left"===s?d+Math.max(r,l)+o:"right"===s?d+f-Math.max(h,c)-o:this.caretX,"top"===n?(b=u,_=b-o,p=m-o,x=m+o):(b=u+g,_=b+o,p=m+o,x=m-o),y=b),{x1:p,x2:m,x3:x,y1:b,y2:_,y3:y}}drawTitle(t,e,i){const s=this.title,n=s.length;let o,a,r;if(n){const h=fi(i.rtl,this.x,this.width);for(t.x=xo(this,i.titleAlign,i),e.textAlign=h.textAlign(i.titleAlign),e.textBaseline="middle",o=Ce(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,r=0;r0!==t))?(t.beginPath(),t.fillStyle=n.multiKeyBackground,ye(t,{x:e,y:f,w:h,h:r,radius:a}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),ye(t,{x:i,y:f+1,w:h-2,h:r-2,radius:a}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(e,f,h,r),t.strokeRect(e,f,h,r),t.fillStyle=o.backgroundColor,t.fillRect(i,f+1,h-2,r-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:n,bodyAlign:o,displayColors:a,boxHeight:r,boxWidth:h,boxPadding:l}=i,c=Ce(i.bodyFont);let d=c.lineHeight,u=0;const f=fi(i.rtl,this.x,this.width),g=function(i){e.fillText(i,f.x(t.x+u),t.y+d/2),t.y+=d+n},p=f.textAlign(o);let m,x,b,_,y,v,w;for(e.textAlign=o,e.textBaseline="middle",e.font=c.string,t.x=xo(this,p,i),e.fillStyle=i.bodyColor,U(this.beforeBody,g),u=a&&"right"!==p?"center"===o?h/2+l:h+2+l:0,_=0,v=s.length;_0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,n=i&&i.y;if(s||n){const i=ho[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=fo(this,t),a=Object.assign({},i,this._size),r=po(e,t,a),h=mo(t,a,r,e);s._to===h.x&&n._to===h.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},n={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=De(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(n,t,s,e),gi(t,e.textDirection),n.y+=o.top,this.drawTitle(n,t,e),this.drawBody(n,t,e),this.drawFooter(n,t,e),pi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),n=!X(i,s),o=this._positionChanged(s,e);(n||o)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,n=this._active||[],o=this._getActiveElements(t,n,e,i),a=this._positionChanged(o,t),r=e||!X(o,n)||a;return r&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,i,s){const n=this.options;if("mouseout"===t.type)return[];if(!s)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const o=this.chart.getElementsAtEventForMode(t,n.mode,n,i);return n.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:s,options:n}=this,o=ho[n.position].call(this,t,e);return!1!==o&&(i!==o.x||s!==o.y)}}var Mo={id:"tooltip",_element:wo,positioners:ho,afterInit(t,e,i){i&&(t.tooltip=new wo({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:yo},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function ko(t,e,i,s){const n=t.indexOf(e);if(-1===n)return((t,e,i,s)=>("string"==typeof e?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,s);return n!==t.lastIndexOf(e)?i:n}function So(t){const e=this.getLabels();return t>=0&&tnull===t?null:Ct(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:ko(i,t,N(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,s=[];let n=this.getLabels();n=0===t&&e===n.length-1?n:n.slice(t,e+1),this._valueRange=Math.max(n.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)s.push({value:i});return s}getLabelForValue(t){return So.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Do(t,e){const i=[],{bounds:s,step:n,min:o,max:a,precision:r,count:h,maxTicks:l,maxDigits:c,includeBounds:d}=t,u=n||1,f=l-1,{min:g,max:p}=e,m=!B(o),x=!B(a),b=!B(h),_=(p-g)/(c+1);let y,v,w,M,k=xt((p-g)/f/u)*u;if(k<1e-14&&!m&&!x)return[{value:g},{value:p}];M=Math.ceil(p/k)-Math.floor(g/k),M>f&&(k=xt(M*k/f/u)*u),B(r)||(y=Math.pow(10,r),k=Math.ceil(k*y)/y),"ticks"===s?(v=Math.floor(g/k)*k,w=Math.ceil(p/k)*k):(v=g,w=p),m&&x&&n&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((a-o)/n,k/1e3)?(M=Math.round(Math.min((a-o)/k,l)),k=(a-o)/M,v=o,w=a):b?(v=m?o:v,w=x?a:w,M=h-1,k=(w-v)/M):(M=(w-v)/k,M=mt(M,Math.round(M),k/1e3)?Math.round(M):Math.ceil(M));const S=Math.max(wt(k),wt(v));y=Math.pow(10,B(r)?S:r),v=Math.round(v*y)/y,w=Math.round(w*y)/y;let P=0;for(m&&(d&&v!==o?(i.push({value:o}),va)break;i.push({value:t})}return x&&d&&w!==a?i.length&&mt(i[i.length-1].value,a,Co(a,_,t))?i[i.length-1].value=a:i.push({value:a}):x&&w!==a||i.push({value:w}),i}function Co(t,e,{horizontal:i,minRotation:s}){const n=yt(s),o=(i?Math.sin(n):Math.cos(n))||.001,a=.75*e*(""+t).length;return Math.min(e/o,a)}class Ao extends Us{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return B(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:s,max:n}=this;const o=t=>s=e?s:t,a=t=>n=i?n:t;if(t){const t=pt(s),e=pt(n);t<0&&e<0?a(0):t>0&&e>0&&o(0)}if(s===n){let e=0===n?1:Math.abs(.05*n);a(n+e),t||o(s-e)}this.min=s,this.max=n}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:s}=t;return s?(e=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s=Do({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&_t(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Jt(t,this.chart.options.locale,this.options.ticks.format)}}class Oo extends Ao{static id="linear";static defaults={ticks:{callback:te.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=V(t)?t:0,this.max=V(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=yt(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,n.lineHeight/s))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}te.formatters.logarithmic;te.formatters.numeric;kn.register(On,Wn,qn,Vn,Ki,Zi,Gi,Qi,Po,Oo,oo,ro,Mo,eo),i.g.Chart=kn}},function(t){var e;e=5579,t(t.s=e)}]); \ No newline at end of file diff --git a/public/build/dashboard.632f98fb.js b/public/build/dashboard.632f98fb.js new file mode 100644 index 00000000..8c7e43b9 --- /dev/null +++ b/public/build/dashboard.632f98fb.js @@ -0,0 +1,2 @@ +/*! For license information please see dashboard.632f98fb.js.LICENSE.txt */ +"use strict";(self.webpackChunkkimai=self.webpackChunkkimai||[]).push([[945],{6839:function(e,t,i){var s=i(3668);i(8692),i(241),i.g.GridStack=s.GridStack},5037:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DDBaseImplement=void 0;t.DDBaseImplement=class{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(e,t){this._eventRegister[e]=t}off(e){delete this._eventRegister[e]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(e,t){if(!this.disabled&&this._eventRegister&&this._eventRegister[e])return this._eventRegister[e](t)}}},6060:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DDDraggable=void 0;const s=i(1432),o=i(1661),n=i(5037),r=i(1120);class l extends n.DDBaseImplement{constructor(e,t={}){super(),this.el=e,this.option=t;let i=t.handle.substring(1);this.dragEl=e.classList.contains(i)?e:e.querySelector(t.handle)||e,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this.enable()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){!1!==this.disabled&&(super.enable(),this.dragEl.addEventListener("mousedown",this._mouseDown),r.isTouch&&(this.dragEl.addEventListener("touchstart",r.touchstart),this.dragEl.addEventListener("pointerdown",r.pointerdown)),this.el.classList.remove("ui-draggable-disabled"),this.el.classList.add("ui-draggable"))}disable(e=!1){!0!==this.disabled&&(super.disable(),this.dragEl.removeEventListener("mousedown",this._mouseDown),r.isTouch&&(this.dragEl.removeEventListener("touchstart",r.touchstart),this.dragEl.removeEventListener("pointerdown",r.pointerdown)),this.el.classList.remove("ui-draggable"),e||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.dragging&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.helper,delete this.option,super.destroy()}updateOption(e){return Object.keys(e).forEach((t=>this.option[t]=e[t])),this}_mouseDown(e){if(s.DDManager.mouseHandled)return;if(0!==e.button)return!0;const t=e.target.nodeName.toLowerCase();return["input","textarea","button","select","option"].find((e=>e===t))||e.target.closest('[contenteditable="true"]')||(this.mouseDownEvent=e,delete this.dragging,delete s.DDManager.dragElement,delete s.DDManager.dropElement,document.addEventListener("mousemove",this._mouseMove,!0),document.addEventListener("mouseup",this._mouseUp,!0),r.isTouch&&(this.dragEl.addEventListener("touchmove",r.touchmove),this.dragEl.addEventListener("touchend",r.touchend)),e.preventDefault(),document.activeElement&&document.activeElement.blur(),s.DDManager.mouseHandled=!0),!0}_callDrag(e){if(!this.dragging)return;const t=o.Utils.initEvent(e,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(t,this.ui()),this.triggerEvent("drag",t)}_mouseMove(e){var t;let i=this.mouseDownEvent;if(this.dragging)if(this._dragFollow(e),s.DDManager.pauseDrag){const t=Number.isInteger(s.DDManager.pauseDrag)?s.DDManager.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout((()=>this._callDrag(e)),t)}else this._callDrag(e);else if(Math.abs(e.x-i.x)+Math.abs(e.y-i.y)>3){this.dragging=!0,s.DDManager.dragElement=this;let i=null===(t=this.el.gridstackNode)||void 0===t?void 0:t.grid;i?s.DDManager.dropElement=i.el.ddElement.ddDroppable:delete s.DDManager.dropElement,this.helper=this._createHelper(e),this._setupHelperContainmentStyle(),this.dragOffset=this._getDragOffset(e,this.el,this.helperContainment);const n=o.Utils.initEvent(e,{target:this.el,type:"dragstart"});this._setupHelperStyle(e),this.option.start&&this.option.start(n,this.ui()),this.triggerEvent("dragstart",n)}return e.preventDefault(),!0}_mouseUp(e){var t;if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),r.isTouch&&(this.dragEl.removeEventListener("touchmove",r.touchmove,!0),this.dragEl.removeEventListener("touchend",r.touchend,!0)),this.dragging){delete this.dragging,(null===(t=s.DDManager.dropElement)||void 0===t?void 0:t.el)===this.el.parentElement&&delete s.DDManager.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper===this.el?this._removeHelperStyle():this.helper.remove();const i=o.Utils.initEvent(e,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(i),this.triggerEvent("dragstop",i),s.DDManager.dropElement&&s.DDManager.dropElement.drop(e)}delete this.helper,delete this.mouseDownEvent,delete s.DDManager.dragElement,delete s.DDManager.dropElement,delete s.DDManager.mouseHandled,e.preventDefault()}_createHelper(e){let t=this.el;return"function"==typeof this.option.helper?t=this.option.helper(e):"clone"===this.option.helper&&(t=o.Utils.cloneNode(this.el)),document.body.contains(t)||o.Utils.appendTo(t,"parent"===this.option.appendTo?this.el.parentNode:this.option.appendTo),t===this.el&&(this.dragElementOriginStyle=l.originStyleProp.map((e=>this.el.style[e]))),t}_setupHelperStyle(e){this.helper.classList.add("ui-draggable-dragging");const t=this.helper.style;return t.pointerEvents="none",t["min-width"]=0,t.width=this.dragOffset.width+"px",t.height=this.dragOffset.height+"px",t.willChange="left, top",t.position="fixed",this._dragFollow(e),t.transition="none",setTimeout((()=>{this.helper&&(t.transition=null)}),0),this}_removeHelperStyle(){var e;this.helper.classList.remove("ui-draggable-dragging");let t=null===(e=this.helper)||void 0===e?void 0:e.gridstackNode;if(!(null==t?void 0:t._isAboutToRemove)&&this.dragElementOriginStyle){let e=this.helper,t=this.dragElementOriginStyle.transition||null;e.style.transition=this.dragElementOriginStyle.transition="none",l.originStyleProp.forEach((t=>e.style[t]=this.dragElementOriginStyle[t]||null)),setTimeout((()=>e.style.transition=t),50)}return delete this.dragElementOriginStyle,this}_dragFollow(e){let t=0,i=0;const s=this.helper.style,o=this.dragOffset;s.left=e.clientX+o.offsetLeft-t+"px",s.top=e.clientY+o.offsetTop-i+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,"fixed"!==this.helper.style.position&&(this.parentOriginStylePosition=this.helperContainment.style.position,window.getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(e,t,i){let s=0,n=0;if(i){const e=document.createElement("div");o.Utils.addElStyles(e,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),i.appendChild(e);const t=e.getBoundingClientRect();i.removeChild(e),s=t.left,n=t.top}const r=t.getBoundingClientRect();return{left:r.left,top:r.top,offsetLeft:-e.clientX+r.left-s,offsetTop:-e.clientY+r.top-n,width:r.width,height:r.height}}ui(){const e=this.el.parentElement.getBoundingClientRect(),t=this.helper.getBoundingClientRect();return{position:{top:t.top-e.top,left:t.left-e.left}}}}t.DDDraggable=l,l.originStyleProp=["transition","pointerEvents","position","left","top","minWidth","willChange"]},7540:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DDDroppable=void 0;const s=i(1432),o=i(5037),n=i(1661),r=i(1120);class l extends o.DDBaseImplement{constructor(e,t={}){super(),this.el=e,this.option=t,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){!1!==this.disabled&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),r.isTouch&&(this.el.addEventListener("pointerenter",r.pointerenter),this.el.addEventListener("pointerleave",r.pointerleave)))}disable(e=!1){!0!==this.disabled&&(super.disable(),this.el.classList.remove("ui-droppable"),e||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),r.isTouch&&(this.el.removeEventListener("pointerenter",r.pointerenter),this.el.removeEventListener("pointerleave",r.pointerleave)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(e){return Object.keys(e).forEach((t=>this.option[t]=e[t])),this._setupAccept(),this}_mouseEnter(e){if(!s.DDManager.dragElement)return;if(!this._canDrop(s.DDManager.dragElement.el))return;e.preventDefault(),e.stopPropagation(),s.DDManager.dropElement&&s.DDManager.dropElement!==this&&s.DDManager.dropElement._mouseLeave(e),s.DDManager.dropElement=this;const t=n.Utils.initEvent(e,{target:this.el,type:"dropover"});this.option.over&&this.option.over(t,this._ui(s.DDManager.dragElement)),this.triggerEvent("dropover",t),this.el.classList.add("ui-droppable-over")}_mouseLeave(e){var t;if(!s.DDManager.dragElement||s.DDManager.dropElement!==this)return;e.preventDefault(),e.stopPropagation();const i=n.Utils.initEvent(e,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(i,this._ui(s.DDManager.dragElement)),this.triggerEvent("dropout",i),s.DDManager.dropElement===this){let i;delete s.DDManager.dropElement;let o=this.el.parentElement;for(;!i&&o;)i=null===(t=o.ddElement)||void 0===t?void 0:t.ddDroppable,o=o.parentElement;i&&i._mouseEnter(e)}}drop(e){e.preventDefault();const t=n.Utils.initEvent(e,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(t,this._ui(s.DDManager.dragElement)),this.triggerEvent("drop",t)}_canDrop(e){return e&&(!this.accept||this.accept(e))}_setupAccept(){return this.option.accept?("string"==typeof this.option.accept?this.accept=e=>e.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(e){return Object.assign({draggable:e.el},e.ui())}}t.DDDroppable=l},51:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DDElement=void 0;const s=i(9354),o=i(6060),n=i(7540);class r{constructor(e){this.el=e}static init(e){return e.ddElement||(e.ddElement=new r(e)),e.ddElement}on(e,t){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(e)>-1?this.ddDraggable.on(e,t):this.ddDroppable&&["drop","dropover","dropout"].indexOf(e)>-1?this.ddDroppable.on(e,t):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(e)>-1&&this.ddResizable.on(e,t),this}off(e){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(e)>-1?this.ddDraggable.off(e):this.ddDroppable&&["drop","dropover","dropout"].indexOf(e)>-1?this.ddDroppable.off(e):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(e)>-1&&this.ddResizable.off(e),this}setupDraggable(e){return this.ddDraggable?this.ddDraggable.updateOption(e):this.ddDraggable=new o.DDDraggable(this.el,e),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(e){return this.ddResizable?this.ddResizable.updateOption(e):this.ddResizable=new s.DDResizable(this.el,e),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(e){return this.ddDroppable?this.ddDroppable.updateOption(e):this.ddDroppable=new n.DDDroppable(this.el,e),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}}t.DDElement=r},7939:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DDGridStack=void 0;const s=i(1661),o=i(1432),n=i(51);t.DDGridStack=class{resizable(e,t,i,s){return this._getDDElements(e).forEach((e=>{if("disable"===t||"enable"===t)e.ddResizable&&e.ddResizable[t]();else if("destroy"===t)e.ddResizable&&e.cleanResizable();else if("option"===t)e.setupResizable({[i]:s});else{const i=e.el.gridstackNode.grid;let s=e.el.getAttribute("gs-resize-handles")?e.el.getAttribute("gs-resize-handles"):i.opts.resizable.handles,o=!i.opts.alwaysShowResizeHandle;e.setupResizable(Object.assign(Object.assign(Object.assign({},i.opts.resizable),{handles:s,autoHide:o}),{start:t.start,stop:t.stop,resize:t.resize}))}})),this}draggable(e,t,i,s){return this._getDDElements(e).forEach((e=>{if("disable"===t||"enable"===t)e.ddDraggable&&e.ddDraggable[t]();else if("destroy"===t)e.ddDraggable&&e.cleanDraggable();else if("option"===t)e.setupDraggable({[i]:s});else{const i=e.el.gridstackNode.grid;e.setupDraggable(Object.assign(Object.assign({},i.opts.draggable),{start:t.start,stop:t.stop,drag:t.drag}))}})),this}dragIn(e,t){return this._getDDElements(e).forEach((e=>e.setupDraggable(t))),this}droppable(e,t,i,s){return"function"!=typeof t.accept||t._accept||(t._accept=t.accept,t.accept=e=>t._accept(e)),this._getDDElements(e).forEach((e=>{"disable"===t||"enable"===t?e.ddDroppable&&e.ddDroppable[t]():"destroy"===t?e.ddDroppable&&e.cleanDroppable():"option"===t?e.setupDroppable({[i]:s}):e.setupDroppable(t)})),this}isDroppable(e){return!(!(e&&e.ddElement&&e.ddElement.ddDroppable)||e.ddElement.ddDroppable.disabled)}isDraggable(e){return!(!(e&&e.ddElement&&e.ddElement.ddDraggable)||e.ddElement.ddDraggable.disabled)}isResizable(e){return!(!(e&&e.ddElement&&e.ddElement.ddResizable)||e.ddElement.ddResizable.disabled)}on(e,t,i){return this._getDDElements(e).forEach((e=>e.on(t,(e=>{i(e,o.DDManager.dragElement?o.DDManager.dragElement.el:e.target,o.DDManager.dragElement?o.DDManager.dragElement.helper:null)})))),this}off(e,t){return this._getDDElements(e).forEach((e=>e.off(t))),this}_getDDElements(e,t=!0){let i=s.Utils.getElements(e);if(!i.length)return[];let o=i.map((e=>e.ddElement||(t?n.DDElement.init(e):null)));return t||o.filter((e=>e)),o}}},1432:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DDManager=void 0;t.DDManager=class{}},9101:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DDResizableHandle=void 0;const s=i(1120);class o{constructor(e,t,i){this.moving=!1,this.host=e,this.dir=t,this.option=i,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._init()}_init(){const e=document.createElement("div");return e.classList.add("ui-resizable-handle"),e.classList.add(`${o.prefix}${this.dir}`),e.style.zIndex="100",e.style.userSelect="none",this.el=e,this.host.appendChild(this.el),this.el.addEventListener("mousedown",this._mouseDown),s.isTouch&&(this.el.addEventListener("touchstart",s.touchstart),this.el.addEventListener("pointerdown",s.pointerdown)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),s.isTouch&&(this.el.removeEventListener("touchstart",s.touchstart),this.el.removeEventListener("pointerdown",s.pointerdown)),this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(e){this.mouseDownEvent=e,document.addEventListener("mousemove",this._mouseMove,!0),document.addEventListener("mouseup",this._mouseUp,!0),s.isTouch&&(this.el.addEventListener("touchmove",s.touchmove),this.el.addEventListener("touchend",s.touchend)),e.stopPropagation(),e.preventDefault()}_mouseMove(e){let t=this.mouseDownEvent;this.moving?this._triggerEvent("move",e):Math.abs(e.x-t.x)+Math.abs(e.y-t.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",e)),e.stopPropagation(),e.preventDefault()}_mouseUp(e){this.moving&&this._triggerEvent("stop",e),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),s.isTouch&&(this.el.removeEventListener("touchmove",s.touchmove),this.el.removeEventListener("touchend",s.touchend)),delete this.moving,delete this.mouseDownEvent,e.stopPropagation(),e.preventDefault()}_triggerEvent(e,t){return this.option[e]&&this.option[e](t),this}}t.DDResizableHandle=o,o.prefix="ui-resizable-"},9354:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DDResizable=void 0;const s=i(9101),o=i(5037),n=i(1661),r=i(1432);class l extends o.DDBaseImplement{constructor(e,t={}){super(),this._ui=()=>{const e=this.el.parentElement.getBoundingClientRect(),t={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},i=this.temporalRect||t;return{position:{left:i.left-e.left,top:i.top-e.top},size:{width:i.width,height:i.height}}},this.el=e,this.option=t,this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){super.enable(),this.el.classList.add("ui-resizable"),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this.el.classList.remove("ui-resizable"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),this.el.classList.remove("ui-resizable"),delete this.el,super.destroy()}updateOption(e){let t=e.handles&&e.handles!==this.option.handles,i=e.autoHide&&e.autoHide!==this.option.autoHide;return Object.keys(e).forEach((t=>this.option[t]=e[t])),t&&(this._removeHandlers(),this._setupHandlers()),i&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(e){return e?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),r.DDManager.overResizeElement===this&&delete r.DDManager.overResizeElement),this}_mouseOver(e){r.DDManager.overResizeElement||r.DDManager.dragElement||(r.DDManager.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(e){r.DDManager.overResizeElement===this&&(delete r.DDManager.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){let e=this.option.handles||"e,s,se";return"all"===e&&(e="n,e,s,w,se,sw,ne,nw"),this.handlers=e.split(",").map((e=>e.trim())).map((e=>new s.DDResizableHandle(this.el,e,{start:e=>{this._resizeStart(e)},stop:e=>{this._resizeStop(e)},move:t=>{this._resizing(t,e)}}))),this}_resizeStart(e){this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=n.Utils.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=e,this._setupHelper(),this._applyChange();const t=n.Utils.initEvent(e,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(t,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",t),this}_resizing(e,t){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(e,t),this._applyChange();const i=n.Utils.initEvent(e,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(i,this._ui()),this.triggerEvent("resize",i),this}_resizeStop(e){const t=n.Utils.initEvent(e,{type:"resizestop",target:this.el});return this.option.stop&&this.option.stop(t),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",t),this._cleanHelper(),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){return this.elOriginStyleVal=l._originStyleProp.map((e=>this.el.style[e])),this.parentOriginStylePosition=this.el.parentElement.style.position,window.getComputedStyle(this.el.parentElement).position.match(/static/)&&(this.el.parentElement.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return l._originStyleProp.forEach(((e,t)=>{this.el.style[e]=this.elOriginStyleVal[t]||null})),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(e,t){const i=this.startEvent,s={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},o=e.clientX-i.clientX,n=e.clientY-i.clientY;t.indexOf("e")>-1?s.width+=o:t.indexOf("w")>-1&&(s.width-=o,s.left+=o),t.indexOf("s")>-1?s.height+=n:t.indexOf("n")>-1&&(s.height-=n,s.top+=n);const r=this._constrainSize(s.width,s.height);return Math.round(s.width)!==Math.round(r.width)&&(t.indexOf("w")>-1&&(s.left+=s.width-r.width),s.width=r.width),Math.round(s.height)!==Math.round(r.height)&&(t.indexOf("n")>-1&&(s.top+=s.height-r.height),s.height=r.height),s}_constrainSize(e,t){const i=this.option.maxWidth||Number.MAX_SAFE_INTEGER,s=this.option.minWidth||e,o=this.option.maxHeight||Number.MAX_SAFE_INTEGER,n=this.option.minHeight||t;return{width:Math.min(i,Math.max(s,e)),height:Math.min(o,Math.max(n,t))}}_applyChange(){let e={left:0,top:0,width:0,height:0};if("absolute"===this.el.style.position){const t=this.el.parentElement,{left:i,top:s}=t.getBoundingClientRect();e={left:i,top:s,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach((t=>{const i=this.temporalRect[t];this.el.style[t]=i-e[t]+"px"})),this):this}_removeHandlers(){return this.handlers.forEach((e=>e.destroy())),delete this.handlers,this}}t.DDResizable=l,l._originStyleProp=["width","height","position","left","top","opacity","zIndex"]},1120:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.pointerleave=t.pointerenter=t.pointerdown=t.touchend=t.touchmove=t.touchstart=t.isTouch=void 0;const s=i(1432);t.isTouch="undefined"!=typeof window&&"undefined"!=typeof document&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0);class o{}function n(e,t){if(e.touches.length>1)return;e.cancelable&&e.preventDefault();const i=e.changedTouches[0],s=document.createEvent("MouseEvents");s.initMouseEvent(t,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(s)}function r(e,t){e.cancelable&&e.preventDefault();const i=document.createEvent("MouseEvents");i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}t.touchstart=function(e){o.touchHandled||(o.touchHandled=!0,n(e,"mousedown"))},t.touchmove=function(e){o.touchHandled&&n(e,"mousemove")},t.touchend=function(e){if(!o.touchHandled)return;o.pointerLeaveTimeout&&(window.clearTimeout(o.pointerLeaveTimeout),delete o.pointerLeaveTimeout);const t=!!s.DDManager.dragElement;n(e,"mouseup"),t||n(e,"click"),o.touchHandled=!1},t.pointerdown=function(e){e.target.releasePointerCapture(e.pointerId)},t.pointerenter=function(e){s.DDManager.dragElement&&r(e,"mouseenter")},t.pointerleave=function(e){s.DDManager.dragElement&&(o.pointerLeaveTimeout=window.setTimeout((()=>{delete o.pointerLeaveTimeout,r(e,"mouseleave")}),10))}},3531:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GridStackEngine=void 0;const s=i(1661);class o{constructor(e={}){this.addedNodes=[],this.removedNodes=[],this.column=e.column||12,this.maxRow=e.maxRow,this._float=e.float,this.nodes=e.nodes||[],this.onChange=e.onChange}batchUpdate(e=!0){return!!this.batchMode===e||(this.batchMode=e,e?(this._prevFloat=this._float,this._float=!0,this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,this._packNodes()._notify())),this}_useEntireRowArea(e,t){return(!this.float||this.batchMode&&!this._prevFloat)&&!this._hasLocked&&(!e._moving||e._skipDown||t.y<=e.y)}_fixCollisions(e,t=e,i,o={}){if(this.sortNodes(-1),!(i=i||this.collide(e,t)))return!1;if(e._moving&&!o.nested&&!this.float&&this.swap(e,i))return!0;let n=t;this._useEntireRowArea(e,t)&&(n={x:0,w:this.column,y:t.y,h:t.h},i=this.collide(e,n,o.skip));let r=!1,l={nested:!0,pack:!1};for(;i=i||this.collide(e,n,o.skip);){let n;if(i.locked||e._moving&&!e._skipDown&&t.y>e.y&&!this.float&&(!this.collide(i,Object.assign(Object.assign({},i),{y:e.y}),e)||!this.collide(i,Object.assign(Object.assign({},i),{y:t.y-i.h}),e))?(e._skipDown=e._skipDown||t.y>e.y,n=this.moveNode(e,Object.assign(Object.assign(Object.assign({},t),{y:i.y+i.h}),l)),i.locked&&n?s.Utils.copyPos(t,e):!i.locked&&n&&o.pack&&(this._packNodes(),t.y=i.y+i.h,s.Utils.copyPos(e,t)),r=r||n):n=this.moveNode(i,Object.assign(Object.assign(Object.assign({},i),{y:t.y+t.h,skip:e}),l)),!n)return r;i=void 0}return r}collide(e,t=e,i){return this.nodes.find((o=>o!==e&&o!==i&&s.Utils.isIntercepted(o,t)))}collideAll(e,t=e,i){return this.nodes.filter((o=>o!==e&&o!==i&&s.Utils.isIntercepted(o,t)))}directionCollideCoverage(e,t,i){if(!t.rect||!e._rect)return;let s,o=e._rect,n=Object.assign({},t.rect);return n.y>o.y?(n.h+=n.y-o.y,n.y=o.y):n.h+=o.y-n.y,n.x>o.x?(n.w+=n.x-o.x,n.x=o.x):n.w+=o.x-n.x,i.forEach((e=>{if(e.locked||!e._rect)return;let t=e._rect,i=Number.MAX_VALUE,r=Number.MAX_VALUE,l=.5;o.yt.y+t.h&&(i=(t.y+t.h-n.y)/t.h),o.xt.x+t.w&&(r=(t.x+t.w-n.x)/t.w);let a=Math.min(r,i);a>l&&(l=a,s=e)})),t.collide=s,s}cacheRects(e,t,i,s,o,n){return this.nodes.forEach((r=>r._rect={y:r.y*t+i,x:r.x*e+n,w:r.w*e-n-s,h:r.h*t-i-o})),this}swap(e,t){if(!t||t.locked||!e||e.locked)return!1;function i(){let i=t.x,s=t.y;return t.x=e.x,t.y=e.y,e.h!=t.h?(e.x=i,e.y=t.y+t.h):e.w!=t.w?(e.x=t.x+t.w,e.y=s):(e.x=i,e.y=s),e._dirty=t._dirty=!0,!0}let o;if(e.w===t.w&&e.h===t.h&&(e.x===t.x||e.y===t.y)&&(o=s.Utils.isTouching(e,t)))return i();if(!1!==o){if(e.w===t.w&&e.x===t.x&&(o||(o=s.Utils.isTouching(e,t)))){if(t.y{e.locked||(e.autoPosition=!0),this.addNode(e,!1),e._dirty=!0})),this.batchUpdate(!1)}set float(e){this._float!==e&&(this._float=e||!1,e||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(e){return this.nodes=s.Utils.sort(this.nodes,e,this.column),this}_packNodes(){return this.batchMode||(this.sortNodes(),this.float?this.nodes.forEach((e=>{if(e._updating||void 0===e._orig||e.y===e._orig.y)return;let t=e.y;for(;t>e._orig.y;){--t,this.collide(e,{x:e.x,y:t,w:e.w,h:e.h})||(e._dirty=!0,e.y=t)}})):this.nodes.forEach(((e,t)=>{if(!e.locked)for(;e.y>0;){let i=0===t?0:e.y-1;if(!(0===t||!this.collide(e,{x:e.x,y:i,w:e.w,h:e.h})))break;e._dirty=e.y!==i,e.y=i}}))),this}prepareNode(e,t){(e=e||{})._id=e._id||o._idSeq++,void 0!==e.x&&void 0!==e.y&&null!==e.x&&null!==e.y||(e.autoPosition=!0);let i={x:0,y:0,w:1,h:1};return s.Utils.defaults(e,i),e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,"string"==typeof e.x&&(e.x=Number(e.x)),"string"==typeof e.y&&(e.y=Number(e.y)),"string"==typeof e.w&&(e.w=Number(e.w)),"string"==typeof e.h&&(e.h=Number(e.h)),isNaN(e.x)&&(e.x=i.x,e.autoPosition=!0),isNaN(e.y)&&(e.y=i.y,e.autoPosition=!0),isNaN(e.w)&&(e.w=i.w),isNaN(e.h)&&(e.h=i.h),this.nodeBoundFix(e,t)}nodeBoundFix(e,t){let i=e._orig||s.Utils.copyPos({},e);e.maxW&&(e.w=Math.min(e.w,e.maxW)),e.maxH&&(e.h=Math.min(e.h,e.maxH)),e.minW&&e.minW<=this.column&&(e.w=Math.max(e.w,e.minW)),e.minH&&(e.h=Math.max(e.h,e.minH));if((1===this.column||e.x+e.w>this.column)&&this.column<12&&!this._inColumnResize&&e._id&&-1===this.findCacheLayout(e,12)){let t=Object.assign({},e);t.autoPosition?(delete t.x,delete t.y):t.x=Math.min(11,t.x),t.w=Math.min(12,t.w),this.cacheOneLayout(t,12)}return e.w>this.column?e.w=this.column:e.w<1&&(e.w=1),this.maxRow&&e.h>this.maxRow?e.h=this.maxRow:e.h<1&&(e.h=1),e.x<0&&(e.x=0),e.y<0&&(e.y=0),e.x+e.w>this.column&&(t?e.w=this.column-e.x:e.x=this.column-e.w),this.maxRow&&e.y+e.h>this.maxRow&&(t?e.h=this.maxRow-e.y:e.y=this.maxRow-e.h),s.Utils.samePos(e,i)||(e._dirty=!0),e}getDirtyNodes(e){return e?this.nodes.filter((e=>e._dirty&&!s.Utils.samePos(e,e._orig))):this.nodes.filter((e=>e._dirty))}_notify(e){if(this.batchMode||!this.onChange)return this;let t=(e||[]).concat(this.getDirtyNodes());return this.onChange(t),this}cleanNodes(){return this.batchMode||this.nodes.forEach((e=>{delete e._dirty,delete e._lastTried})),this}saveInitial(){return this.nodes.forEach((e=>{e._orig=s.Utils.copyPos({},e),delete e._dirty})),this._hasLocked=this.nodes.some((e=>e.locked)),this}restoreInitial(){return this.nodes.forEach((e=>{s.Utils.samePos(e,e._orig)||(s.Utils.copyPos(e,e._orig),e._dirty=!0)})),this._notify(),this}findEmptyPosition(e,t=this.nodes,i=this.column){t=s.Utils.sort(t,-1,i);let o=!1;for(let n=0;!o;++n){let r=n%i,l=Math.floor(n/i);if(r+e.w>i)continue;let a={x:r,y:l,w:e.w,h:e.h};t.find((e=>s.Utils.isIntercepted(a,e)))||(e.x=r,e.y=l,delete e.autoPosition,o=!0)}return o}addNode(e,t=!1){let i=this.nodes.find((t=>t._id===e._id));return i||(delete(e=this._inColumnResize?this.nodeBoundFix(e):this.prepareNode(e))._temporaryRemoved,delete e._removeDOM,e.autoPosition&&this.findEmptyPosition(e)&&delete e.autoPosition,this.nodes.push(e),t&&this.addedNodes.push(e),this._fixCollisions(e),this.batchMode||this._packNodes()._notify(),e)}removeNode(e,t=!0,i=!1){return this.nodes.find((t=>t===e))?(i&&this.removedNodes.push(e),t&&(e._removeDOM=!0),this.nodes=this.nodes.filter((t=>t!==e)),this._packNodes()._notify([e])):this}removeAll(e=!0){return delete this._layouts,0===this.nodes.length?this:(e&&this.nodes.forEach((e=>e._removeDOM=!0)),this.removedNodes=this.nodes,this.nodes=[],this._notify(this.removedNodes))}moveNodeCheck(e,t){if(!this.changedPosConstrain(e,t))return!1;if(t.pack=!0,!this.maxRow)return this.moveNode(e,t);let i,n=new o({column:this.column,float:this.float,nodes:this.nodes.map((t=>t===e?(i=Object.assign({},t),i):Object.assign({},t)))});if(!i)return!1;let r=n.moveNode(i,t)&&n.getRow()<=this.maxRow;if(!r&&!t.resizing&&t.collide){let i=t.collide.el.gridstackNode;if(this.swap(e,i))return this._notify(),!0}return!!r&&(n.nodes.filter((e=>e._dirty)).forEach((e=>{let t=this.nodes.find((t=>t._id===e._id));t&&(s.Utils.copyPos(t,e),t._dirty=!0)})),this._notify(),!0)}willItFit(e){if(delete e._willFitPos,!this.maxRow)return!0;let t=new o({column:this.column,float:this.float,nodes:this.nodes.map((e=>Object.assign({},e)))}),i=Object.assign({},e);return this.cleanupNode(i),delete i.el,delete i._id,delete i.content,delete i.grid,t.addNode(i),t.getRow()<=this.maxRow&&(e._willFitPos=s.Utils.copyPos({},i),!0)}changedPosConstrain(e,t){return t.w=t.w||e.w,t.h=t.h||e.h,e.x!==t.x||e.y!==t.y||(e.maxW&&(t.w=Math.min(t.w,e.maxW)),e.maxH&&(t.h=Math.min(t.h,e.maxH)),e.minW&&(t.w=Math.max(t.w,e.minW)),e.minH&&(t.h=Math.max(t.h,e.minH)),e.w!==t.w||e.h!==t.h)}moveNode(e,t){var i,o;if(!e||!t)return!1;let n;void 0===t.pack&&(n=t.pack=!0),"number"!=typeof t.x&&(t.x=e.x),"number"!=typeof t.y&&(t.y=e.y),"number"!=typeof t.w&&(t.w=e.w),"number"!=typeof t.h&&(t.h=e.h);let r=e.w!==t.w||e.h!==t.h,l=s.Utils.copyPos({},e,!0);if(s.Utils.copyPos(l,t),l=this.nodeBoundFix(l,r),s.Utils.copyPos(t,l),s.Utils.samePos(e,t))return!1;let a=s.Utils.copyPos({},e),h=this.collideAll(e,l,t.skip),d=!0;if(h.length){let r=e._moving&&!t.nested,a=r?this.directionCollideCoverage(e,t,h):h[0];if(r&&a&&(null===(o=null===(i=e.grid)||void 0===i?void 0:i.opts)||void 0===o?void 0:o.subGridDynamic)&&!e.grid._isTemp){let i=s.Utils.areaIntercept(t.rect,a._rect),o=s.Utils.area(t.rect),n=s.Utils.area(a._rect);i/(o.8&&(a.grid.makeSubGrid(a.el,void 0,e),a=void 0)}a?d=!this._fixCollisions(e,l,a,t):(d=!1,n&&delete t.pack)}return d&&(e._dirty=!0,s.Utils.copyPos(e,l)),t.pack&&this._packNodes()._notify(),!s.Utils.samePos(e,a)}getRow(){return this.nodes.reduce(((e,t)=>Math.max(e,t.y+t.h)),0)}beginUpdate(e){return e._updating||(e._updating=!0,delete e._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){let e=this.nodes.find((e=>e._updating));return e&&(delete e._updating,delete e._skipDown),this}save(e=!0){var t;let i=null===(t=this._layouts)||void 0===t?void 0:t.length,o=i&&this.column!==i-1?this._layouts[i-1]:null,n=[];return this.sortNodes(),this.nodes.forEach((t=>{let i=null==o?void 0:o.find((e=>e._id===t._id)),r=Object.assign({},t);i&&(r.x=i.x,r.y=i.y,r.w=i.w),s.Utils.removeInternalForSave(r,!e),n.push(r)})),n}layoutsNodesChange(e){return!this._layouts||this._inColumnResize||this._layouts.forEach(((t,i)=>{if(!t||i===this.column)return this;if(i{if(!e._orig)return;let i=t.find((t=>t._id===e._id));i&&(e.y!==e._orig.y&&(i.y+=e.y-e._orig.y),e.x!==e._orig.x&&(i.x=Math.round(e.x*s)),e.w!==e._orig.w&&(i.w=Math.round(e.w*s)))}))}})),this}updateNodeWidths(e,t,i,o="moveScale"){var n;if(!this.nodes.length||!t||e===t)return this;this.cacheLayout(this.nodes,e),this.batchUpdate();let r=[],l=!1;if(1===t&&(null==i?void 0:i.length)){l=!0;let e=0;i.forEach((t=>{t.x=0,t.w=1,t.y=Math.max(t.y,e),e=t.y+t.h})),r=i,i=[]}else i=s.Utils.sort(this.nodes,-1,e);let a=[];if(t>e){a=this._layouts[t]||[];let s=this._layouts.length-1;!a.length&&e!==s&&(null===(n=this._layouts[s])||void 0===n?void 0:n.length)&&(e=s,this._layouts[s].forEach((e=>{let t=i.find((t=>t._id===e._id));t&&(t.x=e.x,t.y=e.y,t.w=e.w)})))}if(a.forEach((e=>{let t=i.findIndex((t=>t._id===e._id));-1!==t&&((e.autoPosition||isNaN(e.x)||isNaN(e.y))&&this.findEmptyPosition(e,r),e.autoPosition||(i[t].x=e.x,i[t].y=e.y,i[t].w=e.w,r.push(i[t])),i.splice(t,1))})),i.length)if("function"==typeof o)o(t,e,r,i);else if(!l){let s=t/e,n="move"===o||"moveScale"===o,l="scale"===o||"moveScale"===o;i.forEach((i=>{i.x=1===t?0:n?Math.round(i.x*s):Math.min(i.x,t-1),i.w=1===t||1===e?1:l?Math.round(i.w*s)||1:Math.min(i.w,t),r.push(i)})),i=[]}return l||(r=s.Utils.sort(r,-1,t)),this._inColumnResize=!0,this.nodes=[],r.forEach((e=>{this.addNode(e,!1),delete e._orig})),this.batchUpdate(!1),delete this._inColumnResize,this}cacheLayout(e,t,i=!1){let s=[];return e.forEach(((e,t)=>{e._id=e._id||o._idSeq++,s[t]={x:e.x,y:e.y,w:e.w,_id:e._id}})),this._layouts=i?[]:this._layouts||[],this._layouts[t]=s,this}cacheOneLayout(e,t){e._id=e._id||o._idSeq++;let i={x:e.x,y:e.y,w:e.w,_id:e._id};e.autoPosition&&(delete i.x,delete i.y,i.autoPosition=!0),this._layouts=this._layouts||[],this._layouts[t]=this._layouts[t]||[];let s=this.findCacheLayout(e,t);return-1===s?this._layouts[t].push(i):this._layouts[t][s]=i,this}findCacheLayout(e,t){var i,s,o;return null!==(o=null===(s=null===(i=this._layouts)||void 0===i?void 0:i[t])||void 0===s?void 0:s.findIndex((t=>t._id===e._id)))&&void 0!==o?o:-1}cleanupNode(e){for(let t in e)"_"===t[0]&&"_id"!==t&&delete e[t];return this}}t.GridStackEngine=o,o._idSeq=1},3668:function(e,t,i){var s=this&&this.__createBinding||(Object.create?function(e,t,i,s){void 0===s&&(s=i),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||t.hasOwnProperty(i)||s(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.GridStack=void 0;const n=i(3531),r=i(1661),l=i(3777),a=i(7939),h=i(1120),d=i(1432),g=new a.DDGridStack;o(i(3777),t),o(i(1661),t),o(i(3531),t),o(i(7939),t);class u{constructor(e,t={}){var i,s;this._gsEventHandler={},this._extraDragRow=0,this.el=e,t=t||{},e.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),t.row&&(t.minRow=t.maxRow=t.row,delete t.row);let o=r.Utils.toNumber(e.getAttribute("gs-row"));"auto"===t.column&&delete t.column;let a=t;void 0!==a.minWidth&&(t.oneColumnSize=t.oneColumnSize||a.minWidth,delete a.minWidth),void 0!==t.alwaysShowResizeHandle&&(t._alwaysShowResizeHandle=t.alwaysShowResizeHandle);let g=Object.assign(Object.assign({},r.Utils.cloneDeep(l.gridDefaults)),{column:r.Utils.toNumber(e.getAttribute("gs-column"))||l.gridDefaults.column,minRow:o||(r.Utils.toNumber(e.getAttribute("gs-min-row"))||l.gridDefaults.minRow),maxRow:o||(r.Utils.toNumber(e.getAttribute("gs-max-row"))||l.gridDefaults.maxRow),staticGrid:r.Utils.toBool(e.getAttribute("gs-static"))||l.gridDefaults.staticGrid,draggable:{handle:(t.handleClass?"."+t.handleClass:t.handle?t.handle:"")||l.gridDefaults.draggable.handle},removableOptions:{accept:t.itemClass?"."+t.itemClass:l.gridDefaults.removableOptions.accept}});e.getAttribute("gs-animate")&&(g.animate=r.Utils.toBool(e.getAttribute("gs-animate"))),this.opts=r.Utils.defaults(t,g),t=null,this._initMargin(),1!==this.opts.column&&!this.opts.disableOneColumnMode&&this._widthOrContainer()<=this.opts.oneColumnSize&&(this._prevColumn=this.getColumn(),this.opts.column=1),"auto"===this.opts.rtl&&(this.opts.rtl="rtl"===e.style.direction),this.opts.rtl&&this.el.classList.add("grid-stack-rtl");let p=null===(i=r.Utils.closestUpByClass(this.el,l.gridDefaults.itemClass))||void 0===i?void 0:i.gridstackNode;p&&(p.subGrid=this,this.parentGridItem=p,this.el.classList.add("grid-stack-nested"),p.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight="auto"===this.opts.cellHeight,this._isAutoCellHeight||"initial"===this.opts.cellHeight?this.cellHeight(void 0,!1):("number"==typeof this.opts.cellHeight&&this.opts.cellHeightUnit&&this.opts.cellHeightUnit!==l.gridDefaults.cellHeightUnit&&(this.opts.cellHeight=this.opts.cellHeight+this.opts.cellHeightUnit,delete this.opts.cellHeightUnit),this.cellHeight(this.opts.cellHeight,!1)),"mobile"===this.opts.alwaysShowResizeHandle&&(this.opts.alwaysShowResizeHandle=h.isTouch),this._styleSheetClass="grid-stack-instance-"+n.GridStackEngine._idSeq++,this.el.classList.add(this._styleSheetClass),this._setStaticClass();let c=this.opts.engineClass||u.engineClass||n.GridStackEngine;if(this.engine=new c({column:this.getColumn(),float:this.opts.float,maxRow:this.opts.maxRow,onChange:e=>{let t=0;this.engine.nodes.forEach((e=>{t=Math.max(t,e.y+e.h)})),e.forEach((e=>{let t=e.el;t&&(e._removeDOM?(t&&t.remove(),delete e._removeDOM):this._writePosAttr(t,e))})),this._updateStyles(!1,t)}}),this.opts.auto&&(this.batchUpdate(),this.getGridItems().forEach((e=>this._prepareElement(e))),this.batchUpdate(!1)),this.opts.children){let e=this.opts.children;delete this.opts.children,e.length&&this.load(e)}this.setAnimation(this.opts.animate),this._updateStyles(),12!=this.opts.column&&this.el.classList.add("grid-stack-"+this.opts.column),this.opts.dragIn&&u.setupDragIn(this.opts.dragIn,this.opts.dragInOptions),delete this.opts.dragIn,delete this.opts.dragInOptions,this.opts.subGridDynamic&&!d.DDManager.pauseDrag&&(d.DDManager.pauseDrag=!0),void 0!==(null===(s=this.opts.draggable)||void 0===s?void 0:s.pause)&&(d.DDManager.pauseDrag=this.opts.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateWindowResizeEvent()}static init(e={},t=".grid-stack"){let i=u.getGridElement(t);return i?(i.gridstack||(i.gridstack=new u(i,r.Utils.cloneDeep(e))),i.gridstack):("string"==typeof t?console.error('GridStack.initAll() no grid was found with selector "'+t+'" - element missing or wrong selector ?\nNote: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.'):console.error("GridStack.init() no grid element was passed."),null)}static initAll(e={},t=".grid-stack"){let i=[];return u.getGridElements(t).forEach((t=>{t.gridstack||(t.gridstack=new u(t,r.Utils.cloneDeep(e)),delete e.dragIn,delete e.dragInOptions),i.push(t.gridstack)})),0===i.length&&console.error('GridStack.initAll() no grid was found with selector "'+t+'" - element missing or wrong selector ?\nNote: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.'),i}static addGrid(e,t={}){if(!e)return null;let i=e;if(!e.classList.contains("grid-stack")||t.addRemoveCB)if(t.addRemoveCB)i=t.addRemoveCB(e,t,!0,!0);else{let s=document.implementation.createHTMLDocument("");s.body.innerHTML=`
`,i=s.body.children[0],e.appendChild(i)}return u.init(t,i)}static registerEngine(e){u.engineClass=e}get placeholder(){if(!this._placeholder){let e=document.createElement("div");e.className="placeholder-content",this.opts.placeholderText&&(e.innerHTML=this.opts.placeholderText),this._placeholder=document.createElement("div"),this._placeholder.classList.add(this.opts.placeholderClass,l.gridDefaults.itemClass,this.opts.itemClass),this.placeholder.appendChild(e)}return this._placeholder}addWidget(e,t){let i,s;if("string"==typeof e){let t=document.implementation.createHTMLDocument("");t.body.innerHTML=e,i=t.body.children[0]}else if(0===arguments.length||1===arguments.length&&(void 0!==(o=e).el||void 0!==o.x||void 0!==o.y||void 0!==o.w||void 0!==o.h||void 0!==o.content))if(s=t=e,null==s?void 0:s.el)i=s.el;else if(this.opts.addRemoveCB)i=this.opts.addRemoveCB(this.el,t,!0,!1);else{let e=(null==t?void 0:t.content)||"",s=document.implementation.createHTMLDocument("");s.body.innerHTML=`
${e}
`,i=s.body.children[0]}else i=e;var o;if(!i)return;let n=this._readAttr(i);return t=r.Utils.cloneDeep(t)||{},r.Utils.defaults(t,n),s=this.engine.prepareNode(t),this._writeAttr(i,t),this._insertNotAppend?this.el.prepend(i):this.el.appendChild(i),this._prepareElement(i,!0,t),this._updateContainerHeight(),s.subGrid&&this.makeSubGrid(s.el,void 0,void 0,!1),this._prevColumn&&1===this.opts.column&&(this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,i}makeSubGrid(e,t,i,s=!0){var o,n,l;let a,h=e.gridstackNode;if(h||(h=this.makeWidget(e).gridstackNode),null===(o=h.subGrid)||void 0===o?void 0:o.el)return h.subGrid;let d,g=this;for(;g&&!a;)a=null===(n=g.opts)||void 0===n?void 0:n.subGrid,g=null===(l=g.parentGridItem)||void 0===l?void 0:l.grid;t=r.Utils.cloneDeep(Object.assign(Object.assign(Object.assign({},a||{}),{children:void 0}),t||h.subGrid)),h.subGrid=t,"auto"===t.column&&(d=!0,t.column=Math.max(h.w||1,(null==i?void 0:i.w)||1),t.disableOneColumnMode=!0);let p,c,m=h.el.querySelector(".grid-stack-item-content");if(s){if(this._removeDD(h.el),c=Object.assign(Object.assign({},h),{x:0,y:0}),r.Utils.removeInternalForSave(c),delete c.subGrid,h.content&&(c.content=h.content,delete h.content),this.opts.addRemoveCB)p=this.opts.addRemoveCB(this.el,c,!0,!1);else{let e=document.implementation.createHTMLDocument("");e.body.innerHTML='
',p=e.body.children[0],p.appendChild(m),e.body.innerHTML='
',m=e.body.children[0],h.el.appendChild(m)}this._prepareDragDropByNode(h)}if(i){let e=d?t.column:h.w,s=h.h+i.h,o=h.el.style;o.transition="none",this.update(h.el,{w:e,h:s}),setTimeout((()=>o.transition=null))}this.opts.addRemoveCB&&(t.addRemoveCB=t.addRemoveCB||this.opts.addRemoveCB);let v=h.subGrid=u.addGrid(m,t);return(null==i?void 0:i._moving)&&(v._isTemp=!0),d&&(v._autoColumn=!0),s&&v.addWidget(p,c),i&&(i._moving?window.setTimeout((()=>r.Utils.simulateMouseEvent(i._event,"mouseenter",v.el)),0):v.addWidget(h.el,h)),v}removeAsSubGrid(e){var t;let i=null===(t=this.parentGridItem)||void 0===t?void 0:t.grid;i&&(i.batchUpdate(),i.removeWidget(this.parentGridItem.el,!0,!0),this.engine.nodes.forEach((e=>{e.x+=this.parentGridItem.x,e.y+=this.parentGridItem.y,i.addWidget(e.el,e)})),i.batchUpdate(!1),this.parentGridItem&&delete this.parentGridItem.subGrid,delete this.parentGridItem,e&&window.setTimeout((()=>r.Utils.simulateMouseEvent(e._event,"mouseenter",i.el)),0))}save(e=!0,t=!1){let i=this.engine.save(e);if(i.forEach((i=>{var s;if(e&&i.el&&!i.subGrid){let e=i.el.querySelector(".grid-stack-item-content");i.content=e?e.innerHTML:void 0,i.content||delete i.content}else if(e||delete i.content,null===(s=i.subGrid)||void 0===s?void 0:s.el){const s=i.subGrid.save(e,t);i.subGrid=t?s:{children:s}}delete i.el})),t){let e=r.Utils.cloneDeep(this.opts);e.marginBottom===e.marginTop&&e.marginRight===e.marginLeft&&e.marginTop===e.marginRight&&(e.margin=e.marginTop,delete e.marginTop,delete e.marginRight,delete e.marginBottom,delete e.marginLeft),e.rtl===("rtl"===this.el.style.direction)&&(e.rtl="auto"),this._isAutoCellHeight&&(e.cellHeight="auto"),this._autoColumn&&(e.column="auto",delete e.disableOneColumnMode);const t=e._alwaysShowResizeHandle;return delete e._alwaysShowResizeHandle,void 0!==t?e.alwaysShowResizeHandle=t:delete e.alwaysShowResizeHandle,r.Utils.removeInternalAndSame(e,l.gridDefaults),e.children=i,e}return i}load(e,t=this.opts.addRemoveCB||!0){let i=u.Utils.sort([...e],-1,this._prevColumn||this.getColumn());this._insertNotAppend=!0,this._prevColumn&&this._prevColumn!==this.opts.column&&i.some((e=>e.x+e.w>this.opts.column))&&(this._ignoreLayoutsNodeChange=!0,this.engine.cacheLayout(i,this._prevColumn,!0));const s=this.opts.addRemoveCB;"function"==typeof t&&(this.opts.addRemoveCB=t);let o=[];if(this.batchUpdate(),t){[...this.engine.nodes].forEach((e=>{i.find((t=>e.id===t.id))||(this.opts.addRemoveCB&&this.opts.addRemoveCB(this.el,e,!1,!1),o.push(e),this.removeWidget(e.el,!0,!1))}))}return i.forEach((e=>{let i=e.id||0===e.id?this.engine.nodes.find((t=>t.id===e.id)):void 0;if(i){if(this.update(i.el,e),e.subGrid&&e.subGrid.children){let t=i.el.querySelector(".grid-stack");t&&t.gridstack&&(t.gridstack.load(e.subGrid.children),this._insertNotAppend=!0)}}else t&&this.addWidget(e)})),this.engine.removedNodes=o,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this._insertNotAppend,s?this.opts.addRemoveCB=s:delete this.opts.addRemoveCB,this}batchUpdate(e=!0){return this.engine.batchUpdate(e),e||(this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(e=!1){if(this.opts.cellHeight&&"auto"!==this.opts.cellHeight&&(!e||!this.opts.cellHeightUnit||"px"===this.opts.cellHeightUnit))return this.opts.cellHeight;let t=this.el.querySelector("."+this.opts.itemClass);if(t){let e=r.Utils.toNumber(t.getAttribute("gs-h"));return Math.round(t.offsetHeight/e)}let i=parseInt(this.el.getAttribute("gs-current-row"));return i?Math.round(this.el.getBoundingClientRect().height/i):this.opts.cellHeight}cellHeight(e,t=!0){if(t&&void 0!==e&&this._isAutoCellHeight!==("auto"===e)&&(this._isAutoCellHeight="auto"===e,this._updateWindowResizeEvent()),"initial"!==e&&"auto"!==e||(e=void 0),void 0===e){let t=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;e=this.cellWidth()+t}let i=r.Utils.parseHeight(e);return this.opts.cellHeightUnit===i.unit&&this.opts.cellHeight===i.h||(this.opts.cellHeightUnit=i.unit,this.opts.cellHeight=i.h,t&&this._updateStyles(!0)),this}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(){return this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}compact(){return this.engine.compact(),this._triggerChangeEvent(),this}column(e,t="moveScale"){if(e<1||this.opts.column===e)return this;let i,s=this.getColumn();return 1===e?this._prevColumn=s:delete this._prevColumn,this.el.classList.remove("grid-stack-"+s),this.el.classList.add("grid-stack-"+e),this.opts.column=this.engine.column=e,1===e&&this.opts.oneColumnModeDomSort&&(i=[],this.getGridItems().forEach((e=>{e.gridstackNode&&i.push(e.gridstackNode)})),i.length||(i=void 0)),this.engine.updateNodeWidths(s,e,i,t),this._isAutoCellHeight&&this.cellHeight(),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter((e=>e.matches("."+this.opts.itemClass)&&!e.matches("."+this.opts.placeholderClass)))}destroy(e=!0){if(this.el)return this._updateWindowResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),e?this.el.parentNode.removeChild(this.el):(this.removeAll(e),this.el.classList.remove(this._styleSheetClass)),this._removeStylesheet(),this.el.removeAttribute("gs-current-row"),this.parentGridItem&&delete this.parentGridItem.subGrid,delete this.parentGridItem,delete this.opts,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(e){return this.opts.float!==e&&(this.opts.float=this.engine.float=e,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(e,t=!1){let i,s=this.el.getBoundingClientRect();i=t?{top:s.top+document.documentElement.scrollTop,left:s.left}:{top:this.el.offsetTop,left:this.el.offsetLeft};let o=e.left-i.left,n=e.top-i.top,r=s.width/this.getColumn(),l=s.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(o/r),y:Math.floor(n/l)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow)}isAreaEmpty(e,t,i,s){return this.engine.isAreaEmpty(e,t,i,s)}makeWidget(e){let t=u.getElement(e);return this._prepareElement(t,!0),this._updateContainerHeight(),this._triggerAddEvent(),this._triggerChangeEvent(),t}on(e,t){if(-1!==e.indexOf(" ")){return e.split(" ").forEach((e=>this.on(e,t))),this}if("change"===e||"added"===e||"removed"===e||"enable"===e||"disable"===e){let i="enable"===e||"disable"===e;this._gsEventHandler[e]=i?e=>t(e):e=>t(e,e.detail),this.el.addEventListener(e,this._gsEventHandler[e])}else"drag"===e||"dragstart"===e||"dragstop"===e||"resizestart"===e||"resize"===e||"resizestop"===e||"dropped"===e?this._gsEventHandler[e]=t:console.log("GridStack.on("+e+') event not supported, but you can still use $(".grid-stack").on(...) while jquery-ui is still used internally.');return this}off(e){if(-1!==e.indexOf(" ")){return e.split(" ").forEach((e=>this.off(e))),this}return"change"!==e&&"added"!==e&&"removed"!==e&&"enable"!==e&&"disable"!==e||this._gsEventHandler[e]&&this.el.removeEventListener(e,this._gsEventHandler[e]),delete this._gsEventHandler[e],this}removeWidget(e,t=!0,i=!0){return u.getElements(e).forEach((e=>{if(e.parentElement&&e.parentElement!==this.el)return;let s=e.gridstackNode;s||(s=this.engine.nodes.find((t=>e===t.el))),s&&(delete e.gridstackNode,this._removeDD(e),this.engine.removeNode(s,t,i),t&&e.parentElement&&e.remove())})),i&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this}removeAll(e=!0){return this.engine.nodes.forEach((e=>{delete e.el.gridstackNode,this._removeDD(e.el)})),this.engine.removeAll(e),this._triggerRemoveEvent(),this}setAnimation(e){return e?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this}setStatic(e,t=!0,i=!0){return this.opts.staticGrid===e||(this.opts.staticGrid=e,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach((s=>{this._prepareDragDropByNode(s),s.subGrid&&i&&s.subGrid.setStatic(e,t,i)})),t&&this._setStaticClass()),this}update(e,t){if(arguments.length>2){console.warn("gridstack.ts: `update(el, x, y, w, h)` is deprecated. Use `update(el, {x, w, content, ...})`. It will be removed soon");let i=arguments,s=1;return t={x:i[s++],y:i[s++],w:i[s++],h:i[s++]},this.update(e,t)}return u.getElements(e).forEach((e=>{if(!e||!e.gridstackNode)return;let i=e.gridstackNode,s=r.Utils.cloneDeep(t);delete s.autoPosition;let o,n=["x","y","w","h"];if(n.some((e=>void 0!==s[e]&&s[e]!==i[e]))&&(o={},n.forEach((e=>{o[e]=void 0!==s[e]?s[e]:i[e],delete s[e]}))),!o&&(s.minW||s.minH||s.maxW||s.maxH)&&(o={}),s.content){let t=e.querySelector(".grid-stack-item-content");t&&t.innerHTML!==s.content&&(t.innerHTML=s.content),delete s.content}let l=!1,a=!1;for(const e in s)"_"!==e[0]&&i[e]!==s[e]&&(i[e]=s[e],l=!0,a=a||!this.opts.staticGrid&&("noResize"===e||"noMove"===e||"locked"===e));o&&(this.engine.cleanNodes().beginUpdate(i).moveNode(i,o),this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate()),l&&this._writeAttr(e,i),a&&this._prepareDragDropByNode(i)})),this}margin(e){if(!("string"==typeof e&&e.split(" ").length>1)){let t=r.Utils.parseHeight(e);if(this.opts.marginUnit===t.unit&&this.opts.margin===t.h)return}return this.opts.margin=e,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this._updateStyles(!0),this}getMargin(){return this.opts.margin}willItFit(e){if(arguments.length>1){console.warn("gridstack.ts: `willItFit(x,y,w,h,autoPosition)` is deprecated. Use `willItFit({x, y,...})`. It will be removed soon");let e=arguments,t=0,i={x:e[t++],y:e[t++],w:e[t++],h:e[t++],autoPosition:e[t++]};return this.willItFit(i)}return this.engine.willItFit(e)}_triggerChangeEvent(){if(this.engine.batchMode)return this;let e=this.engine.getDirtyNodes(!0);return e&&e.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(e),this._triggerEvent("change",e)),this.engine.saveInitial(),this}_triggerAddEvent(){return this.engine.batchMode||this.engine.addedNodes&&this.engine.addedNodes.length>0&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach((e=>{delete e._dirty})),this._triggerEvent("added",this.engine.addedNodes),this.engine.addedNodes=[]),this}_triggerRemoveEvent(){return this.engine.batchMode||this.engine.removedNodes&&this.engine.removedNodes.length>0&&(this._triggerEvent("removed",this.engine.removedNodes),this.engine.removedNodes=[]),this}_triggerEvent(e,t){let i=t?new CustomEvent(e,{bubbles:!1,detail:t}):new Event(e);return this.el.dispatchEvent(i),this}_removeStylesheet(){return this._styles&&(r.Utils.removeStylesheet(this._styleSheetClass),delete this._styles),this}_updateStyles(e=!1,t){if(e&&this._removeStylesheet(),t||(t=this.getRow()),this._updateContainerHeight(),0===this.opts.cellHeight)return this;let i=this.opts.cellHeight,s=this.opts.cellHeightUnit,o=`.${this._styleSheetClass} > .${this.opts.itemClass}`;if(!this._styles){let e=this.opts.styleInHead?void 0:this.el.parentNode;if(this._styles=r.Utils.createStylesheet(this._styleSheetClass,e,{nonce:this.opts.nonce}),!this._styles)return this;this._styles._max=0,r.Utils.addCSSRule(this._styles,o,`min-height: ${i}${s}`);let t=this.opts.marginTop+this.opts.marginUnit,n=this.opts.marginBottom+this.opts.marginUnit,l=this.opts.marginRight+this.opts.marginUnit,a=this.opts.marginLeft+this.opts.marginUnit,h=`${o} > .grid-stack-item-content`,d=`.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;r.Utils.addCSSRule(this._styles,h,`top: ${t}; right: ${l}; bottom: ${n}; left: ${a};`),r.Utils.addCSSRule(this._styles,d,`top: ${t}; right: ${l}; bottom: ${n}; left: ${a};`),r.Utils.addCSSRule(this._styles,`${o} > .ui-resizable-ne`,`right: ${l}`),r.Utils.addCSSRule(this._styles,`${o} > .ui-resizable-e`,`right: ${l}`),r.Utils.addCSSRule(this._styles,`${o} > .ui-resizable-se`,`right: ${l}; bottom: ${n}`),r.Utils.addCSSRule(this._styles,`${o} > .ui-resizable-nw`,`left: ${a}`),r.Utils.addCSSRule(this._styles,`${o} > .ui-resizable-w`,`left: ${a}`),r.Utils.addCSSRule(this._styles,`${o} > .ui-resizable-sw`,`left: ${a}; bottom: ${n}`)}if((t=t||this._styles._max)>this._styles._max){let e=e=>i*e+s;for(let i=this._styles._max+1;i<=t;i++){let t=e(i);r.Utils.addCSSRule(this._styles,`${o}[gs-y="${i-1}"]`,`top: ${e(i-1)}`),r.Utils.addCSSRule(this._styles,`${o}[gs-h="${i}"]`,`height: ${t}`),r.Utils.addCSSRule(this._styles,`${o}[gs-min-h="${i}"]`,`min-height: ${t}`),r.Utils.addCSSRule(this._styles,`${o}[gs-max-h="${i}"]`,`max-height: ${t}`)}this._styles._max=t}return this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;let e=this.getRow()+this._extraDragRow;if(this.el.setAttribute("gs-current-row",String(e)),0===e)return this.el.style.removeProperty("min-height"),this;let t=this.opts.cellHeight,i=this.opts.cellHeightUnit;return t?(this.el.style.minHeight=e*t+i,this):this}_prepareElement(e,t=!1,i){e.classList.add(this.opts.itemClass),i=i||this._readAttr(e),e.gridstackNode=i,i.el=e,i.grid=this;let s=Object.assign({},i);return i=this.engine.addNode(i,t),r.Utils.same(i,s)||this._writeAttr(e,i),this._prepareDragDropByNode(i),this}_writePosAttr(e,t){return void 0!==t.x&&null!==t.x&&e.setAttribute("gs-x",String(t.x)),void 0!==t.y&&null!==t.y&&e.setAttribute("gs-y",String(t.y)),t.w&&e.setAttribute("gs-w",String(t.w)),t.h&&e.setAttribute("gs-h",String(t.h)),this}_writeAttr(e,t){if(!t)return this;this._writePosAttr(e,t);let i={autoPosition:"gs-auto-position",minW:"gs-min-w",minH:"gs-min-h",maxW:"gs-max-w",maxH:"gs-max-h",noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id"};for(const s in i)t[s]?e.setAttribute(i[s],String(t[s])):e.removeAttribute(i[s]);return this}_readAttr(e){let t={};t.x=r.Utils.toNumber(e.getAttribute("gs-x")),t.y=r.Utils.toNumber(e.getAttribute("gs-y")),t.w=r.Utils.toNumber(e.getAttribute("gs-w")),t.h=r.Utils.toNumber(e.getAttribute("gs-h")),t.maxW=r.Utils.toNumber(e.getAttribute("gs-max-w")),t.minW=r.Utils.toNumber(e.getAttribute("gs-min-w")),t.maxH=r.Utils.toNumber(e.getAttribute("gs-max-h")),t.minH=r.Utils.toNumber(e.getAttribute("gs-min-h")),t.autoPosition=r.Utils.toBool(e.getAttribute("gs-auto-position")),t.noResize=r.Utils.toBool(e.getAttribute("gs-no-resize")),t.noMove=r.Utils.toBool(e.getAttribute("gs-no-move")),t.locked=r.Utils.toBool(e.getAttribute("gs-locked")),t.id=e.getAttribute("gs-id");for(const e in t){if(!t.hasOwnProperty(e))return;t[e]||0===t[e]||delete t[e]}return t}_setStaticClass(){let e=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...e),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...e),this.el.removeAttribute("gs-static")),this}onParentResize(){if(!this.el||!this.el.clientWidth)return;let e=!1;if(this._autoColumn&&this.parentGridItem)this.opts.column!==this.parentGridItem.w&&(e=!0,this.column(this.parentGridItem.w,"none"));else{let t=!this.opts.disableOneColumnMode&&this.el.clientWidth<=this.opts.oneColumnSize;1===this.opts.column!==t&&(e=!0,this.opts.animate&&this.setAnimation(!1),this.column(t?1:this._prevColumn),this.opts.animate&&this.setAnimation(!0))}return this._isAutoCellHeight&&(!e&&this.opts.cellHeightThrottle?(this._cellHeightThrottle||(this._cellHeightThrottle=r.Utils.throttle((()=>this.cellHeight()),this.opts.cellHeightThrottle)),this._cellHeightThrottle()):this.cellHeight()),this.engine.nodes.forEach((e=>{e.subGrid&&e.subGrid.onParentResize()})),this}_updateWindowResizeEvent(e=!1){const t=(this._isAutoCellHeight||!this.opts.disableOneColumnMode)&&!this.parentGridItem;return e||!t||this._windowResizeBind?!e&&t||!this._windowResizeBind||(window.removeEventListener("resize",this._windowResizeBind),delete this._windowResizeBind):(this._windowResizeBind=this.onParentResize.bind(this),window.addEventListener("resize",this._windowResizeBind)),this}static getElement(e=".grid-stack-item"){return r.Utils.getElement(e)}static getElements(e=".grid-stack-item"){return r.Utils.getElements(e)}static getGridElement(e){return u.getElement(e)}static getGridElements(e){return r.Utils.getElements(e)}_initMargin(){let e,t=0,i=[];return"string"==typeof this.opts.margin&&(i=this.opts.margin.split(" ")),2===i.length?(this.opts.marginTop=this.opts.marginBottom=i[0],this.opts.marginLeft=this.opts.marginRight=i[1]):4===i.length?(this.opts.marginTop=i[0],this.opts.marginRight=i[1],this.opts.marginBottom=i[2],this.opts.marginLeft=i[3]):(e=r.Utils.parseHeight(this.opts.margin),this.opts.marginUnit=e.unit,t=this.opts.margin=e.h),void 0===this.opts.marginTop?this.opts.marginTop=t:(e=r.Utils.parseHeight(this.opts.marginTop),this.opts.marginTop=e.h,delete this.opts.margin),void 0===this.opts.marginBottom?this.opts.marginBottom=t:(e=r.Utils.parseHeight(this.opts.marginBottom),this.opts.marginBottom=e.h,delete this.opts.margin),void 0===this.opts.marginRight?this.opts.marginRight=t:(e=r.Utils.parseHeight(this.opts.marginRight),this.opts.marginRight=e.h,delete this.opts.margin),void 0===this.opts.marginLeft?this.opts.marginLeft=t:(e=r.Utils.parseHeight(this.opts.marginLeft),this.opts.marginLeft=e.h,delete this.opts.margin),this.opts.marginUnit=e.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop),this}static getDD(){return g}static setupDragIn(e,t){void 0!==(null==t?void 0:t.pause)&&(d.DDManager.pauseDrag=t.pause),"string"==typeof e&&(t=Object.assign(Object.assign({},l.dragInDefaultOptions),t||{}),r.Utils.getElements(e).forEach((e=>{g.isDraggable(e)||g.dragIn(e,t)})))}movable(e,t){return this.opts.staticGrid||u.getElements(e).forEach((e=>{let i=e.gridstackNode;i&&(t?delete i.noMove:i.noMove=!0,this._prepareDragDropByNode(i))})),this}resizable(e,t){return this.opts.staticGrid||u.getElements(e).forEach((e=>{let i=e.gridstackNode;i&&(t?delete i.noResize:i.noResize=!0,this._prepareDragDropByNode(i))})),this}disable(e=!0){if(!this.opts.staticGrid)return this.enableMove(!1,e),this.enableResize(!1,e),this._triggerEvent("disable"),this}enable(e=!0){if(!this.opts.staticGrid)return this.enableMove(!0,e),this.enableResize(!0,e),this._triggerEvent("enable"),this}enableMove(e,t=!0){return this.opts.staticGrid||(this.opts.disableDrag=!e,this.engine.nodes.forEach((i=>{this.movable(i.el,e),i.subGrid&&t&&i.subGrid.enableMove(e,t)}))),this}enableResize(e,t=!0){return this.opts.staticGrid||(this.opts.disableResize=!e,this.engine.nodes.forEach((i=>{this.resizable(i.el,e),i.subGrid&&t&&i.subGrid.enableResize(e,t)}))),this}_removeDD(e){return g.draggable(e,"destroy").resizable(e,"destroy"),e.gridstackNode&&delete e.gridstackNode._initDD,delete e.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return g.droppable(this.el,"destroy"),this;let e,t,i=(i,s,o)=>{let n=s.gridstackNode;if(!n)return;o=o||s;let l=this.el.getBoundingClientRect(),{top:a,left:h}=o.getBoundingClientRect();h-=l.left,a-=l.top;let d={position:{top:a,left:h}};if(n._temporaryRemoved){if(n.x=Math.max(0,Math.round(h/t)),n.y=Math.max(0,Math.round(a/e)),delete n.autoPosition,this.engine.nodeBoundFix(n),!this.engine.willItFit(n)){if(n.autoPosition=!0,!this.engine.willItFit(n))return void g.off(s,"drag");n._willFitPos&&(r.Utils.copyPos(n,n._willFitPos),delete n._willFitPos)}this._onStartMoving(o,i,d,n,t,e)}else this._dragOrResize(o,i,d,n,t,e)};return g.droppable(this.el,{accept:e=>{let t=e.gridstackNode;if((null==t?void 0:t.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let i=!0;if("function"==typeof this.opts.acceptWidgets)i=this.opts.acceptWidgets(e);else{let t=!0===this.opts.acceptWidgets?".grid-stack-item":this.opts.acceptWidgets;i=e.matches(t)}if(i&&t&&this.opts.maxRow){let e={w:t.w,h:t.h,minW:t.minW,minH:t.minH};i=this.engine.willItFit(e)}return i}}).on(this.el,"dropover",((s,o,n)=>{let r=o.gridstackNode;if((null==r?void 0:r.grid)===this&&!r._temporaryRemoved)return!1;if((null==r?void 0:r.grid)&&r.grid!==this&&!r._temporaryRemoved){r.grid._leave(o,n)}t=this.cellWidth(),e=this.getCellHeight(!0),r||(r=this._readAttr(o)),r.grid||(r._isExternal=!0,o.gridstackNode=r),n=n||o;let l=r.w||Math.round(n.offsetWidth/t)||1,a=r.h||Math.round(n.offsetHeight/e)||1;return r.grid&&r.grid!==this?(o._gridstackNodeOrig||(o._gridstackNodeOrig=r),o.gridstackNode=r=Object.assign(Object.assign({},r),{w:l,h:a,grid:this}),this.engine.cleanupNode(r).nodeBoundFix(r),r._initDD=r._isExternal=r._temporaryRemoved=!0):(r.w=l,r.h=a,r._temporaryRemoved=!0),this._itemRemoving(r.el,!1),g.on(o,"drag",i),i(s,o,n),!1})).on(this.el,"dropout",((e,t,i)=>{let s=t.gridstackNode;return!!s&&(s.grid&&s.grid!==this||(this._leave(t,i),this._isTemp&&this.removeAsSubGrid(s)),!1)})).on(this.el,"drop",((e,t,i)=>{var s,o;let n=t.gridstackNode;if((null==n?void 0:n.grid)===this&&!n._isExternal)return!1;let a=!!this.placeholder.parentElement;this.placeholder.remove();let h=t._gridstackNodeOrig;if(delete t._gridstackNodeOrig,a&&(null==h?void 0:h.grid)&&h.grid!==this){let e=h.grid;e.engine.removedNodes.push(h),e._triggerRemoveEvent()._triggerChangeEvent(),e.parentGridItem&&!e.engine.nodes.length&&e.opts.subGridDynamic&&e.removeAsSubGrid()}if(!n)return!1;if(a&&(this.engine.cleanupNode(n),n.grid=this),g.off(t,"drag"),i!==t?(i.remove(),t.gridstackNode=h,a&&(t=t.cloneNode(!0))):(t.remove(),this._removeDD(t)),!a)return!1;t.gridstackNode=n,n.el=t;let d=null===(o=null===(s=n.subGrid)||void 0===s?void 0:s.el)||void 0===o?void 0:o.gridstack;return r.Utils.copyPos(n,this._readAttr(this.placeholder)),r.Utils.removePositioningStyles(t),this._writeAttr(t,n),t.classList.add(l.gridDefaults.itemClass,this.opts.itemClass),this.el.appendChild(t),d&&(d.parentGridItem=n,d.opts.styleInHead||d._updateStyles(!0)),this._updateContainerHeight(),this.engine.addedNodes.push(n),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped(Object.assign(Object.assign({},e),{type:"dropped"}),h&&h.grid?h:void 0,n),window.setTimeout((()=>{n.el&&n.el.parentElement?this._prepareDragDropByNode(n):this.engine.removeNode(n),delete n.grid._isTemp})),!1})),this}_itemRemoving(e,t){let i=e?e.gridstackNode:void 0;i&&i.grid&&(t?i._isAboutToRemove=!0:delete i._isAboutToRemove,t?e.classList.add("grid-stack-item-removing"):e.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(!this.opts.staticGrid&&"string"==typeof this.opts.removable){let e=document.querySelector(this.opts.removable);if(!e)return this;g.isDroppable(e)||g.droppable(e,this.opts.removableOptions).on(e,"dropover",((e,t)=>this._itemRemoving(t,!0))).on(e,"dropout",((e,t)=>this._itemRemoving(t,!1)))}return this}_prepareDragDropByNode(e){let t=e.el;const i=e.noMove||this.opts.disableDrag,s=e.noResize||this.opts.disableResize;if(this.opts.staticGrid||i&&s)return e._initDD&&(this._removeDD(t),delete e._initDD),t.classList.add("ui-draggable-disabled","ui-resizable-disabled"),this;if(!e._initDD){let i,s,o=(o,n)=>{this._gsEventHandler[o.type]&&this._gsEventHandler[o.type](o,o.target),i=this.cellWidth(),s=this.getCellHeight(!0),this._onStartMoving(t,o,n,e,i,s)},n=(o,n)=>{this._dragOrResize(t,o,n,e,i,s)},l=i=>{this.placeholder.remove(),delete e._moving,delete e._event,delete e._lastTried;let s=i.target;if(s.gridstackNode&&s.gridstackNode.grid===this){if(e.el=s,e._isAboutToRemove){let o=t.gridstackNode.grid;o._gsEventHandler[i.type]&&o._gsEventHandler[i.type](i,s),this._removeDD(t),o.engine.removedNodes.push(e),o._triggerRemoveEvent(),delete t.gridstackNode,delete e.el,t.remove()}else r.Utils.removePositioningStyles(s),e._temporaryRemoved?(r.Utils.copyPos(e,e._orig),this._writePosAttr(s,e),this.engine.addNode(e)):this._writePosAttr(s,e),this._gsEventHandler[i.type]&&this._gsEventHandler[i.type](i,s);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate()}};g.draggable(t,{start:o,stop:l,drag:n}).resizable(t,{start:o,stop:l,resize:n}),e._initDD=!0}return g.draggable(t,i?"disable":"enable").resizable(t,s?"disable":"enable"),this}_onStartMoving(e,t,i,s,o,n){this.engine.cleanNodes().beginUpdate(s),this._writePosAttr(this.placeholder,s),this.el.appendChild(this.placeholder),s.el=this.placeholder,s._lastUiPosition=i.position,s._prevYPix=i.position.top,s._moving="dragstart"===t.type,delete s._lastTried,"dropover"===t.type&&s._temporaryRemoved&&(this.engine.addNode(s),s._moving=!0),this.engine.cacheRects(o,n,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),"resizestart"===t.type&&(g.resizable(e,"option","minWidth",o*(s.minW||1)).resizable(e,"option","minHeight",n*(s.minH||1)),s.maxW&&g.resizable(e,"option","maxWidth",o*s.maxW),s.maxH&&g.resizable(e,"option","maxHeight",n*s.maxH))}_dragOrResize(e,t,i,s,o,n){let l,a=Object.assign({},s._orig),h=this.opts.marginLeft,d=this.opts.marginRight,g=this.opts.marginTop,u=this.opts.marginBottom,p=Math.round(.1*n),c=Math.round(.1*o);if(h=Math.min(h,c),d=Math.min(d,c),g=Math.min(g,p),u=Math.min(u,p),"drag"===t.type){if(s._temporaryRemoved)return;let t=i.position.top-s._prevYPix;s._prevYPix=i.position.top,!1!==this.opts.draggable.scroll&&r.Utils.updateScrollPosition(e,i.position,t);let l=i.position.left+(i.position.left>s._lastUiPosition.left?-d:h),p=i.position.top+(i.position.top>s._lastUiPosition.top?-u:g);a.x=Math.round(l/o),a.y=Math.round(p/n);let c=this._extraDragRow;if(this.engine.collide(s,a)){let e=this.getRow(),t=Math.max(0,a.y+s.h-e);this.opts.maxRow&&e+t>this.opts.maxRow&&(t=Math.max(0,this.opts.maxRow-e)),this._extraDragRow=t}else this._extraDragRow=0;if(this._extraDragRow!==c&&this._updateContainerHeight(),s.x===a.x&&s.y===a.y)return}else if("resize"===t.type){if(a.x<0)return;if(r.Utils.updateScrollResize(t,e,n),a.w=Math.round((i.size.width-h)/o),a.h=Math.round((i.size.height-g)/n),s.w===a.w&&s.h===a.h)return;if(s._lastTried&&s._lastTried.w===a.w&&s._lastTried.h===a.h)return;let d=i.position.left+h,u=i.position.top+g;a.x=Math.round(d/o),a.y=Math.round(u/n),l=!0}s._event=t,s._lastTried=a;let m={x:i.position.left+h,y:i.position.top+g,w:(i.size?i.size.width:s.w*o)-h-d,h:(i.size?i.size.height:s.h*n)-g-u};if(this.engine.moveNodeCheck(s,Object.assign(Object.assign({},a),{cellWidth:o,cellHeight:n,rect:m,resizing:l}))){s._lastUiPosition=i.position,this.engine.cacheRects(o,n,g,d,u,h),delete s._skipDown,l&&s.subGrid&&s.subGrid.onParentResize(),this._extraDragRow=0,this._updateContainerHeight();let e=t.target;this._writePosAttr(e,s),this._gsEventHandler[t.type]&&this._gsEventHandler[t.type](t,e)}}_leave(e,t){let i=e.gridstackNode;i&&(g.off(e,"drag"),i._temporaryRemoved||(i._temporaryRemoved=!0,this.engine.removeNode(i),i.el=i._isExternal&&t?t:e,!0===this.opts.removable&&this._itemRemoving(e,!0),e._gridstackNodeOrig?(e.gridstackNode=e._gridstackNodeOrig,delete e._gridstackNodeOrig):i._isExternal&&(delete i.el,delete e.gridstackNode,this.engine.restoreInitial())))}commit(){return r.obsolete(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}}t.GridStack=u,u.Utils=r.Utils,u.Engine=n.GridStackEngine,u.GDRev="7.3.0"},3777:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.dragInDefaultOptions=t.gridDefaults=void 0,t.gridDefaults={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,oneColumnSize:768,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:".grid-stack-item"},resizable:{handles:"se"},rtl:"auto"},t.dragInDefaultOptions={handle:".grid-stack-item-content",appendTo:"body"}},1661:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=t.obsoleteAttr=t.obsoleteOptsDel=t.obsoleteOpts=t.obsolete=void 0,t.obsolete=function(e,t,i,s,o){let n=(...n)=>(console.warn("gridstack.js: Function `"+i+"` is deprecated in "+o+" and has been replaced with `"+s+"`. It will be **removed** in a future release"),t.apply(e,n));return n.prototype=t.prototype,n},t.obsoleteOpts=function(e,t,i,s){void 0!==e[t]&&(e[i]=e[t],console.warn("gridstack.js: Option `"+t+"` is deprecated in "+s+" and has been replaced with `"+i+"`. It will be **removed** in a future release"))},t.obsoleteOptsDel=function(e,t,i,s){void 0!==e[t]&&console.warn("gridstack.js: Option `"+t+"` is deprecated in "+i+s)},t.obsoleteAttr=function(e,t,i,s){let o=e.getAttribute(t);null!==o&&(e.setAttribute(i,o),console.warn("gridstack.js: attribute `"+t+"`="+o+" is deprecated on this object in "+s+" and has been replaced with `"+i+"`. It will be **removed** in a future release"))};class i{static getElements(e){if("string"==typeof e){let t=document.querySelectorAll(e);return t.length||"."===e[0]||"#"===e[0]||(t=document.querySelectorAll("."+e),t.length||(t=document.querySelectorAll("#"+e))),Array.from(t)}return[e]}static getElement(e){if("string"==typeof e){if(!e.length)return null;if("#"===e[0])return document.getElementById(e.substring(1));if("."===e[0]||"["===e[0])return document.querySelector(e);if(!isNaN(+e[0]))return document.getElementById(e);let t=document.querySelector(e);return t||(t=document.getElementById(e)),t||(t=document.querySelector("."+e)),t}return e}static isIntercepted(e,t){return!(e.y>=t.y+t.h||e.y+e.h<=t.y||e.x+e.w<=t.x||e.x>=t.x+t.w)}static isTouching(e,t){return i.isIntercepted(e,{x:t.x-.5,y:t.y-.5,w:t.w+1,h:t.h+1})}static areaIntercept(e,t){let i=e.x>t.x?e.x:t.x,s=e.x+e.wt.y?e.y:t.y,n=e.y+e.hMath.max(t.x+t.w,e)),0)||12,-1===t?e.sort(((e,t)=>t.x+t.y*i-(e.x+e.y*i))):e.sort(((e,t)=>e.x+e.y*i-(t.x+t.y*i)))}static createStylesheet(e,t,i){let s=document.createElement("style");const o=null==i?void 0:i.nonce;return o&&(s.nonce=o),s.setAttribute("type","text/css"),s.setAttribute("gs-style-id",e),s.styleSheet?s.styleSheet.cssText="":s.appendChild(document.createTextNode("")),t?t.insertBefore(s,t.firstChild):(t=document.getElementsByTagName("head")[0]).appendChild(s),s.sheet}static removeStylesheet(e){let t=document.querySelector("STYLE[gs-style-id="+e+"]");t&&t.parentNode&&t.remove()}static addCSSRule(e,t,i){"function"==typeof e.addRule?e.addRule(t,i):"function"==typeof e.insertRule&&e.insertRule(`${t}{${i}}`)}static toBool(e){return"boolean"==typeof e?e:"string"==typeof e?!(""===(e=e.toLowerCase())||"no"===e||"false"===e||"0"===e):Boolean(e)}static toNumber(e){return null===e||0===e.length?void 0:Number(e)}static parseHeight(e){let t,i="px";if("string"==typeof e){let s=e.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%)?$/);if(!s)throw new Error("Invalid height");i=s[2]||"px",t=parseFloat(s[1])}else t=e;return{h:t,unit:i}}static defaults(e,...t){return t.forEach((t=>{for(const i in t){if(!t.hasOwnProperty(i))return;null===e[i]||void 0===e[i]?e[i]=t[i]:"object"==typeof t[i]&&"object"==typeof e[i]&&this.defaults(e[i],t[i])}})),e}static same(e,t){if("object"!=typeof e)return e==t;if(typeof e!=typeof t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(e[i]!==t[i])return!1;return!0}static copyPos(e,t,i=!1){return e.x=t.x,e.y=t.y,e.w=t.w,e.h=t.h,i&&(t.minW&&(e.minW=t.minW),t.minH&&(e.minH=t.minH),t.maxW&&(e.maxW=t.maxW),t.maxH&&(e.maxH=t.maxH)),e}static samePos(e,t){return e&&t&&e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}static removeInternalAndSame(e,t){if("object"==typeof e&&"object"==typeof t)for(let i in e){let s=e[i];if("_"===i[0]||s===t[i])delete e[i];else if(s&&"object"==typeof s&&void 0!==t[i]){for(let e in s)s[e]!==t[i][e]&&"_"!==e[0]||delete s[e];Object.keys(s).length||delete e[i]}}}static removeInternalForSave(e,t=!0){for(let t in e)"_"!==t[0]&&null!==e[t]&&void 0!==e[t]||delete e[t];delete e.grid,t&&delete e.el,e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,e.locked||delete e.locked,1!==e.w&&e.w!==e.minW||delete e.w,1!==e.h&&e.h!==e.minH||delete e.h}static closestUpByClass(e,t){for(;e;){if(e.classList.contains(t))return e;e=e.parentElement}return null}static throttle(e,t){let i=!1;return(...s)=>{i||(i=!0,setTimeout((()=>{e(...s),i=!1}),t))}}static removePositioningStyles(e){let t=e.style;t.position&&t.removeProperty("position"),t.left&&t.removeProperty("left"),t.top&&t.removeProperty("top"),t.width&&t.removeProperty("width"),t.height&&t.removeProperty("height")}static getScrollElement(e){if(!e)return document.scrollingElement||document.documentElement;const t=getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowY)?e:this.getScrollElement(e.parentElement)}static updateScrollPosition(e,t,i){let s=e.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight;if(s.top<0||s.bottom>o){let n=s.bottom-o,r=s.top,l=this.getScrollElement(e);if(null!==l){let a=l.scrollTop;s.top<0&&i<0?e.offsetHeight>o?l.scrollTop+=i:l.scrollTop+=Math.abs(r)>Math.abs(i)?i:r:i>0&&(e.offsetHeight>o?l.scrollTop+=i:l.scrollTop+=n>i?i:n),t.top+=l.scrollTop-a}}}static updateScrollResize(e,t,i){const s=this.getScrollElement(t),o=s.clientHeight,n=s===this.getScrollElement()?0:s.getBoundingClientRect().top,r=e.clientY-n,l=r>o-i;re===o))&&(s[o]=i.cloneDeep(e[o]));return s}static cloneNode(e){const t=e.cloneNode(!0);return t.removeAttribute("id"),t}static appendTo(e,t){let i;i="string"==typeof t?document.querySelector(t):t,i&&i.appendChild(e)}static addElStyles(e,t){if(t instanceof Object)for(const i in t)t.hasOwnProperty(i)&&(Array.isArray(t[i])?t[i].forEach((t=>{e.style[i]=t})):e.style[i]=t[i])}static initEvent(e,t){const i={type:t.type},s={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:t.target?t.target:e.target};return e.dataTransfer&&(i.dataTransfer=e.dataTransfer),["altKey","ctrlKey","metaKey","shiftKey"].forEach((t=>i[t]=e[t])),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach((t=>i[t]=e[t])),Object.assign(Object.assign({},i),s)}static simulateMouseEvent(e,t,i){const s=document.createEvent("MouseEvents");s.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,e.target),(i||e.target).dispatchEvent(s)}}t.Utils=i},241:function(e,t,i){i.r(t)},8692:function(e,t,i){i.r(t)}},function(e){var t;t=6839,e(e.s=t)}]); \ No newline at end of file diff --git a/public/build/dashboard.e3ce6fbb.js.LICENSE.txt b/public/build/dashboard.632f98fb.js.LICENSE.txt similarity index 100% rename from public/build/dashboard.e3ce6fbb.js.LICENSE.txt rename to public/build/dashboard.632f98fb.js.LICENSE.txt diff --git a/public/build/dashboard.e3ce6fbb.js b/public/build/dashboard.e3ce6fbb.js deleted file mode 100644 index e35b2c0a..00000000 --- a/public/build/dashboard.e3ce6fbb.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see dashboard.e3ce6fbb.js.LICENSE.txt */ -"use strict";(self.webpackChunkkimai2=self.webpackChunkkimai2||[]).push([[945],{6839:function(e,t,i){var s=i(3668);i(8692),i(241),i.g.GridStack=s.GridStack},5037:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DDBaseImplement=void 0;t.DDBaseImplement=class{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(e,t){this._eventRegister[e]=t}off(e){delete this._eventRegister[e]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(e,t){if(!this.disabled&&this._eventRegister&&this._eventRegister[e])return this._eventRegister[e](t)}}},6060:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DDDraggable=void 0;const s=i(1432),o=i(1661),n=i(5037),r=i(1120);class l extends n.DDBaseImplement{constructor(e,t={}){super(),this.el=e,this.option=t;let i=t.handle.substring(1);this.dragEl=e.classList.contains(i)?e:e.querySelector(t.handle)||e,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this.enable()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){!1!==this.disabled&&(super.enable(),this.dragEl.addEventListener("mousedown",this._mouseDown),r.isTouch&&(this.dragEl.addEventListener("touchstart",r.touchstart),this.dragEl.addEventListener("pointerdown",r.pointerdown)),this.el.classList.remove("ui-draggable-disabled"),this.el.classList.add("ui-draggable"))}disable(e=!1){!0!==this.disabled&&(super.disable(),this.dragEl.removeEventListener("mousedown",this._mouseDown),r.isTouch&&(this.dragEl.removeEventListener("touchstart",r.touchstart),this.dragEl.removeEventListener("pointerdown",r.pointerdown)),this.el.classList.remove("ui-draggable"),e||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.dragging&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.helper,delete this.option,super.destroy()}updateOption(e){return Object.keys(e).forEach((t=>this.option[t]=e[t])),this}_mouseDown(e){if(s.DDManager.mouseHandled)return;if(0!==e.button)return!0;const t=e.target.nodeName.toLowerCase();return["input","textarea","button","select","option"].find((e=>e===t))||e.target.closest('[contenteditable="true"]')||(this.mouseDownEvent=e,delete this.dragging,delete s.DDManager.dragElement,delete s.DDManager.dropElement,document.addEventListener("mousemove",this._mouseMove,!0),document.addEventListener("mouseup",this._mouseUp,!0),r.isTouch&&(this.dragEl.addEventListener("touchmove",r.touchmove),this.dragEl.addEventListener("touchend",r.touchend)),e.preventDefault(),document.activeElement&&document.activeElement.blur(),s.DDManager.mouseHandled=!0),!0}_callDrag(e){if(!this.dragging)return;const t=o.Utils.initEvent(e,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(t,this.ui()),this.triggerEvent("drag",t)}_mouseMove(e){var t;let i=this.mouseDownEvent;if(this.dragging)if(this._dragFollow(e),s.DDManager.pauseDrag){const t=Number.isInteger(s.DDManager.pauseDrag)?s.DDManager.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout((()=>this._callDrag(e)),t)}else this._callDrag(e);else if(Math.abs(e.x-i.x)+Math.abs(e.y-i.y)>3){this.dragging=!0,s.DDManager.dragElement=this;let i=null===(t=this.el.gridstackNode)||void 0===t?void 0:t.grid;i?s.DDManager.dropElement=i.el.ddElement.ddDroppable:delete s.DDManager.dropElement,this.helper=this._createHelper(e),this._setupHelperContainmentStyle(),this.dragOffset=this._getDragOffset(e,this.el,this.helperContainment);const n=o.Utils.initEvent(e,{target:this.el,type:"dragstart"});this._setupHelperStyle(e),this.option.start&&this.option.start(n,this.ui()),this.triggerEvent("dragstart",n)}return e.preventDefault(),!0}_mouseUp(e){var t;if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),r.isTouch&&(this.dragEl.removeEventListener("touchmove",r.touchmove,!0),this.dragEl.removeEventListener("touchend",r.touchend,!0)),this.dragging){delete this.dragging,(null===(t=s.DDManager.dropElement)||void 0===t?void 0:t.el)===this.el.parentElement&&delete s.DDManager.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper===this.el?this._removeHelperStyle():this.helper.remove();const i=o.Utils.initEvent(e,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(i),this.triggerEvent("dragstop",i),s.DDManager.dropElement&&s.DDManager.dropElement.drop(e)}delete this.helper,delete this.mouseDownEvent,delete s.DDManager.dragElement,delete s.DDManager.dropElement,delete s.DDManager.mouseHandled,e.preventDefault()}_createHelper(e){let t=this.el;return"function"==typeof this.option.helper?t=this.option.helper(e):"clone"===this.option.helper&&(t=o.Utils.cloneNode(this.el)),document.body.contains(t)||o.Utils.appendTo(t,"parent"===this.option.appendTo?this.el.parentNode:this.option.appendTo),t===this.el&&(this.dragElementOriginStyle=l.originStyleProp.map((e=>this.el.style[e]))),t}_setupHelperStyle(e){this.helper.classList.add("ui-draggable-dragging");const t=this.helper.style;return t.pointerEvents="none",t["min-width"]=0,t.width=this.dragOffset.width+"px",t.height=this.dragOffset.height+"px",t.willChange="left, top",t.position="fixed",this._dragFollow(e),t.transition="none",setTimeout((()=>{this.helper&&(t.transition=null)}),0),this}_removeHelperStyle(){var e;this.helper.classList.remove("ui-draggable-dragging");let t=null===(e=this.helper)||void 0===e?void 0:e.gridstackNode;if(!(null==t?void 0:t._isAboutToRemove)&&this.dragElementOriginStyle){let e=this.helper,t=this.dragElementOriginStyle.transition||null;e.style.transition=this.dragElementOriginStyle.transition="none",l.originStyleProp.forEach((t=>e.style[t]=this.dragElementOriginStyle[t]||null)),setTimeout((()=>e.style.transition=t),50)}return delete this.dragElementOriginStyle,this}_dragFollow(e){let t=0,i=0;const s=this.helper.style,o=this.dragOffset;s.left=e.clientX+o.offsetLeft-t+"px",s.top=e.clientY+o.offsetTop-i+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,"fixed"!==this.helper.style.position&&(this.parentOriginStylePosition=this.helperContainment.style.position,window.getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(e,t,i){let s=0,n=0;if(i){const e=document.createElement("div");o.Utils.addElStyles(e,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),i.appendChild(e);const t=e.getBoundingClientRect();i.removeChild(e),s=t.left,n=t.top}const r=t.getBoundingClientRect();return{left:r.left,top:r.top,offsetLeft:-e.clientX+r.left-s,offsetTop:-e.clientY+r.top-n,width:r.width,height:r.height}}ui(){const e=this.el.parentElement.getBoundingClientRect(),t=this.helper.getBoundingClientRect();return{position:{top:t.top-e.top,left:t.left-e.left}}}}t.DDDraggable=l,l.originStyleProp=["transition","pointerEvents","position","left","top","minWidth","willChange"]},7540:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DDDroppable=void 0;const s=i(1432),o=i(5037),n=i(1661),r=i(1120);class l extends o.DDBaseImplement{constructor(e,t={}){super(),this.el=e,this.option=t,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){!1!==this.disabled&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),r.isTouch&&(this.el.addEventListener("pointerenter",r.pointerenter),this.el.addEventListener("pointerleave",r.pointerleave)))}disable(e=!1){!0!==this.disabled&&(super.disable(),this.el.classList.remove("ui-droppable"),e||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),r.isTouch&&(this.el.removeEventListener("pointerenter",r.pointerenter),this.el.removeEventListener("pointerleave",r.pointerleave)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(e){return Object.keys(e).forEach((t=>this.option[t]=e[t])),this._setupAccept(),this}_mouseEnter(e){if(!s.DDManager.dragElement)return;if(!this._canDrop(s.DDManager.dragElement.el))return;e.preventDefault(),e.stopPropagation(),s.DDManager.dropElement&&s.DDManager.dropElement!==this&&s.DDManager.dropElement._mouseLeave(e),s.DDManager.dropElement=this;const t=n.Utils.initEvent(e,{target:this.el,type:"dropover"});this.option.over&&this.option.over(t,this._ui(s.DDManager.dragElement)),this.triggerEvent("dropover",t),this.el.classList.add("ui-droppable-over")}_mouseLeave(e){var t;if(!s.DDManager.dragElement||s.DDManager.dropElement!==this)return;e.preventDefault(),e.stopPropagation();const i=n.Utils.initEvent(e,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(i,this._ui(s.DDManager.dragElement)),this.triggerEvent("dropout",i),s.DDManager.dropElement===this){let i;delete s.DDManager.dropElement;let o=this.el.parentElement;for(;!i&&o;)i=null===(t=o.ddElement)||void 0===t?void 0:t.ddDroppable,o=o.parentElement;i&&i._mouseEnter(e)}}drop(e){e.preventDefault();const t=n.Utils.initEvent(e,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(t,this._ui(s.DDManager.dragElement)),this.triggerEvent("drop",t)}_canDrop(e){return e&&(!this.accept||this.accept(e))}_setupAccept(){return this.option.accept?("string"==typeof this.option.accept?this.accept=e=>e.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(e){return Object.assign({draggable:e.el},e.ui())}}t.DDDroppable=l},51:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DDElement=void 0;const s=i(9354),o=i(6060),n=i(7540);class r{constructor(e){this.el=e}static init(e){return e.ddElement||(e.ddElement=new r(e)),e.ddElement}on(e,t){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(e)>-1?this.ddDraggable.on(e,t):this.ddDroppable&&["drop","dropover","dropout"].indexOf(e)>-1?this.ddDroppable.on(e,t):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(e)>-1&&this.ddResizable.on(e,t),this}off(e){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(e)>-1?this.ddDraggable.off(e):this.ddDroppable&&["drop","dropover","dropout"].indexOf(e)>-1?this.ddDroppable.off(e):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(e)>-1&&this.ddResizable.off(e),this}setupDraggable(e){return this.ddDraggable?this.ddDraggable.updateOption(e):this.ddDraggable=new o.DDDraggable(this.el,e),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(e){return this.ddResizable?this.ddResizable.updateOption(e):this.ddResizable=new s.DDResizable(this.el,e),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(e){return this.ddDroppable?this.ddDroppable.updateOption(e):this.ddDroppable=new n.DDDroppable(this.el,e),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}}t.DDElement=r},7939:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DDGridStack=void 0;const s=i(1661),o=i(1432),n=i(51);t.DDGridStack=class{resizable(e,t,i,s){return this._getDDElements(e).forEach((e=>{if("disable"===t||"enable"===t)e.ddResizable&&e.ddResizable[t]();else if("destroy"===t)e.ddResizable&&e.cleanResizable();else if("option"===t)e.setupResizable({[i]:s});else{const i=e.el.gridstackNode.grid;let s=e.el.getAttribute("gs-resize-handles")?e.el.getAttribute("gs-resize-handles"):i.opts.resizable.handles,o=!i.opts.alwaysShowResizeHandle;e.setupResizable(Object.assign(Object.assign(Object.assign({},i.opts.resizable),{handles:s,autoHide:o}),{start:t.start,stop:t.stop,resize:t.resize}))}})),this}draggable(e,t,i,s){return this._getDDElements(e).forEach((e=>{if("disable"===t||"enable"===t)e.ddDraggable&&e.ddDraggable[t]();else if("destroy"===t)e.ddDraggable&&e.cleanDraggable();else if("option"===t)e.setupDraggable({[i]:s});else{const i=e.el.gridstackNode.grid;e.setupDraggable(Object.assign(Object.assign({},i.opts.draggable),{start:t.start,stop:t.stop,drag:t.drag}))}})),this}dragIn(e,t){return this._getDDElements(e).forEach((e=>e.setupDraggable(t))),this}droppable(e,t,i,s){return"function"!=typeof t.accept||t._accept||(t._accept=t.accept,t.accept=e=>t._accept(e)),this._getDDElements(e).forEach((e=>{"disable"===t||"enable"===t?e.ddDroppable&&e.ddDroppable[t]():"destroy"===t?e.ddDroppable&&e.cleanDroppable():"option"===t?e.setupDroppable({[i]:s}):e.setupDroppable(t)})),this}isDroppable(e){return!(!(e&&e.ddElement&&e.ddElement.ddDroppable)||e.ddElement.ddDroppable.disabled)}isDraggable(e){return!(!(e&&e.ddElement&&e.ddElement.ddDraggable)||e.ddElement.ddDraggable.disabled)}isResizable(e){return!(!(e&&e.ddElement&&e.ddElement.ddResizable)||e.ddElement.ddResizable.disabled)}on(e,t,i){return this._getDDElements(e).forEach((e=>e.on(t,(e=>{i(e,o.DDManager.dragElement?o.DDManager.dragElement.el:e.target,o.DDManager.dragElement?o.DDManager.dragElement.helper:null)})))),this}off(e,t){return this._getDDElements(e).forEach((e=>e.off(t))),this}_getDDElements(e,t=!0){let i=s.Utils.getElements(e);if(!i.length)return[];let o=i.map((e=>e.ddElement||(t?n.DDElement.init(e):null)));return t||o.filter((e=>e)),o}}},1432:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DDManager=void 0;t.DDManager=class{}},9101:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DDResizableHandle=void 0;const s=i(1120);class o{constructor(e,t,i){this.moving=!1,this.host=e,this.dir=t,this.option=i,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._init()}_init(){const e=document.createElement("div");return e.classList.add("ui-resizable-handle"),e.classList.add(`${o.prefix}${this.dir}`),e.style.zIndex="100",e.style.userSelect="none",this.el=e,this.host.appendChild(this.el),this.el.addEventListener("mousedown",this._mouseDown),s.isTouch&&(this.el.addEventListener("touchstart",s.touchstart),this.el.addEventListener("pointerdown",s.pointerdown)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),s.isTouch&&(this.el.removeEventListener("touchstart",s.touchstart),this.el.removeEventListener("pointerdown",s.pointerdown)),this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(e){this.mouseDownEvent=e,document.addEventListener("mousemove",this._mouseMove,!0),document.addEventListener("mouseup",this._mouseUp,!0),s.isTouch&&(this.el.addEventListener("touchmove",s.touchmove),this.el.addEventListener("touchend",s.touchend)),e.stopPropagation(),e.preventDefault()}_mouseMove(e){let t=this.mouseDownEvent;this.moving?this._triggerEvent("move",e):Math.abs(e.x-t.x)+Math.abs(e.y-t.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",e)),e.stopPropagation(),e.preventDefault()}_mouseUp(e){this.moving&&this._triggerEvent("stop",e),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),s.isTouch&&(this.el.removeEventListener("touchmove",s.touchmove),this.el.removeEventListener("touchend",s.touchend)),delete this.moving,delete this.mouseDownEvent,e.stopPropagation(),e.preventDefault()}_triggerEvent(e,t){return this.option[e]&&this.option[e](t),this}}t.DDResizableHandle=o,o.prefix="ui-resizable-"},9354:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DDResizable=void 0;const s=i(9101),o=i(5037),n=i(1661),r=i(1432);class l extends o.DDBaseImplement{constructor(e,t={}){super(),this._ui=()=>{const e=this.el.parentElement.getBoundingClientRect(),t={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},i=this.temporalRect||t;return{position:{left:i.left-e.left,top:i.top-e.top},size:{width:i.width,height:i.height}}},this.el=e,this.option=t,this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){super.enable(),this.el.classList.add("ui-resizable"),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this.el.classList.remove("ui-resizable"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),this.el.classList.remove("ui-resizable"),delete this.el,super.destroy()}updateOption(e){let t=e.handles&&e.handles!==this.option.handles,i=e.autoHide&&e.autoHide!==this.option.autoHide;return Object.keys(e).forEach((t=>this.option[t]=e[t])),t&&(this._removeHandlers(),this._setupHandlers()),i&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(e){return e?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),r.DDManager.overResizeElement===this&&delete r.DDManager.overResizeElement),this}_mouseOver(e){r.DDManager.overResizeElement||r.DDManager.dragElement||(r.DDManager.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(e){r.DDManager.overResizeElement===this&&(delete r.DDManager.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){let e=this.option.handles||"e,s,se";return"all"===e&&(e="n,e,s,w,se,sw,ne,nw"),this.handlers=e.split(",").map((e=>e.trim())).map((e=>new s.DDResizableHandle(this.el,e,{start:e=>{this._resizeStart(e)},stop:e=>{this._resizeStop(e)},move:t=>{this._resizing(t,e)}}))),this}_resizeStart(e){this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=n.Utils.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=e,this._setupHelper(),this._applyChange();const t=n.Utils.initEvent(e,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(t,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",t),this}_resizing(e,t){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(e,t),this._applyChange();const i=n.Utils.initEvent(e,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(i,this._ui()),this.triggerEvent("resize",i),this}_resizeStop(e){const t=n.Utils.initEvent(e,{type:"resizestop",target:this.el});return this.option.stop&&this.option.stop(t),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",t),this._cleanHelper(),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){return this.elOriginStyleVal=l._originStyleProp.map((e=>this.el.style[e])),this.parentOriginStylePosition=this.el.parentElement.style.position,window.getComputedStyle(this.el.parentElement).position.match(/static/)&&(this.el.parentElement.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return l._originStyleProp.forEach(((e,t)=>{this.el.style[e]=this.elOriginStyleVal[t]||null})),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(e,t){const i=this.startEvent,s={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},o=e.clientX-i.clientX,n=e.clientY-i.clientY;t.indexOf("e")>-1?s.width+=o:t.indexOf("w")>-1&&(s.width-=o,s.left+=o),t.indexOf("s")>-1?s.height+=n:t.indexOf("n")>-1&&(s.height-=n,s.top+=n);const r=this._constrainSize(s.width,s.height);return Math.round(s.width)!==Math.round(r.width)&&(t.indexOf("w")>-1&&(s.left+=s.width-r.width),s.width=r.width),Math.round(s.height)!==Math.round(r.height)&&(t.indexOf("n")>-1&&(s.top+=s.height-r.height),s.height=r.height),s}_constrainSize(e,t){const i=this.option.maxWidth||Number.MAX_SAFE_INTEGER,s=this.option.minWidth||e,o=this.option.maxHeight||Number.MAX_SAFE_INTEGER,n=this.option.minHeight||t;return{width:Math.min(i,Math.max(s,e)),height:Math.min(o,Math.max(n,t))}}_applyChange(){let e={left:0,top:0,width:0,height:0};if("absolute"===this.el.style.position){const t=this.el.parentElement,{left:i,top:s}=t.getBoundingClientRect();e={left:i,top:s,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach((t=>{const i=this.temporalRect[t];this.el.style[t]=i-e[t]+"px"})),this):this}_removeHandlers(){return this.handlers.forEach((e=>e.destroy())),delete this.handlers,this}}t.DDResizable=l,l._originStyleProp=["width","height","position","left","top","opacity","zIndex"]},1120:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.pointerleave=t.pointerenter=t.pointerdown=t.touchend=t.touchmove=t.touchstart=t.isTouch=void 0;const s=i(1432);t.isTouch="undefined"!=typeof window&&"undefined"!=typeof document&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0);class o{}function n(e,t){if(e.touches.length>1)return;e.cancelable&&e.preventDefault();const i=e.changedTouches[0],s=document.createEvent("MouseEvents");s.initMouseEvent(t,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(s)}function r(e,t){e.cancelable&&e.preventDefault();const i=document.createEvent("MouseEvents");i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}t.touchstart=function(e){o.touchHandled||(o.touchHandled=!0,n(e,"mousedown"))},t.touchmove=function(e){o.touchHandled&&n(e,"mousemove")},t.touchend=function(e){if(!o.touchHandled)return;o.pointerLeaveTimeout&&(window.clearTimeout(o.pointerLeaveTimeout),delete o.pointerLeaveTimeout);const t=!!s.DDManager.dragElement;n(e,"mouseup"),t||n(e,"click"),o.touchHandled=!1},t.pointerdown=function(e){e.target.releasePointerCapture(e.pointerId)},t.pointerenter=function(e){s.DDManager.dragElement&&r(e,"mouseenter")},t.pointerleave=function(e){s.DDManager.dragElement&&(o.pointerLeaveTimeout=window.setTimeout((()=>{delete o.pointerLeaveTimeout,r(e,"mouseleave")}),10))}},3531:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GridStackEngine=void 0;const s=i(1661);class o{constructor(e={}){this.addedNodes=[],this.removedNodes=[],this.column=e.column||12,this.maxRow=e.maxRow,this._float=e.float,this.nodes=e.nodes||[],this.onChange=e.onChange}batchUpdate(e=!0){return!!this.batchMode===e||(this.batchMode=e,e?(this._prevFloat=this._float,this._float=!0,this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,this._packNodes()._notify())),this}_useEntireRowArea(e,t){return(!this.float||this.batchMode&&!this._prevFloat)&&!this._hasLocked&&(!e._moving||e._skipDown||t.y<=e.y)}_fixCollisions(e,t=e,i,o={}){if(this.sortNodes(-1),!(i=i||this.collide(e,t)))return!1;if(e._moving&&!o.nested&&!this.float&&this.swap(e,i))return!0;let n=t;this._useEntireRowArea(e,t)&&(n={x:0,w:this.column,y:t.y,h:t.h},i=this.collide(e,n,o.skip));let r=!1,l={nested:!0,pack:!1};for(;i=i||this.collide(e,n,o.skip);){let n;if(i.locked||e._moving&&!e._skipDown&&t.y>e.y&&!this.float&&(!this.collide(i,Object.assign(Object.assign({},i),{y:e.y}),e)||!this.collide(i,Object.assign(Object.assign({},i),{y:t.y-i.h}),e))?(e._skipDown=e._skipDown||t.y>e.y,n=this.moveNode(e,Object.assign(Object.assign(Object.assign({},t),{y:i.y+i.h}),l)),i.locked&&n?s.Utils.copyPos(t,e):!i.locked&&n&&o.pack&&(this._packNodes(),t.y=i.y+i.h,s.Utils.copyPos(e,t)),r=r||n):n=this.moveNode(i,Object.assign(Object.assign(Object.assign({},i),{y:t.y+t.h,skip:e}),l)),!n)return r;i=void 0}return r}collide(e,t=e,i){return this.nodes.find((o=>o!==e&&o!==i&&s.Utils.isIntercepted(o,t)))}collideAll(e,t=e,i){return this.nodes.filter((o=>o!==e&&o!==i&&s.Utils.isIntercepted(o,t)))}directionCollideCoverage(e,t,i){if(!t.rect||!e._rect)return;let s,o=e._rect,n=Object.assign({},t.rect);return n.y>o.y?(n.h+=n.y-o.y,n.y=o.y):n.h+=o.y-n.y,n.x>o.x?(n.w+=n.x-o.x,n.x=o.x):n.w+=o.x-n.x,i.forEach((e=>{if(e.locked||!e._rect)return;let t=e._rect,i=Number.MAX_VALUE,r=Number.MAX_VALUE,l=.5;o.yt.y+t.h&&(i=(t.y+t.h-n.y)/t.h),o.xt.x+t.w&&(r=(t.x+t.w-n.x)/t.w);let a=Math.min(r,i);a>l&&(l=a,s=e)})),t.collide=s,s}cacheRects(e,t,i,s,o,n){return this.nodes.forEach((r=>r._rect={y:r.y*t+i,x:r.x*e+n,w:r.w*e-n-s,h:r.h*t-i-o})),this}swap(e,t){if(!t||t.locked||!e||e.locked)return!1;function i(){let i=t.x,s=t.y;return t.x=e.x,t.y=e.y,e.h!=t.h?(e.x=i,e.y=t.y+t.h):e.w!=t.w?(e.x=t.x+t.w,e.y=s):(e.x=i,e.y=s),e._dirty=t._dirty=!0,!0}let o;if(e.w===t.w&&e.h===t.h&&(e.x===t.x||e.y===t.y)&&(o=s.Utils.isTouching(e,t)))return i();if(!1!==o){if(e.w===t.w&&e.x===t.x&&(o||(o=s.Utils.isTouching(e,t)))){if(t.y{e.locked||(e.autoPosition=!0),this.addNode(e,!1),e._dirty=!0})),this.batchUpdate(!1)}set float(e){this._float!==e&&(this._float=e||!1,e||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(e){return this.nodes=s.Utils.sort(this.nodes,e,this.column),this}_packNodes(){return this.batchMode||(this.sortNodes(),this.float?this.nodes.forEach((e=>{if(e._updating||void 0===e._orig||e.y===e._orig.y)return;let t=e.y;for(;t>e._orig.y;){--t,this.collide(e,{x:e.x,y:t,w:e.w,h:e.h})||(e._dirty=!0,e.y=t)}})):this.nodes.forEach(((e,t)=>{if(!e.locked)for(;e.y>0;){let i=0===t?0:e.y-1;if(!(0===t||!this.collide(e,{x:e.x,y:i,w:e.w,h:e.h})))break;e._dirty=e.y!==i,e.y=i}}))),this}prepareNode(e,t){(e=e||{})._id=e._id||o._idSeq++,void 0!==e.x&&void 0!==e.y&&null!==e.x&&null!==e.y||(e.autoPosition=!0);let i={x:0,y:0,w:1,h:1};return s.Utils.defaults(e,i),e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,"string"==typeof e.x&&(e.x=Number(e.x)),"string"==typeof e.y&&(e.y=Number(e.y)),"string"==typeof e.w&&(e.w=Number(e.w)),"string"==typeof e.h&&(e.h=Number(e.h)),isNaN(e.x)&&(e.x=i.x,e.autoPosition=!0),isNaN(e.y)&&(e.y=i.y,e.autoPosition=!0),isNaN(e.w)&&(e.w=i.w),isNaN(e.h)&&(e.h=i.h),this.nodeBoundFix(e,t)}nodeBoundFix(e,t){let i=e._orig||s.Utils.copyPos({},e);e.maxW&&(e.w=Math.min(e.w,e.maxW)),e.maxH&&(e.h=Math.min(e.h,e.maxH)),e.minW&&e.minW<=this.column&&(e.w=Math.max(e.w,e.minW)),e.minH&&(e.h=Math.max(e.h,e.minH));if((1===this.column||e.x+e.w>this.column)&&this.column<12&&!this._inColumnResize&&e._id&&-1===this.findCacheLayout(e,12)){let t=Object.assign({},e);t.autoPosition?(delete t.x,delete t.y):t.x=Math.min(11,t.x),t.w=Math.min(12,t.w),this.cacheOneLayout(t,12)}return e.w>this.column?e.w=this.column:e.w<1&&(e.w=1),this.maxRow&&e.h>this.maxRow?e.h=this.maxRow:e.h<1&&(e.h=1),e.x<0&&(e.x=0),e.y<0&&(e.y=0),e.x+e.w>this.column&&(t?e.w=this.column-e.x:e.x=this.column-e.w),this.maxRow&&e.y+e.h>this.maxRow&&(t?e.h=this.maxRow-e.y:e.y=this.maxRow-e.h),s.Utils.samePos(e,i)||(e._dirty=!0),e}getDirtyNodes(e){return e?this.nodes.filter((e=>e._dirty&&!s.Utils.samePos(e,e._orig))):this.nodes.filter((e=>e._dirty))}_notify(e){if(this.batchMode||!this.onChange)return this;let t=(e||[]).concat(this.getDirtyNodes());return this.onChange(t),this}cleanNodes(){return this.batchMode||this.nodes.forEach((e=>{delete e._dirty,delete e._lastTried})),this}saveInitial(){return this.nodes.forEach((e=>{e._orig=s.Utils.copyPos({},e),delete e._dirty})),this._hasLocked=this.nodes.some((e=>e.locked)),this}restoreInitial(){return this.nodes.forEach((e=>{s.Utils.samePos(e,e._orig)||(s.Utils.copyPos(e,e._orig),e._dirty=!0)})),this._notify(),this}findEmptyPosition(e,t=this.nodes,i=this.column){t=s.Utils.sort(t,-1,i);let o=!1;for(let n=0;!o;++n){let r=n%i,l=Math.floor(n/i);if(r+e.w>i)continue;let a={x:r,y:l,w:e.w,h:e.h};t.find((e=>s.Utils.isIntercepted(a,e)))||(e.x=r,e.y=l,delete e.autoPosition,o=!0)}return o}addNode(e,t=!1){let i=this.nodes.find((t=>t._id===e._id));return i||(delete(e=this._inColumnResize?this.nodeBoundFix(e):this.prepareNode(e))._temporaryRemoved,delete e._removeDOM,e.autoPosition&&this.findEmptyPosition(e)&&delete e.autoPosition,this.nodes.push(e),t&&this.addedNodes.push(e),this._fixCollisions(e),this.batchMode||this._packNodes()._notify(),e)}removeNode(e,t=!0,i=!1){return this.nodes.find((t=>t===e))?(i&&this.removedNodes.push(e),t&&(e._removeDOM=!0),this.nodes=this.nodes.filter((t=>t!==e)),this._packNodes()._notify([e])):this}removeAll(e=!0){return delete this._layouts,0===this.nodes.length?this:(e&&this.nodes.forEach((e=>e._removeDOM=!0)),this.removedNodes=this.nodes,this.nodes=[],this._notify(this.removedNodes))}moveNodeCheck(e,t){if(!this.changedPosConstrain(e,t))return!1;if(t.pack=!0,!this.maxRow)return this.moveNode(e,t);let i,n=new o({column:this.column,float:this.float,nodes:this.nodes.map((t=>t===e?(i=Object.assign({},t),i):Object.assign({},t)))});if(!i)return!1;let r=n.moveNode(i,t)&&n.getRow()<=this.maxRow;if(!r&&!t.resizing&&t.collide){let i=t.collide.el.gridstackNode;if(this.swap(e,i))return this._notify(),!0}return!!r&&(n.nodes.filter((e=>e._dirty)).forEach((e=>{let t=this.nodes.find((t=>t._id===e._id));t&&(s.Utils.copyPos(t,e),t._dirty=!0)})),this._notify(),!0)}willItFit(e){if(delete e._willFitPos,!this.maxRow)return!0;let t=new o({column:this.column,float:this.float,nodes:this.nodes.map((e=>Object.assign({},e)))}),i=Object.assign({},e);return this.cleanupNode(i),delete i.el,delete i._id,delete i.content,delete i.grid,t.addNode(i),t.getRow()<=this.maxRow&&(e._willFitPos=s.Utils.copyPos({},i),!0)}changedPosConstrain(e,t){return t.w=t.w||e.w,t.h=t.h||e.h,e.x!==t.x||e.y!==t.y||(e.maxW&&(t.w=Math.min(t.w,e.maxW)),e.maxH&&(t.h=Math.min(t.h,e.maxH)),e.minW&&(t.w=Math.max(t.w,e.minW)),e.minH&&(t.h=Math.max(t.h,e.minH)),e.w!==t.w||e.h!==t.h)}moveNode(e,t){var i,o;if(!e||!t)return!1;let n;void 0===t.pack&&(n=t.pack=!0),"number"!=typeof t.x&&(t.x=e.x),"number"!=typeof t.y&&(t.y=e.y),"number"!=typeof t.w&&(t.w=e.w),"number"!=typeof t.h&&(t.h=e.h);let r=e.w!==t.w||e.h!==t.h,l=s.Utils.copyPos({},e,!0);if(s.Utils.copyPos(l,t),l=this.nodeBoundFix(l,r),s.Utils.copyPos(t,l),s.Utils.samePos(e,t))return!1;let a=s.Utils.copyPos({},e),h=this.collideAll(e,l,t.skip),d=!0;if(h.length){let r=e._moving&&!t.nested,a=r?this.directionCollideCoverage(e,t,h):h[0];if(r&&a&&(null===(o=null===(i=e.grid)||void 0===i?void 0:i.opts)||void 0===o?void 0:o.subGridDynamic)&&!e.grid._isTemp){let i=s.Utils.areaIntercept(t.rect,a._rect),o=s.Utils.area(t.rect),n=s.Utils.area(a._rect);i/(o.8&&(a.grid.makeSubGrid(a.el,void 0,e),a=void 0)}a?d=!this._fixCollisions(e,l,a,t):(d=!1,n&&delete t.pack)}return d&&(e._dirty=!0,s.Utils.copyPos(e,l)),t.pack&&this._packNodes()._notify(),!s.Utils.samePos(e,a)}getRow(){return this.nodes.reduce(((e,t)=>Math.max(e,t.y+t.h)),0)}beginUpdate(e){return e._updating||(e._updating=!0,delete e._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){let e=this.nodes.find((e=>e._updating));return e&&(delete e._updating,delete e._skipDown),this}save(e=!0){var t;let i=null===(t=this._layouts)||void 0===t?void 0:t.length,o=i&&this.column!==i-1?this._layouts[i-1]:null,n=[];return this.sortNodes(),this.nodes.forEach((t=>{let i=null==o?void 0:o.find((e=>e._id===t._id)),r=Object.assign({},t);i&&(r.x=i.x,r.y=i.y,r.w=i.w),s.Utils.removeInternalForSave(r,!e),n.push(r)})),n}layoutsNodesChange(e){return!this._layouts||this._inColumnResize||this._layouts.forEach(((t,i)=>{if(!t||i===this.column)return this;if(i{if(!e._orig)return;let i=t.find((t=>t._id===e._id));i&&(e.y!==e._orig.y&&(i.y+=e.y-e._orig.y),e.x!==e._orig.x&&(i.x=Math.round(e.x*s)),e.w!==e._orig.w&&(i.w=Math.round(e.w*s)))}))}})),this}updateNodeWidths(e,t,i,o="moveScale"){var n;if(!this.nodes.length||!t||e===t)return this;this.cacheLayout(this.nodes,e),this.batchUpdate();let r=[],l=!1;if(1===t&&(null==i?void 0:i.length)){l=!0;let e=0;i.forEach((t=>{t.x=0,t.w=1,t.y=Math.max(t.y,e),e=t.y+t.h})),r=i,i=[]}else i=s.Utils.sort(this.nodes,-1,e);let a=[];if(t>e){a=this._layouts[t]||[];let s=this._layouts.length-1;!a.length&&e!==s&&(null===(n=this._layouts[s])||void 0===n?void 0:n.length)&&(e=s,this._layouts[s].forEach((e=>{let t=i.find((t=>t._id===e._id));t&&(t.x=e.x,t.y=e.y,t.w=e.w)})))}if(a.forEach((e=>{let t=i.findIndex((t=>t._id===e._id));-1!==t&&((e.autoPosition||isNaN(e.x)||isNaN(e.y))&&this.findEmptyPosition(e,r),e.autoPosition||(i[t].x=e.x,i[t].y=e.y,i[t].w=e.w,r.push(i[t])),i.splice(t,1))})),i.length)if("function"==typeof o)o(t,e,r,i);else if(!l){let s=t/e,n="move"===o||"moveScale"===o,l="scale"===o||"moveScale"===o;i.forEach((i=>{i.x=1===t?0:n?Math.round(i.x*s):Math.min(i.x,t-1),i.w=1===t||1===e?1:l?Math.round(i.w*s)||1:Math.min(i.w,t),r.push(i)})),i=[]}return l||(r=s.Utils.sort(r,-1,t)),this._inColumnResize=!0,this.nodes=[],r.forEach((e=>{this.addNode(e,!1),delete e._orig})),this.batchUpdate(!1),delete this._inColumnResize,this}cacheLayout(e,t,i=!1){let s=[];return e.forEach(((e,t)=>{e._id=e._id||o._idSeq++,s[t]={x:e.x,y:e.y,w:e.w,_id:e._id}})),this._layouts=i?[]:this._layouts||[],this._layouts[t]=s,this}cacheOneLayout(e,t){e._id=e._id||o._idSeq++;let i={x:e.x,y:e.y,w:e.w,_id:e._id};e.autoPosition&&(delete i.x,delete i.y,i.autoPosition=!0),this._layouts=this._layouts||[],this._layouts[t]=this._layouts[t]||[];let s=this.findCacheLayout(e,t);return-1===s?this._layouts[t].push(i):this._layouts[t][s]=i,this}findCacheLayout(e,t){var i,s,o;return null!==(o=null===(s=null===(i=this._layouts)||void 0===i?void 0:i[t])||void 0===s?void 0:s.findIndex((t=>t._id===e._id)))&&void 0!==o?o:-1}cleanupNode(e){for(let t in e)"_"===t[0]&&"_id"!==t&&delete e[t];return this}}t.GridStackEngine=o,o._idSeq=1},3668:function(e,t,i){var s=this&&this.__createBinding||(Object.create?function(e,t,i,s){void 0===s&&(s=i),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||t.hasOwnProperty(i)||s(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.GridStack=void 0;const n=i(3531),r=i(1661),l=i(3777),a=i(7939),h=i(1120),d=i(1432),g=new a.DDGridStack;o(i(3777),t),o(i(1661),t),o(i(3531),t),o(i(7939),t);class u{constructor(e,t={}){var i,s;this._gsEventHandler={},this._extraDragRow=0,this.el=e,t=t||{},e.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),t.row&&(t.minRow=t.maxRow=t.row,delete t.row);let o=r.Utils.toNumber(e.getAttribute("gs-row"));"auto"===t.column&&delete t.column;let a=t;void 0!==a.minWidth&&(t.oneColumnSize=t.oneColumnSize||a.minWidth,delete a.minWidth),void 0!==t.alwaysShowResizeHandle&&(t._alwaysShowResizeHandle=t.alwaysShowResizeHandle);let g=Object.assign(Object.assign({},r.Utils.cloneDeep(l.gridDefaults)),{column:r.Utils.toNumber(e.getAttribute("gs-column"))||l.gridDefaults.column,minRow:o||(r.Utils.toNumber(e.getAttribute("gs-min-row"))||l.gridDefaults.minRow),maxRow:o||(r.Utils.toNumber(e.getAttribute("gs-max-row"))||l.gridDefaults.maxRow),staticGrid:r.Utils.toBool(e.getAttribute("gs-static"))||l.gridDefaults.staticGrid,draggable:{handle:(t.handleClass?"."+t.handleClass:t.handle?t.handle:"")||l.gridDefaults.draggable.handle},removableOptions:{accept:t.itemClass?"."+t.itemClass:l.gridDefaults.removableOptions.accept}});e.getAttribute("gs-animate")&&(g.animate=r.Utils.toBool(e.getAttribute("gs-animate"))),this.opts=r.Utils.defaults(t,g),t=null,this._initMargin(),1!==this.opts.column&&!this.opts.disableOneColumnMode&&this._widthOrContainer()<=this.opts.oneColumnSize&&(this._prevColumn=this.getColumn(),this.opts.column=1),"auto"===this.opts.rtl&&(this.opts.rtl="rtl"===e.style.direction),this.opts.rtl&&this.el.classList.add("grid-stack-rtl");let p=null===(i=r.Utils.closestUpByClass(this.el,l.gridDefaults.itemClass))||void 0===i?void 0:i.gridstackNode;p&&(p.subGrid=this,this.parentGridItem=p,this.el.classList.add("grid-stack-nested"),p.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight="auto"===this.opts.cellHeight,this._isAutoCellHeight||"initial"===this.opts.cellHeight?this.cellHeight(void 0,!1):("number"==typeof this.opts.cellHeight&&this.opts.cellHeightUnit&&this.opts.cellHeightUnit!==l.gridDefaults.cellHeightUnit&&(this.opts.cellHeight=this.opts.cellHeight+this.opts.cellHeightUnit,delete this.opts.cellHeightUnit),this.cellHeight(this.opts.cellHeight,!1)),"mobile"===this.opts.alwaysShowResizeHandle&&(this.opts.alwaysShowResizeHandle=h.isTouch),this._styleSheetClass="grid-stack-instance-"+n.GridStackEngine._idSeq++,this.el.classList.add(this._styleSheetClass),this._setStaticClass();let c=this.opts.engineClass||u.engineClass||n.GridStackEngine;if(this.engine=new c({column:this.getColumn(),float:this.opts.float,maxRow:this.opts.maxRow,onChange:e=>{let t=0;this.engine.nodes.forEach((e=>{t=Math.max(t,e.y+e.h)})),e.forEach((e=>{let t=e.el;t&&(e._removeDOM?(t&&t.remove(),delete e._removeDOM):this._writePosAttr(t,e))})),this._updateStyles(!1,t)}}),this.opts.auto&&(this.batchUpdate(),this.getGridItems().forEach((e=>this._prepareElement(e))),this.batchUpdate(!1)),this.opts.children){let e=this.opts.children;delete this.opts.children,e.length&&this.load(e)}this.setAnimation(this.opts.animate),this._updateStyles(),12!=this.opts.column&&this.el.classList.add("grid-stack-"+this.opts.column),this.opts.dragIn&&u.setupDragIn(this.opts.dragIn,this.opts.dragInOptions),delete this.opts.dragIn,delete this.opts.dragInOptions,this.opts.subGridDynamic&&!d.DDManager.pauseDrag&&(d.DDManager.pauseDrag=!0),void 0!==(null===(s=this.opts.draggable)||void 0===s?void 0:s.pause)&&(d.DDManager.pauseDrag=this.opts.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateWindowResizeEvent()}static init(e={},t=".grid-stack"){let i=u.getGridElement(t);return i?(i.gridstack||(i.gridstack=new u(i,r.Utils.cloneDeep(e))),i.gridstack):("string"==typeof t?console.error('GridStack.initAll() no grid was found with selector "'+t+'" - element missing or wrong selector ?\nNote: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.'):console.error("GridStack.init() no grid element was passed."),null)}static initAll(e={},t=".grid-stack"){let i=[];return u.getGridElements(t).forEach((t=>{t.gridstack||(t.gridstack=new u(t,r.Utils.cloneDeep(e)),delete e.dragIn,delete e.dragInOptions),i.push(t.gridstack)})),0===i.length&&console.error('GridStack.initAll() no grid was found with selector "'+t+'" - element missing or wrong selector ?\nNote: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.'),i}static addGrid(e,t={}){if(!e)return null;let i=e;if(!e.classList.contains("grid-stack")||t.addRemoveCB)if(t.addRemoveCB)i=t.addRemoveCB(e,t,!0,!0);else{let s=document.implementation.createHTMLDocument("");s.body.innerHTML=`
`,i=s.body.children[0],e.appendChild(i)}return u.init(t,i)}static registerEngine(e){u.engineClass=e}get placeholder(){if(!this._placeholder){let e=document.createElement("div");e.className="placeholder-content",this.opts.placeholderText&&(e.innerHTML=this.opts.placeholderText),this._placeholder=document.createElement("div"),this._placeholder.classList.add(this.opts.placeholderClass,l.gridDefaults.itemClass,this.opts.itemClass),this.placeholder.appendChild(e)}return this._placeholder}addWidget(e,t){let i,s;if("string"==typeof e){let t=document.implementation.createHTMLDocument("");t.body.innerHTML=e,i=t.body.children[0]}else if(0===arguments.length||1===arguments.length&&(void 0!==(o=e).el||void 0!==o.x||void 0!==o.y||void 0!==o.w||void 0!==o.h||void 0!==o.content))if(s=t=e,null==s?void 0:s.el)i=s.el;else if(this.opts.addRemoveCB)i=this.opts.addRemoveCB(this.el,t,!0,!1);else{let e=(null==t?void 0:t.content)||"",s=document.implementation.createHTMLDocument("");s.body.innerHTML=`
${e}
`,i=s.body.children[0]}else i=e;var o;if(!i)return;let n=this._readAttr(i);return t=r.Utils.cloneDeep(t)||{},r.Utils.defaults(t,n),s=this.engine.prepareNode(t),this._writeAttr(i,t),this._insertNotAppend?this.el.prepend(i):this.el.appendChild(i),this._prepareElement(i,!0,t),this._updateContainerHeight(),s.subGrid&&this.makeSubGrid(s.el,void 0,void 0,!1),this._prevColumn&&1===this.opts.column&&(this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,i}makeSubGrid(e,t,i,s=!0){var o,n,l;let a,h=e.gridstackNode;if(h||(h=this.makeWidget(e).gridstackNode),null===(o=h.subGrid)||void 0===o?void 0:o.el)return h.subGrid;let d,g=this;for(;g&&!a;)a=null===(n=g.opts)||void 0===n?void 0:n.subGrid,g=null===(l=g.parentGridItem)||void 0===l?void 0:l.grid;t=r.Utils.cloneDeep(Object.assign(Object.assign(Object.assign({},a||{}),{children:void 0}),t||h.subGrid)),h.subGrid=t,"auto"===t.column&&(d=!0,t.column=Math.max(h.w||1,(null==i?void 0:i.w)||1),t.disableOneColumnMode=!0);let p,c,m=h.el.querySelector(".grid-stack-item-content");if(s){if(this._removeDD(h.el),c=Object.assign(Object.assign({},h),{x:0,y:0}),r.Utils.removeInternalForSave(c),delete c.subGrid,h.content&&(c.content=h.content,delete h.content),this.opts.addRemoveCB)p=this.opts.addRemoveCB(this.el,c,!0,!1);else{let e=document.implementation.createHTMLDocument("");e.body.innerHTML='
',p=e.body.children[0],p.appendChild(m),e.body.innerHTML='
',m=e.body.children[0],h.el.appendChild(m)}this._prepareDragDropByNode(h)}if(i){let e=d?t.column:h.w,s=h.h+i.h,o=h.el.style;o.transition="none",this.update(h.el,{w:e,h:s}),setTimeout((()=>o.transition=null))}this.opts.addRemoveCB&&(t.addRemoveCB=t.addRemoveCB||this.opts.addRemoveCB);let v=h.subGrid=u.addGrid(m,t);return(null==i?void 0:i._moving)&&(v._isTemp=!0),d&&(v._autoColumn=!0),s&&v.addWidget(p,c),i&&(i._moving?window.setTimeout((()=>r.Utils.simulateMouseEvent(i._event,"mouseenter",v.el)),0):v.addWidget(h.el,h)),v}removeAsSubGrid(e){var t;let i=null===(t=this.parentGridItem)||void 0===t?void 0:t.grid;i&&(i.batchUpdate(),i.removeWidget(this.parentGridItem.el,!0,!0),this.engine.nodes.forEach((e=>{e.x+=this.parentGridItem.x,e.y+=this.parentGridItem.y,i.addWidget(e.el,e)})),i.batchUpdate(!1),this.parentGridItem&&delete this.parentGridItem.subGrid,delete this.parentGridItem,e&&window.setTimeout((()=>r.Utils.simulateMouseEvent(e._event,"mouseenter",i.el)),0))}save(e=!0,t=!1){let i=this.engine.save(e);if(i.forEach((i=>{var s;if(e&&i.el&&!i.subGrid){let e=i.el.querySelector(".grid-stack-item-content");i.content=e?e.innerHTML:void 0,i.content||delete i.content}else if(e||delete i.content,null===(s=i.subGrid)||void 0===s?void 0:s.el){const s=i.subGrid.save(e,t);i.subGrid=t?s:{children:s}}delete i.el})),t){let e=r.Utils.cloneDeep(this.opts);e.marginBottom===e.marginTop&&e.marginRight===e.marginLeft&&e.marginTop===e.marginRight&&(e.margin=e.marginTop,delete e.marginTop,delete e.marginRight,delete e.marginBottom,delete e.marginLeft),e.rtl===("rtl"===this.el.style.direction)&&(e.rtl="auto"),this._isAutoCellHeight&&(e.cellHeight="auto"),this._autoColumn&&(e.column="auto",delete e.disableOneColumnMode);const t=e._alwaysShowResizeHandle;return delete e._alwaysShowResizeHandle,void 0!==t?e.alwaysShowResizeHandle=t:delete e.alwaysShowResizeHandle,r.Utils.removeInternalAndSame(e,l.gridDefaults),e.children=i,e}return i}load(e,t=this.opts.addRemoveCB||!0){let i=u.Utils.sort([...e],-1,this._prevColumn||this.getColumn());this._insertNotAppend=!0,this._prevColumn&&this._prevColumn!==this.opts.column&&i.some((e=>e.x+e.w>this.opts.column))&&(this._ignoreLayoutsNodeChange=!0,this.engine.cacheLayout(i,this._prevColumn,!0));const s=this.opts.addRemoveCB;"function"==typeof t&&(this.opts.addRemoveCB=t);let o=[];if(this.batchUpdate(),t){[...this.engine.nodes].forEach((e=>{i.find((t=>e.id===t.id))||(this.opts.addRemoveCB&&this.opts.addRemoveCB(this.el,e,!1,!1),o.push(e),this.removeWidget(e.el,!0,!1))}))}return i.forEach((e=>{let i=e.id||0===e.id?this.engine.nodes.find((t=>t.id===e.id)):void 0;if(i){if(this.update(i.el,e),e.subGrid&&e.subGrid.children){let t=i.el.querySelector(".grid-stack");t&&t.gridstack&&(t.gridstack.load(e.subGrid.children),this._insertNotAppend=!0)}}else t&&this.addWidget(e)})),this.engine.removedNodes=o,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this._insertNotAppend,s?this.opts.addRemoveCB=s:delete this.opts.addRemoveCB,this}batchUpdate(e=!0){return this.engine.batchUpdate(e),e||(this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(e=!1){if(this.opts.cellHeight&&"auto"!==this.opts.cellHeight&&(!e||!this.opts.cellHeightUnit||"px"===this.opts.cellHeightUnit))return this.opts.cellHeight;let t=this.el.querySelector("."+this.opts.itemClass);if(t){let e=r.Utils.toNumber(t.getAttribute("gs-h"));return Math.round(t.offsetHeight/e)}let i=parseInt(this.el.getAttribute("gs-current-row"));return i?Math.round(this.el.getBoundingClientRect().height/i):this.opts.cellHeight}cellHeight(e,t=!0){if(t&&void 0!==e&&this._isAutoCellHeight!==("auto"===e)&&(this._isAutoCellHeight="auto"===e,this._updateWindowResizeEvent()),"initial"!==e&&"auto"!==e||(e=void 0),void 0===e){let t=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;e=this.cellWidth()+t}let i=r.Utils.parseHeight(e);return this.opts.cellHeightUnit===i.unit&&this.opts.cellHeight===i.h||(this.opts.cellHeightUnit=i.unit,this.opts.cellHeight=i.h,t&&this._updateStyles(!0)),this}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(){return this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}compact(){return this.engine.compact(),this._triggerChangeEvent(),this}column(e,t="moveScale"){if(e<1||this.opts.column===e)return this;let i,s=this.getColumn();return 1===e?this._prevColumn=s:delete this._prevColumn,this.el.classList.remove("grid-stack-"+s),this.el.classList.add("grid-stack-"+e),this.opts.column=this.engine.column=e,1===e&&this.opts.oneColumnModeDomSort&&(i=[],this.getGridItems().forEach((e=>{e.gridstackNode&&i.push(e.gridstackNode)})),i.length||(i=void 0)),this.engine.updateNodeWidths(s,e,i,t),this._isAutoCellHeight&&this.cellHeight(),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter((e=>e.matches("."+this.opts.itemClass)&&!e.matches("."+this.opts.placeholderClass)))}destroy(e=!0){if(this.el)return this._updateWindowResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),e?this.el.parentNode.removeChild(this.el):(this.removeAll(e),this.el.classList.remove(this._styleSheetClass)),this._removeStylesheet(),this.el.removeAttribute("gs-current-row"),this.parentGridItem&&delete this.parentGridItem.subGrid,delete this.parentGridItem,delete this.opts,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(e){return this.opts.float!==e&&(this.opts.float=this.engine.float=e,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(e,t=!1){let i,s=this.el.getBoundingClientRect();i=t?{top:s.top+document.documentElement.scrollTop,left:s.left}:{top:this.el.offsetTop,left:this.el.offsetLeft};let o=e.left-i.left,n=e.top-i.top,r=s.width/this.getColumn(),l=s.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(o/r),y:Math.floor(n/l)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow)}isAreaEmpty(e,t,i,s){return this.engine.isAreaEmpty(e,t,i,s)}makeWidget(e){let t=u.getElement(e);return this._prepareElement(t,!0),this._updateContainerHeight(),this._triggerAddEvent(),this._triggerChangeEvent(),t}on(e,t){if(-1!==e.indexOf(" ")){return e.split(" ").forEach((e=>this.on(e,t))),this}if("change"===e||"added"===e||"removed"===e||"enable"===e||"disable"===e){let i="enable"===e||"disable"===e;this._gsEventHandler[e]=i?e=>t(e):e=>t(e,e.detail),this.el.addEventListener(e,this._gsEventHandler[e])}else"drag"===e||"dragstart"===e||"dragstop"===e||"resizestart"===e||"resize"===e||"resizestop"===e||"dropped"===e?this._gsEventHandler[e]=t:console.log("GridStack.on("+e+') event not supported, but you can still use $(".grid-stack").on(...) while jquery-ui is still used internally.');return this}off(e){if(-1!==e.indexOf(" ")){return e.split(" ").forEach((e=>this.off(e))),this}return"change"!==e&&"added"!==e&&"removed"!==e&&"enable"!==e&&"disable"!==e||this._gsEventHandler[e]&&this.el.removeEventListener(e,this._gsEventHandler[e]),delete this._gsEventHandler[e],this}removeWidget(e,t=!0,i=!0){return u.getElements(e).forEach((e=>{if(e.parentElement&&e.parentElement!==this.el)return;let s=e.gridstackNode;s||(s=this.engine.nodes.find((t=>e===t.el))),s&&(delete e.gridstackNode,this._removeDD(e),this.engine.removeNode(s,t,i),t&&e.parentElement&&e.remove())})),i&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this}removeAll(e=!0){return this.engine.nodes.forEach((e=>{delete e.el.gridstackNode,this._removeDD(e.el)})),this.engine.removeAll(e),this._triggerRemoveEvent(),this}setAnimation(e){return e?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this}setStatic(e,t=!0,i=!0){return this.opts.staticGrid===e||(this.opts.staticGrid=e,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach((s=>{this._prepareDragDropByNode(s),s.subGrid&&i&&s.subGrid.setStatic(e,t,i)})),t&&this._setStaticClass()),this}update(e,t){if(arguments.length>2){console.warn("gridstack.ts: `update(el, x, y, w, h)` is deprecated. Use `update(el, {x, w, content, ...})`. It will be removed soon");let i=arguments,s=1;return t={x:i[s++],y:i[s++],w:i[s++],h:i[s++]},this.update(e,t)}return u.getElements(e).forEach((e=>{if(!e||!e.gridstackNode)return;let i=e.gridstackNode,s=r.Utils.cloneDeep(t);delete s.autoPosition;let o,n=["x","y","w","h"];if(n.some((e=>void 0!==s[e]&&s[e]!==i[e]))&&(o={},n.forEach((e=>{o[e]=void 0!==s[e]?s[e]:i[e],delete s[e]}))),!o&&(s.minW||s.minH||s.maxW||s.maxH)&&(o={}),s.content){let t=e.querySelector(".grid-stack-item-content");t&&t.innerHTML!==s.content&&(t.innerHTML=s.content),delete s.content}let l=!1,a=!1;for(const e in s)"_"!==e[0]&&i[e]!==s[e]&&(i[e]=s[e],l=!0,a=a||!this.opts.staticGrid&&("noResize"===e||"noMove"===e||"locked"===e));o&&(this.engine.cleanNodes().beginUpdate(i).moveNode(i,o),this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate()),l&&this._writeAttr(e,i),a&&this._prepareDragDropByNode(i)})),this}margin(e){if(!("string"==typeof e&&e.split(" ").length>1)){let t=r.Utils.parseHeight(e);if(this.opts.marginUnit===t.unit&&this.opts.margin===t.h)return}return this.opts.margin=e,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this._updateStyles(!0),this}getMargin(){return this.opts.margin}willItFit(e){if(arguments.length>1){console.warn("gridstack.ts: `willItFit(x,y,w,h,autoPosition)` is deprecated. Use `willItFit({x, y,...})`. It will be removed soon");let e=arguments,t=0,i={x:e[t++],y:e[t++],w:e[t++],h:e[t++],autoPosition:e[t++]};return this.willItFit(i)}return this.engine.willItFit(e)}_triggerChangeEvent(){if(this.engine.batchMode)return this;let e=this.engine.getDirtyNodes(!0);return e&&e.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(e),this._triggerEvent("change",e)),this.engine.saveInitial(),this}_triggerAddEvent(){return this.engine.batchMode||this.engine.addedNodes&&this.engine.addedNodes.length>0&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach((e=>{delete e._dirty})),this._triggerEvent("added",this.engine.addedNodes),this.engine.addedNodes=[]),this}_triggerRemoveEvent(){return this.engine.batchMode||this.engine.removedNodes&&this.engine.removedNodes.length>0&&(this._triggerEvent("removed",this.engine.removedNodes),this.engine.removedNodes=[]),this}_triggerEvent(e,t){let i=t?new CustomEvent(e,{bubbles:!1,detail:t}):new Event(e);return this.el.dispatchEvent(i),this}_removeStylesheet(){return this._styles&&(r.Utils.removeStylesheet(this._styleSheetClass),delete this._styles),this}_updateStyles(e=!1,t){if(e&&this._removeStylesheet(),t||(t=this.getRow()),this._updateContainerHeight(),0===this.opts.cellHeight)return this;let i=this.opts.cellHeight,s=this.opts.cellHeightUnit,o=`.${this._styleSheetClass} > .${this.opts.itemClass}`;if(!this._styles){let e=this.opts.styleInHead?void 0:this.el.parentNode;if(this._styles=r.Utils.createStylesheet(this._styleSheetClass,e,{nonce:this.opts.nonce}),!this._styles)return this;this._styles._max=0,r.Utils.addCSSRule(this._styles,o,`min-height: ${i}${s}`);let t=this.opts.marginTop+this.opts.marginUnit,n=this.opts.marginBottom+this.opts.marginUnit,l=this.opts.marginRight+this.opts.marginUnit,a=this.opts.marginLeft+this.opts.marginUnit,h=`${o} > .grid-stack-item-content`,d=`.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;r.Utils.addCSSRule(this._styles,h,`top: ${t}; right: ${l}; bottom: ${n}; left: ${a};`),r.Utils.addCSSRule(this._styles,d,`top: ${t}; right: ${l}; bottom: ${n}; left: ${a};`),r.Utils.addCSSRule(this._styles,`${o} > .ui-resizable-ne`,`right: ${l}`),r.Utils.addCSSRule(this._styles,`${o} > .ui-resizable-e`,`right: ${l}`),r.Utils.addCSSRule(this._styles,`${o} > .ui-resizable-se`,`right: ${l}; bottom: ${n}`),r.Utils.addCSSRule(this._styles,`${o} > .ui-resizable-nw`,`left: ${a}`),r.Utils.addCSSRule(this._styles,`${o} > .ui-resizable-w`,`left: ${a}`),r.Utils.addCSSRule(this._styles,`${o} > .ui-resizable-sw`,`left: ${a}; bottom: ${n}`)}if((t=t||this._styles._max)>this._styles._max){let e=e=>i*e+s;for(let i=this._styles._max+1;i<=t;i++){let t=e(i);r.Utils.addCSSRule(this._styles,`${o}[gs-y="${i-1}"]`,`top: ${e(i-1)}`),r.Utils.addCSSRule(this._styles,`${o}[gs-h="${i}"]`,`height: ${t}`),r.Utils.addCSSRule(this._styles,`${o}[gs-min-h="${i}"]`,`min-height: ${t}`),r.Utils.addCSSRule(this._styles,`${o}[gs-max-h="${i}"]`,`max-height: ${t}`)}this._styles._max=t}return this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;let e=this.getRow()+this._extraDragRow;if(this.el.setAttribute("gs-current-row",String(e)),0===e)return this.el.style.removeProperty("min-height"),this;let t=this.opts.cellHeight,i=this.opts.cellHeightUnit;return t?(this.el.style.minHeight=e*t+i,this):this}_prepareElement(e,t=!1,i){e.classList.add(this.opts.itemClass),i=i||this._readAttr(e),e.gridstackNode=i,i.el=e,i.grid=this;let s=Object.assign({},i);return i=this.engine.addNode(i,t),r.Utils.same(i,s)||this._writeAttr(e,i),this._prepareDragDropByNode(i),this}_writePosAttr(e,t){return void 0!==t.x&&null!==t.x&&e.setAttribute("gs-x",String(t.x)),void 0!==t.y&&null!==t.y&&e.setAttribute("gs-y",String(t.y)),t.w&&e.setAttribute("gs-w",String(t.w)),t.h&&e.setAttribute("gs-h",String(t.h)),this}_writeAttr(e,t){if(!t)return this;this._writePosAttr(e,t);let i={autoPosition:"gs-auto-position",minW:"gs-min-w",minH:"gs-min-h",maxW:"gs-max-w",maxH:"gs-max-h",noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id"};for(const s in i)t[s]?e.setAttribute(i[s],String(t[s])):e.removeAttribute(i[s]);return this}_readAttr(e){let t={};t.x=r.Utils.toNumber(e.getAttribute("gs-x")),t.y=r.Utils.toNumber(e.getAttribute("gs-y")),t.w=r.Utils.toNumber(e.getAttribute("gs-w")),t.h=r.Utils.toNumber(e.getAttribute("gs-h")),t.maxW=r.Utils.toNumber(e.getAttribute("gs-max-w")),t.minW=r.Utils.toNumber(e.getAttribute("gs-min-w")),t.maxH=r.Utils.toNumber(e.getAttribute("gs-max-h")),t.minH=r.Utils.toNumber(e.getAttribute("gs-min-h")),t.autoPosition=r.Utils.toBool(e.getAttribute("gs-auto-position")),t.noResize=r.Utils.toBool(e.getAttribute("gs-no-resize")),t.noMove=r.Utils.toBool(e.getAttribute("gs-no-move")),t.locked=r.Utils.toBool(e.getAttribute("gs-locked")),t.id=e.getAttribute("gs-id");for(const e in t){if(!t.hasOwnProperty(e))return;t[e]||0===t[e]||delete t[e]}return t}_setStaticClass(){let e=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...e),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...e),this.el.removeAttribute("gs-static")),this}onParentResize(){if(!this.el||!this.el.clientWidth)return;let e=!1;if(this._autoColumn&&this.parentGridItem)this.opts.column!==this.parentGridItem.w&&(e=!0,this.column(this.parentGridItem.w,"none"));else{let t=!this.opts.disableOneColumnMode&&this.el.clientWidth<=this.opts.oneColumnSize;1===this.opts.column!==t&&(e=!0,this.opts.animate&&this.setAnimation(!1),this.column(t?1:this._prevColumn),this.opts.animate&&this.setAnimation(!0))}return this._isAutoCellHeight&&(!e&&this.opts.cellHeightThrottle?(this._cellHeightThrottle||(this._cellHeightThrottle=r.Utils.throttle((()=>this.cellHeight()),this.opts.cellHeightThrottle)),this._cellHeightThrottle()):this.cellHeight()),this.engine.nodes.forEach((e=>{e.subGrid&&e.subGrid.onParentResize()})),this}_updateWindowResizeEvent(e=!1){const t=(this._isAutoCellHeight||!this.opts.disableOneColumnMode)&&!this.parentGridItem;return e||!t||this._windowResizeBind?!e&&t||!this._windowResizeBind||(window.removeEventListener("resize",this._windowResizeBind),delete this._windowResizeBind):(this._windowResizeBind=this.onParentResize.bind(this),window.addEventListener("resize",this._windowResizeBind)),this}static getElement(e=".grid-stack-item"){return r.Utils.getElement(e)}static getElements(e=".grid-stack-item"){return r.Utils.getElements(e)}static getGridElement(e){return u.getElement(e)}static getGridElements(e){return r.Utils.getElements(e)}_initMargin(){let e,t=0,i=[];return"string"==typeof this.opts.margin&&(i=this.opts.margin.split(" ")),2===i.length?(this.opts.marginTop=this.opts.marginBottom=i[0],this.opts.marginLeft=this.opts.marginRight=i[1]):4===i.length?(this.opts.marginTop=i[0],this.opts.marginRight=i[1],this.opts.marginBottom=i[2],this.opts.marginLeft=i[3]):(e=r.Utils.parseHeight(this.opts.margin),this.opts.marginUnit=e.unit,t=this.opts.margin=e.h),void 0===this.opts.marginTop?this.opts.marginTop=t:(e=r.Utils.parseHeight(this.opts.marginTop),this.opts.marginTop=e.h,delete this.opts.margin),void 0===this.opts.marginBottom?this.opts.marginBottom=t:(e=r.Utils.parseHeight(this.opts.marginBottom),this.opts.marginBottom=e.h,delete this.opts.margin),void 0===this.opts.marginRight?this.opts.marginRight=t:(e=r.Utils.parseHeight(this.opts.marginRight),this.opts.marginRight=e.h,delete this.opts.margin),void 0===this.opts.marginLeft?this.opts.marginLeft=t:(e=r.Utils.parseHeight(this.opts.marginLeft),this.opts.marginLeft=e.h,delete this.opts.margin),this.opts.marginUnit=e.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop),this}static getDD(){return g}static setupDragIn(e,t){void 0!==(null==t?void 0:t.pause)&&(d.DDManager.pauseDrag=t.pause),"string"==typeof e&&(t=Object.assign(Object.assign({},l.dragInDefaultOptions),t||{}),r.Utils.getElements(e).forEach((e=>{g.isDraggable(e)||g.dragIn(e,t)})))}movable(e,t){return this.opts.staticGrid||u.getElements(e).forEach((e=>{let i=e.gridstackNode;i&&(t?delete i.noMove:i.noMove=!0,this._prepareDragDropByNode(i))})),this}resizable(e,t){return this.opts.staticGrid||u.getElements(e).forEach((e=>{let i=e.gridstackNode;i&&(t?delete i.noResize:i.noResize=!0,this._prepareDragDropByNode(i))})),this}disable(e=!0){if(!this.opts.staticGrid)return this.enableMove(!1,e),this.enableResize(!1,e),this._triggerEvent("disable"),this}enable(e=!0){if(!this.opts.staticGrid)return this.enableMove(!0,e),this.enableResize(!0,e),this._triggerEvent("enable"),this}enableMove(e,t=!0){return this.opts.staticGrid||(this.opts.disableDrag=!e,this.engine.nodes.forEach((i=>{this.movable(i.el,e),i.subGrid&&t&&i.subGrid.enableMove(e,t)}))),this}enableResize(e,t=!0){return this.opts.staticGrid||(this.opts.disableResize=!e,this.engine.nodes.forEach((i=>{this.resizable(i.el,e),i.subGrid&&t&&i.subGrid.enableResize(e,t)}))),this}_removeDD(e){return g.draggable(e,"destroy").resizable(e,"destroy"),e.gridstackNode&&delete e.gridstackNode._initDD,delete e.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return g.droppable(this.el,"destroy"),this;let e,t,i=(i,s,o)=>{let n=s.gridstackNode;if(!n)return;o=o||s;let l=this.el.getBoundingClientRect(),{top:a,left:h}=o.getBoundingClientRect();h-=l.left,a-=l.top;let d={position:{top:a,left:h}};if(n._temporaryRemoved){if(n.x=Math.max(0,Math.round(h/t)),n.y=Math.max(0,Math.round(a/e)),delete n.autoPosition,this.engine.nodeBoundFix(n),!this.engine.willItFit(n)){if(n.autoPosition=!0,!this.engine.willItFit(n))return void g.off(s,"drag");n._willFitPos&&(r.Utils.copyPos(n,n._willFitPos),delete n._willFitPos)}this._onStartMoving(o,i,d,n,t,e)}else this._dragOrResize(o,i,d,n,t,e)};return g.droppable(this.el,{accept:e=>{let t=e.gridstackNode;if((null==t?void 0:t.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let i=!0;if("function"==typeof this.opts.acceptWidgets)i=this.opts.acceptWidgets(e);else{let t=!0===this.opts.acceptWidgets?".grid-stack-item":this.opts.acceptWidgets;i=e.matches(t)}if(i&&t&&this.opts.maxRow){let e={w:t.w,h:t.h,minW:t.minW,minH:t.minH};i=this.engine.willItFit(e)}return i}}).on(this.el,"dropover",((s,o,n)=>{let r=o.gridstackNode;if((null==r?void 0:r.grid)===this&&!r._temporaryRemoved)return!1;if((null==r?void 0:r.grid)&&r.grid!==this&&!r._temporaryRemoved){r.grid._leave(o,n)}t=this.cellWidth(),e=this.getCellHeight(!0),r||(r=this._readAttr(o)),r.grid||(r._isExternal=!0,o.gridstackNode=r),n=n||o;let l=r.w||Math.round(n.offsetWidth/t)||1,a=r.h||Math.round(n.offsetHeight/e)||1;return r.grid&&r.grid!==this?(o._gridstackNodeOrig||(o._gridstackNodeOrig=r),o.gridstackNode=r=Object.assign(Object.assign({},r),{w:l,h:a,grid:this}),this.engine.cleanupNode(r).nodeBoundFix(r),r._initDD=r._isExternal=r._temporaryRemoved=!0):(r.w=l,r.h=a,r._temporaryRemoved=!0),this._itemRemoving(r.el,!1),g.on(o,"drag",i),i(s,o,n),!1})).on(this.el,"dropout",((e,t,i)=>{let s=t.gridstackNode;return!!s&&(s.grid&&s.grid!==this||(this._leave(t,i),this._isTemp&&this.removeAsSubGrid(s)),!1)})).on(this.el,"drop",((e,t,i)=>{var s,o;let n=t.gridstackNode;if((null==n?void 0:n.grid)===this&&!n._isExternal)return!1;let a=!!this.placeholder.parentElement;this.placeholder.remove();let h=t._gridstackNodeOrig;if(delete t._gridstackNodeOrig,a&&(null==h?void 0:h.grid)&&h.grid!==this){let e=h.grid;e.engine.removedNodes.push(h),e._triggerRemoveEvent()._triggerChangeEvent(),e.parentGridItem&&!e.engine.nodes.length&&e.opts.subGridDynamic&&e.removeAsSubGrid()}if(!n)return!1;if(a&&(this.engine.cleanupNode(n),n.grid=this),g.off(t,"drag"),i!==t?(i.remove(),t.gridstackNode=h,a&&(t=t.cloneNode(!0))):(t.remove(),this._removeDD(t)),!a)return!1;t.gridstackNode=n,n.el=t;let d=null===(o=null===(s=n.subGrid)||void 0===s?void 0:s.el)||void 0===o?void 0:o.gridstack;return r.Utils.copyPos(n,this._readAttr(this.placeholder)),r.Utils.removePositioningStyles(t),this._writeAttr(t,n),t.classList.add(l.gridDefaults.itemClass,this.opts.itemClass),this.el.appendChild(t),d&&(d.parentGridItem=n,d.opts.styleInHead||d._updateStyles(!0)),this._updateContainerHeight(),this.engine.addedNodes.push(n),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped(Object.assign(Object.assign({},e),{type:"dropped"}),h&&h.grid?h:void 0,n),window.setTimeout((()=>{n.el&&n.el.parentElement?this._prepareDragDropByNode(n):this.engine.removeNode(n),delete n.grid._isTemp})),!1})),this}_itemRemoving(e,t){let i=e?e.gridstackNode:void 0;i&&i.grid&&(t?i._isAboutToRemove=!0:delete i._isAboutToRemove,t?e.classList.add("grid-stack-item-removing"):e.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(!this.opts.staticGrid&&"string"==typeof this.opts.removable){let e=document.querySelector(this.opts.removable);if(!e)return this;g.isDroppable(e)||g.droppable(e,this.opts.removableOptions).on(e,"dropover",((e,t)=>this._itemRemoving(t,!0))).on(e,"dropout",((e,t)=>this._itemRemoving(t,!1)))}return this}_prepareDragDropByNode(e){let t=e.el;const i=e.noMove||this.opts.disableDrag,s=e.noResize||this.opts.disableResize;if(this.opts.staticGrid||i&&s)return e._initDD&&(this._removeDD(t),delete e._initDD),t.classList.add("ui-draggable-disabled","ui-resizable-disabled"),this;if(!e._initDD){let i,s,o=(o,n)=>{this._gsEventHandler[o.type]&&this._gsEventHandler[o.type](o,o.target),i=this.cellWidth(),s=this.getCellHeight(!0),this._onStartMoving(t,o,n,e,i,s)},n=(o,n)=>{this._dragOrResize(t,o,n,e,i,s)},l=i=>{this.placeholder.remove(),delete e._moving,delete e._event,delete e._lastTried;let s=i.target;if(s.gridstackNode&&s.gridstackNode.grid===this){if(e.el=s,e._isAboutToRemove){let o=t.gridstackNode.grid;o._gsEventHandler[i.type]&&o._gsEventHandler[i.type](i,s),this._removeDD(t),o.engine.removedNodes.push(e),o._triggerRemoveEvent(),delete t.gridstackNode,delete e.el,t.remove()}else r.Utils.removePositioningStyles(s),e._temporaryRemoved?(r.Utils.copyPos(e,e._orig),this._writePosAttr(s,e),this.engine.addNode(e)):this._writePosAttr(s,e),this._gsEventHandler[i.type]&&this._gsEventHandler[i.type](i,s);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate()}};g.draggable(t,{start:o,stop:l,drag:n}).resizable(t,{start:o,stop:l,resize:n}),e._initDD=!0}return g.draggable(t,i?"disable":"enable").resizable(t,s?"disable":"enable"),this}_onStartMoving(e,t,i,s,o,n){this.engine.cleanNodes().beginUpdate(s),this._writePosAttr(this.placeholder,s),this.el.appendChild(this.placeholder),s.el=this.placeholder,s._lastUiPosition=i.position,s._prevYPix=i.position.top,s._moving="dragstart"===t.type,delete s._lastTried,"dropover"===t.type&&s._temporaryRemoved&&(this.engine.addNode(s),s._moving=!0),this.engine.cacheRects(o,n,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),"resizestart"===t.type&&(g.resizable(e,"option","minWidth",o*(s.minW||1)).resizable(e,"option","minHeight",n*(s.minH||1)),s.maxW&&g.resizable(e,"option","maxWidth",o*s.maxW),s.maxH&&g.resizable(e,"option","maxHeight",n*s.maxH))}_dragOrResize(e,t,i,s,o,n){let l,a=Object.assign({},s._orig),h=this.opts.marginLeft,d=this.opts.marginRight,g=this.opts.marginTop,u=this.opts.marginBottom,p=Math.round(.1*n),c=Math.round(.1*o);if(h=Math.min(h,c),d=Math.min(d,c),g=Math.min(g,p),u=Math.min(u,p),"drag"===t.type){if(s._temporaryRemoved)return;let t=i.position.top-s._prevYPix;s._prevYPix=i.position.top,!1!==this.opts.draggable.scroll&&r.Utils.updateScrollPosition(e,i.position,t);let l=i.position.left+(i.position.left>s._lastUiPosition.left?-d:h),p=i.position.top+(i.position.top>s._lastUiPosition.top?-u:g);a.x=Math.round(l/o),a.y=Math.round(p/n);let c=this._extraDragRow;if(this.engine.collide(s,a)){let e=this.getRow(),t=Math.max(0,a.y+s.h-e);this.opts.maxRow&&e+t>this.opts.maxRow&&(t=Math.max(0,this.opts.maxRow-e)),this._extraDragRow=t}else this._extraDragRow=0;if(this._extraDragRow!==c&&this._updateContainerHeight(),s.x===a.x&&s.y===a.y)return}else if("resize"===t.type){if(a.x<0)return;if(r.Utils.updateScrollResize(t,e,n),a.w=Math.round((i.size.width-h)/o),a.h=Math.round((i.size.height-g)/n),s.w===a.w&&s.h===a.h)return;if(s._lastTried&&s._lastTried.w===a.w&&s._lastTried.h===a.h)return;let d=i.position.left+h,u=i.position.top+g;a.x=Math.round(d/o),a.y=Math.round(u/n),l=!0}s._event=t,s._lastTried=a;let m={x:i.position.left+h,y:i.position.top+g,w:(i.size?i.size.width:s.w*o)-h-d,h:(i.size?i.size.height:s.h*n)-g-u};if(this.engine.moveNodeCheck(s,Object.assign(Object.assign({},a),{cellWidth:o,cellHeight:n,rect:m,resizing:l}))){s._lastUiPosition=i.position,this.engine.cacheRects(o,n,g,d,u,h),delete s._skipDown,l&&s.subGrid&&s.subGrid.onParentResize(),this._extraDragRow=0,this._updateContainerHeight();let e=t.target;this._writePosAttr(e,s),this._gsEventHandler[t.type]&&this._gsEventHandler[t.type](t,e)}}_leave(e,t){let i=e.gridstackNode;i&&(g.off(e,"drag"),i._temporaryRemoved||(i._temporaryRemoved=!0,this.engine.removeNode(i),i.el=i._isExternal&&t?t:e,!0===this.opts.removable&&this._itemRemoving(e,!0),e._gridstackNodeOrig?(e.gridstackNode=e._gridstackNodeOrig,delete e._gridstackNodeOrig):i._isExternal&&(delete i.el,delete e.gridstackNode,this.engine.restoreInitial())))}commit(){return r.obsolete(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}}t.GridStack=u,u.Utils=r.Utils,u.Engine=n.GridStackEngine,u.GDRev="7.3.0"},3777:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.dragInDefaultOptions=t.gridDefaults=void 0,t.gridDefaults={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,oneColumnSize:768,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:".grid-stack-item"},resizable:{handles:"se"},rtl:"auto"},t.dragInDefaultOptions={handle:".grid-stack-item-content",appendTo:"body"}},1661:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=t.obsoleteAttr=t.obsoleteOptsDel=t.obsoleteOpts=t.obsolete=void 0,t.obsolete=function(e,t,i,s,o){let n=(...n)=>(console.warn("gridstack.js: Function `"+i+"` is deprecated in "+o+" and has been replaced with `"+s+"`. It will be **removed** in a future release"),t.apply(e,n));return n.prototype=t.prototype,n},t.obsoleteOpts=function(e,t,i,s){void 0!==e[t]&&(e[i]=e[t],console.warn("gridstack.js: Option `"+t+"` is deprecated in "+s+" and has been replaced with `"+i+"`. It will be **removed** in a future release"))},t.obsoleteOptsDel=function(e,t,i,s){void 0!==e[t]&&console.warn("gridstack.js: Option `"+t+"` is deprecated in "+i+s)},t.obsoleteAttr=function(e,t,i,s){let o=e.getAttribute(t);null!==o&&(e.setAttribute(i,o),console.warn("gridstack.js: attribute `"+t+"`="+o+" is deprecated on this object in "+s+" and has been replaced with `"+i+"`. It will be **removed** in a future release"))};class i{static getElements(e){if("string"==typeof e){let t=document.querySelectorAll(e);return t.length||"."===e[0]||"#"===e[0]||(t=document.querySelectorAll("."+e),t.length||(t=document.querySelectorAll("#"+e))),Array.from(t)}return[e]}static getElement(e){if("string"==typeof e){if(!e.length)return null;if("#"===e[0])return document.getElementById(e.substring(1));if("."===e[0]||"["===e[0])return document.querySelector(e);if(!isNaN(+e[0]))return document.getElementById(e);let t=document.querySelector(e);return t||(t=document.getElementById(e)),t||(t=document.querySelector("."+e)),t}return e}static isIntercepted(e,t){return!(e.y>=t.y+t.h||e.y+e.h<=t.y||e.x+e.w<=t.x||e.x>=t.x+t.w)}static isTouching(e,t){return i.isIntercepted(e,{x:t.x-.5,y:t.y-.5,w:t.w+1,h:t.h+1})}static areaIntercept(e,t){let i=e.x>t.x?e.x:t.x,s=e.x+e.wt.y?e.y:t.y,n=e.y+e.hMath.max(t.x+t.w,e)),0)||12,-1===t?e.sort(((e,t)=>t.x+t.y*i-(e.x+e.y*i))):e.sort(((e,t)=>e.x+e.y*i-(t.x+t.y*i)))}static createStylesheet(e,t,i){let s=document.createElement("style");const o=null==i?void 0:i.nonce;return o&&(s.nonce=o),s.setAttribute("type","text/css"),s.setAttribute("gs-style-id",e),s.styleSheet?s.styleSheet.cssText="":s.appendChild(document.createTextNode("")),t?t.insertBefore(s,t.firstChild):(t=document.getElementsByTagName("head")[0]).appendChild(s),s.sheet}static removeStylesheet(e){let t=document.querySelector("STYLE[gs-style-id="+e+"]");t&&t.parentNode&&t.remove()}static addCSSRule(e,t,i){"function"==typeof e.addRule?e.addRule(t,i):"function"==typeof e.insertRule&&e.insertRule(`${t}{${i}}`)}static toBool(e){return"boolean"==typeof e?e:"string"==typeof e?!(""===(e=e.toLowerCase())||"no"===e||"false"===e||"0"===e):Boolean(e)}static toNumber(e){return null===e||0===e.length?void 0:Number(e)}static parseHeight(e){let t,i="px";if("string"==typeof e){let s=e.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%)?$/);if(!s)throw new Error("Invalid height");i=s[2]||"px",t=parseFloat(s[1])}else t=e;return{h:t,unit:i}}static defaults(e,...t){return t.forEach((t=>{for(const i in t){if(!t.hasOwnProperty(i))return;null===e[i]||void 0===e[i]?e[i]=t[i]:"object"==typeof t[i]&&"object"==typeof e[i]&&this.defaults(e[i],t[i])}})),e}static same(e,t){if("object"!=typeof e)return e==t;if(typeof e!=typeof t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(e[i]!==t[i])return!1;return!0}static copyPos(e,t,i=!1){return e.x=t.x,e.y=t.y,e.w=t.w,e.h=t.h,i&&(t.minW&&(e.minW=t.minW),t.minH&&(e.minH=t.minH),t.maxW&&(e.maxW=t.maxW),t.maxH&&(e.maxH=t.maxH)),e}static samePos(e,t){return e&&t&&e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}static removeInternalAndSame(e,t){if("object"==typeof e&&"object"==typeof t)for(let i in e){let s=e[i];if("_"===i[0]||s===t[i])delete e[i];else if(s&&"object"==typeof s&&void 0!==t[i]){for(let e in s)s[e]!==t[i][e]&&"_"!==e[0]||delete s[e];Object.keys(s).length||delete e[i]}}}static removeInternalForSave(e,t=!0){for(let t in e)"_"!==t[0]&&null!==e[t]&&void 0!==e[t]||delete e[t];delete e.grid,t&&delete e.el,e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,e.locked||delete e.locked,1!==e.w&&e.w!==e.minW||delete e.w,1!==e.h&&e.h!==e.minH||delete e.h}static closestUpByClass(e,t){for(;e;){if(e.classList.contains(t))return e;e=e.parentElement}return null}static throttle(e,t){let i=!1;return(...s)=>{i||(i=!0,setTimeout((()=>{e(...s),i=!1}),t))}}static removePositioningStyles(e){let t=e.style;t.position&&t.removeProperty("position"),t.left&&t.removeProperty("left"),t.top&&t.removeProperty("top"),t.width&&t.removeProperty("width"),t.height&&t.removeProperty("height")}static getScrollElement(e){if(!e)return document.scrollingElement||document.documentElement;const t=getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowY)?e:this.getScrollElement(e.parentElement)}static updateScrollPosition(e,t,i){let s=e.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight;if(s.top<0||s.bottom>o){let n=s.bottom-o,r=s.top,l=this.getScrollElement(e);if(null!==l){let a=l.scrollTop;s.top<0&&i<0?e.offsetHeight>o?l.scrollTop+=i:l.scrollTop+=Math.abs(r)>Math.abs(i)?i:r:i>0&&(e.offsetHeight>o?l.scrollTop+=i:l.scrollTop+=n>i?i:n),t.top+=l.scrollTop-a}}}static updateScrollResize(e,t,i){const s=this.getScrollElement(t),o=s.clientHeight,n=s===this.getScrollElement()?0:s.getBoundingClientRect().top,r=e.clientY-n,l=r>o-i;re===o))&&(s[o]=i.cloneDeep(e[o]));return s}static cloneNode(e){const t=e.cloneNode(!0);return t.removeAttribute("id"),t}static appendTo(e,t){let i;i="string"==typeof t?document.querySelector(t):t,i&&i.appendChild(e)}static addElStyles(e,t){if(t instanceof Object)for(const i in t)t.hasOwnProperty(i)&&(Array.isArray(t[i])?t[i].forEach((t=>{e.style[i]=t})):e.style[i]=t[i])}static initEvent(e,t){const i={type:t.type},s={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:t.target?t.target:e.target};return e.dataTransfer&&(i.dataTransfer=e.dataTransfer),["altKey","ctrlKey","metaKey","shiftKey"].forEach((t=>i[t]=e[t])),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach((t=>i[t]=e[t])),Object.assign(Object.assign({},i),s)}static simulateMouseEvent(e,t,i){const s=document.createEvent("MouseEvents");s.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,e.target),(i||e.target).dispatchEvent(s)}}t.Utils=i},241:function(e,t,i){i.r(t)},8692:function(e,t,i){i.r(t)}},function(e){var t;t=6839,e(e.s=t)}]); \ No newline at end of file diff --git a/public/build/entrypoints.json b/public/build/entrypoints.json index 7ce07d63..f3a23737 100644 --- a/public/build/entrypoints.json +++ b/public/build/entrypoints.json @@ -2,8 +2,8 @@ "entrypoints": { "app": { "js": [ - "/build/runtime.74179306.js", - "/build/app.ea4d46bf.js" + "/build/runtime.6c399d29.js", + "/build/app.7719f352.js" ], "css": [ "/build/app.899af573.css" @@ -11,8 +11,8 @@ }, "app-rtl": { "js": [ - "/build/runtime.74179306.js", - "/build/app-rtl.6669505e.js" + "/build/runtime.6c399d29.js", + "/build/app-rtl.7a875ca7.js" ], "css": [ "/build/app-rtl.bb694a34.css" @@ -20,8 +20,8 @@ }, "export-pdf": { "js": [ - "/build/runtime.74179306.js", - "/build/export-pdf.32b1a2d8.js" + "/build/runtime.6c399d29.js", + "/build/export-pdf.395749ab.js" ], "css": [ "/build/export-pdf.d8a6c23b.css" @@ -29,8 +29,8 @@ }, "invoice": { "js": [ - "/build/runtime.74179306.js", - "/build/invoice.e9e8aa7d.js" + "/build/runtime.6c399d29.js", + "/build/invoice.773af9c4.js" ], "css": [ "/build/invoice.595f2ed8.css" @@ -38,8 +38,8 @@ }, "invoice-pdf": { "js": [ - "/build/runtime.74179306.js", - "/build/invoice-pdf.502e6e63.js" + "/build/runtime.6c399d29.js", + "/build/invoice-pdf.26d98626.js" ], "css": [ "/build/invoice-pdf.2b749265.css" @@ -47,14 +47,14 @@ }, "chart": { "js": [ - "/build/runtime.74179306.js", - "/build/chart.7e725b75.js" + "/build/runtime.6c399d29.js", + "/build/chart.62631acc.js" ] }, "calendar": { "js": [ - "/build/runtime.74179306.js", - "/build/calendar.cf8275ae.js" + "/build/runtime.6c399d29.js", + "/build/calendar.7415ab21.js" ], "css": [ "/build/calendar.d757753e.css" @@ -62,8 +62,8 @@ }, "dashboard": { "js": [ - "/build/runtime.74179306.js", - "/build/dashboard.e3ce6fbb.js" + "/build/runtime.6c399d29.js", + "/build/dashboard.632f98fb.js" ], "css": [ "/build/dashboard.b7129fa1.css" @@ -71,21 +71,21 @@ } }, "integrity": { - "/build/runtime.74179306.js": "sha384-OC1hTNUXUalKJcvmzrZ0TMCOIwnhxCxgG9dQkbcwR7WcBBCkl2H8bs3giiT2pAwG", - "/build/app.ea4d46bf.js": "sha384-PyuOwCnH7A+SwxmECJdtTOTEY/G5571SrCLJU1p2GDzgt5tSvSQAyFpvIMbSseI4", + "/build/runtime.6c399d29.js": "sha384-/rm616f12czi8l/27GvWXtb3g608vJZf2XTUKxqCRI4tsa2vUHP+BW90edTok5zC", + "/build/app.7719f352.js": "sha384-lj0mGChJMeCxDtjDy96KBKaW5E61RIqYc2+3RlVz+wcsIroUZxMApq0PsW8QcKFN", "/build/app.899af573.css": "sha384-8FV7dixselI1s8FeZCs88+w6hVO9bJ7U1Ai12BBPE7O8bQOxqkhKsWHsCD+WCtdn", - "/build/app-rtl.6669505e.js": "sha384-k8BTJnF4xgczvXYu+nucr7wNwDw9v2cVYH6BNtwaoRJLVr0uhoTSzdyirqfjYwNU", + "/build/app-rtl.7a875ca7.js": "sha384-T7gLI61h9dGeMgzo63vKu4GiDOeLPct9zSUHrceNbhSwIdUmSSNoZ1+d7fKhJJ4/", "/build/app-rtl.bb694a34.css": "sha384-0ANmqhe0IP4aUvWOWo/KZUgAqueE4hH/ZU0EREtgrtKXWM/JPMmRFBEXk8iZTEcd", - "/build/export-pdf.32b1a2d8.js": "sha384-ybmG79nEz8qi9KXvtgRaVmcOx0OQ05W5EPvHpHjRaOh23qlOF/dp89rVgoLuFw6o", + "/build/export-pdf.395749ab.js": "sha384-3Hjvmu4FC/0dhHnR8kyRBU7k2xMNy1lxBpGgOkrw8PxXnwyQDM8/5bQmkJbjVT1+", "/build/export-pdf.d8a6c23b.css": "sha384-ztepocHE4rnGE9eKZ4kL6jTKaePUyiwiB9TjJjstjpf/ckcKg1HedrEOOk/8ElJg", - "/build/invoice.e9e8aa7d.js": "sha384-JIXe1hyboSIC1ANrcga4w62hoZFpGzBMTzYjVenZ8+1NMXC0PXC/ZqsGiYh/uy0I", + "/build/invoice.773af9c4.js": "sha384-QmMqYJ0RP2WOYU7D4lLzKCBFDL6vCvZHQc7wf8K8N+hdCuTJwq1P0GuY81f30/SY", "/build/invoice.595f2ed8.css": "sha384-pPD6gjc24k+qRscW+AS0trqN2MrBI7l0YbFvIjudaoOG0fWHuxpbGBP7P3E1er5a", - "/build/invoice-pdf.502e6e63.js": "sha384-rA+sITn2mkcoezrJYcY8j0kfp9kc9nadewwE4PMIfGwwK7m44HY9vCy1ZCA3Er2f", + "/build/invoice-pdf.26d98626.js": "sha384-gwNzQiU1y6qU/M9DPGiNW0MVZkLctEHk37sCES2X9ov+zugEaDABdkMjKBYOC9lz", "/build/invoice-pdf.2b749265.css": "sha384-DXXgkz2WWnrWnfBnXX5fmfPQSPb98upMnWxYKwTGYS04EhrPIWfDCutB2unIrWh7", - "/build/chart.7e725b75.js": "sha384-dxi1x1S516fKFFrYP4w6XFqGHTurW8YBh7P5nt11amur+3B08JH0/yuyXNZvP8la", - "/build/calendar.cf8275ae.js": "sha384-opOQIFRD/XVjA2W1QVyoLeRuYHUf55RRYrZVEyYNKHs9VZzKFOTMBC/8PxBqQw+m", + "/build/chart.62631acc.js": "sha384-L4evSO0OZiQt+jTqfMR70M2Vid7Hl5YdPocC6syhSoBRavlf7Az9/Ldh4YJUuwAU", + "/build/calendar.7415ab21.js": "sha384-+iYr7VnMIxSQMERlaruX2Ktp6gWmGSyCxfUAaeSDkoninXdUdiKBjlcZZwhHhZWU", "/build/calendar.d757753e.css": "sha384-cTmQMgHYjd2gfObFWmEUph7qQLCyXaIkneSf+bQ2mqVmZwqOB+pJOm/UYTyTjALJ", - "/build/dashboard.e3ce6fbb.js": "sha384-275eWBbQLvReq7BrXYcRgGnBrhki1xvdoqnwRVYGbD3S+BhUZEeez7aZ6XepdpcR", + "/build/dashboard.632f98fb.js": "sha384-PlHarP53f8b+47VZvbQw3LURA2vODFf7UMwpnktvukrhswaHtx93cx2M1BtO56JH", "/build/dashboard.b7129fa1.css": "sha384-2nn5hLA+3YedgHYBpge62S8Losj8aoPwK9Zk9EvN1xEYatvOUQ7H3rIR2UUJAGOS" } } \ No newline at end of file diff --git a/public/build/export-pdf.32b1a2d8.js b/public/build/export-pdf.32b1a2d8.js deleted file mode 100644 index 1af8c14c..00000000 --- a/public/build/export-pdf.32b1a2d8.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkkimai2=self.webpackChunkkimai2||[]).push([[872],{878:function(i,n,u){u(3385)},3385:function(i,n,u){"use strict";u.r(n)}},function(i){var n;n=878,i(i.s=n)}]); \ No newline at end of file diff --git a/public/build/export-pdf.395749ab.js b/public/build/export-pdf.395749ab.js new file mode 100644 index 00000000..24861d65 --- /dev/null +++ b/public/build/export-pdf.395749ab.js @@ -0,0 +1 @@ +(self.webpackChunkkimai=self.webpackChunkkimai||[]).push([[872],{878:function(i,n,u){u(3385)},3385:function(i,n,u){"use strict";u.r(n)}},function(i){var n;n=878,i(i.s=n)}]); \ No newline at end of file diff --git a/public/build/invoice-pdf.26d98626.js b/public/build/invoice-pdf.26d98626.js new file mode 100644 index 00000000..8332f13b --- /dev/null +++ b/public/build/invoice-pdf.26d98626.js @@ -0,0 +1 @@ +(self.webpackChunkkimai=self.webpackChunkkimai||[]).push([[117],{1555:function(i,n,u){u(6620)},6620:function(i,n,u){"use strict";u.r(n)}},function(i){var n;n=1555,i(i.s=n)}]); \ No newline at end of file diff --git a/public/build/invoice-pdf.502e6e63.js b/public/build/invoice-pdf.502e6e63.js deleted file mode 100644 index b4fdc7b3..00000000 --- a/public/build/invoice-pdf.502e6e63.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkkimai2=self.webpackChunkkimai2||[]).push([[117],{1555:function(i,n,u){u(6620)},6620:function(i,n,u){"use strict";u.r(n)}},function(i){var n;n=1555,i(i.s=n)}]); \ No newline at end of file diff --git a/public/build/invoice.773af9c4.js b/public/build/invoice.773af9c4.js new file mode 100644 index 00000000..eadea038 --- /dev/null +++ b/public/build/invoice.773af9c4.js @@ -0,0 +1 @@ +(self.webpackChunkkimai=self.webpackChunkkimai||[]).push([[896],{4820:function(i,n,u){u(3631)},3631:function(i,n,u){"use strict";u.r(n)}},function(i){var n;n=4820,i(i.s=n)}]); \ No newline at end of file diff --git a/public/build/invoice.e9e8aa7d.js b/public/build/invoice.e9e8aa7d.js deleted file mode 100644 index 767885da..00000000 --- a/public/build/invoice.e9e8aa7d.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkkimai2=self.webpackChunkkimai2||[]).push([[896],{4820:function(i,n,u){u(3631)},3631:function(i,n,u){"use strict";u.r(n)}},function(i){var n;n=4820,i(i.s=n)}]); \ No newline at end of file diff --git a/public/build/manifest.json b/public/build/manifest.json index eccd4919..0dc70b7b 100644 --- a/public/build/manifest.json +++ b/public/build/manifest.json @@ -1,20 +1,20 @@ { "build/app.css": "/build/app.899af573.css", - "build/app.js": "/build/app.ea4d46bf.js", + "build/app.js": "/build/app.7719f352.js", "build/app-rtl.css": "/build/app-rtl.bb694a34.css", - "build/app-rtl.js": "/build/app-rtl.6669505e.js", + "build/app-rtl.js": "/build/app-rtl.7a875ca7.js", "build/export-pdf.css": "/build/export-pdf.d8a6c23b.css", - "build/export-pdf.js": "/build/export-pdf.32b1a2d8.js", + "build/export-pdf.js": "/build/export-pdf.395749ab.js", "build/invoice.css": "/build/invoice.595f2ed8.css", - "build/invoice.js": "/build/invoice.e9e8aa7d.js", + "build/invoice.js": "/build/invoice.773af9c4.js", "build/invoice-pdf.css": "/build/invoice-pdf.2b749265.css", - "build/invoice-pdf.js": "/build/invoice-pdf.502e6e63.js", - "build/chart.js": "/build/chart.7e725b75.js", + "build/invoice-pdf.js": "/build/invoice-pdf.26d98626.js", + "build/chart.js": "/build/chart.62631acc.js", "build/calendar.css": "/build/calendar.d757753e.css", - "build/calendar.js": "/build/calendar.cf8275ae.js", + "build/calendar.js": "/build/calendar.7415ab21.js", "build/dashboard.css": "/build/dashboard.b7129fa1.css", - "build/dashboard.js": "/build/dashboard.e3ce6fbb.js", - "build/runtime.js": "/build/runtime.74179306.js", + "build/dashboard.js": "/build/dashboard.632f98fb.js", + "build/runtime.js": "/build/runtime.6c399d29.js", "build/fonts/fa-solid-900.ttf": "/build/fonts/fa-solid-900.ad1782c7.ttf", "build/fonts/fa-brands-400.ttf": "/build/fonts/fa-brands-400.26b80c88.ttf", "build/fonts/fa-solid-900.woff2": "/build/fonts/fa-solid-900.83a538a0.woff2", diff --git a/public/build/runtime.74179306.js b/public/build/runtime.6c399d29.js similarity index 92% rename from public/build/runtime.74179306.js rename to public/build/runtime.6c399d29.js index 31a7f38b..dcd59bfe 100644 --- a/public/build/runtime.74179306.js +++ b/public/build/runtime.6c399d29.js @@ -1 +1 @@ -!function(){"use strict";var e,r={},n={};function t(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}t.m=r,t.amdO={},e=[],t.O=function(r,n,o,i){if(!n){var u=1/0;for(l=0;l=i)&&Object.keys(t.O).every((function(e){return t.O[e](n[a])}))?n.splice(a--,1):(f=!1,i0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[n,o,i]},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,{a:r}),r},t.d=function(e,r){for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.hmd=function(e){return(e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={121:0};t.O.j=function(r){return 0===e[r]};var r=function(r,n){var o,i,u=n[0],f=n[1],a=n[2],c=0;if(u.some((function(r){return 0!==e[r]}))){for(o in f)t.o(f,o)&&(t.m[o]=f[o]);if(a)var l=a(t)}for(r&&r(n);c=i)&&Object.keys(t.O).every((function(e){return t.O[e](n[a])}))?n.splice(a--,1):(f=!1,i0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[n,o,i]},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,{a:r}),r},t.d=function(e,r){for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.hmd=function(e){return(e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={121:0};t.O.j=function(r){return 0===e[r]};var r=function(r,n){var o,i,u=n[0],f=n[1],a=n[2],c=0;if(u.some((function(r){return 0!==e[r]}))){for(o in f)t.o(f,o)&&(t.m[o]=f[o]);if(a)var l=a(t)}for(r&&r(n);cgetApplication()->find('doctrine:schema:drop'); - $command->run(new ArrayInput(['--force' => true]), $output); + $command->run(new ArrayInput(['--force' => true, '--full-database' => true]), $output); } catch (Exception $ex) { $io->error('Failed to drop database schema: ' . $ex->getMessage()); diff --git a/src/Command/ResetTestCommand.php b/src/Command/ResetTestCommand.php index 6af557b8..32d3df1a 100644 --- a/src/Command/ResetTestCommand.php +++ b/src/Command/ResetTestCommand.php @@ -18,13 +18,10 @@ use App\Entity\Team; use App\Entity\User; use App\Entity\UserPreference; use Doctrine\ORM\EntityManagerInterface; -use Exception; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; /** @@ -213,18 +210,4 @@ final class ResetTestCommand extends AbstractResetCommand $this->entityManager->flush(); } - - protected function dropSchema(SymfonyStyle $io, OutputInterface $output): int - { - try { - $command = $this->getApplication()->find('doctrine:schema:drop'); - $command->run(new ArrayInput(['--force' => true, '--full-database' => true]), $output); - } catch (Exception $ex) { - $io->error('Failed to drop database schema: ' . $ex->getMessage()); - - return Command::FAILURE; - } - - return Command::SUCCESS; - } } diff --git a/src/Constants.php b/src/Constants.php index 5b668854..11c41cd7 100644 --- a/src/Constants.php +++ b/src/Constants.php @@ -12,16 +12,16 @@ namespace App; /** * Some "very" global constants for Kimai. */ -class Constants +final class Constants { /** * The current release version */ - public const VERSION = '2.27.0'; + public const VERSION = '2.28.0'; /** * The current release: major * 10000 + minor * 100 + patch */ - public const VERSION_ID = 22700; + public const VERSION_ID = 22800; /** * The software name */ diff --git a/src/Export/Base/CsvRenderer.php b/src/Export/Base/CsvRenderer.php index 566bbd09..b54bcb5c 100644 --- a/src/Export/Base/CsvRenderer.php +++ b/src/Export/Base/CsvRenderer.php @@ -15,6 +15,7 @@ use App\Export\Package\SpoutSpreadsheet; use App\Export\RendererInterface; use App\Export\TimesheetExportInterface; use App\Repository\Query\TimesheetQuery; +use OpenSpout\Writer\CSV\Options; use OpenSpout\Writer\CSV\Writer; use Symfony\Component\HttpFoundation\Response; @@ -58,7 +59,10 @@ final class CsvRenderer implements RendererInterface, TimesheetExportInterface throw new \Exception('Could not open temporary file'); } - $spreadsheet = new SpoutSpreadsheet(new Writer()); + $options = new Options(); + $options->SHOULD_ADD_BOM = false; + + $spreadsheet = new SpoutSpreadsheet(new Writer($options)); $spreadsheet->open($filename); $this->spreadsheetRenderer->writeSpreadsheet($spreadsheet, $exportItems, $query); diff --git a/src/Widget/Type/PaginatedWorkingTimeChart.php b/src/Widget/Type/PaginatedWorkingTimeChart.php index 922e2191..d04ff533 100644 --- a/src/Widget/Type/PaginatedWorkingTimeChart.php +++ b/src/Widget/Type/PaginatedWorkingTimeChart.php @@ -144,6 +144,7 @@ final class PaginatedWorkingTimeChart extends AbstractWidget return [ 'begin' => clone $weekBegin, 'end' => clone $weekEnd, + 'dateYear' => $year, 'thisMonth' => $thisMonth, 'lastWeekInYear' => $lastWeekInYear, 'lastWeekInLastYear' => $lastWeekInLastYear, diff --git a/templates/emails/confirmation.html.twig b/templates/emails/confirmation.html.twig index 1e935214..f1af621a 100644 --- a/templates/emails/confirmation.html.twig +++ b/templates/emails/confirmation.html.twig @@ -10,8 +10,4 @@ - - - -

{{ 'automated_email_dont_answer'|trans({}, 'email') }}

{% endblock %} diff --git a/templates/emails/default.html.twig b/templates/emails/default.html.twig index 3d75c380..e8dd0835 100644 --- a/templates/emails/default.html.twig +++ b/templates/emails/default.html.twig @@ -6,8 +6,4 @@ {% block body %}

{{ body|trans({}, 'email') }}

- - - -

{{ 'automated_email_dont_answer'|trans({}, 'email') }}

{% endblock %} diff --git a/templates/emails/layout.html.twig b/templates/emails/layout.html.twig index 32171f46..9f5756dd 100644 --- a/templates/emails/layout.html.twig +++ b/templates/emails/layout.html.twig @@ -10,6 +10,6 @@ -

{{ 'automated_email_dont_answer'|trans({}, 'email') }}

+ {% block no_answer %}

{{ 'automated_email_dont_answer'|trans({}, 'email') }}

{% endblock %} {% endapply %} diff --git a/templates/widget/widget-paginatedworkingtimechart.html.twig b/templates/widget/widget-paginatedworkingtimechart.html.twig index 1ceaef6f..2935ba47 100644 --- a/templates/widget/widget-paginatedworkingtimechart.html.twig +++ b/templates/widget/widget-paginatedworkingtimechart.html.twig @@ -60,7 +60,7 @@
{{ data.year|duration }}
- {{ 'stats.workingTimeYear'|trans({'%year%': data.thisMonth|date_format('Y')}) }} + {{ 'stats.workingTimeYear'|trans({'%year%': data.dateYear}) }}
{% endif %} diff --git a/tests/Widget/Type/PaginatedWorkingTimeChartTest.php b/tests/Widget/Type/PaginatedWorkingTimeChartTest.php index e7200fa3..ecdf23e1 100644 --- a/tests/Widget/Type/PaginatedWorkingTimeChartTest.php +++ b/tests/Widget/Type/PaginatedWorkingTimeChartTest.php @@ -24,9 +24,6 @@ use PHPUnit\Framework\TestCase; */ class PaginatedWorkingTimeChartTest extends TestCase { - /** - * @return PaginatedWorkingTimeChart - */ public function createSut(): PaginatedWorkingTimeChart { $repository = $this->createMock(TimesheetRepository::class); @@ -73,7 +70,7 @@ class PaginatedWorkingTimeChartTest extends TestCase $repository = $this->createMock(TimesheetRepository::class); $expectedKeys = [ - 'begin', 'end', 'thisMonth', 'lastWeekInYear', 'lastWeekInLastYear', 'day', 'week', 'month', 'year', 'financial', 'financialBegin' + 'begin', 'end', 'dateYear', 'thisMonth', 'lastWeekInYear', 'lastWeekInLastYear', 'day', 'week', 'month', 'year', 'financial', 'financialBegin' ]; $configuration = SystemConfigurationFactory::createStub(['company' => ['financial_year' => null]]); @@ -101,7 +98,7 @@ class PaginatedWorkingTimeChartTest extends TestCase $repository = $this->createMock(TimesheetRepository::class); $expectedKeys = [ - 'begin', 'end', 'thisMonth', 'lastWeekInYear', 'lastWeekInLastYear', 'day', 'week', 'month', 'year', 'financial', 'financialBegin' + 'begin', 'end', 'dateYear', 'thisMonth', 'lastWeekInYear', 'lastWeekInLastYear', 'day', 'week', 'month', 'year', 'financial', 'financialBegin' ]; $configuration = SystemConfigurationFactory::createStub(['company' => ['financial_year' => '2020-01-01']]); diff --git a/yarn.lock b/yarn.lock index 75ecf083..76211570 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4217,9 +4217,9 @@ __metadata: languageName: node linkType: hard -"kimai2@workspace:.": +"kimai@workspace:.": version: 0.0.0-use.local - resolution: "kimai2@workspace:." + resolution: "kimai@workspace:." dependencies: "@babel/core": "npm:^7" "@babel/eslint-parser": "npm:^7"