diff --git a/abp_io/src/Volo.AbpWebSite.Web/gulpfile.js b/abp_io/src/Volo.AbpWebSite.Web/gulpfile.js index db4c6fd03c..f7ebc78f23 100644 --- a/abp_io/src/Volo.AbpWebSite.Web/gulpfile.js +++ b/abp_io/src/Volo.AbpWebSite.Web/gulpfile.js @@ -4,8 +4,6 @@ var gulp = require("gulp"), path = require('path'), copyResources = require('./node_modules/@abp/aspnetcore.mvc.ui/gulp/copy-resources.js'); -copyResources.init(path.resolve('./')); - -gulp.task('default', [copyResources.taskName], function () { - -}); \ No newline at end of file +exports.default = function(){ + return copyResources(path.resolve('./')); +}; \ No newline at end of file diff --git a/abp_io/src/Volo.AbpWebSite.Web/package.json b/abp_io/src/Volo.AbpWebSite.Web/package.json index 4ea43ebe02..e3ca1c54d2 100644 --- a/abp_io/src/Volo.AbpWebSite.Web/package.json +++ b/abp_io/src/Volo.AbpWebSite.Web/package.json @@ -3,7 +3,7 @@ "name": "volo.aspnetzero.support", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "^0.4.9", + "@abp/aspnetcore.mvc.ui.theme.basic": "^0.6.4", "@abp/blogging": "^0.4.9", "@abp/docs": "^0.5.1" } diff --git a/docs/cs/Contribution/Index.md b/docs/cs/Contribution/Index.md new file mode 100644 index 0000000000..667dac84b6 --- /dev/null +++ b/docs/cs/Contribution/Index.md @@ -0,0 +1,52 @@ +## Průvodce pro přispěvatele + +ABP je [open source](https://github.com/abpframework) a komunitně řízený projekt. Tento průvodce má za cíl pomoci každému kdo chce do projektu nějak přispět. + +### Příspěvek kódu + +Vždy můžete zaslat pull request do Github repositáře. + +- Naklonujte [ABP repozitář](https://github.com/abpframework/abp/) z Githubu. +- Učiňte potřebné změny. +- Zašlete pull request. + +Než budete dělat nějaké změny, diskutujte o nich prosím na [Github problémy](https://github.com/abpframework/abp/issues). Díky tomu nebude žádný jiný vývojář pracovat na stejném problému a Váš PR má lepší šanci na to být přijat. + +#### Opravy chyb a vylepšení + +Pokud chcete opravit známou chybu nebo pracovat na plánovaném vylepšení podívejte se na [seznam problémů](https://github.com/abpframework/abp/issues) na Githubu. + +#### Požadavky na funkce + +Pokud máte nápad na funkci pro framework nebo modul [vytvořte problém](https://github.com/abpframework/abp/issues/new) na Githubu nebo se připojte ke stávající diskuzi. V případě přijetí komunitou ho pak můžete implementovat. + +### Překlad dokumentů + +Pokud chcete přeložit celou [dokumentaci](https://abp.io/documents/) (včetně této stránky) do Vašeho rodného jazyka, následujte tyto kroky: + +* Naklonujte [ABP repozitář](https://github.com/abpframework/abp/) z Githubu. +* K přidání nového jazyka vytvořte novou složku v [docs](https://github.com/abpframework/abp/tree/master/docs). Název složky musí být "en", "es", "fr", "tr" atd. v závislosti na jazyku (navštivte [všechny jazykové kódy](https://msdn.microsoft.com/en-us/library/hh441729.aspx)). +* Pro referenci použijte ["en" složku](https://github.com/abpframework/abp/tree/master/docs/en) a její názvy souborů a strom složek. Při překladu této dokumentace zachovejte prosím tyto názvy stejné. +* Zašlete pull request (PR) po překladu jakéhokoliv dokumentu klidně i po jednom. Nečekejte až budete mít překlad všech dokumentů. + +### Lokalizace zdrojů + +ABP framework má flexibilní [lokalizační systém](../Localization.md). Můžete tak vytvořit lokalizované uživatelské prostředí pro svou vlastní aplikaci. + +K tomu mají framework a vestavěné moduly již lokalizované texty. Například [lokalizační texty pro Volo.Abp.UI balík](https://github.com/abpframework/abp/blob/master/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json). Můžete vytvořit nový soubor ve [stejné složce](https://github.com/abpframework/abp/tree/master/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi) k přidání překladu. + +* Naklonujte [ABP repozitář](https://github.com/abpframework/abp/) z Githubu. +* Vytvořte nový soubor pro cílový jazyk pro lokalizační text v (json) souboru (u souboru en.json). +* Zkopírujte veškerý text ze souboru en.json. +* Přeložte texty. +* Zašlete pull request na Githubu. + +ABP je modulářní framework, proto je zde mnoho zdrojů lokalizačních textů, jeden pro každý modul. K najití všech .json souborů, vyhledejte po naklonování repozitáře soubory "en.json". Můžete se taky podívat na [tento seznam](Localization-Text-Files.md) souborů lokalizačních textů. + +### Příspevky do blogu a návody + +Pokud se rozhodnete pro ABP vytvořit nějaké návody nebo příspěvky do blogu, dejte nám vědět (prostřednictvím [Github problémy](https://github.com/abpframework/abp/issues)), ať můžeme přidat odkaz na Váš návod/příspěvek v oficiální dokumentaci a oznámit na našem [Twitter účtu](https://twitter.com/abpframework). + +### Zpráva o chybě + +Pokud najdete chybu, [vytvořte prosím problém v Github repozitáři](https://github.com/abpframework/abp/issues/new). diff --git a/docs/cs/Contribution/Localization-Text-Files.md b/docs/cs/Contribution/Localization-Text-Files.md new file mode 100644 index 0000000000..8ec7e63fc7 --- /dev/null +++ b/docs/cs/Contribution/Localization-Text-Files.md @@ -0,0 +1,40 @@ +## Textové soubory pro lokalizaci + +Toto je seznam lokalizačních textových souborů pro každého kdo chce přispět k překladu textů ve frameworku. Tento seznam budeme udržovat aktuální: + +* https://github.com/abpframework/abp/tree/master/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/en.json +* https://github.com/abpframework/abp/tree/master/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpValidation/en.json +* https://github.com/abpframework/abp/tree/master/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Localization/Resource/en.json +* https://github.com/abpframework/abp/tree/master/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json +* https://github.com/abpframework/abp/tree/master/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/Resource/en.json +* https://github.com/abpframework/abp/tree/master/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/en.json +* https://github.com/abpframework/abp/tree/master/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/CountryNames/en.json +* https://github.com/abpframework/abp/tree/master/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/Validation/en.json +* https://github.com/abpframework/abp/tree/master/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Source/en.json +* https://github.com/abpframework/abp/tree/master/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/en.json +* https://github.com/abpframework/abp/tree/master/modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/en.json +* https://github.com/abpframework/abp/tree/master/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Localization/Resources/Blogging/ApplicationContracts/en.json +* https://github.com/abpframework/abp/tree/master/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/en.json +* https://github.com/abpframework/abp/tree/master/modules/docs/app/VoloDocs.Web/Localization/Resources/VoloDocs/Web/en.json +* https://github.com/abpframework/abp/tree/master/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/en.json +* https://github.com/abpframework/abp/tree/master/modules/docs/src/Volo.Docs.Admin.Web/Localization/Resources/Docs/Web/en.json +* https://github.com/abpframework/abp/tree/master/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/en.json +* https://github.com/abpframework/abp/tree/master/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/Localization/ApplicationContracts/en.json +* https://github.com/abpframework/abp/tree/master/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/en.json +* https://github.com/abpframework/abp/tree/master/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/en.json +* https://github.com/abpframework/abp/tree/master/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/Localization/ApplicationContracts/en.json +* https://github.com/abpframework/abp/tree/master/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/Localization/Domain/en.json +* https://github.com/abpframework/abp/tree/master/modules/identity/src/Volo.Abp.Identity.Web/Localization/Resources/AbpIdentity/en.json +* https://github.com/abpframework/abp/tree/master/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/en.json +* https://github.com/abpframework/abp/tree/master/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/en.json +* https://github.com/abpframework/abp/tree/master/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/en.json +* https://github.com/abpframework/abp/tree/master/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Localization/Resources/AbpTenantManagement/Web/en.json +* https://github.com/abpframework/abp/tree/master/samples/BookStore/src/Acme.BookStore.Domain.Shared/Localization/BookStore/en.json +* https://github.com/abpframework/abp/tree/master/samples/DashboardDemo/src/DashboardDemo.Domain/Localization/DashboardDemo/en.json +* https://github.com/abpframework/abp/tree/master/samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/ProductManagement/Localization/ApplicationContracts/en.json +* https://github.com/abpframework/abp/tree/master/samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain/ProductManagement/Localization/Domain/en.json +* https://github.com/abpframework/abp/tree/master/samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/Localization/Resources/ProductManagement/en.json +* https://github.com/abpframework/abp/tree/master/templates/mvc-module/src/MyCompanyName.MyProjectName.Application.Contracts/Localization/MyProjectName/ApplicationContracts/en.json +* https://github.com/abpframework/abp/tree/master/templates/mvc-module/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/DomainShared/en.json +* https://github.com/abpframework/abp/tree/master/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Localization/MyProjectName/Web/en.json +* https://github.com/abpframework/abp/tree/master/templates/mvc/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/en.json diff --git a/docs/cs/docs-nav.json b/docs/cs/docs-nav.json index 4b976b4812..6f41d127e8 100644 --- a/docs/cs/docs-nav.json +++ b/docs/cs/docs-nav.json @@ -218,7 +218,7 @@ }, { "text": "Tag pomocníci", - "path": "Tag-Helpers.md" + "path": "AspNetCore/Tag-Helpers/Index.md" }, { "text": "Motivy", diff --git a/docs/cs/images/bookstore-apis.png b/docs/cs/images/bookstore-apis.png new file mode 100644 index 0000000000..aedd79c7f1 Binary files /dev/null and b/docs/cs/images/bookstore-apis.png differ diff --git a/docs/cs/images/bookstore-create-template.png b/docs/cs/images/bookstore-create-template.png new file mode 100644 index 0000000000..7cc96c8c94 Binary files /dev/null and b/docs/cs/images/bookstore-create-template.png differ diff --git a/docs/cs/images/bookstore-homepage.png b/docs/cs/images/bookstore-homepage.png new file mode 100644 index 0000000000..5e5b512220 Binary files /dev/null and b/docs/cs/images/bookstore-homepage.png differ diff --git a/docs/cs/images/bookstore-user-management-v2.png b/docs/cs/images/bookstore-user-management-v2.png new file mode 100644 index 0000000000..dd95740754 Binary files /dev/null and b/docs/cs/images/bookstore-user-management-v2.png differ diff --git a/docs/cs/images/bookstore-visual-studio-solution-tiered.png b/docs/cs/images/bookstore-visual-studio-solution-tiered.png new file mode 100644 index 0000000000..19662bf731 Binary files /dev/null and b/docs/cs/images/bookstore-visual-studio-solution-tiered.png differ diff --git a/docs/cs/images/bookstore-visual-studio-solution-v3.png b/docs/cs/images/bookstore-visual-studio-solution-v3.png new file mode 100644 index 0000000000..307e3516a5 Binary files /dev/null and b/docs/cs/images/bookstore-visual-studio-solution-v3.png differ diff --git a/docs/cs/images/build-action-embedded-resource-sample.png b/docs/cs/images/build-action-embedded-resource-sample.png new file mode 100644 index 0000000000..d001c5d19f Binary files /dev/null and b/docs/cs/images/build-action-embedded-resource-sample.png differ diff --git a/docs/cs/images/create-new-aspnet-core-application.png b/docs/cs/images/create-new-aspnet-core-application.png new file mode 100644 index 0000000000..fe78b9051d Binary files /dev/null and b/docs/cs/images/create-new-aspnet-core-application.png differ diff --git a/docs/cs/images/create-new-net-core-console-application.png b/docs/cs/images/create-new-net-core-console-application.png new file mode 100644 index 0000000000..c5f39bfb37 Binary files /dev/null and b/docs/cs/images/create-new-net-core-console-application.png differ diff --git a/docs/cs/images/db-migrator-app.png b/docs/cs/images/db-migrator-app.png new file mode 100644 index 0000000000..ace6abb226 Binary files /dev/null and b/docs/cs/images/db-migrator-app.png differ diff --git a/docs/cs/images/docs-create-project.jpg b/docs/cs/images/docs-create-project.jpg new file mode 100644 index 0000000000..742f5e307f Binary files /dev/null and b/docs/cs/images/docs-create-project.jpg differ diff --git a/docs/cs/images/docs-module_download-new-abp-project.png b/docs/cs/images/docs-module_download-new-abp-project.png new file mode 100644 index 0000000000..0da3b7a67a Binary files /dev/null and b/docs/cs/images/docs-module_download-new-abp-project.png differ diff --git a/docs/cs/images/docs-module_download-sample-navigation-menu.png b/docs/cs/images/docs-module_download-sample-navigation-menu.png new file mode 100644 index 0000000000..9a1232f198 Binary files /dev/null and b/docs/cs/images/docs-module_download-sample-navigation-menu.png differ diff --git a/docs/cs/images/docs-module_solution-explorer.png b/docs/cs/images/docs-module_solution-explorer.png new file mode 100644 index 0000000000..cafc38f0b0 Binary files /dev/null and b/docs/cs/images/docs-module_solution-explorer.png differ diff --git a/docs/cs/images/github-access-token-private-repo.jpg b/docs/cs/images/github-access-token-private-repo.jpg new file mode 100644 index 0000000000..5bc53cc63d Binary files /dev/null and b/docs/cs/images/github-access-token-private-repo.jpg differ diff --git a/docs/cs/images/github-access-token-public-repo.jpg b/docs/cs/images/github-access-token-public-repo.jpg new file mode 100644 index 0000000000..b909c2cfe5 Binary files /dev/null and b/docs/cs/images/github-access-token-public-repo.jpg differ diff --git a/docs/cs/images/github-myusername.jpg b/docs/cs/images/github-myusername.jpg new file mode 100644 index 0000000000..4ac57eeed4 Binary files /dev/null and b/docs/cs/images/github-myusername.jpg differ diff --git a/docs/cs/images/issuemanagement-module-solution.png b/docs/cs/images/issuemanagement-module-solution.png new file mode 100644 index 0000000000..181924dd90 Binary files /dev/null and b/docs/cs/images/issuemanagement-module-solution.png differ diff --git a/docs/cs/images/layered-project-dependencies-module.png b/docs/cs/images/layered-project-dependencies-module.png new file mode 100644 index 0000000000..7592f49878 Binary files /dev/null and b/docs/cs/images/layered-project-dependencies-module.png differ diff --git a/docs/cs/images/layered-project-dependencies.png b/docs/cs/images/layered-project-dependencies.png new file mode 100644 index 0000000000..c5fd1b3504 Binary files /dev/null and b/docs/cs/images/layered-project-dependencies.png differ diff --git a/docs/cs/images/localization-resource-json-files.png b/docs/cs/images/localization-resource-json-files.png new file mode 100644 index 0000000000..bbbd78c320 Binary files /dev/null and b/docs/cs/images/localization-resource-json-files.png differ diff --git a/docs/cs/images/microservice-sample-authserver-home.png b/docs/cs/images/microservice-sample-authserver-home.png new file mode 100644 index 0000000000..7ae62ad6d5 Binary files /dev/null and b/docs/cs/images/microservice-sample-authserver-home.png differ diff --git a/docs/cs/images/microservice-sample-authserver-login.png b/docs/cs/images/microservice-sample-authserver-login.png new file mode 100644 index 0000000000..f6e8dfaa9f Binary files /dev/null and b/docs/cs/images/microservice-sample-authserver-login.png differ diff --git a/docs/cs/images/microservice-sample-backend-ui-permissions.png b/docs/cs/images/microservice-sample-backend-ui-permissions.png new file mode 100644 index 0000000000..02769be3e5 Binary files /dev/null and b/docs/cs/images/microservice-sample-backend-ui-permissions.png differ diff --git a/docs/cs/images/microservice-sample-backend-ui.png b/docs/cs/images/microservice-sample-backend-ui.png new file mode 100644 index 0000000000..0935a6047a Binary files /dev/null and b/docs/cs/images/microservice-sample-backend-ui.png differ diff --git a/docs/cs/images/microservice-sample-blogservice-permission-in-database.png b/docs/cs/images/microservice-sample-blogservice-permission-in-database.png new file mode 100644 index 0000000000..f99cd39893 Binary files /dev/null and b/docs/cs/images/microservice-sample-blogservice-permission-in-database.png differ diff --git a/docs/cs/images/microservice-sample-diagram-2.png b/docs/cs/images/microservice-sample-diagram-2.png new file mode 100644 index 0000000000..17aea07098 Binary files /dev/null and b/docs/cs/images/microservice-sample-diagram-2.png differ diff --git a/docs/cs/images/microservice-sample-diagram.png b/docs/cs/images/microservice-sample-diagram.png new file mode 100644 index 0000000000..b1d9f6c66e Binary files /dev/null and b/docs/cs/images/microservice-sample-diagram.png differ diff --git a/docs/cs/images/microservice-sample-kibana-1.png b/docs/cs/images/microservice-sample-kibana-1.png new file mode 100644 index 0000000000..f3a51bd349 Binary files /dev/null and b/docs/cs/images/microservice-sample-kibana-1.png differ diff --git a/docs/cs/images/microservice-sample-kibana-2.png b/docs/cs/images/microservice-sample-kibana-2.png new file mode 100644 index 0000000000..31b281486c Binary files /dev/null and b/docs/cs/images/microservice-sample-kibana-2.png differ diff --git a/docs/cs/images/microservice-sample-product-module-in-solution.png b/docs/cs/images/microservice-sample-product-module-in-solution.png new file mode 100644 index 0000000000..27e841cdd5 Binary files /dev/null and b/docs/cs/images/microservice-sample-product-module-in-solution.png differ diff --git a/docs/cs/images/microservice-sample-public-product-list.png b/docs/cs/images/microservice-sample-public-product-list.png new file mode 100644 index 0000000000..cf8649bbe5 Binary files /dev/null and b/docs/cs/images/microservice-sample-public-product-list.png differ diff --git a/docs/cs/images/microservice-sample-solution.png b/docs/cs/images/microservice-sample-solution.png new file mode 100644 index 0000000000..4c8344ed68 Binary files /dev/null and b/docs/cs/images/microservice-sample-solution.png differ diff --git a/docs/cs/images/microservice-sample-update-database-authserver.png b/docs/cs/images/microservice-sample-update-database-authserver.png new file mode 100644 index 0000000000..689019b587 Binary files /dev/null and b/docs/cs/images/microservice-sample-update-database-authserver.png differ diff --git a/docs/cs/images/microservice-sample-update-database-products.png b/docs/cs/images/microservice-sample-update-database-products.png new file mode 100644 index 0000000000..b49c2a8f8e Binary files /dev/null and b/docs/cs/images/microservice-sample-update-database-products.png differ diff --git a/docs/cs/images/module-layers-and-packages.jpg b/docs/cs/images/module-layers-and-packages.jpg new file mode 100644 index 0000000000..f71a91eb8d Binary files /dev/null and b/docs/cs/images/module-layers-and-packages.jpg differ diff --git a/docs/cs/images/night-build-add-nuget-package.png b/docs/cs/images/night-build-add-nuget-package.png new file mode 100644 index 0000000000..c3621ef7d9 Binary files /dev/null and b/docs/cs/images/night-build-add-nuget-package.png differ diff --git a/docs/cs/images/night-build-add-nuget-source.png b/docs/cs/images/night-build-add-nuget-source.png new file mode 100644 index 0000000000..8fd4b9365a Binary files /dev/null and b/docs/cs/images/night-build-add-nuget-source.png differ diff --git a/docs/cs/images/pcm-update-database-v2.png b/docs/cs/images/pcm-update-database-v2.png new file mode 100644 index 0000000000..d5bb9c2975 Binary files /dev/null and b/docs/cs/images/pcm-update-database-v2.png differ diff --git a/docs/cs/images/pcm-update-database.png b/docs/cs/images/pcm-update-database.png new file mode 100644 index 0000000000..ac53f0db4f Binary files /dev/null and b/docs/cs/images/pcm-update-database.png differ diff --git a/docs/cs/images/select-empty-web-application.png b/docs/cs/images/select-empty-web-application.png new file mode 100644 index 0000000000..b0cd89a27a Binary files /dev/null and b/docs/cs/images/select-empty-web-application.png differ diff --git a/docs/cs/images/set-as-startup-project.png b/docs/cs/images/set-as-startup-project.png new file mode 100644 index 0000000000..13da5caf6c Binary files /dev/null and b/docs/cs/images/set-as-startup-project.png differ diff --git a/docs/cs/images/tiered-solution-applications.png b/docs/cs/images/tiered-solution-applications.png new file mode 100644 index 0000000000..fb6ede7ac5 Binary files /dev/null and b/docs/cs/images/tiered-solution-applications.png differ diff --git a/docs/cs/images/tiered-solution-servers.png b/docs/cs/images/tiered-solution-servers.png new file mode 100644 index 0000000000..3c999b4b45 Binary files /dev/null and b/docs/cs/images/tiered-solution-servers.png differ diff --git a/docs/cs/images/volodocs-iis-add-website.png b/docs/cs/images/volodocs-iis-add-website.png new file mode 100644 index 0000000000..878b3e8f0c Binary files /dev/null and b/docs/cs/images/volodocs-iis-add-website.png differ diff --git a/docs/cs/images/volodocs-iis-application-pool.png b/docs/cs/images/volodocs-iis-application-pool.png new file mode 100644 index 0000000000..cc5186f50b Binary files /dev/null and b/docs/cs/images/volodocs-iis-application-pool.png differ diff --git a/docs/en/Blog-Posts/2019-06-19 v0_18_Release/Post.md b/docs/en/Blog-Posts/2019-06-19 v0_18_Release/Post.md new file mode 100644 index 0000000000..9b322af754 --- /dev/null +++ b/docs/en/Blog-Posts/2019-06-19 v0_18_Release/Post.md @@ -0,0 +1,88 @@ +# ABP CLI, New Templates & Other Features with the v0.18 Release + +ABP v0.18 has been released with [70+ issues](https://github.com/abpframework/abp/milestone/16?closed=1) resolved and [500+ commits](https://github.com/abpframework/abp/compare/0.17.0.0...0.18.0) pushed. + +## Web Site Changes + +[abp.io](https://abp.io) web site is **completely renewed** to highlight the goals and important features of the ABP framework. Document & blog URLs are also changed: + +- `abp.io/documents` moved to [docs.abp.io](https://docs.abp.io). +- `abp.io/blog` moved to [blog.abp.io](https://blog.abp.io). + +## ABP CLI + +ABP CLI (Command Line Interface) is a new global command line tool to perform some common operations for ABP based solutions. Main functions are; + +* **Creating a new application** or module project. +* **Adding a new module** to an application. +* **Updating** all ABP related packages in a solution. + +ABP CLI is now the preferred way to create a new project, while you can still download a new project from the [get started](https://abp.io/get-started) page. + +### Usage + +Install the ABP CLI using a command line window: + +````bash +dotnet tool install -g Volo.Abp.Cli +```` + +Create a new application: + +````bash +abp new Acme.BookStore +```` + +Add a module to an application: + +````bash +abp add-module Volo.Blogging +```` + +Update all ABP related packages in a solution: + +````bash +abp update +```` + +See [ABP CLI documentation](https://docs.abp.io/en/abp/latest/CLI) for details. + +## New Templates + +In this release, we've renewed all startup templates. The main goal is to provide better startup templates based on Domain Driven Design layers those also allow to create tiered solutions (where Web and API layers can be physically separated). It also includes unit & integration test projects separated for different layers. + +The image below shows the new startup project for an MVC application. + +![mvc-template-solution](mvc-template-solution.png) + +See the [startup templates document](https://docs.abp.io/en/abp/latest/Startup-Templates/Index) for details. + +## Change Logs + +Here are some other features and enhancements coming with this release: + +* New data seed system with `IDataSeeder` service & `IDataSeedContributor` interface to allow a modular initial data seed system. +* New [Volo.Abp.Specifications](https://www.nuget.org/packages/Volo.Abp.Specifications) package. +* Improved MemoryDB implementation to serialize/deserialize objects stored in memory, so it provides more realistic infrastructure for mocking database in unit/integration tests. +* Added multi-language support for the docs module. Used it for the [ABP documentation](https://docs.abp.io). + +See the [GitHub Release Notes](https://github.com/abpframework/abp/releases/tag/0.18.0) for all features, enhancements & bugfixes in this release. + +## Road Map + +One thing related to the ABP v1.0 release is .NET Core / ASP.NET Core 3.0 release. According to the [.NET Core road map](https://github.com/dotnet/core/blob/master/roadmap.md), 3.0 release has been scheduled for September 2019. + +ASP.NET Core comes with big changes and features. As a big breaking change, it will [only run on .NET Core](https://github.com/aspnet/Announcements/issues/324) (dropping .net standard support), so it will not work with full .net framework anymore. + +We had declared to release v1.0 in 2019 Q2. The main works we should do for v1.0 are; + +* Fill the gaps in current features. +* Refactor & improve the current APIs. +* Fix known bugs. +* Complete the documentation & tutorials. + +In addition to the work we should do, we are also considering to wait ASP.NET Core 3.0 release. Because, if we release ABP v1.0 before ASP.NET Core 3.0, we will have to release ABP v2.0 again in a short time and drop v1.0 support. So, we are considering to publish ABP v1.0 RC with ASP.NET Core 3.0 RC and align the final release date with Microsoft. + +## Want to Contribute? + +Thanks to the community for their support for ABP development. It is very appreciated. If you also want to contribute, see [this guide](https://github.com/abpframework/abp/blob/master/docs/en/Contribution/Index.md) as the beginning. \ No newline at end of file diff --git a/docs/en/Blog-Posts/2019-06-19 v0_18_Release/mvc-template-solution.png b/docs/en/Blog-Posts/2019-06-19 v0_18_Release/mvc-template-solution.png new file mode 100644 index 0000000000..307e3516a5 Binary files /dev/null and b/docs/en/Blog-Posts/2019-06-19 v0_18_Release/mvc-template-solution.png differ diff --git a/docs/en/CLI.md b/docs/en/CLI.md index d210560910..1f461c9997 100644 --- a/docs/en/CLI.md +++ b/docs/en/CLI.md @@ -103,7 +103,7 @@ abp add-module Volo.Blogging ### update -Updating all ABP related packages can be tedious since there are many packages of the framework and modules. This command automatically updates all ABP related packages in a solution or project to the latest versions. +Updating all ABP related packages can be tedious since there are many packages of the framework and modules. This command automatically updates all ABP NuGet related packages and NPM packages in a solution or project to the latest versions. Usage: diff --git a/docs/en/Contribution/Index.md b/docs/en/Contribution/Index.md index 74174c97d1..ff39f487d7 100644 --- a/docs/en/Contribution/Index.md +++ b/docs/en/Contribution/Index.md @@ -31,7 +31,7 @@ You may want to translate the complete [documentation](https://abp.io/documents/ ### Resource Localization -ABP framework has a flexible [localization system](https://abp.io/documents/abp/latest/Localization). You can create localized user interfaces for your own application. +ABP framework has a flexible [localization system](../Localization.md). You can create localized user interfaces for your own application. In addition to that, the framework and pre-build modules have already localized texts. As an example, see [the localization texts for the Volo.Abp.UI package](https://github.com/abpframework/abp/blob/master/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json). You can create a new file in the [same folder](https://github.com/abpframework/abp/tree/master/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi) to translate it. diff --git a/docs/zh-Hans/Contribution/Index.md b/docs/zh-Hans/Contribution/Index.md index b6b9839262..a0a7ebc13e 100644 --- a/docs/zh-Hans/Contribution/Index.md +++ b/docs/zh-Hans/Contribution/Index.md @@ -31,7 +31,7 @@ ABP是[开源](https://github.com/abpframework)和社区驱动项目. 本指南 ### 资源本地化 -ABP框架具有灵活的[本地化系统](https://abp.io/documents/abp/latest/Localization). 你可以为自己的应用程序创建本地化用户界面. +ABP框架具有灵活的[本地化系统](../Localization.md). 你可以为自己的应用程序创建本地化用户界面. 除此之外,框架和预构建模块已经本地化了文本.请参阅[Volo.Abp.UI包的本地化文本](https://github.com/abpframework/abp/blob/master/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json).你可以在[相同文件夹](https://github.com/abpframework/abp/tree/master/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi)中创建一个新文件进行翻译. diff --git a/framework/Volo.Abp.sln b/framework/Volo.Abp.sln index 42e4b28516..3c3336de1f 100644 --- a/framework/Volo.Abp.sln +++ b/framework/Volo.Abp.sln @@ -238,9 +238,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Mvc.UI. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Mvc.UI.Dashboards", "src\Volo.Abp.AspNetCore.Mvc.UI.Dashboards\Volo.Abp.AspNetCore.Mvc.UI.Dashboards.csproj", "{054D766D-5992-460E-A4D8-936D80BE2C1A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Ldap", "src\Volo.Abp.Ldap\Volo.Abp.Ldap.csproj", "{4DADBBD2-4C63-4C90-9661-EBF6252A7D6F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Ldap", "src\Volo.Abp.Ldap\Volo.Abp.Ldap.csproj", "{4DADBBD2-4C63-4C90-9661-EBF6252A7D6F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Ldap.Tests", "test\Volo.Abp.Ldap.Tests\Volo.Abp.Ldap.Tests.csproj", "{38FB8F75-426E-4265-8D0E-E121837B6FCC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Ldap.Tests", "test\Volo.Abp.Ldap.Tests\Volo.Abp.Ldap.Tests.csproj", "{38FB8F75-426E-4265-8D0E-E121837B6FCC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Dapper", "src\Volo.Abp.Dapper\Volo.Abp.Dapper.csproj", "{D863A3C3-CC1D-426F-BDD4-02E7AE2A3170}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Dapper.Tests", "test\Volo.Abp.Dapper.Tests\Volo.Abp.Dapper.Tests.csproj", "{E026A085-D881-4AE0-9F08-422AC3903BD7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -720,6 +724,14 @@ Global {38FB8F75-426E-4265-8D0E-E121837B6FCC}.Debug|Any CPU.Build.0 = Debug|Any CPU {38FB8F75-426E-4265-8D0E-E121837B6FCC}.Release|Any CPU.ActiveCfg = Release|Any CPU {38FB8F75-426E-4265-8D0E-E121837B6FCC}.Release|Any CPU.Build.0 = Release|Any CPU + {D863A3C3-CC1D-426F-BDD4-02E7AE2A3170}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D863A3C3-CC1D-426F-BDD4-02E7AE2A3170}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D863A3C3-CC1D-426F-BDD4-02E7AE2A3170}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D863A3C3-CC1D-426F-BDD4-02E7AE2A3170}.Release|Any CPU.Build.0 = Release|Any CPU + {E026A085-D881-4AE0-9F08-422AC3903BD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E026A085-D881-4AE0-9F08-422AC3903BD7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E026A085-D881-4AE0-9F08-422AC3903BD7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E026A085-D881-4AE0-9F08-422AC3903BD7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -843,6 +855,8 @@ Global {054D766D-5992-460E-A4D8-936D80BE2C1A} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {4DADBBD2-4C63-4C90-9661-EBF6252A7D6F} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {38FB8F75-426E-4265-8D0E-E121837B6FCC} = {447C8A77-E5F0-4538-8687-7383196D04EA} + {D863A3C3-CC1D-426F-BDD4-02E7AE2A3170} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} + {E026A085-D881-4AE0-9F08-422AC3903BD7} = {447C8A77-E5F0-4538-8687-7383196D04EA} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {BB97ECF4-9A84-433F-A80B-2A3285BDD1D5} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/Core/CoreStyleContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/Core/CoreStyleContributor.cs new file mode 100644 index 0000000000..94f2e81694 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/Core/CoreStyleContributor.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; + +namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.Core +{ + public class CoreStyleContributor : BundleContributor + { + public override void ConfigureBundle(BundleConfigurationContext context) + { + context.Files.AddIfNotContains("/libs/abp/core/abp.css"); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/FreezeUi/FreezeUiScriptContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/FreezeUi/FreezeUiScriptContributor.cs deleted file mode 100644 index 2c8095290b..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/FreezeUi/FreezeUiScriptContributor.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Collections.Generic; -using Volo.Abp.AspNetCore.Mvc.UI.Bundling; -using Volo.Abp.AspNetCore.Mvc.UI.Packages.Core; -using Volo.Abp.Modularity; - -namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.FreezeUi -{ - [DependsOn(typeof(CoreScriptContributor))] - public class FreezeUiScriptContributor : BundleContributor - { - public override void ConfigureBundle(BundleConfigurationContext context) - { - context.Files.AddIfNotContains("/libs/freeze-ui/freeze-ui.min.js"); - } - } -} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/FreezeUi/FreezeUiStyleContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/FreezeUi/FreezeUiStyleContributor.cs deleted file mode 100644 index 96f4996663..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/FreezeUi/FreezeUiStyleContributor.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Collections.Generic; -using Volo.Abp.AspNetCore.Mvc.UI.Bundling; -using Volo.Abp.AspNetCore.Mvc.UI.Packages.Bootstrap; -using Volo.Abp.Modularity; - -namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.FreezeUi -{ - [DependsOn(typeof(BootstrapStyleContributor))] - public class FreezeUiStyleContributor : BundleContributor - { - public override void ConfigureBundle(BundleConfigurationContext context) - { - context.Files.AddIfNotContains("/libs/freeze-ui/freeze-ui.min.css"); - } - } -} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs index 8271c0e05a..81870fe1d7 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs @@ -1,15 +1,10 @@ using Volo.Abp.AspNetCore.Mvc.UI.Bundling; -using Volo.Abp.AspNetCore.Mvc.UI.Packages.Anchor; using Volo.Abp.AspNetCore.Mvc.UI.Packages.Bootstrap; -using Volo.Abp.AspNetCore.Mvc.UI.Packages.Clipboard; using Volo.Abp.AspNetCore.Mvc.UI.Packages.DatatablesNetBs4; -using Volo.Abp.AspNetCore.Mvc.UI.Packages.FreezeUi; using Volo.Abp.AspNetCore.Mvc.UI.Packages.JQuery; using Volo.Abp.AspNetCore.Mvc.UI.Packages.JQueryForm; using Volo.Abp.AspNetCore.Mvc.UI.Packages.JQueryValidationUnobtrusive; using Volo.Abp.AspNetCore.Mvc.UI.Packages.Lodash; -using Volo.Abp.AspNetCore.Mvc.UI.Packages.MalihuCustomScrollbar; -using Volo.Abp.AspNetCore.Mvc.UI.Packages.Popper; using Volo.Abp.AspNetCore.Mvc.UI.Packages.Select2; using Volo.Abp.AspNetCore.Mvc.UI.Packages.SweetAlert; using Volo.Abp.AspNetCore.Mvc.UI.Packages.Timeago; @@ -28,8 +23,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling typeof(DatatablesNetBs4ScriptContributor), typeof(SweetalertScriptContributor), typeof(ToastrScriptBundleContributor), - typeof(TimeagoScriptContributor), - typeof(FreezeUiScriptContributor))] + typeof(TimeagoScriptContributor) + )] public class SharedThemeGlobalScriptContributor : BundleContributor { public override void ConfigureBundle(BundleConfigurationContext context) @@ -42,8 +37,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling "/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js", "/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js", "/libs/abp/aspnetcore-mvc-ui-theme-shared/sweetalert/abp-sweetalert.js", - "/libs/abp/aspnetcore-mvc-ui-theme-shared/toastr/abp-toastr.js", - "/libs/abp/aspnetcore-mvc-ui-theme-shared/freeze-ui/abp-freeze-ui.js" + "/libs/abp/aspnetcore-mvc-ui-theme-shared/toastr/abp-toastr.js" }); } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalStyleContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalStyleContributor.cs index 7fb8181373..779231802d 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalStyleContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalStyleContributor.cs @@ -1,8 +1,8 @@ using Volo.Abp.AspNetCore.Mvc.UI.Bundling; using Volo.Abp.AspNetCore.Mvc.UI.Packages.Bootstrap; +using Volo.Abp.AspNetCore.Mvc.UI.Packages.Core; using Volo.Abp.AspNetCore.Mvc.UI.Packages.DatatablesNetBs4; using Volo.Abp.AspNetCore.Mvc.UI.Packages.FontAwesome; -using Volo.Abp.AspNetCore.Mvc.UI.Packages.FreezeUi; using Volo.Abp.AspNetCore.Mvc.UI.Packages.Select2; using Volo.Abp.AspNetCore.Mvc.UI.Packages.Toastr; using Volo.Abp.Modularity; @@ -10,12 +10,12 @@ using Volo.Abp.Modularity; namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling { [DependsOn( + typeof(CoreStyleContributor), typeof(BootstrapStyleContributor), typeof(FontAwesomeStyleContributor), typeof(ToastrStyleBundleContributor), typeof(Select2StyleContributor), - typeof(DatatablesNetBs4StyleContributor), - typeof(FreezeUiStyleContributor) + typeof(DatatablesNetBs4StyleContributor) )] public class SharedThemeGlobalStyleContributor : BundleContributor { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/freeze-ui/abp-freeze-ui.js b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/freeze-ui/abp-freeze-ui.js deleted file mode 100644 index 4fb8db1b3c..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/freeze-ui/abp-freeze-ui.js +++ /dev/null @@ -1,71 +0,0 @@ -var abp = abp || {}; -(function ($) { - if (!window.FreezeUI || !$) { - return; - } - - /* MESSAGE **************************************************/ - /*Package from https://alexradulescu.github.io/freeze-ui/*/ - - abp.ui = abp.ui || {}; - - /* UI BLOCK */ - - abp.ui.block = function (elm) { - if (elm) { - window.FreezeUI({ selector: elm }); - } else { - window.FreezeUI(); - } - }; - - abp.ui.unblock = function () { - window.UnFreezeUI(); - }; - - /* UI BUSY */ - - abp.ui.setBusy = function (element, text, freezeDelay) { - var opt = { text: text ? text : ' ' }; - - if (element) { - opt.element = element; - } - - if (freezeDelay) { - opt.freezeDelay = freezeDelay; - } - - window.FreezeUI(opt); - }; - - abp.ui.setBusy = function (options) { - options = $.extend({}, options || { - freezeDelay: 500 - }); - - if (!options.text) { - options.text = " "; - } - - window.FreezeUI(options); - - if (options.promise) { - if (options.promise.always) { - options.promise.always(function () { - abp.ui.clearBusy(options.element); - }); - } else if (options.promise['finally']) { - options.promise['finally'](function () { - abp.ui.clearBusy(options.element); - }); - } - } - }; - - - abp.ui.clearBusy = function () { - window.UnFreezeUI(); - }; - -})(jQuery); \ No newline at end of file diff --git a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobInfo.cs b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobInfo.cs index 6241bc81f9..0e6c2e6bd5 100644 --- a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobInfo.cs +++ b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobInfo.cs @@ -10,8 +10,7 @@ namespace Volo.Abp.BackgroundJobs public Guid Id { get; set; } /// - /// Type of the job. - /// It's AssemblyQualifiedName of job type. + /// Name of the job. /// public virtual string JobName { get; set; } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj index e181af68ac..64b113fba9 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj +++ b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj @@ -15,6 +15,7 @@ + diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs index 3c2a88094f..dd45adb94b 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs @@ -1,12 +1,12 @@ -using System; -using System.Diagnostics; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using NuGet.Versioning; +using System; using System.IO; +using System.Linq; using System.Reflection; -using System.Runtime.InteropServices; -using Microsoft.Extensions.DependencyInjection; using System.Threading.Tasks; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Abstractions; using Volo.Abp.Cli.Args; using Volo.Abp.Cli.Commands; using Volo.Abp.Cli.NuGet; @@ -18,7 +18,6 @@ namespace Volo.Abp.Cli public class CliService : ITransientDependency { public ILogger Logger { get; set; } - protected ICommandLineArgumentParser CommandLineArgumentParser { get; } protected ICommandSelector CommandSelector { get; } protected IHybridServiceScopeFactory ServiceScopeFactory { get; } @@ -40,11 +39,9 @@ namespace Volo.Abp.Cli public async Task RunAsync(string[] args) { - Logger.LogInformation($"ABP CLI, version {GetCliVersion()}."); - Logger.LogInformation("https://abp.io"); - - await CheckForNewVersion(); + Logger.LogInformation("ABP CLI (https://abp.io)"); + await CheckCliVersionAsync(); CheckDependencies(); var commandLineArgs = CommandLineArgumentParser.Parse(args); @@ -71,8 +68,8 @@ namespace Volo.Abp.Cli private void CheckDependencies() { - var installedNpmPackages = GetInstalledNpmPackages(); - + var installedNpmPackages = CmdHelper.RunCmdAndGetOutput("npm list -g --depth 0"); + if (!installedNpmPackages.Contains(" yarn@")) { InstallYarn(); @@ -83,35 +80,6 @@ namespace Volo.Abp.Cli } } - private string GetInstalledNpmPackages() - { - var output = ""; - - using (var process = new Process()) - { - process.StartInfo = new ProcessStartInfo(CmdHelper.GetFileName()) - { - Arguments = CmdHelper.GetArguments("npm list -g --depth 0"), - UseShellExecute = false, - CreateNoWindow = true, - RedirectStandardOutput = true, - RedirectStandardError = true - }; - process.Start(); - - using (var stdOut = process.StandardOutput) - { - using (var stdErr = process.StandardError) - { - output = stdOut.ReadToEnd(); - output += stdErr.ReadToEnd(); - } - } - } - - return output; - } - private void InstallYarn() { Logger.LogInformation("Installing yarn..."); @@ -124,47 +92,145 @@ namespace Volo.Abp.Cli CmdHelper.RunCmd("npm install gulp -g"); } - private async Task CheckForNewVersion() + private async Task CheckCliVersionAsync() { + var assembly = typeof(CliService).Assembly; + var toolPath = GetToolPath(assembly); + var currentCliVersion = await GetCurrentCliVersion(toolPath, assembly); + var updateChannel = GetUpdateChannel(currentCliVersion); + + Logger.LogInformation($"Version {currentCliVersion} ({updateChannel} channel)"); + try { - var currentVersion = GetCliVersion(); - var latestVersion = await NuGetService.GetLatestVersionOrNullAsync("Volo.Abp.Cli"); + var latestVersion = await GetLatestVersion(updateChannel); - if (!latestVersion.IsNullOrEmpty() && currentVersion != latestVersion) + if (latestVersion != null && latestVersion > currentCliVersion) { - Logger.LogInformation(""); - Logger.LogWarning("ABP CLI has a newer version (" + latestVersion + "). Please update to get the latest features and fixes."); - Logger.LogWarning(""); - Logger.LogWarning("Update Command: "); - Logger.LogWarning(" dotnet tool update -g Volo.Abp.Cli"); - Logger.LogWarning(""); + LogNewVersionInfo(updateChannel, latestVersion, toolPath); } } catch (Exception e) { - Logger.LogWarning("Could not get the latest version infom from NuGet.org:"); + Logger.LogWarning("Unable to retrieve the latest version"); Logger.LogWarning(e.Message); } } - private static string GetCliVersion() + private static string GetToolPath(Assembly assembly) + { + if (!assembly.Location.Contains(".store")) + { + return null; + } + + return assembly.Location.Substring(0, assembly.Location.IndexOf(".store", StringComparison.Ordinal)); + } + + private async Task GetCurrentCliVersion(string toolPath, Assembly assembly) + { + SemanticVersion currentCliVersion = default; + if (!string.IsNullOrEmpty(toolPath)) + { + var consoleOutput = new StringReader(CmdHelper.RunCmdAndGetOutput($"dotnet tool list --tool-path {toolPath}")); + string line; + while ((line = await consoleOutput.ReadLineAsync()) != null) + { + if (line.StartsWith("Volo.Abp.Cli", StringComparison.InvariantCultureIgnoreCase)) + { + var version = line.Split(new char[0], StringSplitOptions.RemoveEmptyEntries)[1]; + + SemanticVersion.TryParse(version, out currentCliVersion); + + break; + } + } + } + + if (currentCliVersion == null) + { + // If not a tool executable, fallback to assembly version and treat as dev without updates + // Assembly revisions are not supported by SemVer scheme required for NuGet, trim to {major}.{minor}.{patch} + var assemblyVersion = string.Join(".", assembly.GetFileVersion().Split('.').Take(3)); + return SemanticVersion.Parse(assemblyVersion + "-dev"); + } + + return currentCliVersion; + } + + private static UpdateChannel GetUpdateChannel(SemanticVersion currentCliVersion) + { + if (!currentCliVersion.IsPrerelease) + { + return UpdateChannel.Stable; + } + + if (currentCliVersion.Release.Contains("preview")) + { + return UpdateChannel.Nightly; + } + + if (currentCliVersion.Release.Contains("dev")) + { + return UpdateChannel.Development; + } + + return UpdateChannel.Prerelease; + } + + private async Task GetLatestVersion(UpdateChannel updateChannel) { - var version = typeof(CliService) - .Assembly - .GetFileVersion(); + switch (updateChannel) + { + case UpdateChannel.Stable: + return await NuGetService.GetLatestVersionOrNullAsync("Volo.Abp.Cli"); + + case UpdateChannel.Prerelease: + return await NuGetService.GetLatestVersionOrNullAsync("Volo.Abp.Cli", includePreviews: true); - /* Assembly versions are like "2.4.0.0", but NuGet removes the last "0" here, - * like "2.4.0". - * So, we need to remove it from the assembly version to match to the NuGet version. - */ + case UpdateChannel.Nightly: + return await NuGetService.GetLatestVersionOrNullAsync("Volo.Abp.Cli", includeNightly: true); - if (version.Split('.').Length == 4) + default: + return default; + } + } + + private void LogNewVersionInfo(UpdateChannel updateChannel, SemanticVersion latestVersion, string toolPath) + { + Logger.LogWarning( + $"ABP CLI has a newer {updateChannel.ToString().ToLowerInvariant()} version {latestVersion}, please update to get the latest features and fixes."); + Logger.LogWarning(""); + Logger.LogWarning("Update Command: "); + + // Update command doesn't support prerelease versions https://github.com/dotnet/sdk/issues/2551 workaround is to uninstall & install + switch (updateChannel) { - version = version.RemovePostFix(".0"); + case UpdateChannel.Stable: + Logger.LogWarning($" dotnet tool update --tool-path {toolPath} Volo.Abp.Cli"); + break; + + case UpdateChannel.Prerelease: + Logger.LogWarning($" dotnet tool uninstall --tool-path {toolPath} Volo.Abp.Cli"); + Logger.LogWarning($" dotnet tool install --tool-path {toolPath} --version {latestVersion} Volo.Abp.Cli"); + break; + + case UpdateChannel.Nightly: + Logger.LogWarning($" dotnet tool uninstall --tool-path {toolPath} Volo.Abp.Cli"); + Logger.LogWarning( + $" dotnet tool install --tool-path {toolPath} --add-source https://www.myget.org/F/abp-nightly/api/v3/index.json --version {latestVersion} Volo.Abp.Cli"); + break; } - return version; + Logger.LogWarning(""); + } + + protected enum UpdateChannel + { + Development, + Stable, + Prerelease, + Nightly } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs index a43a910340..6f40dbc18f 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs @@ -56,9 +56,9 @@ namespace Volo.Abp.Cli.Commands sb.AppendLine(" --skip-db-migrations Specify if a new migration will be added or not."); sb.AppendLine(""); sb.AppendLine("Examples:"); - sb.AppendLine(" abp add-module Volo.Blogging Adds the module to the current soluton."); - sb.AppendLine(" abp add-module Volo.Blogging -s Acme.BookStore Adds the module to the given soluton."); - sb.AppendLine(" abp add-module Volo.Blogging -s Acme.BookStore --skip-db-migrations false Adds the module to the given soluton but doesn't create a database migration."); + sb.AppendLine(" abp add-module Volo.Blogging Adds the module to the current solution."); + sb.AppendLine(" abp add-module Volo.Blogging -s Acme.BookStore Adds the module to the given solution."); + sb.AppendLine(" abp add-module Volo.Blogging -s Acme.BookStore --skip-db-migrations false Adds the module to the given solution but doesn't create a database migration."); sb.AppendLine(""); return Task.FromResult(sb.ToString()); @@ -93,7 +93,7 @@ namespace Volo.Abp.Cli.Commands if (foundSolutionFiles.Length == 0) { - throw new CliUsageException("'abp add-module' command should be used inside a folder contaning a .sln file!"); + throw new CliUsageException("'abp add-module' command should be used inside a folder containing a .sln file!"); } //foundSolutionFiles.Length > 1 diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/UpdateCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/UpdateCommand.cs index df95839767..dbd95ef1f7 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/UpdateCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/UpdateCommand.cs @@ -15,18 +15,32 @@ namespace Volo.Abp.Cli.Commands { public ILogger Logger { get; set; } - private readonly VoloPackagesVersionUpdater _packagesVersionUpdater; + private readonly VoloNugetPackagesVersionUpdater _nugetPackagesVersionUpdater; + private readonly NpmPackagesUpdater _npmPackagesUpdater; - public UpdateCommand(VoloPackagesVersionUpdater packagesVersionUpdater) + public UpdateCommand(VoloNugetPackagesVersionUpdater nugetPackagesVersionUpdater, NpmPackagesUpdater npmPackagesUpdater) { - _packagesVersionUpdater = packagesVersionUpdater; + _nugetPackagesVersionUpdater = nugetPackagesVersionUpdater; + _npmPackagesUpdater = npmPackagesUpdater; Logger = NullLogger.Instance; } public async Task ExecuteAsync(CommandLineArgs commandLineArgs) { - var includePreviews = commandLineArgs.Options.GetOrNull(Options.IncludePreviews.Short, Options.IncludePreviews.Long) != null; + UpdateNugetPackages(commandLineArgs); + UpdateNpmPackages(); + } + + private void UpdateNpmPackages() + { + _npmPackagesUpdater.Update(Directory.GetCurrentDirectory()); + } + + private void UpdateNugetPackages(CommandLineArgs commandLineArgs) + { + var includePreviews = + commandLineArgs.Options.GetOrNull(Options.IncludePreviews.Short, Options.IncludePreviews.Long) != null; var solution = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.sln").FirstOrDefault(); @@ -34,7 +48,7 @@ namespace Volo.Abp.Cli.Commands { var solutionName = Path.GetFileName(solution).RemovePostFix(".sln"); - _packagesVersionUpdater.UpdateSolution(solution, includePreviews); + _nugetPackagesVersionUpdater.UpdateSolution(solution, includePreviews); Logger.LogInformation($"Volo packages are updated in {solutionName} solution."); return; @@ -46,13 +60,14 @@ namespace Volo.Abp.Cli.Commands { var projectName = Path.GetFileName(project).RemovePostFix(".csproj"); - _packagesVersionUpdater.UpdateProject(project, includePreviews); + _nugetPackagesVersionUpdater.UpdateProject(project, includePreviews); Logger.LogInformation($"Volo packages are updated in {projectName} project."); return; } - throw new CliUsageException("No solution or project found in this directory." + Environment.NewLine + Environment.NewLine + GetUsageInfo()); + throw new CliUsageException("No solution or project found in this directory." + Environment.NewLine + + Environment.NewLine + GetUsageInfo()); } public Task GetUsageInfo() @@ -77,8 +92,8 @@ namespace Volo.Abp.Cli.Commands public Task GetShortDescriptionAsync() { - return Task.FromResult("Automatically updates all ABP related packages in a" + - " solution or project to the latest versions."); + return Task.FromResult("Automatically updates all ABP related NuGet packages and NPM packages in a" + + " solution or project to the latest versions"); } public static class Options diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/NuGet/NuGetService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/NuGet/NuGetService.cs index 115ce41d74..be0a444d0d 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/NuGet/NuGetService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/NuGet/NuGetService.cs @@ -1,4 +1,5 @@ using Newtonsoft.Json; +using NuGet.Versioning; using System; using System.Collections.Generic; using System.Linq; @@ -23,16 +24,17 @@ namespace Volo.Abp.Cli.NuGet CancellationTokenProvider = cancellationTokenProvider; } - public async Task GetLatestVersionOrNullAsync(string packageId, bool includePreviews = false) + public async Task GetLatestVersionOrNullAsync(string packageId, bool includePreviews = false, bool includeNightly = false) { using (var client = new HttpClient()) { client.Timeout = TimeSpan.FromSeconds(30); - var responseMessage = await client.GetAsync( - $"https://api.nuget.org/v3-flatcontainer/{packageId.ToLowerInvariant()}/index.json", - CancellationTokenProvider.Token - ); + var url = includeNightly ? + $"https://www.myget.org/F/abp-nightly/api/v3/flatcontainer/{packageId.ToLowerInvariant()}/index.json" : + $"https://api.nuget.org/v3-flatcontainer/{packageId.ToLowerInvariant()}/index.json"; + + var responseMessage = await client.GetAsync(url, CancellationTokenProvider.Token); if (!responseMessage.IsSuccessStatusCode) { @@ -41,16 +43,14 @@ namespace Volo.Abp.Cli.NuGet var result = await responseMessage.Content.ReadAsStringAsync(); - var versions = JsonSerializer.Deserialize(result).Versions; + var versions = JsonSerializer.Deserialize(result).Versions.Select(x => SemanticVersion.Parse(x)); - if (!includePreviews) + if (!includePreviews && !includeNightly) { - versions = versions - .Where(x => !x.Contains("beta") && !x.Contains("preview") && !x.Contains("alpha") && !x.Contains("rc")) - .ToList(); + versions = versions.Where(x => !x.IsPrerelease); } - return versions.Count > 0 ? versions.Last() : null; + return versions.Any() ? versions.Max() : null; } } @@ -60,4 +60,4 @@ namespace Volo.Abp.Cli.NuGet public List Versions { get; set; } } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NpmPackagesUpdater.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NpmPackagesUpdater.cs new file mode 100644 index 0000000000..4d647d015e --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NpmPackagesUpdater.cs @@ -0,0 +1,122 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Volo.Abp.Cli.Utils; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.Cli.ProjectModification +{ + public class NpmPackagesUpdater : ITransientDependency + { + public ILogger Logger { get; set; } + + private readonly PackageJsonFileFinder _packageJsonFileFinder; + + private readonly Dictionary _fileVersionStorage = new Dictionary(); + + public NpmPackagesUpdater(PackageJsonFileFinder packageJsonFileFinder) + { + _packageJsonFileFinder = packageJsonFileFinder; + + Logger = NullLogger.Instance; + } + + public void Update(string rootDirectory) + { + var fileList = _packageJsonFileFinder.Find(rootDirectory); + + foreach (var file in fileList) + { + UpdatePackagesInFile(file); + + RunYarnAndGulp(file); + } + } + + protected virtual void UpdatePackagesInFile(string file) + { + var fileContent = File.ReadAllText(file); + var packageJson = JObject.Parse(fileContent); + var abpPackages = GetAbpPackagesFromPackageJson(packageJson); + + if (!abpPackages.Any()) + { + return; + } + + foreach (var abpPackage in abpPackages) + { + UpdatePackage(file, abpPackage); + } + + var modifiedFileContent = packageJson.ToString(Formatting.Indented); + + File.WriteAllText(file, modifiedFileContent); + } + + protected virtual void UpdatePackage(string file, JProperty package) + { + var version = GetLatestVersion(package); + + var versionWithPrefix = $"^{version}"; + + if (versionWithPrefix == (string)package.Value) + { + return; + } + + package.Value.Replace(versionWithPrefix); + + Logger.LogInformation($"Updated {package.Name} to {version} in {file.Replace(Directory.GetCurrentDirectory(), "")}."); + } + + protected virtual string GetLatestVersion(JProperty package) + { + if (_fileVersionStorage.ContainsKey(package.Name)) + { + return _fileVersionStorage[package.Name]; + } + + var version = CmdHelper.RunCmdAndGetOutput($"npm show {package.Name} version"); + + _fileVersionStorage[package.Name] = version; + + return version; + } + + protected virtual List GetAbpPackagesFromPackageJson(JObject fileObject) + { + var dependencies = (JObject)fileObject["dependencies"]; + var properties = dependencies.Properties().ToList(); + var abpPackages = properties.Where(p => p.Name.StartsWith("@abp/") || p.Name.StartsWith("@volo/")).ToList(); + return abpPackages; + } + + protected virtual void RunYarnAndGulp(string file) + { + var fileDirectory = Path.GetDirectoryName(file).EnsureEndsWith(Path.DirectorySeparatorChar); + RunYarn(fileDirectory); + Thread.Sleep(500); + RunGulp(fileDirectory); + } + + protected virtual void RunGulp(string fileDirectory) + { + Logger.LogInformation($"Running Gulp on {fileDirectory}"); + CmdHelper.RunCmd($"cd {fileDirectory} && gulp"); + } + + protected virtual void RunYarn(string fileDirectory) + { + Logger.LogInformation($"Running Yarn on {fileDirectory}"); + CmdHelper.RunCmd($"cd {fileDirectory} && yarn"); + } + } +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/PackageJsonFileFinder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/PackageJsonFileFinder.cs new file mode 100644 index 0000000000..ff26e765bb --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/PackageJsonFileFinder.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.Cli.ProjectModification +{ + public class PackageJsonFileFinder : ITransientDependency + { + public List Find(string rootDirectory) + { + var slash = Path.DirectorySeparatorChar; + + return + Directory.GetFiles(rootDirectory.EnsureEndsWith(slash), "*package.json", SearchOption.AllDirectories) + .Where(f => + !f.Contains(slash + "node_modules" + slash) && + !f.Contains(slash + "Release" + slash) && + !f.Contains(slash + "Debug" + slash) && + IsWithProjectFile(f) + ).ToList(); + } + + protected virtual bool IsWithProjectFile(string path) + { + var directory = Path.GetDirectoryName(path); + + return Directory.GetFiles(directory, "*.csproj", searchOption: SearchOption.TopDirectoryOnly).Any(); + } + } +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloPackagesVersionUpdater.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloNugetPackagesVersionUpdater.cs similarity index 90% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloPackagesVersionUpdater.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloNugetPackagesVersionUpdater.cs index 8e0be8f1a1..6312af0358 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloPackagesVersionUpdater.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloNugetPackagesVersionUpdater.cs @@ -3,14 +3,15 @@ using System.IO; using System.Text; using Volo.Abp.Cli.NuGet; using Volo.Abp.DependencyInjection; +using Volo.Abp.Threading; namespace Volo.Abp.Cli.ProjectModification { - public class VoloPackagesVersionUpdater : ITransientDependency + public class VoloNugetPackagesVersionUpdater : ITransientDependency { private readonly NuGetService _nuGetService; - public VoloPackagesVersionUpdater(NuGetService nuGetService) + public VoloNugetPackagesVersionUpdater(NuGetService nuGetService) { _nuGetService = nuGetService; } @@ -75,8 +76,8 @@ namespace Volo.Abp.Cli.ProjectModification content = content.Substring(indexAfterSecondQuote); var indexOfThirdQuote = content.IndexOf("\"", StringComparison.Ordinal); - - var version = _nuGetService.GetLatestVersionOrNullAsync(packageId, includePreviews); + + var version = AsyncHelper.RunSync(() => _nuGetService.GetLatestVersionOrNullAsync(packageId, includePreviews)); returningText.Append(version); index = indexOfPackageReference + packageReferenceStartText.Length + indexAfterQuote + indexAfterSecondQuote + indexOfThirdQuote; diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/CmdHelper.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/CmdHelper.cs index c9225b62f0..2e7a0da442 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/CmdHelper.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/CmdHelper.cs @@ -17,6 +17,35 @@ namespace Volo.Abp.Cli.Utils Process.Start(procStartInfo).WaitForExit(); } + public static string RunCmdAndGetOutput(string command) + { + var output = ""; + + using (var process = new Process()) + { + process.StartInfo = new ProcessStartInfo(CmdHelper.GetFileName()) + { + Arguments = CmdHelper.GetArguments(command), + UseShellExecute = false, + CreateNoWindow = true, + RedirectStandardOutput = true, + RedirectStandardError = true + }; + process.Start(); + + using (var stdOut = process.StandardOutput) + { + using (var stdErr = process.StandardError) + { + output = stdOut.ReadToEnd(); + output += stdErr.ReadToEnd(); + } + } + } + + return output.Trim(); + } + public static string GetArguments(string command) { if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) diff --git a/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj b/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj new file mode 100644 index 0000000000..849dc33c60 --- /dev/null +++ b/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj @@ -0,0 +1,24 @@ + + + + + + netstandard2.0 + Volo.Abp.Dapper + Volo.Abp.Dapper + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + false + false + false + + + + + + + + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Dapper/Volo/Abp/Dapper/AbpDapperModule.cs b/framework/src/Volo.Abp.Dapper/Volo/Abp/Dapper/AbpDapperModule.cs new file mode 100644 index 0000000000..17045fd12b --- /dev/null +++ b/framework/src/Volo.Abp.Dapper/Volo/Abp/Dapper/AbpDapperModule.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Domain; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Modularity; + +namespace Volo.Abp.Dapper +{ + [DependsOn( + typeof(AbpDddDomainModule), + typeof(AbpEntityFrameworkCoreModule))] + public class AbpDapperModule : AbpModule + { + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Dapper/Volo/Abp/Domain/Repositories/Dapper/DapperRepository.cs b/framework/src/Volo.Abp.Dapper/Volo/Abp/Domain/Repositories/Dapper/DapperRepository.cs new file mode 100644 index 0000000000..cdb03f8515 --- /dev/null +++ b/framework/src/Volo.Abp.Dapper/Volo/Abp/Domain/Repositories/Dapper/DapperRepository.cs @@ -0,0 +1,23 @@ +using System.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Storage; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Uow; + +namespace Volo.Abp.Domain.Repositories.Dapper +{ + public class DapperRepository : IDapperRepository, IUnitOfWorkEnabled + where TDbContext : IEfCoreDbContext + { + private readonly IDbContextProvider _dbContextProvider; + + public DapperRepository(IDbContextProvider dbContextProvider) + { + _dbContextProvider = dbContextProvider; + } + + public IDbConnection DbConnection => _dbContextProvider.GetDbContext().Database.GetDbConnection(); + + public IDbTransaction DbTransaction => _dbContextProvider.GetDbContext().Database.CurrentTransaction?.GetDbTransaction(); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Dapper/Volo/Abp/Domain/Repositories/Dapper/IDapperRepository.cs b/framework/src/Volo.Abp.Dapper/Volo/Abp/Domain/Repositories/Dapper/IDapperRepository.cs new file mode 100644 index 0000000000..f45be08b54 --- /dev/null +++ b/framework/src/Volo.Abp.Dapper/Volo/Abp/Domain/Repositories/Dapper/IDapperRepository.cs @@ -0,0 +1,11 @@ +using System.Data; + +namespace Volo.Abp.Domain.Repositories.Dapper +{ + public interface IDapperRepository + { + IDbConnection DbConnection { get; } + + IDbTransaction DbTransaction { get; } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateProvider.cs b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateProvider.cs index 28abdfc213..e8a2a9bac8 100644 --- a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateProvider.cs +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/EmailTemplateProvider.cs @@ -25,6 +25,11 @@ namespace Volo.Abp.Emailing.Templates Options = options.Value; } + public async Task GetAsync(string name) + { + return await GetAsync(name, CultureInfo.CurrentUICulture.Name); + } + public async Task GetAsync(string name, string cultureName) { return await GetInternalAsync(name, cultureName); diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/IEmailTemplateProvider.cs b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/IEmailTemplateProvider.cs index 4fc8381833..ab68dbe2ca 100644 --- a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/IEmailTemplateProvider.cs +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Templates/IEmailTemplateProvider.cs @@ -4,6 +4,8 @@ namespace Volo.Abp.Emailing.Templates { public interface IEmailTemplateProvider { + Task GetAsync(string name); + Task GetAsync(string name, string cultureName); } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs index d26e489afe..67028207e5 100644 --- a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs +++ b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs @@ -49,8 +49,6 @@ namespace Volo.Abp.EventBus.RabbitMq HandlerFactories = new ConcurrentDictionary>(); EventTypes = new ConcurrentDictionary(); - - Initialize(); } public void Initialize() @@ -97,7 +95,12 @@ namespace Volo.Abp.EventBus.RabbitMq public override IDisposable Subscribe(Type eventType, IEventHandlerFactory factory) { var handlerFactories = GetOrCreateHandlerFactories(eventType); - + + if (factory.IsInFactories(handlerFactories)) + { + return NullDisposable.Instance; + } + handlerFactories.Add(factory); if (handlerFactories.Count == 1) //TODO: Multi-threading! diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/EventBusBase.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/EventBusBase.cs index 3b2da52a96..551b508a40 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/EventBusBase.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/EventBusBase.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel.Design; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventHandlerFactory.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventHandlerFactory.cs index 9fbb81b014..279badbca6 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventHandlerFactory.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventHandlerFactory.cs @@ -1,3 +1,5 @@ +using System.Collections.Generic; + namespace Volo.Abp.EventBus { /// @@ -10,5 +12,7 @@ namespace Volo.Abp.EventBus /// /// The event handler IEventHandlerDisposeWrapper GetHandler(); + + bool IsInFactories(List handlerFactories); } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IocEventHandlerFactory.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IocEventHandlerFactory.cs index e3e4748ff6..2a028a521e 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IocEventHandlerFactory.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IocEventHandlerFactory.cs @@ -1,4 +1,6 @@ using System; +using System.Collections.Generic; +using System.Linq; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.DependencyInjection; @@ -33,6 +35,13 @@ namespace Volo.Abp.EventBus ); } + public bool IsInFactories(List handlerFactories) + { + return handlerFactories + .OfType() + .Any(f => f.HandlerType == HandlerType); + } + public void Dispose() { diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBus.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBus.cs index e8786073a7..18470a30fd 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBus.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/LocalEventBus.cs @@ -49,7 +49,12 @@ namespace Volo.Abp.EventBus.Local { GetOrCreateHandlerFactories(eventType) .Locking(factories => - factories.Add(factory) + { + if (!factory.IsInFactories(factories)) + { + factories.Add(factory); + } + } ); return new EventHandlerFactoryUnregistrar(this, eventType, factory); diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/SingleInstanceHandlerFactory.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/SingleInstanceHandlerFactory.cs index 4fdd9cce69..7e7a69f3cc 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/SingleInstanceHandlerFactory.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/SingleInstanceHandlerFactory.cs @@ -1,3 +1,6 @@ +using System.Collections.Generic; +using System.Linq; + namespace Volo.Abp.EventBus { /// @@ -27,5 +30,12 @@ namespace Volo.Abp.EventBus { return new EventHandlerDisposeWrapper(HandlerInstance); } + + public bool IsInFactories(List handlerFactories) + { + return handlerFactories + .OfType() + .Any(f => f.HandlerInstance == HandlerInstance); + } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/TransientEventHandlerFactory.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/TransientEventHandlerFactory.cs index 6cacc3522d..af5f66c01e 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/TransientEventHandlerFactory.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/TransientEventHandlerFactory.cs @@ -1,4 +1,6 @@ using System; +using System.Collections.Generic; +using System.Linq; namespace Volo.Abp.EventBus { @@ -7,22 +9,62 @@ namespace Volo.Abp.EventBus /// by a transient instance object. /// /// - /// This class always creates a new transient instance of handler. + /// This class always creates a new transient instance of the handler type. /// - public class TransientEventHandlerFactory : IEventHandlerFactory + public class TransientEventHandlerFactory : TransientEventHandlerFactory, IEventHandlerFactory where THandler : IEventHandler, new() { + public TransientEventHandlerFactory() + : base(typeof(THandler)) + { + + } + + protected override IEventHandler CreateHandler() + { + return new THandler(); + } + } + + /// + /// This implementation is used to handle events + /// by a transient instance object. + /// + /// + /// This class always creates a new transient instance of the handler type. + /// + public class TransientEventHandlerFactory : IEventHandlerFactory + { + public Type HandlerType { get; } + + public TransientEventHandlerFactory(Type handlerType) + { + HandlerType = handlerType; + } + /// /// Creates a new instance of the handler object. /// /// The handler object - public IEventHandlerDisposeWrapper GetHandler() + public virtual IEventHandlerDisposeWrapper GetHandler() { - var handler = new THandler(); + var handler = CreateHandler(); return new EventHandlerDisposeWrapper( handler, () => (handler as IDisposable)?.Dispose() ); } + + public bool IsInFactories(List handlerFactories) + { + return handlerFactories + .OfType() + .Any(f => f.HandlerType == HandlerType); + } + + protected virtual IEventHandler CreateHandler() + { + return (IEventHandler) Activator.CreateInstance(HandlerType); + } } } \ No newline at end of file diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/gulpfile.js b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/gulpfile.js index db4c6fd03c..f7ebc78f23 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/gulpfile.js +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/gulpfile.js @@ -4,8 +4,6 @@ var gulp = require("gulp"), path = require('path'), copyResources = require('./node_modules/@abp/aspnetcore.mvc.ui/gulp/copy-resources.js'); -copyResources.init(path.resolve('./')); - -gulp.task('default', [copyResources.taskName], function () { - -}); \ No newline at end of file +exports.default = function(){ + return copyResources(path.resolve('./')); +}; \ No newline at end of file diff --git a/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj b/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj new file mode 100644 index 0000000000..c531932479 --- /dev/null +++ b/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj @@ -0,0 +1,24 @@ + + + + netcoreapp2.2 + Volo.Abp.Dapper.Tests + Volo.Abp.Dapper.Tests + true + false + false + false + + + + + + + + + + + + + + \ No newline at end of file diff --git a/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/AbpDapperTestModule.cs b/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/AbpDapperTestModule.cs new file mode 100644 index 0000000000..02b7575052 --- /dev/null +++ b/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/AbpDapperTestModule.cs @@ -0,0 +1,17 @@ +using Volo.Abp.Autofac; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Modularity; + +namespace Volo.Abp.Dapper +{ + [DependsOn( + typeof(AbpEntityFrameworkCoreTestModule), + typeof(AbpDapperModule), + typeof(AbpAutofacModule))] + public class AbpDapperTestModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + } + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/DapperTestBase.cs b/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/DapperTestBase.cs new file mode 100644 index 0000000000..3fa387cec2 --- /dev/null +++ b/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/DapperTestBase.cs @@ -0,0 +1,10 @@ +namespace Volo.Abp.Dapper +{ + public abstract class DapperTestBase : AbpIntegratedTest + { + protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) + { + options.UseAutofac(); + } + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository.cs b/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository.cs new file mode 100644 index 0000000000..3621f9301e --- /dev/null +++ b/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Dapper; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Repositories.Dapper; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.TestApp.EntityFrameworkCore; + +namespace Volo.Abp.Dapper.Repositories +{ + public class PersonDapperRepository : DapperRepository, ITransientDependency + { + public PersonDapperRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + + public virtual async Task> GetAllPersonNames() + { + return (await DbConnection.QueryAsync("select Name from People", transaction: DbTransaction)) + .ToList(); + } + + public virtual async Task UpdatePersonNames(string name) + { + return await DbConnection.ExecuteAsync("update People set Name = @NewName", new {NewName = name}, + DbTransaction); + } + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository_Tests.cs b/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository_Tests.cs new file mode 100644 index 0000000000..3b5a7a4dd3 --- /dev/null +++ b/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository_Tests.cs @@ -0,0 +1,52 @@ +using System.Threading.Tasks; +using Shouldly; +using Volo.Abp.TestApp; +using Volo.Abp.Uow; +using Xunit; + +namespace Volo.Abp.Dapper.Repositories +{ + public class PersonDapperRepository_Tests : DapperTestBase + { + [Fact] + public async Task GetAllPersonNames_Test() + { + var allNames = await GetRequiredService().GetAllPersonNames(); + allNames.ShouldNotBeEmpty(); + allNames.ShouldContain(x => x == "Douglas"); + allNames.ShouldContain(x => x == "John-Deleted"); + allNames.ShouldContain(x => x == $"{TestDataBuilder.TenantId1}-Person1"); + allNames.ShouldContain(x => x == $"{TestDataBuilder.TenantId1}-Person2"); + } + + [Fact] + public async Task UpdatePersonNames_Test() + { + var personDapperRepository = GetRequiredService(); + await personDapperRepository.UpdatePersonNames("test"); + + var allNames = await personDapperRepository.GetAllPersonNames(); + allNames.ShouldNotBeEmpty(); + allNames.ShouldAllBe(x => x == "test"); + } + + [Fact] + public async Task Dapper_Transaction_Test() + { + var unitOfWorkManager = GetRequiredService(); + var personDapperRepository = GetRequiredService(); + + using (var uow = unitOfWorkManager.Begin(new UnitOfWorkOptions + { + IsTransactional = true + })) + { + await personDapperRepository.UpdatePersonNames("test"); + await uow.RollbackAsync(); + } + + var allNames = await personDapperRepository.GetAllPersonNames(); + allNames.ShouldAllBe(x => x != "test"); + } + } +} \ No newline at end of file diff --git a/modules/blogging/app/Volo.BloggingTestApp/gulpfile.js b/modules/blogging/app/Volo.BloggingTestApp/gulpfile.js index 754602029a..5dcf4c5c6f 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/gulpfile.js +++ b/modules/blogging/app/Volo.BloggingTestApp/gulpfile.js @@ -4,8 +4,6 @@ var gulp = require("gulp"), path = require('path'), copyResources = require('./node_modules/@abp/aspnetcore.mvc.ui/gulp/copy-resources.js'); -copyResources.init(path.resolve('./')); - -gulp.task('default', [copyResources.taskName], function () { - -}); \ No newline at end of file +exports.default = function(){ + return copyResources(path.resolve('./')); +}; \ No newline at end of file diff --git a/modules/blogging/app/Volo.BloggingTestApp/package.json b/modules/blogging/app/Volo.BloggingTestApp/package.json index 8c3725341c..cae899546e 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/package.json +++ b/modules/blogging/app/Volo.BloggingTestApp/package.json @@ -3,7 +3,7 @@ "name": "volo.blogtestapp", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "^0.4.9", - "@abp/blogging": "^0.4.9" + "@abp/aspnetcore.mvc.ui.theme.basic": "^0.6.5", + "@abp/blogging": "^0.6.5" } -} +} \ No newline at end of file diff --git a/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/abp/core/abp.css b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/abp/core/abp.css new file mode 100644 index 0000000000..915fb0f9e7 --- /dev/null +++ b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/abp/core/abp.css @@ -0,0 +1,56 @@ +@keyframes spin { + 0% { + transform: translateZ(0) rotate(0deg); + } + + 100% { + transform: translateZ(0) rotate(360deg); + } +} + +.abp-block-area { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 999999999; + background-color: #fff; + opacity: .8; + transition: opacity .25s; +} + + .abp-block-area.abp-block-area-disappearing { + opacity: 0; + } + + .abp-block-area.abp-block-area-busy:after { + content: attr(data-text); + display: block; + max-width: 125px; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + font-size: 20px; + font-family: sans-serif; + color: #343a40; + text-align: center; + text-transform: uppercase; + } + + .abp-block-area.abp-block-area-busy:before { + content: ""; + display: block; + width: 150px; + height: 150px; + border-radius: 50%; + border-width: 2px; + border-style: solid; + border-color: transparent #228ae6 #228ae6 #228ae6; + position: absolute; + top: calc(50% - 75px); + left: calc(50% - 75px); + will-change: transform; + animation: spin .75s infinite ease-in-out; + } diff --git a/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/abp/core/abp.js b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/abp/core/abp.js index 4c87489e22..730db8bc97 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/abp/core/abp.js +++ b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/abp/core/abp.js @@ -161,6 +161,25 @@ var abp = abp || {}; abp.auth.setToken(); } + /* SETTINGS *************************************************/ + + abp.setting = abp.setting || {}; + + abp.setting.values = abp.setting.values || {}; + + abp.setting.get = function (name) { + return abp.setting.values[name]; + }; + + abp.setting.getBoolean = function (name) { + var value = abp.setting.get(name); + return value == 'true' || value == 'True'; + }; + + abp.setting.getInt = function (name) { + return parseInt(abp.setting.values[name]); + }; + /* NOTIFICATION *********************************************/ //Defines Notification API, not implements it @@ -227,25 +246,96 @@ var abp = abp || {}; abp.ui = abp.ui || {}; /* UI BLOCK */ - //Defines UI Block API, not implements it + //Defines UI Block API and implements basically + + var $abpBlockArea = document.createElement('div'); + $abpBlockArea.classList.add('abp-block-area'); + + /* opts: { //Can be an object with options or a string for query a selector + * elm: a query selector (optional - default: document.body) + * busy: boolean (optional - default: false) + * promise: A promise with always or finally handler (optional - auto unblocks the ui if provided) + * } + */ + abp.ui.block = function (opts) { + if (!opts) { + opts = {}; + } else if (typeof opts == 'string') { + opts = { + elm: opts + }; + } - abp.ui.block = function (elm) { - abp.log.warn('abp.ui.block is not implemented!'); + var $elm = document.querySelector(opts.elm) || document.body; + + if (opts.busy) { + $abpBlockArea.classList.add('abp-block-area-busy'); + } else { + $abpBlockArea.classList.remove('abp-block-area-busy'); + } + + if (document.querySelector(opts.elm)) { + $abpBlockArea.style.position = 'absolute'; + } else { + $abpBlockArea.style.position = 'fixed'; + } + + $elm.appendChild($abpBlockArea); + + if (opts.promise) { + if (opts.promise.always) { //jQuery.Deferred style + opts.promise.always(function () { + abp.ui.unblock({ + $elm: opts.elm + }); + }); + } else if (opts.promise['finally']) { //Q style + opts.promise['finally'](function () { + abp.ui.unblock({ + $elm: opts.elm + }); + }); + } + } }; - abp.ui.unblock = function (elm) { - abp.log.warn('abp.ui.unblock is not implemented!'); + /* opts: { + * + * } + */ + abp.ui.unblock = function (opts) { + var element = document.querySelector('.abp-block-area'); + if (element) { + element.classList.add('abp-block-area-disappearing'); + setTimeout(function () { + if (element) { + element.classList.remove('abp-block-area-disappearing'); + element.parentElement.removeChild(element); + } + }, 250); + } }; /* UI BUSY */ //Defines UI Busy API, not implements it - abp.ui.setBusy = function (elm, optionsOrPromise) { - abp.log.warn('abp.ui.setBusy is not implemented!'); + abp.ui.setBusy = function (opts) { + if (!opts) { + opts = { + busy: true + }; + } else if (typeof opts == 'string') { + opts = { + elm: opts, + busy: true + }; + } + + abp.ui.block(opts); }; - abp.ui.clearBusy = function (elm) { - abp.log.warn('abp.ui.clearBusy is not implemented!'); + abp.ui.clearBusy = function (opts) { + abp.ui.unblock(opts); }; /* SIMPLE EVENT BUS *****************************************/ diff --git a/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/bootstrap/css/bootstrap.css b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/bootstrap/css/bootstrap.css index 7d43e1f107..8f4758923a 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/bootstrap/css/bootstrap.css +++ b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/bootstrap/css/bootstrap.css @@ -1,7 +1,7 @@ /*! - * Bootstrap v4.1.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors - * Copyright 2011-2018 Twitter, Inc. + * Bootstrap v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors + * Copyright 2011-2019 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ :root { @@ -31,7 +31,7 @@ --breakpoint-md: 768px; --breakpoint-lg: 992px; --breakpoint-xl: 1200px; - --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; } @@ -45,13 +45,7 @@ html { font-family: sans-serif; line-height: 1.15; -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; - -ms-overflow-style: scrollbar; - -webkit-tap-highlight-color: transparent; -} - -@-ms-viewport { - width: device-width; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } article, aside, figcaption, figure, footer, header, hgroup, main, nav, section { @@ -60,7 +54,7 @@ article, aside, figcaption, figure, footer, header, hgroup, main, nav, section { body { margin: 0; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 1rem; font-weight: 400; line-height: 1.5; @@ -96,6 +90,8 @@ abbr[data-original-title] { text-decoration: underline dotted; cursor: help; border-bottom: 0; + -webkit-text-decoration-skip-ink: none; + text-decoration-skip-ink: none; } address { @@ -131,10 +127,6 @@ blockquote { margin: 0 0 1rem; } -dfn { - font-style: italic; -} - b, strong { font-weight: bolder; @@ -164,7 +156,6 @@ a { color: #007bff; text-decoration: none; background-color: transparent; - -webkit-text-decoration-skip: objects; } a:hover { @@ -198,7 +189,6 @@ pre { margin-top: 0; margin-bottom: 1rem; overflow: auto; - -ms-overflow-style: scrollbar; } figure { @@ -210,8 +200,9 @@ img { border-style: none; } -svg:not(:root) { +svg { overflow: hidden; + vertical-align: middle; } table { @@ -265,13 +256,24 @@ select { text-transform: none; } +select { + word-wrap: normal; +} + button, -html [type="button"], +[type="button"], [type="reset"], [type="submit"] { -webkit-appearance: button; } +button:not(:disabled), +[type="button"]:not(:disabled), +[type="reset"]:not(:disabled), +[type="submit"]:not(:disabled) { + cursor: pointer; +} + button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, @@ -331,7 +333,6 @@ progress { -webkit-appearance: none; } -[type="search"]::-webkit-search-cancel-button, [type="search"]::-webkit-search-decoration { -webkit-appearance: none; } @@ -361,10 +362,8 @@ template { h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { margin-bottom: 0.5rem; - font-family: inherit; font-weight: 500; line-height: 1.2; - color: inherit; } h1, .h1 { @@ -474,7 +473,7 @@ mark, } .blockquote-footer::before { - content: "\2014 \00A0"; + content: "\2014\00A0"; } .img-fluid { @@ -614,7 +613,6 @@ pre code { .col-xl-auto { position: relative; width: 100%; - min-height: 1px; padding-right: 15px; padding-left: 15px; } @@ -631,7 +629,7 @@ pre code { -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; - max-width: none; + max-width: 100%; } .col-1 { @@ -837,7 +835,7 @@ pre code { -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; - max-width: none; + max-width: 100%; } .col-sm-1 { -ms-flex: 0 0 8.333333%; @@ -1009,7 +1007,7 @@ pre code { -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; - max-width: none; + max-width: 100%; } .col-md-1 { -ms-flex: 0 0 8.333333%; @@ -1181,7 +1179,7 @@ pre code { -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; - max-width: none; + max-width: 100%; } .col-lg-1 { -ms-flex: 0 0 8.333333%; @@ -1353,7 +1351,7 @@ pre code { -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; - max-width: none; + max-width: 100%; } .col-xl-1 { -ms-flex: 0 0 8.333333%; @@ -1515,9 +1513,8 @@ pre code { .table { width: 100%; - max-width: 100%; margin-bottom: 1rem; - background-color: transparent; + color: #212529; } .table th, @@ -1536,10 +1533,6 @@ pre code { border-top: 2px solid #dee2e6; } -.table .table { - background-color: #fff; -} - .table-sm th, .table-sm td { padding: 0.3rem; @@ -1571,6 +1564,7 @@ pre code { } .table-hover tbody tr:hover { + color: #212529; background-color: rgba(0, 0, 0, 0.075); } @@ -1580,6 +1574,13 @@ pre code { background-color: #b8daff; } +.table-primary th, +.table-primary td, +.table-primary thead th, +.table-primary tbody + tbody { + border-color: #7abaff; +} + .table-hover .table-primary:hover { background-color: #9fcdff; } @@ -1595,6 +1596,13 @@ pre code { background-color: #d6d8db; } +.table-secondary th, +.table-secondary td, +.table-secondary thead th, +.table-secondary tbody + tbody { + border-color: #b3b7bb; +} + .table-hover .table-secondary:hover { background-color: #c8cbcf; } @@ -1610,6 +1618,13 @@ pre code { background-color: #c3e6cb; } +.table-success th, +.table-success td, +.table-success thead th, +.table-success tbody + tbody { + border-color: #8fd19e; +} + .table-hover .table-success:hover { background-color: #b1dfbb; } @@ -1625,6 +1640,13 @@ pre code { background-color: #bee5eb; } +.table-info th, +.table-info td, +.table-info thead th, +.table-info tbody + tbody { + border-color: #86cfda; +} + .table-hover .table-info:hover { background-color: #abdde5; } @@ -1640,6 +1662,13 @@ pre code { background-color: #ffeeba; } +.table-warning th, +.table-warning td, +.table-warning thead th, +.table-warning tbody + tbody { + border-color: #ffdf7e; +} + .table-hover .table-warning:hover { background-color: #ffe8a1; } @@ -1655,6 +1684,13 @@ pre code { background-color: #f5c6cb; } +.table-danger th, +.table-danger td, +.table-danger thead th, +.table-danger tbody + tbody { + border-color: #ed969e; +} + .table-hover .table-danger:hover { background-color: #f1b0b7; } @@ -1670,6 +1706,13 @@ pre code { background-color: #fdfdfe; } +.table-light th, +.table-light td, +.table-light thead th, +.table-light tbody + tbody { + border-color: #fbfcfc; +} + .table-hover .table-light:hover { background-color: #ececf6; } @@ -1685,6 +1728,13 @@ pre code { background-color: #c6c8ca; } +.table-dark th, +.table-dark td, +.table-dark thead th, +.table-dark tbody + tbody { + border-color: #95999c; +} + .table-hover .table-dark:hover { background-color: #b9bbbe; } @@ -1711,8 +1761,8 @@ pre code { .table .thead-dark th { color: #fff; - background-color: #212529; - border-color: #32383e; + background-color: #343a40; + border-color: #454d55; } .table .thead-light th { @@ -1723,13 +1773,13 @@ pre code { .table-dark { color: #fff; - background-color: #212529; + background-color: #343a40; } .table-dark th, .table-dark td, .table-dark thead th { - border-color: #32383e; + border-color: #454d55; } .table-dark.table-bordered { @@ -1741,6 +1791,7 @@ pre code { } .table-dark.table-hover tbody tr:hover { + color: #fff; background-color: rgba(255, 255, 255, 0.075); } @@ -1750,7 +1801,6 @@ pre code { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; - -ms-overflow-style: -ms-autohiding-scrollbar; } .table-responsive-sm > .table-bordered { border: 0; @@ -1763,7 +1813,6 @@ pre code { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; - -ms-overflow-style: -ms-autohiding-scrollbar; } .table-responsive-md > .table-bordered { border: 0; @@ -1776,7 +1825,6 @@ pre code { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; - -ms-overflow-style: -ms-autohiding-scrollbar; } .table-responsive-lg > .table-bordered { border: 0; @@ -1789,7 +1837,6 @@ pre code { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; - -ms-overflow-style: -ms-autohiding-scrollbar; } .table-responsive-xl > .table-bordered { border: 0; @@ -1801,7 +1848,6 @@ pre code { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; - -ms-overflow-style: -ms-autohiding-scrollbar; } .table-responsive > .table-bordered { @@ -1811,8 +1857,10 @@ pre code { .form-control { display: block; width: 100%; + height: calc(1.5em + 0.75rem + 2px); padding: 0.375rem 0.75rem; font-size: 1rem; + font-weight: 400; line-height: 1.5; color: #495057; background-color: #fff; @@ -1822,7 +1870,7 @@ pre code { transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .form-control { transition: none; } @@ -1871,10 +1919,6 @@ pre code { opacity: 1; } -select.form-control:not([size]):not([multiple]) { - height: calc(2.25rem + 2px); -} - select.form-control:focus::-ms-value { color: #495057; background-color: #fff; @@ -1921,55 +1965,33 @@ select.form-control:focus::-ms-value { border-width: 1px 0; } -.form-control-plaintext.form-control-sm, .input-group-sm > .form-control-plaintext.form-control, -.input-group-sm > .input-group-prepend > .form-control-plaintext.input-group-text, -.input-group-sm > .input-group-append > .form-control-plaintext.input-group-text, -.input-group-sm > .input-group-prepend > .form-control-plaintext.btn, -.input-group-sm > .input-group-append > .form-control-plaintext.btn, .form-control-plaintext.form-control-lg, .input-group-lg > .form-control-plaintext.form-control, -.input-group-lg > .input-group-prepend > .form-control-plaintext.input-group-text, -.input-group-lg > .input-group-append > .form-control-plaintext.input-group-text, -.input-group-lg > .input-group-prepend > .form-control-plaintext.btn, -.input-group-lg > .input-group-append > .form-control-plaintext.btn { +.form-control-plaintext.form-control-sm, .form-control-plaintext.form-control-lg { padding-right: 0; padding-left: 0; } -.form-control-sm, .input-group-sm > .form-control, -.input-group-sm > .input-group-prepend > .input-group-text, -.input-group-sm > .input-group-append > .input-group-text, -.input-group-sm > .input-group-prepend > .btn, -.input-group-sm > .input-group-append > .btn { +.form-control-sm { + height: calc(1.5em + 0.5rem + 2px); padding: 0.25rem 0.5rem; font-size: 0.875rem; line-height: 1.5; border-radius: 0.2rem; } -select.form-control-sm:not([size]):not([multiple]), .input-group-sm > select.form-control:not([size]):not([multiple]), -.input-group-sm > .input-group-prepend > select.input-group-text:not([size]):not([multiple]), -.input-group-sm > .input-group-append > select.input-group-text:not([size]):not([multiple]), -.input-group-sm > .input-group-prepend > select.btn:not([size]):not([multiple]), -.input-group-sm > .input-group-append > select.btn:not([size]):not([multiple]) { - height: calc(1.8125rem + 2px); -} - -.form-control-lg, .input-group-lg > .form-control, -.input-group-lg > .input-group-prepend > .input-group-text, -.input-group-lg > .input-group-append > .input-group-text, -.input-group-lg > .input-group-prepend > .btn, -.input-group-lg > .input-group-append > .btn { +.form-control-lg { + height: calc(1.5em + 1rem + 2px); padding: 0.5rem 1rem; font-size: 1.25rem; line-height: 1.5; border-radius: 0.3rem; } -select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.form-control:not([size]):not([multiple]), -.input-group-lg > .input-group-prepend > select.input-group-text:not([size]):not([multiple]), -.input-group-lg > .input-group-append > select.input-group-text:not([size]):not([multiple]), -.input-group-lg > .input-group-prepend > select.btn:not([size]):not([multiple]), -.input-group-lg > .input-group-append > select.btn:not([size]):not([multiple]) { - height: calc(2.875rem + 2px); +select.form-control[size], select.form-control[multiple] { + height: auto; +} + +textarea.form-control { + height: auto; } .form-group { @@ -2046,35 +2068,53 @@ select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.for z-index: 5; display: none; max-width: 100%; - padding: .5rem; + padding: 0.25rem 0.5rem; margin-top: .1rem; - font-size: .875rem; - line-height: 1; + font-size: 0.875rem; + line-height: 1.5; color: #fff; - background-color: rgba(40, 167, 69, 0.8); - border-radius: .2rem; + background-color: rgba(40, 167, 69, 0.9); + border-radius: 0.25rem; } -.was-validated .form-control:valid, .form-control.is-valid, .was-validated -.custom-select:valid, -.custom-select.is-valid { +.was-validated .form-control:valid, .form-control.is-valid { border-color: #28a745; + padding-right: calc(1.5em + 0.75rem); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: center right calc(0.375em + 0.1875rem); + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } -.was-validated .form-control:valid:focus, .form-control.is-valid:focus, .was-validated -.custom-select:valid:focus, -.custom-select.is-valid:focus { +.was-validated .form-control:valid:focus, .form-control.is-valid:focus { border-color: #28a745; box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25); } .was-validated .form-control:valid ~ .valid-feedback, .was-validated .form-control:valid ~ .valid-tooltip, .form-control.is-valid ~ .valid-feedback, -.form-control.is-valid ~ .valid-tooltip, .was-validated -.custom-select:valid ~ .valid-feedback, -.was-validated -.custom-select:valid ~ .valid-tooltip, -.custom-select.is-valid ~ .valid-feedback, +.form-control.is-valid ~ .valid-tooltip { + display: block; +} + +.was-validated textarea.form-control:valid, textarea.form-control.is-valid { + padding-right: calc(1.5em + 0.75rem); + background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); +} + +.was-validated .custom-select:valid, .custom-select.is-valid { + border-color: #28a745; + padding-right: calc((1em + 0.75rem) * 3 / 4 + 1.75rem); + background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.was-validated .custom-select:valid:focus, .custom-select.is-valid:focus { + border-color: #28a745; + box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25); +} + +.was-validated .custom-select:valid ~ .valid-feedback, +.was-validated .custom-select:valid ~ .valid-tooltip, .custom-select.is-valid ~ .valid-feedback, .custom-select.is-valid ~ .valid-tooltip { display: block; } @@ -2100,7 +2140,7 @@ select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.for } .was-validated .custom-control-input:valid ~ .custom-control-label::before, .custom-control-input.is-valid ~ .custom-control-label::before { - background-color: #71dd8a; + border-color: #28a745; } .was-validated .custom-control-input:valid ~ .valid-feedback, @@ -2110,19 +2150,20 @@ select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.for } .was-validated .custom-control-input:valid:checked ~ .custom-control-label::before, .custom-control-input.is-valid:checked ~ .custom-control-label::before { + border-color: #34ce57; background-color: #34ce57; } .was-validated .custom-control-input:valid:focus ~ .custom-control-label::before, .custom-control-input.is-valid:focus ~ .custom-control-label::before { - box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(40, 167, 69, 0.25); + box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25); } -.was-validated .custom-file-input:valid ~ .custom-file-label, .custom-file-input.is-valid ~ .custom-file-label { +.was-validated .custom-control-input:valid:focus:not(:checked) ~ .custom-control-label::before, .custom-control-input.is-valid:focus:not(:checked) ~ .custom-control-label::before { border-color: #28a745; } -.was-validated .custom-file-input:valid ~ .custom-file-label::before, .custom-file-input.is-valid ~ .custom-file-label::before { - border-color: inherit; +.was-validated .custom-file-input:valid ~ .custom-file-label, .custom-file-input.is-valid ~ .custom-file-label { + border-color: #28a745; } .was-validated .custom-file-input:valid ~ .valid-feedback, @@ -2132,6 +2173,7 @@ select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.for } .was-validated .custom-file-input:valid:focus ~ .custom-file-label, .custom-file-input.is-valid:focus ~ .custom-file-label { + border-color: #28a745; box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25); } @@ -2149,35 +2191,53 @@ select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.for z-index: 5; display: none; max-width: 100%; - padding: .5rem; + padding: 0.25rem 0.5rem; margin-top: .1rem; - font-size: .875rem; - line-height: 1; + font-size: 0.875rem; + line-height: 1.5; color: #fff; - background-color: rgba(220, 53, 69, 0.8); - border-radius: .2rem; + background-color: rgba(220, 53, 69, 0.9); + border-radius: 0.25rem; } -.was-validated .form-control:invalid, .form-control.is-invalid, .was-validated -.custom-select:invalid, -.custom-select.is-invalid { +.was-validated .form-control:invalid, .form-control.is-invalid { border-color: #dc3545; + padding-right: calc(1.5em + 0.75rem); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E"); + background-repeat: no-repeat; + background-position: center right calc(0.375em + 0.1875rem); + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } -.was-validated .form-control:invalid:focus, .form-control.is-invalid:focus, .was-validated -.custom-select:invalid:focus, -.custom-select.is-invalid:focus { +.was-validated .form-control:invalid:focus, .form-control.is-invalid:focus { border-color: #dc3545; box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); } .was-validated .form-control:invalid ~ .invalid-feedback, .was-validated .form-control:invalid ~ .invalid-tooltip, .form-control.is-invalid ~ .invalid-feedback, -.form-control.is-invalid ~ .invalid-tooltip, .was-validated -.custom-select:invalid ~ .invalid-feedback, -.was-validated -.custom-select:invalid ~ .invalid-tooltip, -.custom-select.is-invalid ~ .invalid-feedback, +.form-control.is-invalid ~ .invalid-tooltip { + display: block; +} + +.was-validated textarea.form-control:invalid, textarea.form-control.is-invalid { + padding-right: calc(1.5em + 0.75rem); + background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); +} + +.was-validated .custom-select:invalid, .custom-select.is-invalid { + border-color: #dc3545; + padding-right: calc((1em + 0.75rem) * 3 / 4 + 1.75rem); + background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E") #fff no-repeat center right 1.75rem/calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} + +.was-validated .custom-select:invalid:focus, .custom-select.is-invalid:focus { + border-color: #dc3545; + box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); +} + +.was-validated .custom-select:invalid ~ .invalid-feedback, +.was-validated .custom-select:invalid ~ .invalid-tooltip, .custom-select.is-invalid ~ .invalid-feedback, .custom-select.is-invalid ~ .invalid-tooltip { display: block; } @@ -2203,7 +2263,7 @@ select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.for } .was-validated .custom-control-input:invalid ~ .custom-control-label::before, .custom-control-input.is-invalid ~ .custom-control-label::before { - background-color: #efa2a9; + border-color: #dc3545; } .was-validated .custom-control-input:invalid ~ .invalid-feedback, @@ -2213,19 +2273,20 @@ select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.for } .was-validated .custom-control-input:invalid:checked ~ .custom-control-label::before, .custom-control-input.is-invalid:checked ~ .custom-control-label::before { + border-color: #e4606d; background-color: #e4606d; } .was-validated .custom-control-input:invalid:focus ~ .custom-control-label::before, .custom-control-input.is-invalid:focus ~ .custom-control-label::before { - box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(220, 53, 69, 0.25); + box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); } -.was-validated .custom-file-input:invalid ~ .custom-file-label, .custom-file-input.is-invalid ~ .custom-file-label { +.was-validated .custom-control-input:invalid:focus:not(:checked) ~ .custom-control-label::before, .custom-control-input.is-invalid:focus:not(:checked) ~ .custom-control-label::before { border-color: #dc3545; } -.was-validated .custom-file-input:invalid ~ .custom-file-label::before, .custom-file-input.is-invalid ~ .custom-file-label::before { - border-color: inherit; +.was-validated .custom-file-input:invalid ~ .custom-file-label, .custom-file-input.is-invalid ~ .custom-file-label { + border-color: #dc3545; } .was-validated .custom-file-input:invalid ~ .invalid-feedback, @@ -2235,6 +2296,7 @@ select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.for } .was-validated .custom-file-input:invalid:focus ~ .custom-file-label, .custom-file-input.is-invalid:focus ~ .custom-file-label { + border-color: #dc3545; box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); } @@ -2296,6 +2358,8 @@ select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.for } .form-inline .form-check-input { position: relative; + -ms-flex-negative: 0; + flex-shrink: 0; margin-top: 0; margin-right: 0.25rem; margin-left: 0; @@ -2314,13 +2378,14 @@ select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.for .btn { display: inline-block; font-weight: 400; + color: #212529; text-align: center; - white-space: nowrap; vertical-align: middle; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; + background-color: transparent; border: 1px solid transparent; padding: 0.375rem 0.75rem; font-size: 1rem; @@ -2329,13 +2394,14 @@ select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.for transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .btn { transition: none; } } -.btn:hover, .btn:focus { +.btn:hover { + color: #212529; text-decoration: none; } @@ -2348,14 +2414,6 @@ select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.for opacity: 0.65; } -.btn:not(:disabled):not(.disabled) { - cursor: pointer; -} - -.btn:not(:disabled):not(.disabled):active, .btn:not(:disabled):not(.disabled).active { - background-image: none; -} - a.btn.disabled, fieldset:disabled a.btn { pointer-events: none; @@ -2374,7 +2432,7 @@ fieldset:disabled a.btn { } .btn-primary:focus, .btn-primary.focus { - box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); + box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5); } .btn-primary.disabled, .btn-primary:disabled { @@ -2392,7 +2450,7 @@ fieldset:disabled a.btn { .btn-primary:not(:disabled):not(.disabled):active:focus, .btn-primary:not(:disabled):not(.disabled).active:focus, .show > .btn-primary.dropdown-toggle:focus { - box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); + box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5); } .btn-secondary { @@ -2408,7 +2466,7 @@ fieldset:disabled a.btn { } .btn-secondary:focus, .btn-secondary.focus { - box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5); + box-shadow: 0 0 0 0.2rem rgba(130, 138, 145, 0.5); } .btn-secondary.disabled, .btn-secondary:disabled { @@ -2426,7 +2484,7 @@ fieldset:disabled a.btn { .btn-secondary:not(:disabled):not(.disabled):active:focus, .btn-secondary:not(:disabled):not(.disabled).active:focus, .show > .btn-secondary.dropdown-toggle:focus { - box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5); + box-shadow: 0 0 0 0.2rem rgba(130, 138, 145, 0.5); } .btn-success { @@ -2442,7 +2500,7 @@ fieldset:disabled a.btn { } .btn-success:focus, .btn-success.focus { - box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); + box-shadow: 0 0 0 0.2rem rgba(72, 180, 97, 0.5); } .btn-success.disabled, .btn-success:disabled { @@ -2460,7 +2518,7 @@ fieldset:disabled a.btn { .btn-success:not(:disabled):not(.disabled):active:focus, .btn-success:not(:disabled):not(.disabled).active:focus, .show > .btn-success.dropdown-toggle:focus { - box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); + box-shadow: 0 0 0 0.2rem rgba(72, 180, 97, 0.5); } .btn-info { @@ -2476,7 +2534,7 @@ fieldset:disabled a.btn { } .btn-info:focus, .btn-info.focus { - box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5); + box-shadow: 0 0 0 0.2rem rgba(58, 176, 195, 0.5); } .btn-info.disabled, .btn-info:disabled { @@ -2494,7 +2552,7 @@ fieldset:disabled a.btn { .btn-info:not(:disabled):not(.disabled):active:focus, .btn-info:not(:disabled):not(.disabled).active:focus, .show > .btn-info.dropdown-toggle:focus { - box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5); + box-shadow: 0 0 0 0.2rem rgba(58, 176, 195, 0.5); } .btn-warning { @@ -2510,7 +2568,7 @@ fieldset:disabled a.btn { } .btn-warning:focus, .btn-warning.focus { - box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5); + box-shadow: 0 0 0 0.2rem rgba(222, 170, 12, 0.5); } .btn-warning.disabled, .btn-warning:disabled { @@ -2528,7 +2586,7 @@ fieldset:disabled a.btn { .btn-warning:not(:disabled):not(.disabled):active:focus, .btn-warning:not(:disabled):not(.disabled).active:focus, .show > .btn-warning.dropdown-toggle:focus { - box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5); + box-shadow: 0 0 0 0.2rem rgba(222, 170, 12, 0.5); } .btn-danger { @@ -2544,7 +2602,7 @@ fieldset:disabled a.btn { } .btn-danger:focus, .btn-danger.focus { - box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5); + box-shadow: 0 0 0 0.2rem rgba(225, 83, 97, 0.5); } .btn-danger.disabled, .btn-danger:disabled { @@ -2562,7 +2620,7 @@ fieldset:disabled a.btn { .btn-danger:not(:disabled):not(.disabled):active:focus, .btn-danger:not(:disabled):not(.disabled).active:focus, .show > .btn-danger.dropdown-toggle:focus { - box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5); + box-shadow: 0 0 0 0.2rem rgba(225, 83, 97, 0.5); } .btn-light { @@ -2578,7 +2636,7 @@ fieldset:disabled a.btn { } .btn-light:focus, .btn-light.focus { - box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5); + box-shadow: 0 0 0 0.2rem rgba(216, 217, 219, 0.5); } .btn-light.disabled, .btn-light:disabled { @@ -2596,7 +2654,7 @@ fieldset:disabled a.btn { .btn-light:not(:disabled):not(.disabled):active:focus, .btn-light:not(:disabled):not(.disabled).active:focus, .show > .btn-light.dropdown-toggle:focus { - box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5); + box-shadow: 0 0 0 0.2rem rgba(216, 217, 219, 0.5); } .btn-dark { @@ -2612,7 +2670,7 @@ fieldset:disabled a.btn { } .btn-dark:focus, .btn-dark.focus { - box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); + box-shadow: 0 0 0 0.2rem rgba(82, 88, 93, 0.5); } .btn-dark.disabled, .btn-dark:disabled { @@ -2630,13 +2688,11 @@ fieldset:disabled a.btn { .btn-dark:not(:disabled):not(.disabled):active:focus, .btn-dark:not(:disabled):not(.disabled).active:focus, .show > .btn-dark.dropdown-toggle:focus { - box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); + box-shadow: 0 0 0 0.2rem rgba(82, 88, 93, 0.5); } .btn-outline-primary { color: #007bff; - background-color: transparent; - background-image: none; border-color: #007bff; } @@ -2669,8 +2725,6 @@ fieldset:disabled a.btn { .btn-outline-secondary { color: #6c757d; - background-color: transparent; - background-image: none; border-color: #6c757d; } @@ -2703,8 +2757,6 @@ fieldset:disabled a.btn { .btn-outline-success { color: #28a745; - background-color: transparent; - background-image: none; border-color: #28a745; } @@ -2737,8 +2789,6 @@ fieldset:disabled a.btn { .btn-outline-info { color: #17a2b8; - background-color: transparent; - background-image: none; border-color: #17a2b8; } @@ -2771,8 +2821,6 @@ fieldset:disabled a.btn { .btn-outline-warning { color: #ffc107; - background-color: transparent; - background-image: none; border-color: #ffc107; } @@ -2805,8 +2853,6 @@ fieldset:disabled a.btn { .btn-outline-danger { color: #dc3545; - background-color: transparent; - background-image: none; border-color: #dc3545; } @@ -2839,8 +2885,6 @@ fieldset:disabled a.btn { .btn-outline-light { color: #f8f9fa; - background-color: transparent; - background-image: none; border-color: #f8f9fa; } @@ -2873,8 +2917,6 @@ fieldset:disabled a.btn { .btn-outline-dark { color: #343a40; - background-color: transparent; - background-image: none; border-color: #343a40; } @@ -2908,19 +2950,16 @@ fieldset:disabled a.btn { .btn-link { font-weight: 400; color: #007bff; - background-color: transparent; + text-decoration: none; } .btn-link:hover { color: #0056b3; text-decoration: underline; - background-color: transparent; - border-color: transparent; } .btn-link:focus, .btn-link.focus { text-decoration: underline; - border-color: transparent; box-shadow: none; } @@ -2962,7 +3001,7 @@ input[type="button"].btn-block { transition: opacity 0.15s linear; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .fade { transition: none; } @@ -2983,7 +3022,7 @@ input[type="button"].btn-block { transition: height 0.35s ease; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .collapsing { transition: none; } @@ -2996,10 +3035,12 @@ input[type="button"].btn-block { position: relative; } +.dropdown-toggle { + white-space: nowrap; +} + .dropdown-toggle::after { display: inline-block; - width: 0; - height: 0; margin-left: 0.255em; vertical-align: 0.255em; content: ""; @@ -3033,11 +3074,60 @@ input[type="button"].btn-block { border-radius: 0.25rem; } +.dropdown-menu-left { + right: auto; + left: 0; +} + .dropdown-menu-right { right: 0; left: auto; } +@media (min-width: 576px) { + .dropdown-menu-sm-left { + right: auto; + left: 0; + } + .dropdown-menu-sm-right { + right: 0; + left: auto; + } +} + +@media (min-width: 768px) { + .dropdown-menu-md-left { + right: auto; + left: 0; + } + .dropdown-menu-md-right { + right: 0; + left: auto; + } +} + +@media (min-width: 992px) { + .dropdown-menu-lg-left { + right: auto; + left: 0; + } + .dropdown-menu-lg-right { + right: 0; + left: auto; + } +} + +@media (min-width: 1200px) { + .dropdown-menu-xl-left { + right: auto; + left: 0; + } + .dropdown-menu-xl-right { + right: 0; + left: auto; + } +} + .dropup .dropdown-menu { top: auto; bottom: 100%; @@ -3047,8 +3137,6 @@ input[type="button"].btn-block { .dropup .dropdown-toggle::after { display: inline-block; - width: 0; - height: 0; margin-left: 0.255em; vertical-align: 0.255em; content: ""; @@ -3072,8 +3160,6 @@ input[type="button"].btn-block { .dropright .dropdown-toggle::after { display: inline-block; - width: 0; - height: 0; margin-left: 0.255em; vertical-align: 0.255em; content: ""; @@ -3101,8 +3187,6 @@ input[type="button"].btn-block { .dropleft .dropdown-toggle::after { display: inline-block; - width: 0; - height: 0; margin-left: 0.255em; vertical-align: 0.255em; content: ""; @@ -3114,8 +3198,6 @@ input[type="button"].btn-block { .dropleft .dropdown-toggle::before { display: inline-block; - width: 0; - height: 0; margin-right: 0.255em; vertical-align: 0.255em; content: ""; @@ -3171,6 +3253,7 @@ input[type="button"].btn-block { .dropdown-item.disabled, .dropdown-item:disabled { color: #6c757d; + pointer-events: none; background-color: transparent; } @@ -3204,8 +3287,8 @@ input[type="button"].btn-block { .btn-group > .btn, .btn-group-vertical > .btn { position: relative; - -ms-flex: 0 1 auto; - flex: 0 1 auto; + -ms-flex: 1 1 auto; + flex: 1 1 auto; } .btn-group > .btn:hover, @@ -3220,17 +3303,6 @@ input[type="button"].btn-block { z-index: 1; } -.btn-group .btn + .btn, -.btn-group .btn + .btn-group, -.btn-group .btn-group + .btn, -.btn-group .btn-group + .btn-group, -.btn-group-vertical .btn + .btn, -.btn-group-vertical .btn + .btn-group, -.btn-group-vertical .btn-group + .btn, -.btn-group-vertical .btn-group + .btn-group { - margin-left: -1px; -} - .btn-toolbar { display: -ms-flexbox; display: flex; @@ -3244,8 +3316,9 @@ input[type="button"].btn-block { width: auto; } -.btn-group > .btn:first-child { - margin-left: 0; +.btn-group > .btn:not(:first-child), +.btn-group > .btn-group:not(:first-child) { + margin-left: -1px; } .btn-group > .btn:not(:last-child):not(.dropdown-toggle), @@ -3294,17 +3367,14 @@ input[type="button"].btn-block { justify-content: center; } -.btn-group-vertical .btn, -.btn-group-vertical .btn-group { +.btn-group-vertical > .btn, +.btn-group-vertical > .btn-group { width: 100%; } -.btn-group-vertical > .btn + .btn, -.btn-group-vertical > .btn + .btn-group, -.btn-group-vertical > .btn-group + .btn, -.btn-group-vertical > .btn-group + .btn-group { +.btn-group-vertical > .btn:not(:first-child), +.btn-group-vertical > .btn-group:not(:first-child) { margin-top: -1px; - margin-left: 0; } .btn-group-vertical > .btn:not(:last-child):not(.dropdown-toggle), @@ -3345,6 +3415,7 @@ input[type="button"].btn-block { } .input-group > .form-control, +.input-group > .form-control-plaintext, .input-group > .custom-select, .input-group > .custom-file { position: relative; @@ -3354,15 +3425,12 @@ input[type="button"].btn-block { margin-bottom: 0; } -.input-group > .form-control:focus, -.input-group > .custom-select:focus, -.input-group > .custom-file:focus { - z-index: 3; -} - .input-group > .form-control + .form-control, .input-group > .form-control + .custom-select, .input-group > .form-control + .custom-file, +.input-group > .form-control-plaintext + .form-control, +.input-group > .form-control-plaintext + .custom-select, +.input-group > .form-control-plaintext + .custom-file, .input-group > .custom-select + .form-control, .input-group > .custom-select + .custom-select, .input-group > .custom-select + .custom-file, @@ -3372,6 +3440,16 @@ input[type="button"].btn-block { margin-left: -1px; } +.input-group > .form-control:focus, +.input-group > .custom-select:focus, +.input-group > .custom-file .custom-file-input:focus ~ .custom-file-label { + z-index: 3; +} + +.input-group > .custom-file .custom-file-input:focus { + z-index: 4; +} + .input-group > .form-control:not(:last-child), .input-group > .custom-select:not(:last-child) { border-top-right-radius: 0; @@ -3414,6 +3492,11 @@ input[type="button"].btn-block { z-index: 2; } +.input-group-prepend .btn:focus, +.input-group-append .btn:focus { + z-index: 3; +} + .input-group-prepend .btn + .btn, .input-group-prepend .btn + .input-group-text, .input-group-prepend .input-group-text + .input-group-text, @@ -3456,6 +3539,45 @@ input[type="button"].btn-block { margin-top: 0; } +.input-group-lg > .form-control:not(textarea), +.input-group-lg > .custom-select { + height: calc(1.5em + 1rem + 2px); +} + +.input-group-lg > .form-control, +.input-group-lg > .custom-select, +.input-group-lg > .input-group-prepend > .input-group-text, +.input-group-lg > .input-group-append > .input-group-text, +.input-group-lg > .input-group-prepend > .btn, +.input-group-lg > .input-group-append > .btn { + padding: 0.5rem 1rem; + font-size: 1.25rem; + line-height: 1.5; + border-radius: 0.3rem; +} + +.input-group-sm > .form-control:not(textarea), +.input-group-sm > .custom-select { + height: calc(1.5em + 0.5rem + 2px); +} + +.input-group-sm > .form-control, +.input-group-sm > .custom-select, +.input-group-sm > .input-group-prepend > .input-group-text, +.input-group-sm > .input-group-append > .input-group-text, +.input-group-sm > .input-group-prepend > .btn, +.input-group-sm > .input-group-append > .btn { + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + line-height: 1.5; + border-radius: 0.2rem; +} + +.input-group-lg > .custom-select, +.input-group-sm > .custom-select { + padding-right: 1.75rem; +} + .input-group > .input-group-prepend > .btn, .input-group > .input-group-prepend > .input-group-text, .input-group > .input-group-append:not(:last-child) > .btn, @@ -3497,16 +3619,22 @@ input[type="button"].btn-block { .custom-control-input:checked ~ .custom-control-label::before { color: #fff; + border-color: #007bff; background-color: #007bff; } .custom-control-input:focus ~ .custom-control-label::before { - box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25); + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); +} + +.custom-control-input:focus:not(:checked) ~ .custom-control-label::before { + border-color: #80bdff; } -.custom-control-input:active ~ .custom-control-label::before { +.custom-control-input:not(:disabled):active ~ .custom-control-label::before { color: #fff; background-color: #b3d7ff; + border-color: #b3d7ff; } .custom-control-input:disabled ~ .custom-control-label { @@ -3520,6 +3648,7 @@ input[type="button"].btn-block { .custom-control-label { position: relative; margin-bottom: 0; + vertical-align: top; } .custom-control-label::before { @@ -3531,11 +3660,8 @@ input[type="button"].btn-block { height: 1rem; pointer-events: none; content: ""; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - background-color: #dee2e6; + background-color: #fff; + border: #adb5bd solid 1px; } .custom-control-label::after { @@ -3546,29 +3672,24 @@ input[type="button"].btn-block { width: 1rem; height: 1rem; content: ""; - background-repeat: no-repeat; - background-position: center center; - background-size: 50% 50%; + background: no-repeat 50% / 50% 50%; } .custom-checkbox .custom-control-label::before { border-radius: 0.25rem; } -.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before { - background-color: #007bff; -} - .custom-checkbox .custom-control-input:checked ~ .custom-control-label::after { - background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E"); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e"); } .custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::before { + border-color: #007bff; background-color: #007bff; } .custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::after { - background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='%23fff' d='M0 2h4'/%3E%3C/svg%3E"); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e"); } .custom-checkbox .custom-control-input:disabled:checked ~ .custom-control-label::before { @@ -3583,28 +3704,65 @@ input[type="button"].btn-block { border-radius: 50%; } -.custom-radio .custom-control-input:checked ~ .custom-control-label::before { - background-color: #007bff; -} - .custom-radio .custom-control-input:checked ~ .custom-control-label::after { - background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E"); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); } .custom-radio .custom-control-input:disabled:checked ~ .custom-control-label::before { background-color: rgba(0, 123, 255, 0.5); } +.custom-switch { + padding-left: 2.25rem; +} + +.custom-switch .custom-control-label::before { + left: -2.25rem; + width: 1.75rem; + pointer-events: all; + border-radius: 0.5rem; +} + +.custom-switch .custom-control-label::after { + top: calc(0.25rem + 2px); + left: calc(-2.25rem + 2px); + width: calc(1rem - 4px); + height: calc(1rem - 4px); + background-color: #adb5bd; + border-radius: 0.5rem; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-transform 0.15s ease-in-out; + transition: transform 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: transform 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-transform 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .custom-switch .custom-control-label::after { + transition: none; + } +} + +.custom-switch .custom-control-input:checked ~ .custom-control-label::after { + background-color: #fff; + -webkit-transform: translateX(0.75rem); + transform: translateX(0.75rem); +} + +.custom-switch .custom-control-input:disabled:checked ~ .custom-control-label::before { + background-color: rgba(0, 123, 255, 0.5); +} + .custom-select { display: inline-block; width: 100%; - height: calc(2.25rem + 2px); + height: calc(1.5em + 0.75rem + 2px); padding: 0.375rem 1.75rem 0.375rem 0.75rem; + font-size: 1rem; + font-weight: 400; line-height: 1.5; color: #495057; vertical-align: middle; - background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right 0.75rem center; - background-size: 8px 10px; + background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px; + background-color: #fff; border: 1px solid #ced4da; border-radius: 0.25rem; -webkit-appearance: none; @@ -3615,7 +3773,7 @@ input[type="button"].btn-block { .custom-select:focus { border-color: #80bdff; outline: 0; - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075), 0 0 5px rgba(128, 189, 255, 0.5); + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); } .custom-select:focus::-ms-value { @@ -3635,28 +3793,30 @@ input[type="button"].btn-block { } .custom-select::-ms-expand { - opacity: 0; + display: none; } .custom-select-sm { - height: calc(1.8125rem + 2px); - padding-top: 0.375rem; - padding-bottom: 0.375rem; - font-size: 75%; + height: calc(1.5em + 0.5rem + 2px); + padding-top: 0.25rem; + padding-bottom: 0.25rem; + padding-left: 0.5rem; + font-size: 0.875rem; } .custom-select-lg { - height: calc(2.875rem + 2px); - padding-top: 0.375rem; - padding-bottom: 0.375rem; - font-size: 125%; + height: calc(1.5em + 1rem + 2px); + padding-top: 0.5rem; + padding-bottom: 0.5rem; + padding-left: 1rem; + font-size: 1.25rem; } .custom-file { position: relative; display: inline-block; width: 100%; - height: calc(2.25rem + 2px); + height: calc(1.5em + 0.75rem + 2px); margin-bottom: 0; } @@ -3664,7 +3824,7 @@ input[type="button"].btn-block { position: relative; z-index: 2; width: 100%; - height: calc(2.25rem + 2px); + height: calc(1.5em + 0.75rem + 2px); margin: 0; opacity: 0; } @@ -3674,22 +3834,27 @@ input[type="button"].btn-block { box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); } -.custom-file-input:focus ~ .custom-file-label::after { - border-color: #80bdff; +.custom-file-input:disabled ~ .custom-file-label { + background-color: #e9ecef; } .custom-file-input:lang(en) ~ .custom-file-label::after { content: "Browse"; } +.custom-file-input ~ .custom-file-label[data-browse]::after { + content: attr(data-browse); +} + .custom-file-label { position: absolute; top: 0; right: 0; left: 0; z-index: 1; - height: calc(2.25rem + 2px); + height: calc(1.5em + 0.75rem + 2px); padding: 0.375rem 0.75rem; + font-weight: 400; line-height: 1.5; color: #495057; background-color: #fff; @@ -3704,19 +3869,20 @@ input[type="button"].btn-block { bottom: 0; z-index: 3; display: block; - height: 2.25rem; + height: calc(1.5em + 0.75rem); padding: 0.375rem 0.75rem; line-height: 1.5; color: #495057; content: "Browse"; background-color: #e9ecef; - border-left: 1px solid #ced4da; + border-left: inherit; border-radius: 0 0.25rem 0.25rem 0; } .custom-range { width: 100%; - padding-left: 0; + height: calc(1rem + 0.4rem); + padding: 0; background-color: transparent; -webkit-appearance: none; -moz-appearance: none; @@ -3727,6 +3893,18 @@ input[type="button"].btn-block { outline: none; } +.custom-range:focus::-webkit-slider-thumb { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25); +} + +.custom-range:focus::-moz-range-thumb { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25); +} + +.custom-range:focus::-ms-thumb { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25); +} + .custom-range::-moz-focus-outer { border: 0; } @@ -3738,13 +3916,15 @@ input[type="button"].btn-block { background-color: #007bff; border: 0; border-radius: 1rem; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; -webkit-appearance: none; appearance: none; } -.custom-range::-webkit-slider-thumb:focus { - outline: none; - box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25); +@media (prefers-reduced-motion: reduce) { + .custom-range::-webkit-slider-thumb { + transition: none; + } } .custom-range::-webkit-slider-thumb:active { @@ -3767,13 +3947,15 @@ input[type="button"].btn-block { background-color: #007bff; border: 0; border-radius: 1rem; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; -moz-appearance: none; appearance: none; } -.custom-range::-moz-range-thumb:focus { - outline: none; - box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25); +@media (prefers-reduced-motion: reduce) { + .custom-range::-moz-range-thumb { + transition: none; + } } .custom-range::-moz-range-thumb:active { @@ -3793,15 +3975,20 @@ input[type="button"].btn-block { .custom-range::-ms-thumb { width: 1rem; height: 1rem; + margin-top: 0; + margin-right: 0.2rem; + margin-left: 0.2rem; background-color: #007bff; border: 0; border-radius: 1rem; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; appearance: none; } -.custom-range::-ms-thumb:focus { - outline: none; - box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25); +@media (prefers-reduced-motion: reduce) { + .custom-range::-ms-thumb { + transition: none; + } } .custom-range::-ms-thumb:active { @@ -3829,6 +4016,40 @@ input[type="button"].btn-block { border-radius: 1rem; } +.custom-range:disabled::-webkit-slider-thumb { + background-color: #adb5bd; +} + +.custom-range:disabled::-webkit-slider-runnable-track { + cursor: default; +} + +.custom-range:disabled::-moz-range-thumb { + background-color: #adb5bd; +} + +.custom-range:disabled::-moz-range-track { + cursor: default; +} + +.custom-range:disabled::-ms-thumb { + background-color: #adb5bd; +} + +.custom-control-label::before, +.custom-file-label, +.custom-select { + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .custom-control-label::before, + .custom-file-label, + .custom-select { + transition: none; + } +} + .nav { display: -ms-flexbox; display: flex; @@ -3850,6 +4071,8 @@ input[type="button"].btn-block { .nav-link.disabled { color: #6c757d; + pointer-events: none; + cursor: default; } .nav-tabs { @@ -4008,10 +4231,6 @@ input[type="button"].btn-block { text-decoration: none; } -.navbar-toggler:not(:disabled):not(.disabled) { - cursor: pointer; -} - .navbar-toggler-icon { display: inline-block; width: 1.5em; @@ -4267,7 +4486,7 @@ input[type="button"].btn-block { } .navbar-light .navbar-toggler-icon { - background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"); + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); } .navbar-light .navbar-text { @@ -4315,7 +4534,7 @@ input[type="button"].btn-block { } .navbar-dark .navbar-toggler-icon { - background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"); + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); } .navbar-dark .navbar-text { @@ -4505,52 +4724,30 @@ input[type="button"].btn-block { margin-left: 0; border-left: 0; } - .card-group > .card:first-child { + .card-group > .card:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; } - .card-group > .card:first-child .card-img-top, - .card-group > .card:first-child .card-header { + .card-group > .card:not(:last-child) .card-img-top, + .card-group > .card:not(:last-child) .card-header { border-top-right-radius: 0; } - .card-group > .card:first-child .card-img-bottom, - .card-group > .card:first-child .card-footer { + .card-group > .card:not(:last-child) .card-img-bottom, + .card-group > .card:not(:last-child) .card-footer { border-bottom-right-radius: 0; } - .card-group > .card:last-child { + .card-group > .card:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; } - .card-group > .card:last-child .card-img-top, - .card-group > .card:last-child .card-header { + .card-group > .card:not(:first-child) .card-img-top, + .card-group > .card:not(:first-child) .card-header { border-top-left-radius: 0; } - .card-group > .card:last-child .card-img-bottom, - .card-group > .card:last-child .card-footer { + .card-group > .card:not(:first-child) .card-img-bottom, + .card-group > .card:not(:first-child) .card-footer { border-bottom-left-radius: 0; } - .card-group > .card:only-child { - border-radius: 0.25rem; - } - .card-group > .card:only-child .card-img-top, - .card-group > .card:only-child .card-header { - border-top-left-radius: 0.25rem; - border-top-right-radius: 0.25rem; - } - .card-group > .card:only-child .card-img-bottom, - .card-group > .card:only-child .card-footer { - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; - } - .card-group > .card:not(:first-child):not(:last-child):not(:only-child) { - border-radius: 0; - } - .card-group > .card:not(:first-child):not(:last-child):not(:only-child) .card-img-top, - .card-group > .card:not(:first-child):not(:last-child):not(:only-child) .card-img-bottom, - .card-group > .card:not(:first-child):not(:last-child):not(:only-child) .card-header, - .card-group > .card:not(:first-child):not(:last-child):not(:only-child) .card-footer { - border-radius: 0; - } } .card-columns .card { @@ -4574,26 +4771,34 @@ input[type="button"].btn-block { } } -.accordion .card:not(:first-of-type):not(:last-of-type) { - border-bottom: 0; +.accordion > .card { + overflow: hidden; +} + +.accordion > .card:not(:first-of-type) .card-header:first-child { border-radius: 0; } -.accordion .card:not(:first-of-type) .card-header:first-child { +.accordion > .card:not(:first-of-type):not(:last-of-type) { + border-bottom: 0; border-radius: 0; } -.accordion .card:first-of-type { +.accordion > .card:first-of-type { border-bottom: 0; border-bottom-right-radius: 0; border-bottom-left-radius: 0; } -.accordion .card:last-of-type { +.accordion > .card:last-of-type { border-top-left-radius: 0; border-top-right-radius: 0; } +.accordion > .card .card-header { + margin-bottom: -1px; +} + .breadcrumb { display: -ms-flexbox; display: flex; @@ -4662,10 +4867,6 @@ input[type="button"].btn-block { box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); } -.page-link:not(:disabled):not(.disabled) { - cursor: pointer; -} - .page-item:first-child .page-link { margin-left: 0; border-top-left-radius: 0.25rem; @@ -4734,6 +4935,17 @@ input[type="button"].btn-block { white-space: nowrap; vertical-align: baseline; border-radius: 0.25rem; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .badge { + transition: none; + } +} + +a.badge:hover, a.badge:focus { + text-decoration: none; } .badge:empty { @@ -4756,89 +4968,121 @@ input[type="button"].btn-block { background-color: #007bff; } -.badge-primary[href]:hover, .badge-primary[href]:focus { +a.badge-primary:hover, a.badge-primary:focus { color: #fff; - text-decoration: none; background-color: #0062cc; } +a.badge-primary:focus, a.badge-primary.focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); +} + .badge-secondary { color: #fff; background-color: #6c757d; } -.badge-secondary[href]:hover, .badge-secondary[href]:focus { +a.badge-secondary:hover, a.badge-secondary:focus { color: #fff; - text-decoration: none; background-color: #545b62; } +a.badge-secondary:focus, a.badge-secondary.focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5); +} + .badge-success { color: #fff; background-color: #28a745; } -.badge-success[href]:hover, .badge-success[href]:focus { +a.badge-success:hover, a.badge-success:focus { color: #fff; - text-decoration: none; background-color: #1e7e34; } +a.badge-success:focus, a.badge-success.focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); +} + .badge-info { color: #fff; background-color: #17a2b8; } -.badge-info[href]:hover, .badge-info[href]:focus { +a.badge-info:hover, a.badge-info:focus { color: #fff; - text-decoration: none; background-color: #117a8b; } +a.badge-info:focus, a.badge-info.focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5); +} + .badge-warning { color: #212529; background-color: #ffc107; } -.badge-warning[href]:hover, .badge-warning[href]:focus { +a.badge-warning:hover, a.badge-warning:focus { color: #212529; - text-decoration: none; background-color: #d39e00; } +a.badge-warning:focus, a.badge-warning.focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5); +} + .badge-danger { color: #fff; background-color: #dc3545; } -.badge-danger[href]:hover, .badge-danger[href]:focus { +a.badge-danger:hover, a.badge-danger:focus { color: #fff; - text-decoration: none; background-color: #bd2130; } +a.badge-danger:focus, a.badge-danger.focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5); +} + .badge-light { color: #212529; background-color: #f8f9fa; } -.badge-light[href]:hover, .badge-light[href]:focus { +a.badge-light:hover, a.badge-light:focus { color: #212529; - text-decoration: none; background-color: #dae0e5; } +a.badge-light:focus, a.badge-light.focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5); +} + .badge-dark { color: #fff; background-color: #343a40; } -.badge-dark[href]:hover, .badge-dark[href]:focus { +a.badge-dark:hover, a.badge-dark:focus { color: #fff; - text-decoration: none; background-color: #1d2124; } +a.badge-dark:focus, a.badge-dark.focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); +} + .jumbotron { padding: 2rem 1rem; margin-bottom: 2rem; @@ -5040,7 +5284,7 @@ input[type="button"].btn-block { transition: width 0.6s ease; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .progress-bar { transition: none; } @@ -5056,6 +5300,13 @@ input[type="button"].btn-block { animation: progress-bar-stripes 1s linear infinite; } +@media (prefers-reduced-motion: reduce) { + .progress-bar-animated { + -webkit-animation: none; + animation: none; + } +} + .media { display: -ms-flexbox; display: flex; @@ -5084,6 +5335,7 @@ input[type="button"].btn-block { } .list-group-item-action:hover, .list-group-item-action:focus { + z-index: 1; color: #495057; text-decoration: none; background-color: #f8f9fa; @@ -5114,13 +5366,9 @@ input[type="button"].btn-block { border-bottom-left-radius: 0.25rem; } -.list-group-item:hover, .list-group-item:focus { - z-index: 1; - text-decoration: none; -} - .list-group-item.disabled, .list-group-item:disabled { color: #6c757d; + pointer-events: none; background-color: #fff; } @@ -5131,17 +5379,133 @@ input[type="button"].btn-block { border-color: #007bff; } +.list-group-horizontal { + -ms-flex-direction: row; + flex-direction: row; +} + +.list-group-horizontal .list-group-item { + margin-right: -1px; + margin-bottom: 0; +} + +.list-group-horizontal .list-group-item:first-child { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + border-top-right-radius: 0; +} + +.list-group-horizontal .list-group-item:last-child { + margin-right: 0; + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0; +} + +@media (min-width: 576px) { + .list-group-horizontal-sm { + -ms-flex-direction: row; + flex-direction: row; + } + .list-group-horizontal-sm .list-group-item { + margin-right: -1px; + margin-bottom: 0; + } + .list-group-horizontal-sm .list-group-item:first-child { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + border-top-right-radius: 0; + } + .list-group-horizontal-sm .list-group-item:last-child { + margin-right: 0; + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0; + } +} + +@media (min-width: 768px) { + .list-group-horizontal-md { + -ms-flex-direction: row; + flex-direction: row; + } + .list-group-horizontal-md .list-group-item { + margin-right: -1px; + margin-bottom: 0; + } + .list-group-horizontal-md .list-group-item:first-child { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + border-top-right-radius: 0; + } + .list-group-horizontal-md .list-group-item:last-child { + margin-right: 0; + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0; + } +} + +@media (min-width: 992px) { + .list-group-horizontal-lg { + -ms-flex-direction: row; + flex-direction: row; + } + .list-group-horizontal-lg .list-group-item { + margin-right: -1px; + margin-bottom: 0; + } + .list-group-horizontal-lg .list-group-item:first-child { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + border-top-right-radius: 0; + } + .list-group-horizontal-lg .list-group-item:last-child { + margin-right: 0; + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0; + } +} + +@media (min-width: 1200px) { + .list-group-horizontal-xl { + -ms-flex-direction: row; + flex-direction: row; + } + .list-group-horizontal-xl .list-group-item { + margin-right: -1px; + margin-bottom: 0; + } + .list-group-horizontal-xl .list-group-item:first-child { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + border-top-right-radius: 0; + } + .list-group-horizontal-xl .list-group-item:last-child { + margin-right: 0; + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0; + } +} + .list-group-flush .list-group-item { border-right: 0; border-left: 0; border-radius: 0; } +.list-group-flush .list-group-item:last-child { + margin-bottom: -1px; +} + .list-group-flush:first-child .list-group-item:first-child { border-top: 0; } .list-group-flush:last-child .list-group-item:last-child { + margin-bottom: 0; border-bottom: 0; } @@ -5283,14 +5647,13 @@ input[type="button"].btn-block { opacity: .5; } -.close:hover, .close:focus { +.close:hover { color: #000; text-decoration: none; - opacity: .75; } -.close:not(:disabled):not(.disabled) { - cursor: pointer; +.close:not(:disabled):not(.disabled):hover, .close:not(:disabled):not(.disabled):focus { + opacity: .75; } button.close { @@ -5298,29 +5661,82 @@ button.close { background-color: transparent; border: 0; -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +a.close.disabled { + pointer-events: none; +} + +.toast { + max-width: 350px; + overflow: hidden; + font-size: 0.875rem; + background-color: rgba(255, 255, 255, 0.85); + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, 0.1); + box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1); + -webkit-backdrop-filter: blur(10px); + backdrop-filter: blur(10px); + opacity: 0; + border-radius: 0.25rem; +} + +.toast:not(:last-child) { + margin-bottom: 0.75rem; +} + +.toast.showing { + opacity: 1; +} + +.toast.show { + display: block; + opacity: 1; +} + +.toast.hide { + display: none; +} + +.toast-header { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + padding: 0.25rem 0.75rem; + color: #6c757d; + background-color: rgba(255, 255, 255, 0.85); + background-clip: padding-box; + border-bottom: 1px solid rgba(0, 0, 0, 0.05); +} + +.toast-body { + padding: 0.75rem; } .modal-open { overflow: hidden; } +.modal-open .modal { + overflow-x: hidden; + overflow-y: auto; +} + .modal { position: fixed; top: 0; - right: 0; - bottom: 0; left: 0; z-index: 1050; display: none; + width: 100%; + height: 100%; overflow: hidden; outline: 0; } -.modal-open .modal { - overflow-x: hidden; - overflow-y: auto; -} - .modal-dialog { position: relative; width: auto; @@ -5332,19 +5748,40 @@ button.close { transition: -webkit-transform 0.3s ease-out; transition: transform 0.3s ease-out; transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out; - -webkit-transform: translate(0, -25%); - transform: translate(0, -25%); + -webkit-transform: translate(0, -50px); + transform: translate(0, -50px); } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .modal.fade .modal-dialog { transition: none; } } .modal.show .modal-dialog { - -webkit-transform: translate(0, 0); - transform: translate(0, 0); + -webkit-transform: none; + transform: none; +} + +.modal-dialog-scrollable { + display: -ms-flexbox; + display: flex; + max-height: calc(100% - 1rem); +} + +.modal-dialog-scrollable .modal-content { + max-height: calc(100vh - 1rem); + overflow: hidden; +} + +.modal-dialog-scrollable .modal-header, +.modal-dialog-scrollable .modal-footer { + -ms-flex-negative: 0; + flex-shrink: 0; +} + +.modal-dialog-scrollable .modal-body { + overflow-y: auto; } .modal-dialog-centered { @@ -5352,7 +5789,29 @@ button.close { display: flex; -ms-flex-align: center; align-items: center; - min-height: calc(100% - (0.5rem * 2)); + min-height: calc(100% - 1rem); +} + +.modal-dialog-centered::before { + display: block; + height: calc(100vh - 1rem); + content: ""; +} + +.modal-dialog-centered.modal-dialog-scrollable { + -ms-flex-direction: column; + flex-direction: column; + -ms-flex-pack: center; + justify-content: center; + height: 100%; +} + +.modal-dialog-centered.modal-dialog-scrollable .modal-content { + max-height: none; +} + +.modal-dialog-centered.modal-dialog-scrollable::before { + content: none; } .modal-content { @@ -5373,10 +5832,10 @@ button.close { .modal-backdrop { position: fixed; top: 0; - right: 0; - bottom: 0; left: 0; z-index: 1040; + width: 100vw; + height: 100vh; background-color: #000; } @@ -5395,14 +5854,14 @@ button.close { align-items: flex-start; -ms-flex-pack: justify; justify-content: space-between; - padding: 1rem; - border-bottom: 1px solid #e9ecef; + padding: 1rem 1rem; + border-bottom: 1px solid #dee2e6; border-top-left-radius: 0.3rem; border-top-right-radius: 0.3rem; } .modal-header .close { - padding: 1rem; + padding: 1rem 1rem; margin: -1rem -1rem -1rem auto; } @@ -5426,7 +5885,9 @@ button.close { -ms-flex-pack: end; justify-content: flex-end; padding: 1rem; - border-top: 1px solid #e9ecef; + border-top: 1px solid #dee2e6; + border-bottom-right-radius: 0.3rem; + border-bottom-left-radius: 0.3rem; } .modal-footer > :not(:first-child) { @@ -5450,8 +5911,17 @@ button.close { max-width: 500px; margin: 1.75rem auto; } + .modal-dialog-scrollable { + max-height: calc(100% - 3.5rem); + } + .modal-dialog-scrollable .modal-content { + max-height: calc(100vh - 3.5rem); + } .modal-dialog-centered { - min-height: calc(100% - (1.75rem * 2)); + min-height: calc(100% - 3.5rem); + } + .modal-dialog-centered::before { + height: calc(100vh - 3.5rem); } .modal-sm { max-width: 300px; @@ -5459,17 +5929,24 @@ button.close { } @media (min-width: 992px) { - .modal-lg { + .modal-lg, + .modal-xl { max-width: 800px; } } +@media (min-width: 1200px) { + .modal-xl { + max-width: 1140px; + } +} + .tooltip { position: absolute; z-index: 1070; display: block; margin: 0; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-style: normal; font-weight: 400; line-height: 1.5; @@ -5582,7 +6059,7 @@ button.close { z-index: 1060; display: block; max-width: 276px; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-style: normal; font-weight: 400; line-height: 1.5; @@ -5624,25 +6101,19 @@ button.close { margin-bottom: 0.5rem; } -.bs-popover-top .arrow, .bs-popover-auto[x-placement^="top"] .arrow { +.bs-popover-top > .arrow, .bs-popover-auto[x-placement^="top"] > .arrow { bottom: calc((0.5rem + 1px) * -1); } -.bs-popover-top .arrow::before, .bs-popover-auto[x-placement^="top"] .arrow::before, -.bs-popover-top .arrow::after, -.bs-popover-auto[x-placement^="top"] .arrow::after { - border-width: 0.5rem 0.5rem 0; -} - -.bs-popover-top .arrow::before, .bs-popover-auto[x-placement^="top"] .arrow::before { +.bs-popover-top > .arrow::before, .bs-popover-auto[x-placement^="top"] > .arrow::before { bottom: 0; + border-width: 0.5rem 0.5rem 0; border-top-color: rgba(0, 0, 0, 0.25); } - -.bs-popover-top .arrow::after, -.bs-popover-auto[x-placement^="top"] .arrow::after { +.bs-popover-top > .arrow::after, .bs-popover-auto[x-placement^="top"] > .arrow::after { bottom: 1px; + border-width: 0.5rem 0.5rem 0; border-top-color: #fff; } @@ -5650,28 +6121,22 @@ button.close { margin-left: 0.5rem; } -.bs-popover-right .arrow, .bs-popover-auto[x-placement^="right"] .arrow { +.bs-popover-right > .arrow, .bs-popover-auto[x-placement^="right"] > .arrow { left: calc((0.5rem + 1px) * -1); width: 0.5rem; height: 1rem; margin: 0.3rem 0; } -.bs-popover-right .arrow::before, .bs-popover-auto[x-placement^="right"] .arrow::before, -.bs-popover-right .arrow::after, -.bs-popover-auto[x-placement^="right"] .arrow::after { - border-width: 0.5rem 0.5rem 0.5rem 0; -} - -.bs-popover-right .arrow::before, .bs-popover-auto[x-placement^="right"] .arrow::before { +.bs-popover-right > .arrow::before, .bs-popover-auto[x-placement^="right"] > .arrow::before { left: 0; + border-width: 0.5rem 0.5rem 0.5rem 0; border-right-color: rgba(0, 0, 0, 0.25); } - -.bs-popover-right .arrow::after, -.bs-popover-auto[x-placement^="right"] .arrow::after { +.bs-popover-right > .arrow::after, .bs-popover-auto[x-placement^="right"] > .arrow::after { left: 1px; + border-width: 0.5rem 0.5rem 0.5rem 0; border-right-color: #fff; } @@ -5679,25 +6144,19 @@ button.close { margin-top: 0.5rem; } -.bs-popover-bottom .arrow, .bs-popover-auto[x-placement^="bottom"] .arrow { +.bs-popover-bottom > .arrow, .bs-popover-auto[x-placement^="bottom"] > .arrow { top: calc((0.5rem + 1px) * -1); } -.bs-popover-bottom .arrow::before, .bs-popover-auto[x-placement^="bottom"] .arrow::before, -.bs-popover-bottom .arrow::after, -.bs-popover-auto[x-placement^="bottom"] .arrow::after { - border-width: 0 0.5rem 0.5rem 0.5rem; -} - -.bs-popover-bottom .arrow::before, .bs-popover-auto[x-placement^="bottom"] .arrow::before { +.bs-popover-bottom > .arrow::before, .bs-popover-auto[x-placement^="bottom"] > .arrow::before { top: 0; + border-width: 0 0.5rem 0.5rem 0.5rem; border-bottom-color: rgba(0, 0, 0, 0.25); } - -.bs-popover-bottom .arrow::after, -.bs-popover-auto[x-placement^="bottom"] .arrow::after { +.bs-popover-bottom > .arrow::after, .bs-popover-auto[x-placement^="bottom"] > .arrow::after { top: 1px; + border-width: 0 0.5rem 0.5rem 0.5rem; border-bottom-color: #fff; } @@ -5716,28 +6175,22 @@ button.close { margin-right: 0.5rem; } -.bs-popover-left .arrow, .bs-popover-auto[x-placement^="left"] .arrow { +.bs-popover-left > .arrow, .bs-popover-auto[x-placement^="left"] > .arrow { right: calc((0.5rem + 1px) * -1); width: 0.5rem; height: 1rem; margin: 0.3rem 0; } -.bs-popover-left .arrow::before, .bs-popover-auto[x-placement^="left"] .arrow::before, -.bs-popover-left .arrow::after, -.bs-popover-auto[x-placement^="left"] .arrow::after { - border-width: 0.5rem 0 0.5rem 0.5rem; -} - -.bs-popover-left .arrow::before, .bs-popover-auto[x-placement^="left"] .arrow::before { +.bs-popover-left > .arrow::before, .bs-popover-auto[x-placement^="left"] > .arrow::before { right: 0; + border-width: 0.5rem 0 0.5rem 0.5rem; border-left-color: rgba(0, 0, 0, 0.25); } - -.bs-popover-left .arrow::after, -.bs-popover-auto[x-placement^="left"] .arrow::after { +.bs-popover-left > .arrow::after, .bs-popover-auto[x-placement^="left"] > .arrow::after { right: 1px; + border-width: 0.5rem 0 0.5rem 0.5rem; border-left-color: #fff; } @@ -5745,7 +6198,6 @@ button.close { padding: 0.5rem 0.75rem; margin-bottom: 0; font-size: 1rem; - color: inherit; background-color: #f7f7f7; border-bottom: 1px solid #ebebeb; border-top-left-radius: calc(0.3rem - 1px); @@ -5765,28 +6217,37 @@ button.close { position: relative; } +.carousel.pointer-event { + -ms-touch-action: pan-y; + touch-action: pan-y; +} + .carousel-inner { position: relative; width: 100%; overflow: hidden; } +.carousel-inner::after { + display: block; + clear: both; + content: ""; +} + .carousel-item { position: relative; display: none; - -ms-flex-align: center; - align-items: center; + float: left; width: 100%; - transition: -webkit-transform 0.6s ease; - transition: transform 0.6s ease; - transition: transform 0.6s ease, -webkit-transform 0.6s ease; + margin-right: -100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; - -webkit-perspective: 1000px; - perspective: 1000px; + transition: -webkit-transform 0.6s ease-in-out; + transition: transform 0.6s ease-in-out; + transition: transform 0.6s ease-in-out, -webkit-transform 0.6s ease-in-out; } -@media screen and (prefers-reduced-motion: reduce) { +@media (prefers-reduced-motion: reduce) { .carousel-item { transition: none; } @@ -5798,88 +6259,43 @@ button.close { display: block; } -.carousel-item-next, -.carousel-item-prev { - position: absolute; - top: 0; -} - -.carousel-item-next.carousel-item-left, -.carousel-item-prev.carousel-item-right { - -webkit-transform: translateX(0); - transform: translateX(0); -} - -@supports ((-webkit-transform-style: preserve-3d) or (transform-style: preserve-3d)) { - .carousel-item-next.carousel-item-left, - .carousel-item-prev.carousel-item-right { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.carousel-item-next, +.carousel-item-next:not(.carousel-item-left), .active.carousel-item-right { -webkit-transform: translateX(100%); transform: translateX(100%); } -@supports ((-webkit-transform-style: preserve-3d) or (transform-style: preserve-3d)) { - .carousel-item-next, - .active.carousel-item-right { - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - } -} - -.carousel-item-prev, +.carousel-item-prev:not(.carousel-item-right), .active.carousel-item-left { -webkit-transform: translateX(-100%); transform: translateX(-100%); } -@supports ((-webkit-transform-style: preserve-3d) or (transform-style: preserve-3d)) { - .carousel-item-prev, - .active.carousel-item-left { - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); - } -} - .carousel-fade .carousel-item { opacity: 0; - transition-duration: .6s; transition-property: opacity; + -webkit-transform: none; + transform: none; } .carousel-fade .carousel-item.active, .carousel-fade .carousel-item-next.carousel-item-left, .carousel-fade .carousel-item-prev.carousel-item-right { + z-index: 1; opacity: 1; } .carousel-fade .active.carousel-item-left, -.carousel-fade .active.carousel-item-right { - opacity: 0; -} - -.carousel-fade .carousel-item-next, -.carousel-fade .carousel-item-prev, -.carousel-fade .carousel-item.active, -.carousel-fade .active.carousel-item-left, -.carousel-fade .active.carousel-item-prev { - -webkit-transform: translateX(0); - transform: translateX(0); +.carousel-fade .active.carousel-item-right { + z-index: 0; + opacity: 0; + transition: 0s 0.6s opacity; } -@supports ((-webkit-transform-style: preserve-3d) or (transform-style: preserve-3d)) { - .carousel-fade .carousel-item-next, - .carousel-fade .carousel-item-prev, - .carousel-fade .carousel-item.active, +@media (prefers-reduced-motion: reduce) { .carousel-fade .active.carousel-item-left, - .carousel-fade .active.carousel-item-prev { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); + .carousel-fade .active.carousel-item-right { + transition: none; } } @@ -5888,6 +6304,7 @@ button.close { position: absolute; top: 0; bottom: 0; + z-index: 1; display: -ms-flexbox; display: flex; -ms-flex-align: center; @@ -5898,6 +6315,14 @@ button.close { color: #fff; text-align: center; opacity: 0.5; + transition: opacity 0.15s ease; +} + +@media (prefers-reduced-motion: reduce) { + .carousel-control-prev, + .carousel-control-next { + transition: none; + } } .carousel-control-prev:hover, .carousel-control-prev:focus, @@ -5906,7 +6331,7 @@ button.close { color: #fff; text-decoration: none; outline: 0; - opacity: .9; + opacity: 0.9; } .carousel-control-prev { @@ -5922,22 +6347,21 @@ button.close { display: inline-block; width: 20px; height: 20px; - background: transparent no-repeat center center; - background-size: 100% 100%; + background: no-repeat 50% / 100% 100%; } .carousel-control-prev-icon { - background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E"); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3e%3c/svg%3e"); } .carousel-control-next-icon { - background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E"); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3e%3c/svg%3e"); } .carousel-indicators { position: absolute; right: 0; - bottom: 10px; + bottom: 0; left: 0; z-index: 15; display: -ms-flexbox; @@ -5951,7 +6375,7 @@ button.close { } .carousel-indicators li { - position: relative; + box-sizing: content-box; -ms-flex: 0 1 auto; flex: 0 1 auto; width: 30px; @@ -5960,31 +6384,22 @@ button.close { margin-left: 3px; text-indent: -999px; cursor: pointer; - background-color: rgba(255, 255, 255, 0.5); -} - -.carousel-indicators li::before { - position: absolute; - top: -10px; - left: 0; - display: inline-block; - width: 100%; - height: 10px; - content: ""; + background-color: #fff; + background-clip: padding-box; + border-top: 10px solid transparent; + border-bottom: 10px solid transparent; + opacity: .5; + transition: opacity 0.6s ease; } -.carousel-indicators li::after { - position: absolute; - bottom: -10px; - left: 0; - display: inline-block; - width: 100%; - height: 10px; - content: ""; +@media (prefers-reduced-motion: reduce) { + .carousel-indicators li { + transition: none; + } } .carousel-indicators .active { - background-color: #fff; + opacity: 1; } .carousel-caption { @@ -5999,6 +6414,75 @@ button.close { text-align: center; } +@-webkit-keyframes spinner-border { + to { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes spinner-border { + to { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +.spinner-border { + display: inline-block; + width: 2rem; + height: 2rem; + vertical-align: text-bottom; + border: 0.25em solid currentColor; + border-right-color: transparent; + border-radius: 50%; + -webkit-animation: spinner-border .75s linear infinite; + animation: spinner-border .75s linear infinite; +} + +.spinner-border-sm { + width: 1rem; + height: 1rem; + border-width: 0.2em; +} + +@-webkit-keyframes spinner-grow { + 0% { + -webkit-transform: scale(0); + transform: scale(0); + } + 50% { + opacity: 1; + } +} + +@keyframes spinner-grow { + 0% { + -webkit-transform: scale(0); + transform: scale(0); + } + 50% { + opacity: 1; + } +} + +.spinner-grow { + display: inline-block; + width: 2rem; + height: 2rem; + vertical-align: text-bottom; + background-color: currentColor; + border-radius: 50%; + opacity: 0; + -webkit-animation: spinner-grow .75s linear infinite; + animation: spinner-grow .75s linear infinite; +} + +.spinner-grow-sm { + width: 1rem; + height: 1rem; +} + .align-baseline { vertical-align: baseline !important; } @@ -6187,6 +6671,10 @@ button.bg-dark:focus { border-color: #fff !important; } +.rounded-sm { + border-radius: 0.2rem !important; +} + .rounded { border-radius: 0.25rem !important; } @@ -6211,10 +6699,18 @@ button.bg-dark:focus { border-bottom-left-radius: 0.25rem !important; } +.rounded-lg { + border-radius: 0.3rem !important; +} + .rounded-circle { border-radius: 50% !important; } +.rounded-pill { + border-radius: 50rem !important; +} + .rounded-0 { border-radius: 0 !important; } @@ -7252,6 +7748,14 @@ button.bg-dark:focus { } } +.overflow-auto { + overflow: auto !important; +} + +.overflow-hidden { + overflow: hidden !important; +} + .position-static { position: static !important; } @@ -7382,6 +7886,34 @@ button.bg-dark:focus { max-height: 100% !important; } +.min-vw-100 { + min-width: 100vw !important; +} + +.min-vh-100 { + min-height: 100vh !important; +} + +.vw-100 { + width: 100vw !important; +} + +.vh-100 { + height: 100vh !important; +} + +.stretched-link::after { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1; + pointer-events: auto; + content: ""; + background-color: rgba(0, 0, 0, 0); +} + .m-0 { margin: 0 !important; } @@ -7670,6 +8202,126 @@ button.bg-dark:focus { padding-left: 3rem !important; } +.m-n1 { + margin: -0.25rem !important; +} + +.mt-n1, +.my-n1 { + margin-top: -0.25rem !important; +} + +.mr-n1, +.mx-n1 { + margin-right: -0.25rem !important; +} + +.mb-n1, +.my-n1 { + margin-bottom: -0.25rem !important; +} + +.ml-n1, +.mx-n1 { + margin-left: -0.25rem !important; +} + +.m-n2 { + margin: -0.5rem !important; +} + +.mt-n2, +.my-n2 { + margin-top: -0.5rem !important; +} + +.mr-n2, +.mx-n2 { + margin-right: -0.5rem !important; +} + +.mb-n2, +.my-n2 { + margin-bottom: -0.5rem !important; +} + +.ml-n2, +.mx-n2 { + margin-left: -0.5rem !important; +} + +.m-n3 { + margin: -1rem !important; +} + +.mt-n3, +.my-n3 { + margin-top: -1rem !important; +} + +.mr-n3, +.mx-n3 { + margin-right: -1rem !important; +} + +.mb-n3, +.my-n3 { + margin-bottom: -1rem !important; +} + +.ml-n3, +.mx-n3 { + margin-left: -1rem !important; +} + +.m-n4 { + margin: -1.5rem !important; +} + +.mt-n4, +.my-n4 { + margin-top: -1.5rem !important; +} + +.mr-n4, +.mx-n4 { + margin-right: -1.5rem !important; +} + +.mb-n4, +.my-n4 { + margin-bottom: -1.5rem !important; +} + +.ml-n4, +.mx-n4 { + margin-left: -1.5rem !important; +} + +.m-n5 { + margin: -3rem !important; +} + +.mt-n5, +.my-n5 { + margin-top: -3rem !important; +} + +.mr-n5, +.mx-n5 { + margin-right: -3rem !important; +} + +.mb-n5, +.my-n5 { + margin-bottom: -3rem !important; +} + +.ml-n5, +.mx-n5 { + margin-left: -3rem !important; +} + .m-auto { margin: auto !important; } @@ -7923,6 +8575,101 @@ button.bg-dark:focus { .px-sm-5 { padding-left: 3rem !important; } + .m-sm-n1 { + margin: -0.25rem !important; + } + .mt-sm-n1, + .my-sm-n1 { + margin-top: -0.25rem !important; + } + .mr-sm-n1, + .mx-sm-n1 { + margin-right: -0.25rem !important; + } + .mb-sm-n1, + .my-sm-n1 { + margin-bottom: -0.25rem !important; + } + .ml-sm-n1, + .mx-sm-n1 { + margin-left: -0.25rem !important; + } + .m-sm-n2 { + margin: -0.5rem !important; + } + .mt-sm-n2, + .my-sm-n2 { + margin-top: -0.5rem !important; + } + .mr-sm-n2, + .mx-sm-n2 { + margin-right: -0.5rem !important; + } + .mb-sm-n2, + .my-sm-n2 { + margin-bottom: -0.5rem !important; + } + .ml-sm-n2, + .mx-sm-n2 { + margin-left: -0.5rem !important; + } + .m-sm-n3 { + margin: -1rem !important; + } + .mt-sm-n3, + .my-sm-n3 { + margin-top: -1rem !important; + } + .mr-sm-n3, + .mx-sm-n3 { + margin-right: -1rem !important; + } + .mb-sm-n3, + .my-sm-n3 { + margin-bottom: -1rem !important; + } + .ml-sm-n3, + .mx-sm-n3 { + margin-left: -1rem !important; + } + .m-sm-n4 { + margin: -1.5rem !important; + } + .mt-sm-n4, + .my-sm-n4 { + margin-top: -1.5rem !important; + } + .mr-sm-n4, + .mx-sm-n4 { + margin-right: -1.5rem !important; + } + .mb-sm-n4, + .my-sm-n4 { + margin-bottom: -1.5rem !important; + } + .ml-sm-n4, + .mx-sm-n4 { + margin-left: -1.5rem !important; + } + .m-sm-n5 { + margin: -3rem !important; + } + .mt-sm-n5, + .my-sm-n5 { + margin-top: -3rem !important; + } + .mr-sm-n5, + .mx-sm-n5 { + margin-right: -3rem !important; + } + .mb-sm-n5, + .my-sm-n5 { + margin-bottom: -3rem !important; + } + .ml-sm-n5, + .mx-sm-n5 { + margin-left: -3rem !important; + } .m-sm-auto { margin: auto !important; } @@ -8173,6 +8920,101 @@ button.bg-dark:focus { .px-md-5 { padding-left: 3rem !important; } + .m-md-n1 { + margin: -0.25rem !important; + } + .mt-md-n1, + .my-md-n1 { + margin-top: -0.25rem !important; + } + .mr-md-n1, + .mx-md-n1 { + margin-right: -0.25rem !important; + } + .mb-md-n1, + .my-md-n1 { + margin-bottom: -0.25rem !important; + } + .ml-md-n1, + .mx-md-n1 { + margin-left: -0.25rem !important; + } + .m-md-n2 { + margin: -0.5rem !important; + } + .mt-md-n2, + .my-md-n2 { + margin-top: -0.5rem !important; + } + .mr-md-n2, + .mx-md-n2 { + margin-right: -0.5rem !important; + } + .mb-md-n2, + .my-md-n2 { + margin-bottom: -0.5rem !important; + } + .ml-md-n2, + .mx-md-n2 { + margin-left: -0.5rem !important; + } + .m-md-n3 { + margin: -1rem !important; + } + .mt-md-n3, + .my-md-n3 { + margin-top: -1rem !important; + } + .mr-md-n3, + .mx-md-n3 { + margin-right: -1rem !important; + } + .mb-md-n3, + .my-md-n3 { + margin-bottom: -1rem !important; + } + .ml-md-n3, + .mx-md-n3 { + margin-left: -1rem !important; + } + .m-md-n4 { + margin: -1.5rem !important; + } + .mt-md-n4, + .my-md-n4 { + margin-top: -1.5rem !important; + } + .mr-md-n4, + .mx-md-n4 { + margin-right: -1.5rem !important; + } + .mb-md-n4, + .my-md-n4 { + margin-bottom: -1.5rem !important; + } + .ml-md-n4, + .mx-md-n4 { + margin-left: -1.5rem !important; + } + .m-md-n5 { + margin: -3rem !important; + } + .mt-md-n5, + .my-md-n5 { + margin-top: -3rem !important; + } + .mr-md-n5, + .mx-md-n5 { + margin-right: -3rem !important; + } + .mb-md-n5, + .my-md-n5 { + margin-bottom: -3rem !important; + } + .ml-md-n5, + .mx-md-n5 { + margin-left: -3rem !important; + } .m-md-auto { margin: auto !important; } @@ -8423,6 +9265,101 @@ button.bg-dark:focus { .px-lg-5 { padding-left: 3rem !important; } + .m-lg-n1 { + margin: -0.25rem !important; + } + .mt-lg-n1, + .my-lg-n1 { + margin-top: -0.25rem !important; + } + .mr-lg-n1, + .mx-lg-n1 { + margin-right: -0.25rem !important; + } + .mb-lg-n1, + .my-lg-n1 { + margin-bottom: -0.25rem !important; + } + .ml-lg-n1, + .mx-lg-n1 { + margin-left: -0.25rem !important; + } + .m-lg-n2 { + margin: -0.5rem !important; + } + .mt-lg-n2, + .my-lg-n2 { + margin-top: -0.5rem !important; + } + .mr-lg-n2, + .mx-lg-n2 { + margin-right: -0.5rem !important; + } + .mb-lg-n2, + .my-lg-n2 { + margin-bottom: -0.5rem !important; + } + .ml-lg-n2, + .mx-lg-n2 { + margin-left: -0.5rem !important; + } + .m-lg-n3 { + margin: -1rem !important; + } + .mt-lg-n3, + .my-lg-n3 { + margin-top: -1rem !important; + } + .mr-lg-n3, + .mx-lg-n3 { + margin-right: -1rem !important; + } + .mb-lg-n3, + .my-lg-n3 { + margin-bottom: -1rem !important; + } + .ml-lg-n3, + .mx-lg-n3 { + margin-left: -1rem !important; + } + .m-lg-n4 { + margin: -1.5rem !important; + } + .mt-lg-n4, + .my-lg-n4 { + margin-top: -1.5rem !important; + } + .mr-lg-n4, + .mx-lg-n4 { + margin-right: -1.5rem !important; + } + .mb-lg-n4, + .my-lg-n4 { + margin-bottom: -1.5rem !important; + } + .ml-lg-n4, + .mx-lg-n4 { + margin-left: -1.5rem !important; + } + .m-lg-n5 { + margin: -3rem !important; + } + .mt-lg-n5, + .my-lg-n5 { + margin-top: -3rem !important; + } + .mr-lg-n5, + .mx-lg-n5 { + margin-right: -3rem !important; + } + .mb-lg-n5, + .my-lg-n5 { + margin-bottom: -3rem !important; + } + .ml-lg-n5, + .mx-lg-n5 { + margin-left: -3rem !important; + } .m-lg-auto { margin: auto !important; } @@ -8673,6 +9610,101 @@ button.bg-dark:focus { .px-xl-5 { padding-left: 3rem !important; } + .m-xl-n1 { + margin: -0.25rem !important; + } + .mt-xl-n1, + .my-xl-n1 { + margin-top: -0.25rem !important; + } + .mr-xl-n1, + .mx-xl-n1 { + margin-right: -0.25rem !important; + } + .mb-xl-n1, + .my-xl-n1 { + margin-bottom: -0.25rem !important; + } + .ml-xl-n1, + .mx-xl-n1 { + margin-left: -0.25rem !important; + } + .m-xl-n2 { + margin: -0.5rem !important; + } + .mt-xl-n2, + .my-xl-n2 { + margin-top: -0.5rem !important; + } + .mr-xl-n2, + .mx-xl-n2 { + margin-right: -0.5rem !important; + } + .mb-xl-n2, + .my-xl-n2 { + margin-bottom: -0.5rem !important; + } + .ml-xl-n2, + .mx-xl-n2 { + margin-left: -0.5rem !important; + } + .m-xl-n3 { + margin: -1rem !important; + } + .mt-xl-n3, + .my-xl-n3 { + margin-top: -1rem !important; + } + .mr-xl-n3, + .mx-xl-n3 { + margin-right: -1rem !important; + } + .mb-xl-n3, + .my-xl-n3 { + margin-bottom: -1rem !important; + } + .ml-xl-n3, + .mx-xl-n3 { + margin-left: -1rem !important; + } + .m-xl-n4 { + margin: -1.5rem !important; + } + .mt-xl-n4, + .my-xl-n4 { + margin-top: -1.5rem !important; + } + .mr-xl-n4, + .mx-xl-n4 { + margin-right: -1.5rem !important; + } + .mb-xl-n4, + .my-xl-n4 { + margin-bottom: -1.5rem !important; + } + .ml-xl-n4, + .mx-xl-n4 { + margin-left: -1.5rem !important; + } + .m-xl-n5 { + margin: -3rem !important; + } + .mt-xl-n5, + .my-xl-n5 { + margin-top: -3rem !important; + } + .mr-xl-n5, + .mx-xl-n5 { + margin-right: -3rem !important; + } + .mb-xl-n5, + .my-xl-n5 { + margin-bottom: -3rem !important; + } + .ml-xl-n5, + .mx-xl-n5 { + margin-left: -3rem !important; + } .m-xl-auto { margin: auto !important; } @@ -8695,13 +9727,17 @@ button.bg-dark:focus { } .text-monospace { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important; } .text-justify { text-align: justify !important; } +.text-wrap { + white-space: normal !important; +} + .text-nowrap { white-space: nowrap !important; } @@ -8788,6 +9824,10 @@ button.bg-dark:focus { font-weight: 300 !important; } +.font-weight-lighter { + font-weight: lighter !important; +} + .font-weight-normal { font-weight: 400 !important; } @@ -8796,6 +9836,10 @@ button.bg-dark:focus { font-weight: 700 !important; } +.font-weight-bolder { + font-weight: bolder !important; +} + .font-italic { font-style: italic !important; } @@ -8809,7 +9853,7 @@ button.bg-dark:focus { } a.text-primary:hover, a.text-primary:focus { - color: #0062cc !important; + color: #0056b3 !important; } .text-secondary { @@ -8817,7 +9861,7 @@ a.text-primary:hover, a.text-primary:focus { } a.text-secondary:hover, a.text-secondary:focus { - color: #545b62 !important; + color: #494f54 !important; } .text-success { @@ -8825,7 +9869,7 @@ a.text-secondary:hover, a.text-secondary:focus { } a.text-success:hover, a.text-success:focus { - color: #1e7e34 !important; + color: #19692c !important; } .text-info { @@ -8833,7 +9877,7 @@ a.text-success:hover, a.text-success:focus { } a.text-info:hover, a.text-info:focus { - color: #117a8b !important; + color: #0f6674 !important; } .text-warning { @@ -8841,7 +9885,7 @@ a.text-info:hover, a.text-info:focus { } a.text-warning:hover, a.text-warning:focus { - color: #d39e00 !important; + color: #ba8b00 !important; } .text-danger { @@ -8849,7 +9893,7 @@ a.text-warning:hover, a.text-warning:focus { } a.text-danger:hover, a.text-danger:focus { - color: #bd2130 !important; + color: #a71d2a !important; } .text-light { @@ -8857,7 +9901,7 @@ a.text-danger:hover, a.text-danger:focus { } a.text-light:hover, a.text-light:focus { - color: #dae0e5 !important; + color: #cbd3da !important; } .text-dark { @@ -8865,7 +9909,7 @@ a.text-light:hover, a.text-light:focus { } a.text-dark:hover, a.text-dark:focus { - color: #1d2124 !important; + color: #121416 !important; } .text-body { @@ -8892,6 +9936,19 @@ a.text-dark:hover, a.text-dark:focus { border: 0; } +.text-decoration-none { + text-decoration: none !important; +} + +.text-break { + word-break: break-word !important; + overflow-wrap: break-word !important; +} + +.text-reset { + color: inherit !important; +} + .visible { visibility: visible !important; } diff --git a/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/bootstrap/js/bootstrap.bundle.js b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/bootstrap/js/bootstrap.bundle.js index adb3400738..f4f23ead2c 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/bootstrap/js/bootstrap.bundle.js +++ b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/bootstrap/js/bootstrap.bundle.js @@ -1,13 +1,13 @@ /*! - * Bootstrap v4.1.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery')) : typeof define === 'function' && define.amd ? define(['exports', 'jquery'], factory) : - (factory((global.bootstrap = {}),global.jQuery)); -}(this, (function (exports,$) { 'use strict'; + (global = global || self, factory(global.bootstrap = {}, global.jQuery)); +}(this, function (exports, $) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; @@ -69,1340 +69,1441 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): util.js + * Bootstrap (v4.3.1): util.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ + /** + * ------------------------------------------------------------------------ + * Private TransitionEnd Helpers + * ------------------------------------------------------------------------ + */ - var Util = function ($$$1) { - /** - * ------------------------------------------------------------------------ - * Private TransitionEnd Helpers - * ------------------------------------------------------------------------ - */ - var TRANSITION_END = 'transitionend'; - var MAX_UID = 1000000; - var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp) - - function toType(obj) { - return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); - } + var TRANSITION_END = 'transitionend'; + var MAX_UID = 1000000; + var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp) - function getSpecialTransitionEndEvent() { - return { - bindType: TRANSITION_END, - delegateType: TRANSITION_END, - handle: function handle(event) { - if ($$$1(event.target).is(this)) { - return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params - } + function toType(obj) { + return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); + } - return undefined; // eslint-disable-line no-undefined + function getSpecialTransitionEndEvent() { + return { + bindType: TRANSITION_END, + delegateType: TRANSITION_END, + handle: function handle(event) { + if ($(event.target).is(this)) { + return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params } - }; - } - function transitionEndEmulator(duration) { - var _this = this; + return undefined; // eslint-disable-line no-undefined + } + }; + } - var called = false; - $$$1(this).one(Util.TRANSITION_END, function () { - called = true; - }); - setTimeout(function () { - if (!called) { - Util.triggerTransitionEnd(_this); - } - }, duration); - return this; - } + function transitionEndEmulator(duration) { + var _this = this; - function setTransitionEndSupport() { - $$$1.fn.emulateTransitionEnd = transitionEndEmulator; - $$$1.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent(); - } - /** - * -------------------------------------------------------------------------- - * Public Util Api - * -------------------------------------------------------------------------- - */ + var called = false; + $(this).one(Util.TRANSITION_END, function () { + called = true; + }); + setTimeout(function () { + if (!called) { + Util.triggerTransitionEnd(_this); + } + }, duration); + return this; + } + + function setTransitionEndSupport() { + $.fn.emulateTransitionEnd = transitionEndEmulator; + $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent(); + } + /** + * -------------------------------------------------------------------------- + * Public Util Api + * -------------------------------------------------------------------------- + */ - var Util = { - TRANSITION_END: 'bsTransitionEnd', - getUID: function getUID(prefix) { - do { - // eslint-disable-next-line no-bitwise - prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here - } while (document.getElementById(prefix)); + var Util = { + TRANSITION_END: 'bsTransitionEnd', + getUID: function getUID(prefix) { + do { + // eslint-disable-next-line no-bitwise + prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here + } while (document.getElementById(prefix)); - return prefix; - }, - getSelectorFromElement: function getSelectorFromElement(element) { - var selector = element.getAttribute('data-target'); + return prefix; + }, + getSelectorFromElement: function getSelectorFromElement(element) { + var selector = element.getAttribute('data-target'); - if (!selector || selector === '#') { - selector = element.getAttribute('href') || ''; - } + if (!selector || selector === '#') { + var hrefAttr = element.getAttribute('href'); + selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : ''; + } - try { - var $selector = $$$1(document).find(selector); - return $selector.length > 0 ? selector : null; - } catch (err) { - return null; - } - }, - getTransitionDurationFromElement: function getTransitionDurationFromElement(element) { - if (!element) { - return 0; - } // Get transition-duration of the element + try { + return document.querySelector(selector) ? selector : null; + } catch (err) { + return null; + } + }, + getTransitionDurationFromElement: function getTransitionDurationFromElement(element) { + if (!element) { + return 0; + } // Get transition-duration of the element - var transitionDuration = $$$1(element).css('transition-duration'); - var floatTransitionDuration = parseFloat(transitionDuration); // Return 0 if element or transition duration is not found + var transitionDuration = $(element).css('transition-duration'); + var transitionDelay = $(element).css('transition-delay'); + var floatTransitionDuration = parseFloat(transitionDuration); + var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found - if (!floatTransitionDuration) { - return 0; - } // If multiple durations are defined, take the first + if (!floatTransitionDuration && !floatTransitionDelay) { + return 0; + } // If multiple durations are defined, take the first - transitionDuration = transitionDuration.split(',')[0]; - return parseFloat(transitionDuration) * MILLISECONDS_MULTIPLIER; - }, - reflow: function reflow(element) { - return element.offsetHeight; - }, - triggerTransitionEnd: function triggerTransitionEnd(element) { - $$$1(element).trigger(TRANSITION_END); - }, - // TODO: Remove in v5 - supportsTransitionEnd: function supportsTransitionEnd() { - return Boolean(TRANSITION_END); - }, - isElement: function isElement(obj) { - return (obj[0] || obj).nodeType; - }, - typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) { - for (var property in configTypes) { - if (Object.prototype.hasOwnProperty.call(configTypes, property)) { - var expectedTypes = configTypes[property]; - var value = config[property]; - var valueType = value && Util.isElement(value) ? 'element' : toType(value); - - if (!new RegExp(expectedTypes).test(valueType)) { - throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); - } + transitionDuration = transitionDuration.split(',')[0]; + transitionDelay = transitionDelay.split(',')[0]; + return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; + }, + reflow: function reflow(element) { + return element.offsetHeight; + }, + triggerTransitionEnd: function triggerTransitionEnd(element) { + $(element).trigger(TRANSITION_END); + }, + // TODO: Remove in v5 + supportsTransitionEnd: function supportsTransitionEnd() { + return Boolean(TRANSITION_END); + }, + isElement: function isElement(obj) { + return (obj[0] || obj).nodeType; + }, + typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) { + for (var property in configTypes) { + if (Object.prototype.hasOwnProperty.call(configTypes, property)) { + var expectedTypes = configTypes[property]; + var value = config[property]; + var valueType = value && Util.isElement(value) ? 'element' : toType(value); + + if (!new RegExp(expectedTypes).test(valueType)) { + throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); } } } - }; - setTransitionEndSupport(); - return Util; - }($); + }, + findShadowRoot: function findShadowRoot(element) { + if (!document.documentElement.attachShadow) { + return null; + } // Can find the shadow root otherwise it'll return the document + + + if (typeof element.getRootNode === 'function') { + var root = element.getRootNode(); + return root instanceof ShadowRoot ? root : null; + } + + if (element instanceof ShadowRoot) { + return element; + } // when we don't find a shadow root + + + if (!element.parentNode) { + return null; + } + + return Util.findShadowRoot(element.parentNode); + } + }; + setTransitionEndSupport(); /** - * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): alert.js - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * -------------------------------------------------------------------------- + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ */ - var Alert = function ($$$1) { + var NAME = 'alert'; + var VERSION = '4.3.1'; + var DATA_KEY = 'bs.alert'; + var EVENT_KEY = "." + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var Selector = { + DISMISS: '[data-dismiss="alert"]' + }; + var Event = { + CLOSE: "close" + EVENT_KEY, + CLOSED: "closed" + EVENT_KEY, + CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY + }; + var ClassName = { + ALERT: 'alert', + FADE: 'fade', + SHOW: 'show' /** * ------------------------------------------------------------------------ - * Constants + * Class Definition * ------------------------------------------------------------------------ */ - var NAME = 'alert'; - var VERSION = '4.1.1'; - var DATA_KEY = 'bs.alert'; - var EVENT_KEY = "." + DATA_KEY; - var DATA_API_KEY = '.data-api'; - var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; - var Selector = { - DISMISS: '[data-dismiss="alert"]' - }; - var Event = { - CLOSE: "close" + EVENT_KEY, - CLOSED: "closed" + EVENT_KEY, - CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY - }; - var ClassName = { - ALERT: 'alert', - FADE: 'fade', - SHOW: 'show' - /** - * ------------------------------------------------------------------------ - * Class Definition - * ------------------------------------------------------------------------ - */ - - }; - - var Alert = - /*#__PURE__*/ - function () { - function Alert(element) { - this._element = element; - } // Getters + }; - var _proto = Alert.prototype; + var Alert = + /*#__PURE__*/ + function () { + function Alert(element) { + this._element = element; + } // Getters - // Public - _proto.close = function close(element) { - var rootElement = this._element; - if (element) { - rootElement = this._getRootElement(element); - } + var _proto = Alert.prototype; - var customEvent = this._triggerCloseEvent(rootElement); + // Public + _proto.close = function close(element) { + var rootElement = this._element; - if (customEvent.isDefaultPrevented()) { - return; - } + if (element) { + rootElement = this._getRootElement(element); + } - this._removeElement(rootElement); - }; + var customEvent = this._triggerCloseEvent(rootElement); - _proto.dispose = function dispose() { - $$$1.removeData(this._element, DATA_KEY); - this._element = null; - }; // Private + if (customEvent.isDefaultPrevented()) { + return; + } + this._removeElement(rootElement); + }; - _proto._getRootElement = function _getRootElement(element) { - var selector = Util.getSelectorFromElement(element); - var parent = false; + _proto.dispose = function dispose() { + $.removeData(this._element, DATA_KEY); + this._element = null; + } // Private + ; - if (selector) { - parent = $$$1(selector)[0]; - } + _proto._getRootElement = function _getRootElement(element) { + var selector = Util.getSelectorFromElement(element); + var parent = false; - if (!parent) { - parent = $$$1(element).closest("." + ClassName.ALERT)[0]; - } + if (selector) { + parent = document.querySelector(selector); + } - return parent; - }; + if (!parent) { + parent = $(element).closest("." + ClassName.ALERT)[0]; + } - _proto._triggerCloseEvent = function _triggerCloseEvent(element) { - var closeEvent = $$$1.Event(Event.CLOSE); - $$$1(element).trigger(closeEvent); - return closeEvent; - }; + return parent; + }; - _proto._removeElement = function _removeElement(element) { - var _this = this; + _proto._triggerCloseEvent = function _triggerCloseEvent(element) { + var closeEvent = $.Event(Event.CLOSE); + $(element).trigger(closeEvent); + return closeEvent; + }; - $$$1(element).removeClass(ClassName.SHOW); + _proto._removeElement = function _removeElement(element) { + var _this = this; - if (!$$$1(element).hasClass(ClassName.FADE)) { - this._destroyElement(element); + $(element).removeClass(ClassName.SHOW); - return; - } + if (!$(element).hasClass(ClassName.FADE)) { + this._destroyElement(element); - var transitionDuration = Util.getTransitionDurationFromElement(element); - $$$1(element).one(Util.TRANSITION_END, function (event) { - return _this._destroyElement(element, event); - }).emulateTransitionEnd(transitionDuration); - }; + return; + } - _proto._destroyElement = function _destroyElement(element) { - $$$1(element).detach().trigger(Event.CLOSED).remove(); - }; // Static + var transitionDuration = Util.getTransitionDurationFromElement(element); + $(element).one(Util.TRANSITION_END, function (event) { + return _this._destroyElement(element, event); + }).emulateTransitionEnd(transitionDuration); + }; + _proto._destroyElement = function _destroyElement(element) { + $(element).detach().trigger(Event.CLOSED).remove(); + } // Static + ; - Alert._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var $element = $$$1(this); - var data = $element.data(DATA_KEY); + Alert._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var $element = $(this); + var data = $element.data(DATA_KEY); - if (!data) { - data = new Alert(this); - $element.data(DATA_KEY, data); - } + if (!data) { + data = new Alert(this); + $element.data(DATA_KEY, data); + } - if (config === 'close') { - data[config](this); - } - }); - }; + if (config === 'close') { + data[config](this); + } + }); + }; - Alert._handleDismiss = function _handleDismiss(alertInstance) { - return function (event) { - if (event) { - event.preventDefault(); - } + Alert._handleDismiss = function _handleDismiss(alertInstance) { + return function (event) { + if (event) { + event.preventDefault(); + } - alertInstance.close(this); - }; + alertInstance.close(this); }; + }; - _createClass(Alert, null, [{ - key: "VERSION", - get: function get() { - return VERSION; - } - }]); - - return Alert; - }(); - /** - * ------------------------------------------------------------------------ - * Data Api implementation - * ------------------------------------------------------------------------ - */ + _createClass(Alert, null, [{ + key: "VERSION", + get: function get() { + return VERSION; + } + }]); + return Alert; + }(); + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ - $$$1(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert())); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ - $$$1.fn[NAME] = Alert._jQueryInterface; - $$$1.fn[NAME].Constructor = Alert; + $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert())); + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ - $$$1.fn[NAME].noConflict = function () { - $$$1.fn[NAME] = JQUERY_NO_CONFLICT; - return Alert._jQueryInterface; - }; + $.fn[NAME] = Alert._jQueryInterface; + $.fn[NAME].Constructor = Alert; - return Alert; - }($); + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Alert._jQueryInterface; + }; /** - * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): button.js - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * -------------------------------------------------------------------------- + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ */ - var Button = function ($$$1) { + var NAME$1 = 'button'; + var VERSION$1 = '4.3.1'; + var DATA_KEY$1 = 'bs.button'; + var EVENT_KEY$1 = "." + DATA_KEY$1; + var DATA_API_KEY$1 = '.data-api'; + var JQUERY_NO_CONFLICT$1 = $.fn[NAME$1]; + var ClassName$1 = { + ACTIVE: 'active', + BUTTON: 'btn', + FOCUS: 'focus' + }; + var Selector$1 = { + DATA_TOGGLE_CARROT: '[data-toggle^="button"]', + DATA_TOGGLE: '[data-toggle="buttons"]', + INPUT: 'input:not([type="hidden"])', + ACTIVE: '.active', + BUTTON: '.btn' + }; + var Event$1 = { + CLICK_DATA_API: "click" + EVENT_KEY$1 + DATA_API_KEY$1, + FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY$1 + DATA_API_KEY$1 + " " + ("blur" + EVENT_KEY$1 + DATA_API_KEY$1) /** * ------------------------------------------------------------------------ - * Constants + * Class Definition * ------------------------------------------------------------------------ */ - var NAME = 'button'; - var VERSION = '4.1.1'; - var DATA_KEY = 'bs.button'; - var EVENT_KEY = "." + DATA_KEY; - var DATA_API_KEY = '.data-api'; - var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; - var ClassName = { - ACTIVE: 'active', - BUTTON: 'btn', - FOCUS: 'focus' - }; - var Selector = { - DATA_TOGGLE_CARROT: '[data-toggle^="button"]', - DATA_TOGGLE: '[data-toggle="buttons"]', - INPUT: 'input', - ACTIVE: '.active', - BUTTON: '.btn' - }; - var Event = { - CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY, - FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY) - /** - * ------------------------------------------------------------------------ - * Class Definition - * ------------------------------------------------------------------------ - */ - }; + }; - var Button = - /*#__PURE__*/ - function () { - function Button(element) { - this._element = element; - } // Getters + var Button = + /*#__PURE__*/ + function () { + function Button(element) { + this._element = element; + } // Getters - var _proto = Button.prototype; + var _proto = Button.prototype; - // Public - _proto.toggle = function toggle() { - var triggerChangeEvent = true; - var addAriaPressed = true; - var rootElement = $$$1(this._element).closest(Selector.DATA_TOGGLE)[0]; + // Public + _proto.toggle = function toggle() { + var triggerChangeEvent = true; + var addAriaPressed = true; + var rootElement = $(this._element).closest(Selector$1.DATA_TOGGLE)[0]; - if (rootElement) { - var input = $$$1(this._element).find(Selector.INPUT)[0]; + if (rootElement) { + var input = this._element.querySelector(Selector$1.INPUT); - if (input) { - if (input.type === 'radio') { - if (input.checked && $$$1(this._element).hasClass(ClassName.ACTIVE)) { - triggerChangeEvent = false; - } else { - var activeElement = $$$1(rootElement).find(Selector.ACTIVE)[0]; + if (input) { + if (input.type === 'radio') { + if (input.checked && this._element.classList.contains(ClassName$1.ACTIVE)) { + triggerChangeEvent = false; + } else { + var activeElement = rootElement.querySelector(Selector$1.ACTIVE); - if (activeElement) { - $$$1(activeElement).removeClass(ClassName.ACTIVE); - } + if (activeElement) { + $(activeElement).removeClass(ClassName$1.ACTIVE); } } + } - if (triggerChangeEvent) { - if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) { - return; - } - - input.checked = !$$$1(this._element).hasClass(ClassName.ACTIVE); - $$$1(input).trigger('change'); + if (triggerChangeEvent) { + if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) { + return; } - input.focus(); - addAriaPressed = false; + input.checked = !this._element.classList.contains(ClassName$1.ACTIVE); + $(input).trigger('change'); } - } - - if (addAriaPressed) { - this._element.setAttribute('aria-pressed', !$$$1(this._element).hasClass(ClassName.ACTIVE)); - } - if (triggerChangeEvent) { - $$$1(this._element).toggleClass(ClassName.ACTIVE); + input.focus(); + addAriaPressed = false; } - }; + } - _proto.dispose = function dispose() { - $$$1.removeData(this._element, DATA_KEY); - this._element = null; - }; // Static + if (addAriaPressed) { + this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName$1.ACTIVE)); + } + if (triggerChangeEvent) { + $(this._element).toggleClass(ClassName$1.ACTIVE); + } + }; - Button._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $$$1(this).data(DATA_KEY); + _proto.dispose = function dispose() { + $.removeData(this._element, DATA_KEY$1); + this._element = null; + } // Static + ; - if (!data) { - data = new Button(this); - $$$1(this).data(DATA_KEY, data); - } + Button._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY$1); - if (config === 'toggle') { - data[config](); - } - }); - }; + if (!data) { + data = new Button(this); + $(this).data(DATA_KEY$1, data); + } - _createClass(Button, null, [{ - key: "VERSION", - get: function get() { - return VERSION; + if (config === 'toggle') { + data[config](); } - }]); + }); + }; - return Button; - }(); - /** - * ------------------------------------------------------------------------ - * Data Api implementation - * ------------------------------------------------------------------------ - */ + _createClass(Button, null, [{ + key: "VERSION", + get: function get() { + return VERSION$1; + } + }]); + return Button; + }(); + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ - $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { - event.preventDefault(); - var button = event.target; - if (!$$$1(button).hasClass(ClassName.BUTTON)) { - button = $$$1(button).closest(Selector.BUTTON); - } + $(document).on(Event$1.CLICK_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) { + event.preventDefault(); + var button = event.target; - Button._jQueryInterface.call($$$1(button), 'toggle'); - }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { - var button = $$$1(event.target).closest(Selector.BUTTON)[0]; - $$$1(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type)); - }); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ + if (!$(button).hasClass(ClassName$1.BUTTON)) { + button = $(button).closest(Selector$1.BUTTON); + } - $$$1.fn[NAME] = Button._jQueryInterface; - $$$1.fn[NAME].Constructor = Button; + Button._jQueryInterface.call($(button), 'toggle'); + }).on(Event$1.FOCUS_BLUR_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) { + var button = $(event.target).closest(Selector$1.BUTTON)[0]; + $(button).toggleClass(ClassName$1.FOCUS, /^focus(in)?$/.test(event.type)); + }); + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ - $$$1.fn[NAME].noConflict = function () { - $$$1.fn[NAME] = JQUERY_NO_CONFLICT; - return Button._jQueryInterface; - }; + $.fn[NAME$1] = Button._jQueryInterface; + $.fn[NAME$1].Constructor = Button; - return Button; - }($); + $.fn[NAME$1].noConflict = function () { + $.fn[NAME$1] = JQUERY_NO_CONFLICT$1; + return Button._jQueryInterface; + }; /** - * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): carousel.js - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * -------------------------------------------------------------------------- + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ */ - var Carousel = function ($$$1) { + var NAME$2 = 'carousel'; + var VERSION$2 = '4.3.1'; + var DATA_KEY$2 = 'bs.carousel'; + var EVENT_KEY$2 = "." + DATA_KEY$2; + var DATA_API_KEY$2 = '.data-api'; + var JQUERY_NO_CONFLICT$2 = $.fn[NAME$2]; + var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key + + var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key + + var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch + + var SWIPE_THRESHOLD = 40; + var Default = { + interval: 5000, + keyboard: true, + slide: false, + pause: 'hover', + wrap: true, + touch: true + }; + var DefaultType = { + interval: '(number|boolean)', + keyboard: 'boolean', + slide: '(boolean|string)', + pause: '(string|boolean)', + wrap: 'boolean', + touch: 'boolean' + }; + var Direction = { + NEXT: 'next', + PREV: 'prev', + LEFT: 'left', + RIGHT: 'right' + }; + var Event$2 = { + SLIDE: "slide" + EVENT_KEY$2, + SLID: "slid" + EVENT_KEY$2, + KEYDOWN: "keydown" + EVENT_KEY$2, + MOUSEENTER: "mouseenter" + EVENT_KEY$2, + MOUSELEAVE: "mouseleave" + EVENT_KEY$2, + TOUCHSTART: "touchstart" + EVENT_KEY$2, + TOUCHMOVE: "touchmove" + EVENT_KEY$2, + TOUCHEND: "touchend" + EVENT_KEY$2, + POINTERDOWN: "pointerdown" + EVENT_KEY$2, + POINTERUP: "pointerup" + EVENT_KEY$2, + DRAG_START: "dragstart" + EVENT_KEY$2, + LOAD_DATA_API: "load" + EVENT_KEY$2 + DATA_API_KEY$2, + CLICK_DATA_API: "click" + EVENT_KEY$2 + DATA_API_KEY$2 + }; + var ClassName$2 = { + CAROUSEL: 'carousel', + ACTIVE: 'active', + SLIDE: 'slide', + RIGHT: 'carousel-item-right', + LEFT: 'carousel-item-left', + NEXT: 'carousel-item-next', + PREV: 'carousel-item-prev', + ITEM: 'carousel-item', + POINTER_EVENT: 'pointer-event' + }; + var Selector$2 = { + ACTIVE: '.active', + ACTIVE_ITEM: '.active.carousel-item', + ITEM: '.carousel-item', + ITEM_IMG: '.carousel-item img', + NEXT_PREV: '.carousel-item-next, .carousel-item-prev', + INDICATORS: '.carousel-indicators', + DATA_SLIDE: '[data-slide], [data-slide-to]', + DATA_RIDE: '[data-ride="carousel"]' + }; + var PointerType = { + TOUCH: 'touch', + PEN: 'pen' /** * ------------------------------------------------------------------------ - * Constants + * Class Definition * ------------------------------------------------------------------------ */ - var NAME = 'carousel'; - var VERSION = '4.1.1'; - var DATA_KEY = 'bs.carousel'; - var EVENT_KEY = "." + DATA_KEY; - var DATA_API_KEY = '.data-api'; - var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; - var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key - - var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key - - var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch - - var Default = { - interval: 5000, - keyboard: true, - slide: false, - pause: 'hover', - wrap: true - }; - var DefaultType = { - interval: '(number|boolean)', - keyboard: 'boolean', - slide: '(boolean|string)', - pause: '(string|boolean)', - wrap: 'boolean' - }; - var Direction = { - NEXT: 'next', - PREV: 'prev', - LEFT: 'left', - RIGHT: 'right' + + }; + + var Carousel = + /*#__PURE__*/ + function () { + function Carousel(element, config) { + this._items = null; + this._interval = null; + this._activeElement = null; + this._isPaused = false; + this._isSliding = false; + this.touchTimeout = null; + this.touchStartX = 0; + this.touchDeltaX = 0; + this._config = this._getConfig(config); + this._element = element; + this._indicatorsElement = this._element.querySelector(Selector$2.INDICATORS); + this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0; + this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent); + + this._addEventListeners(); + } // Getters + + + var _proto = Carousel.prototype; + + // Public + _proto.next = function next() { + if (!this._isSliding) { + this._slide(Direction.NEXT); + } }; - var Event = { - SLIDE: "slide" + EVENT_KEY, - SLID: "slid" + EVENT_KEY, - KEYDOWN: "keydown" + EVENT_KEY, - MOUSEENTER: "mouseenter" + EVENT_KEY, - MOUSELEAVE: "mouseleave" + EVENT_KEY, - TOUCHEND: "touchend" + EVENT_KEY, - LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY, - CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY + + _proto.nextWhenVisible = function nextWhenVisible() { + // Don't call next when the page isn't visible + // or the carousel or its parent isn't visible + if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') { + this.next(); + } }; - var ClassName = { - CAROUSEL: 'carousel', - ACTIVE: 'active', - SLIDE: 'slide', - RIGHT: 'carousel-item-right', - LEFT: 'carousel-item-left', - NEXT: 'carousel-item-next', - PREV: 'carousel-item-prev', - ITEM: 'carousel-item' + + _proto.prev = function prev() { + if (!this._isSliding) { + this._slide(Direction.PREV); + } }; - var Selector = { - ACTIVE: '.active', - ACTIVE_ITEM: '.active.carousel-item', - ITEM: '.carousel-item', - NEXT_PREV: '.carousel-item-next, .carousel-item-prev', - INDICATORS: '.carousel-indicators', - DATA_SLIDE: '[data-slide], [data-slide-to]', - DATA_RIDE: '[data-ride="carousel"]' - /** - * ------------------------------------------------------------------------ - * Class Definition - * ------------------------------------------------------------------------ - */ + _proto.pause = function pause(event) { + if (!event) { + this._isPaused = true; + } + + if (this._element.querySelector(Selector$2.NEXT_PREV)) { + Util.triggerTransitionEnd(this._element); + this.cycle(true); + } + + clearInterval(this._interval); + this._interval = null; }; - var Carousel = - /*#__PURE__*/ - function () { - function Carousel(element, config) { - this._items = null; - this._interval = null; - this._activeElement = null; + _proto.cycle = function cycle(event) { + if (!event) { this._isPaused = false; - this._isSliding = false; - this.touchTimeout = null; - this._config = this._getConfig(config); - this._element = $$$1(element)[0]; - this._indicatorsElement = $$$1(this._element).find(Selector.INDICATORS)[0]; + } - this._addEventListeners(); - } // Getters + if (this._interval) { + clearInterval(this._interval); + this._interval = null; + } + if (this._config.interval && !this._isPaused) { + this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval); + } + }; - var _proto = Carousel.prototype; + _proto.to = function to(index) { + var _this = this; - // Public - _proto.next = function next() { - if (!this._isSliding) { - this._slide(Direction.NEXT); - } - }; + this._activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM); - _proto.nextWhenVisible = function nextWhenVisible() { - // Don't call next when the page isn't visible - // or the carousel or its parent isn't visible - if (!document.hidden && $$$1(this._element).is(':visible') && $$$1(this._element).css('visibility') !== 'hidden') { - this.next(); - } - }; + var activeIndex = this._getItemIndex(this._activeElement); - _proto.prev = function prev() { - if (!this._isSliding) { - this._slide(Direction.PREV); - } - }; + if (index > this._items.length - 1 || index < 0) { + return; + } - _proto.pause = function pause(event) { - if (!event) { - this._isPaused = true; - } + if (this._isSliding) { + $(this._element).one(Event$2.SLID, function () { + return _this.to(index); + }); + return; + } - if ($$$1(this._element).find(Selector.NEXT_PREV)[0]) { - Util.triggerTransitionEnd(this._element); - this.cycle(true); - } + if (activeIndex === index) { + this.pause(); + this.cycle(); + return; + } - clearInterval(this._interval); - this._interval = null; - }; + var direction = index > activeIndex ? Direction.NEXT : Direction.PREV; - _proto.cycle = function cycle(event) { - if (!event) { - this._isPaused = false; - } + this._slide(direction, this._items[index]); + }; - if (this._interval) { - clearInterval(this._interval); - this._interval = null; - } + _proto.dispose = function dispose() { + $(this._element).off(EVENT_KEY$2); + $.removeData(this._element, DATA_KEY$2); + this._items = null; + this._config = null; + this._element = null; + this._interval = null; + this._isPaused = null; + this._isSliding = null; + this._activeElement = null; + this._indicatorsElement = null; + } // Private + ; + + _proto._getConfig = function _getConfig(config) { + config = _objectSpread({}, Default, config); + Util.typeCheckConfig(NAME$2, config, DefaultType); + return config; + }; - if (this._config.interval && !this._isPaused) { - this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval); - } - }; + _proto._handleSwipe = function _handleSwipe() { + var absDeltax = Math.abs(this.touchDeltaX); - _proto.to = function to(index) { - var _this = this; + if (absDeltax <= SWIPE_THRESHOLD) { + return; + } - this._activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0]; + var direction = absDeltax / this.touchDeltaX; // swipe left - var activeIndex = this._getItemIndex(this._activeElement); + if (direction > 0) { + this.prev(); + } // swipe right - if (index > this._items.length - 1 || index < 0) { - return; - } - - if (this._isSliding) { - $$$1(this._element).one(Event.SLID, function () { - return _this.to(index); - }); - return; - } - if (activeIndex === index) { - this.pause(); - this.cycle(); - return; - } + if (direction < 0) { + this.next(); + } + }; - var direction = index > activeIndex ? Direction.NEXT : Direction.PREV; + _proto._addEventListeners = function _addEventListeners() { + var _this2 = this; - this._slide(direction, this._items[index]); - }; + if (this._config.keyboard) { + $(this._element).on(Event$2.KEYDOWN, function (event) { + return _this2._keydown(event); + }); + } - _proto.dispose = function dispose() { - $$$1(this._element).off(EVENT_KEY); - $$$1.removeData(this._element, DATA_KEY); - this._items = null; - this._config = null; - this._element = null; - this._interval = null; - this._isPaused = null; - this._isSliding = null; - this._activeElement = null; - this._indicatorsElement = null; - }; // Private + if (this._config.pause === 'hover') { + $(this._element).on(Event$2.MOUSEENTER, function (event) { + return _this2.pause(event); + }).on(Event$2.MOUSELEAVE, function (event) { + return _this2.cycle(event); + }); + } + if (this._config.touch) { + this._addTouchEventListeners(); + } + }; - _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, Default, config); - Util.typeCheckConfig(NAME, config, DefaultType); - return config; - }; + _proto._addTouchEventListeners = function _addTouchEventListeners() { + var _this3 = this; - _proto._addEventListeners = function _addEventListeners() { - var _this2 = this; + if (!this._touchSupported) { + return; + } - if (this._config.keyboard) { - $$$1(this._element).on(Event.KEYDOWN, function (event) { - return _this2._keydown(event); - }); + var start = function start(event) { + if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) { + _this3.touchStartX = event.originalEvent.clientX; + } else if (!_this3._pointerEvent) { + _this3.touchStartX = event.originalEvent.touches[0].clientX; } + }; - if (this._config.pause === 'hover') { - $$$1(this._element).on(Event.MOUSEENTER, function (event) { - return _this2.pause(event); - }).on(Event.MOUSELEAVE, function (event) { - return _this2.cycle(event); - }); - - if ('ontouchstart' in document.documentElement) { - // If it's a touch-enabled device, mouseenter/leave are fired as - // part of the mouse compatibility events on first tap - the carousel - // would stop cycling until user tapped out of it; - // here, we listen for touchend, explicitly pause the carousel - // (as if it's the second time we tap on it, mouseenter compat event - // is NOT fired) and after a timeout (to allow for mouse compatibility - // events to fire) we explicitly restart cycling - $$$1(this._element).on(Event.TOUCHEND, function () { - _this2.pause(); - - if (_this2.touchTimeout) { - clearTimeout(_this2.touchTimeout); - } - - _this2.touchTimeout = setTimeout(function (event) { - return _this2.cycle(event); - }, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval); - }); - } + var move = function move(event) { + // ensure swiping with one touch and not pinching + if (event.originalEvent.touches && event.originalEvent.touches.length > 1) { + _this3.touchDeltaX = 0; + } else { + _this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX; } }; - _proto._keydown = function _keydown(event) { - if (/input|textarea/i.test(event.target.tagName)) { - return; + var end = function end(event) { + if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) { + _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX; } - switch (event.which) { - case ARROW_LEFT_KEYCODE: - event.preventDefault(); - this.prev(); - break; + _this3._handleSwipe(); - case ARROW_RIGHT_KEYCODE: - event.preventDefault(); - this.next(); - break; + if (_this3._config.pause === 'hover') { + // If it's a touch-enabled device, mouseenter/leave are fired as + // part of the mouse compatibility events on first tap - the carousel + // would stop cycling until user tapped out of it; + // here, we listen for touchend, explicitly pause the carousel + // (as if it's the second time we tap on it, mouseenter compat event + // is NOT fired) and after a timeout (to allow for mouse compatibility + // events to fire) we explicitly restart cycling + _this3.pause(); + + if (_this3.touchTimeout) { + clearTimeout(_this3.touchTimeout); + } - default: + _this3.touchTimeout = setTimeout(function (event) { + return _this3.cycle(event); + }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval); } }; - _proto._getItemIndex = function _getItemIndex(element) { - this._items = $$$1.makeArray($$$1(element).parent().find(Selector.ITEM)); - return this._items.indexOf(element); - }; + $(this._element.querySelectorAll(Selector$2.ITEM_IMG)).on(Event$2.DRAG_START, function (e) { + return e.preventDefault(); + }); - _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) { - var isNextDirection = direction === Direction.NEXT; - var isPrevDirection = direction === Direction.PREV; + if (this._pointerEvent) { + $(this._element).on(Event$2.POINTERDOWN, function (event) { + return start(event); + }); + $(this._element).on(Event$2.POINTERUP, function (event) { + return end(event); + }); - var activeIndex = this._getItemIndex(activeElement); + this._element.classList.add(ClassName$2.POINTER_EVENT); + } else { + $(this._element).on(Event$2.TOUCHSTART, function (event) { + return start(event); + }); + $(this._element).on(Event$2.TOUCHMOVE, function (event) { + return move(event); + }); + $(this._element).on(Event$2.TOUCHEND, function (event) { + return end(event); + }); + } + }; - var lastItemIndex = this._items.length - 1; - var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex; + _proto._keydown = function _keydown(event) { + if (/input|textarea/i.test(event.target.tagName)) { + return; + } - if (isGoingToWrap && !this._config.wrap) { - return activeElement; - } + switch (event.which) { + case ARROW_LEFT_KEYCODE: + event.preventDefault(); + this.prev(); + break; - var delta = direction === Direction.PREV ? -1 : 1; - var itemIndex = (activeIndex + delta) % this._items.length; - return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; - }; + case ARROW_RIGHT_KEYCODE: + event.preventDefault(); + this.next(); + break; - _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) { - var targetIndex = this._getItemIndex(relatedTarget); + default: + } + }; - var fromIndex = this._getItemIndex($$$1(this._element).find(Selector.ACTIVE_ITEM)[0]); + _proto._getItemIndex = function _getItemIndex(element) { + this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector$2.ITEM)) : []; + return this._items.indexOf(element); + }; - var slideEvent = $$$1.Event(Event.SLIDE, { - relatedTarget: relatedTarget, - direction: eventDirectionName, - from: fromIndex, - to: targetIndex - }); - $$$1(this._element).trigger(slideEvent); - return slideEvent; - }; + _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) { + var isNextDirection = direction === Direction.NEXT; + var isPrevDirection = direction === Direction.PREV; - _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { - if (this._indicatorsElement) { - $$$1(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE); + var activeIndex = this._getItemIndex(activeElement); - var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; + var lastItemIndex = this._items.length - 1; + var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex; - if (nextIndicator) { - $$$1(nextIndicator).addClass(ClassName.ACTIVE); - } - } - }; + if (isGoingToWrap && !this._config.wrap) { + return activeElement; + } - _proto._slide = function _slide(direction, element) { - var _this3 = this; + var delta = direction === Direction.PREV ? -1 : 1; + var itemIndex = (activeIndex + delta) % this._items.length; + return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; + }; - var activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0]; + _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) { + var targetIndex = this._getItemIndex(relatedTarget); - var activeElementIndex = this._getItemIndex(activeElement); + var fromIndex = this._getItemIndex(this._element.querySelector(Selector$2.ACTIVE_ITEM)); - var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); + var slideEvent = $.Event(Event$2.SLIDE, { + relatedTarget: relatedTarget, + direction: eventDirectionName, + from: fromIndex, + to: targetIndex + }); + $(this._element).trigger(slideEvent); + return slideEvent; + }; - var nextElementIndex = this._getItemIndex(nextElement); + _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { + if (this._indicatorsElement) { + var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector$2.ACTIVE)); + $(indicators).removeClass(ClassName$2.ACTIVE); - var isCycling = Boolean(this._interval); - var directionalClassName; - var orderClassName; - var eventDirectionName; + var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; - if (direction === Direction.NEXT) { - directionalClassName = ClassName.LEFT; - orderClassName = ClassName.NEXT; - eventDirectionName = Direction.LEFT; - } else { - directionalClassName = ClassName.RIGHT; - orderClassName = ClassName.PREV; - eventDirectionName = Direction.RIGHT; + if (nextIndicator) { + $(nextIndicator).addClass(ClassName$2.ACTIVE); } + } + }; - if (nextElement && $$$1(nextElement).hasClass(ClassName.ACTIVE)) { - this._isSliding = false; - return; - } + _proto._slide = function _slide(direction, element) { + var _this4 = this; - var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName); + var activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM); - if (slideEvent.isDefaultPrevented()) { - return; - } + var activeElementIndex = this._getItemIndex(activeElement); - if (!activeElement || !nextElement) { - // Some weirdness is happening, so we bail - return; - } + var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); - this._isSliding = true; + var nextElementIndex = this._getItemIndex(nextElement); - if (isCycling) { - this.pause(); - } + var isCycling = Boolean(this._interval); + var directionalClassName; + var orderClassName; + var eventDirectionName; - this._setActiveIndicatorElement(nextElement); + if (direction === Direction.NEXT) { + directionalClassName = ClassName$2.LEFT; + orderClassName = ClassName$2.NEXT; + eventDirectionName = Direction.LEFT; + } else { + directionalClassName = ClassName$2.RIGHT; + orderClassName = ClassName$2.PREV; + eventDirectionName = Direction.RIGHT; + } - var slidEvent = $$$1.Event(Event.SLID, { - relatedTarget: nextElement, - direction: eventDirectionName, - from: activeElementIndex, - to: nextElementIndex - }); + if (nextElement && $(nextElement).hasClass(ClassName$2.ACTIVE)) { + this._isSliding = false; + return; + } - if ($$$1(this._element).hasClass(ClassName.SLIDE)) { - $$$1(nextElement).addClass(orderClassName); - Util.reflow(nextElement); - $$$1(activeElement).addClass(directionalClassName); - $$$1(nextElement).addClass(directionalClassName); - var transitionDuration = Util.getTransitionDurationFromElement(activeElement); - $$$1(activeElement).one(Util.TRANSITION_END, function () { - $$$1(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE); - $$$1(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName); - _this3._isSliding = false; - setTimeout(function () { - return $$$1(_this3._element).trigger(slidEvent); - }, 0); - }).emulateTransitionEnd(transitionDuration); - } else { - $$$1(activeElement).removeClass(ClassName.ACTIVE); - $$$1(nextElement).addClass(ClassName.ACTIVE); - this._isSliding = false; - $$$1(this._element).trigger(slidEvent); - } + var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName); - if (isCycling) { - this.cycle(); - } - }; // Static + if (slideEvent.isDefaultPrevented()) { + return; + } + if (!activeElement || !nextElement) { + // Some weirdness is happening, so we bail + return; + } - Carousel._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $$$1(this).data(DATA_KEY); + this._isSliding = true; - var _config = _objectSpread({}, Default, $$$1(this).data()); + if (isCycling) { + this.pause(); + } - if (typeof config === 'object') { - _config = _objectSpread({}, _config, config); - } + this._setActiveIndicatorElement(nextElement); - var action = typeof config === 'string' ? config : _config.slide; + var slidEvent = $.Event(Event$2.SLID, { + relatedTarget: nextElement, + direction: eventDirectionName, + from: activeElementIndex, + to: nextElementIndex + }); - if (!data) { - data = new Carousel(this, _config); - $$$1(this).data(DATA_KEY, data); - } + if ($(this._element).hasClass(ClassName$2.SLIDE)) { + $(nextElement).addClass(orderClassName); + Util.reflow(nextElement); + $(activeElement).addClass(directionalClassName); + $(nextElement).addClass(directionalClassName); + var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10); - if (typeof config === 'number') { - data.to(config); - } else if (typeof action === 'string') { - if (typeof data[action] === 'undefined') { - throw new TypeError("No method named \"" + action + "\""); - } + if (nextElementInterval) { + this._config.defaultInterval = this._config.defaultInterval || this._config.interval; + this._config.interval = nextElementInterval; + } else { + this._config.interval = this._config.defaultInterval || this._config.interval; + } - data[action](); - } else if (_config.interval) { - data.pause(); - data.cycle(); - } - }); - }; + var transitionDuration = Util.getTransitionDurationFromElement(activeElement); + $(activeElement).one(Util.TRANSITION_END, function () { + $(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName$2.ACTIVE); + $(activeElement).removeClass(ClassName$2.ACTIVE + " " + orderClassName + " " + directionalClassName); + _this4._isSliding = false; + setTimeout(function () { + return $(_this4._element).trigger(slidEvent); + }, 0); + }).emulateTransitionEnd(transitionDuration); + } else { + $(activeElement).removeClass(ClassName$2.ACTIVE); + $(nextElement).addClass(ClassName$2.ACTIVE); + this._isSliding = false; + $(this._element).trigger(slidEvent); + } - Carousel._dataApiClickHandler = function _dataApiClickHandler(event) { - var selector = Util.getSelectorFromElement(this); + if (isCycling) { + this.cycle(); + } + } // Static + ; - if (!selector) { - return; - } + Carousel._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY$2); - var target = $$$1(selector)[0]; + var _config = _objectSpread({}, Default, $(this).data()); - if (!target || !$$$1(target).hasClass(ClassName.CAROUSEL)) { - return; + if (typeof config === 'object') { + _config = _objectSpread({}, _config, config); } - var config = _objectSpread({}, $$$1(target).data(), $$$1(this).data()); + var action = typeof config === 'string' ? config : _config.slide; - var slideIndex = this.getAttribute('data-slide-to'); - - if (slideIndex) { - config.interval = false; + if (!data) { + data = new Carousel(this, _config); + $(this).data(DATA_KEY$2, data); } - Carousel._jQueryInterface.call($$$1(target), config); + if (typeof config === 'number') { + data.to(config); + } else if (typeof action === 'string') { + if (typeof data[action] === 'undefined') { + throw new TypeError("No method named \"" + action + "\""); + } - if (slideIndex) { - $$$1(target).data(DATA_KEY).to(slideIndex); + data[action](); + } else if (_config.interval && _config.ride) { + data.pause(); + data.cycle(); } + }); + }; - event.preventDefault(); - }; + Carousel._dataApiClickHandler = function _dataApiClickHandler(event) { + var selector = Util.getSelectorFromElement(this); - _createClass(Carousel, null, [{ - key: "VERSION", - get: function get() { - return VERSION; - } - }, { - key: "Default", - get: function get() { - return Default; - } - }]); + if (!selector) { + return; + } - return Carousel; - }(); - /** - * ------------------------------------------------------------------------ - * Data Api implementation - * ------------------------------------------------------------------------ - */ + var target = $(selector)[0]; + if (!target || !$(target).hasClass(ClassName$2.CAROUSEL)) { + return; + } - $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler); - $$$1(window).on(Event.LOAD_DATA_API, function () { - $$$1(Selector.DATA_RIDE).each(function () { - var $carousel = $$$1(this); + var config = _objectSpread({}, $(target).data(), $(this).data()); - Carousel._jQueryInterface.call($carousel, $carousel.data()); - }); - }); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ + var slideIndex = this.getAttribute('data-slide-to'); + + if (slideIndex) { + config.interval = false; + } + + Carousel._jQueryInterface.call($(target), config); - $$$1.fn[NAME] = Carousel._jQueryInterface; - $$$1.fn[NAME].Constructor = Carousel; + if (slideIndex) { + $(target).data(DATA_KEY$2).to(slideIndex); + } - $$$1.fn[NAME].noConflict = function () { - $$$1.fn[NAME] = JQUERY_NO_CONFLICT; - return Carousel._jQueryInterface; + event.preventDefault(); }; + _createClass(Carousel, null, [{ + key: "VERSION", + get: function get() { + return VERSION$2; + } + }, { + key: "Default", + get: function get() { + return Default; + } + }]); + return Carousel; - }($); + }(); + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + + $(document).on(Event$2.CLICK_DATA_API, Selector$2.DATA_SLIDE, Carousel._dataApiClickHandler); + $(window).on(Event$2.LOAD_DATA_API, function () { + var carousels = [].slice.call(document.querySelectorAll(Selector$2.DATA_RIDE)); + for (var i = 0, len = carousels.length; i < len; i++) { + var $carousel = $(carousels[i]); + + Carousel._jQueryInterface.call($carousel, $carousel.data()); + } + }); /** - * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): collapse.js - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * -------------------------------------------------------------------------- + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME$2] = Carousel._jQueryInterface; + $.fn[NAME$2].Constructor = Carousel; + + $.fn[NAME$2].noConflict = function () { + $.fn[NAME$2] = JQUERY_NO_CONFLICT$2; + return Carousel._jQueryInterface; + }; + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ */ - var Collapse = function ($$$1) { + var NAME$3 = 'collapse'; + var VERSION$3 = '4.3.1'; + var DATA_KEY$3 = 'bs.collapse'; + var EVENT_KEY$3 = "." + DATA_KEY$3; + var DATA_API_KEY$3 = '.data-api'; + var JQUERY_NO_CONFLICT$3 = $.fn[NAME$3]; + var Default$1 = { + toggle: true, + parent: '' + }; + var DefaultType$1 = { + toggle: 'boolean', + parent: '(string|element)' + }; + var Event$3 = { + SHOW: "show" + EVENT_KEY$3, + SHOWN: "shown" + EVENT_KEY$3, + HIDE: "hide" + EVENT_KEY$3, + HIDDEN: "hidden" + EVENT_KEY$3, + CLICK_DATA_API: "click" + EVENT_KEY$3 + DATA_API_KEY$3 + }; + var ClassName$3 = { + SHOW: 'show', + COLLAPSE: 'collapse', + COLLAPSING: 'collapsing', + COLLAPSED: 'collapsed' + }; + var Dimension = { + WIDTH: 'width', + HEIGHT: 'height' + }; + var Selector$3 = { + ACTIVES: '.show, .collapsing', + DATA_TOGGLE: '[data-toggle="collapse"]' /** * ------------------------------------------------------------------------ - * Constants + * Class Definition * ------------------------------------------------------------------------ */ - var NAME = 'collapse'; - var VERSION = '4.1.1'; - var DATA_KEY = 'bs.collapse'; - var EVENT_KEY = "." + DATA_KEY; - var DATA_API_KEY = '.data-api'; - var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; - var Default = { - toggle: true, - parent: '' - }; - var DefaultType = { - toggle: 'boolean', - parent: '(string|element)' - }; - var Event = { - SHOW: "show" + EVENT_KEY, - SHOWN: "shown" + EVENT_KEY, - HIDE: "hide" + EVENT_KEY, - HIDDEN: "hidden" + EVENT_KEY, - CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY - }; - var ClassName = { - SHOW: 'show', - COLLAPSE: 'collapse', - COLLAPSING: 'collapsing', - COLLAPSED: 'collapsed' - }; - var Dimension = { - WIDTH: 'width', - HEIGHT: 'height' - }; - var Selector = { - ACTIVES: '.show, .collapsing', - DATA_TOGGLE: '[data-toggle="collapse"]' - /** - * ------------------------------------------------------------------------ - * Class Definition - * ------------------------------------------------------------------------ - */ - - }; - var Collapse = - /*#__PURE__*/ - function () { - function Collapse(element, config) { - this._isTransitioning = false; - this._element = element; - this._config = this._getConfig(config); - this._triggerArray = $$$1.makeArray($$$1("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]"))); - var tabToggles = $$$1(Selector.DATA_TOGGLE); + }; - for (var i = 0; i < tabToggles.length; i++) { - var elem = tabToggles[i]; - var selector = Util.getSelectorFromElement(elem); + var Collapse = + /*#__PURE__*/ + function () { + function Collapse(element, config) { + this._isTransitioning = false; + this._element = element; + this._config = this._getConfig(config); + this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]"))); + var toggleList = [].slice.call(document.querySelectorAll(Selector$3.DATA_TOGGLE)); + + for (var i = 0, len = toggleList.length; i < len; i++) { + var elem = toggleList[i]; + var selector = Util.getSelectorFromElement(elem); + var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) { + return foundElem === element; + }); - if (selector !== null && $$$1(selector).filter(element).length > 0) { - this._selector = selector; + if (selector !== null && filterElement.length > 0) { + this._selector = selector; - this._triggerArray.push(elem); - } + this._triggerArray.push(elem); } + } - this._parent = this._config.parent ? this._getParent() : null; - - if (!this._config.parent) { - this._addAriaAndCollapsedClass(this._element, this._triggerArray); - } + this._parent = this._config.parent ? this._getParent() : null; - if (this._config.toggle) { - this.toggle(); - } - } // Getters + if (!this._config.parent) { + this._addAriaAndCollapsedClass(this._element, this._triggerArray); + } + if (this._config.toggle) { + this.toggle(); + } + } // Getters - var _proto = Collapse.prototype; - // Public - _proto.toggle = function toggle() { - if ($$$1(this._element).hasClass(ClassName.SHOW)) { - this.hide(); - } else { - this.show(); - } - }; + var _proto = Collapse.prototype; - _proto.show = function show() { - var _this = this; + // Public + _proto.toggle = function toggle() { + if ($(this._element).hasClass(ClassName$3.SHOW)) { + this.hide(); + } else { + this.show(); + } + }; - if (this._isTransitioning || $$$1(this._element).hasClass(ClassName.SHOW)) { - return; - } + _proto.show = function show() { + var _this = this; - var actives; - var activesData; + if (this._isTransitioning || $(this._element).hasClass(ClassName$3.SHOW)) { + return; + } - if (this._parent) { - actives = $$$1.makeArray($$$1(this._parent).find(Selector.ACTIVES).filter("[data-parent=\"" + this._config.parent + "\"]")); + var actives; + var activesData; - if (actives.length === 0) { - actives = null; + if (this._parent) { + actives = [].slice.call(this._parent.querySelectorAll(Selector$3.ACTIVES)).filter(function (elem) { + if (typeof _this._config.parent === 'string') { + return elem.getAttribute('data-parent') === _this._config.parent; } - } - if (actives) { - activesData = $$$1(actives).not(this._selector).data(DATA_KEY); + return elem.classList.contains(ClassName$3.COLLAPSE); + }); - if (activesData && activesData._isTransitioning) { - return; - } + if (actives.length === 0) { + actives = null; } + } - var startEvent = $$$1.Event(Event.SHOW); - $$$1(this._element).trigger(startEvent); + if (actives) { + activesData = $(actives).not(this._selector).data(DATA_KEY$3); - if (startEvent.isDefaultPrevented()) { + if (activesData && activesData._isTransitioning) { return; } + } - if (actives) { - Collapse._jQueryInterface.call($$$1(actives).not(this._selector), 'hide'); - - if (!activesData) { - $$$1(actives).data(DATA_KEY, null); - } - } + var startEvent = $.Event(Event$3.SHOW); + $(this._element).trigger(startEvent); - var dimension = this._getDimension(); + if (startEvent.isDefaultPrevented()) { + return; + } - $$$1(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING); - this._element.style[dimension] = 0; + if (actives) { + Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide'); - if (this._triggerArray.length > 0) { - $$$1(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true); + if (!activesData) { + $(actives).data(DATA_KEY$3, null); } + } - this.setTransitioning(true); + var dimension = this._getDimension(); - var complete = function complete() { - $$$1(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW); - _this._element.style[dimension] = ''; + $(this._element).removeClass(ClassName$3.COLLAPSE).addClass(ClassName$3.COLLAPSING); + this._element.style[dimension] = 0; - _this.setTransitioning(false); + if (this._triggerArray.length) { + $(this._triggerArray).removeClass(ClassName$3.COLLAPSED).attr('aria-expanded', true); + } - $$$1(_this._element).trigger(Event.SHOWN); - }; + this.setTransitioning(true); - var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); - var scrollSize = "scroll" + capitalizedDimension; - var transitionDuration = Util.getTransitionDurationFromElement(this._element); - $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); - this._element.style[dimension] = this._element[scrollSize] + "px"; + var complete = function complete() { + $(_this._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).addClass(ClassName$3.SHOW); + _this._element.style[dimension] = ''; + + _this.setTransitioning(false); + + $(_this._element).trigger(Event$3.SHOWN); }; - _proto.hide = function hide() { - var _this2 = this; + var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); + var scrollSize = "scroll" + capitalizedDimension; + var transitionDuration = Util.getTransitionDurationFromElement(this._element); + $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); + this._element.style[dimension] = this._element[scrollSize] + "px"; + }; - if (this._isTransitioning || !$$$1(this._element).hasClass(ClassName.SHOW)) { - return; - } + _proto.hide = function hide() { + var _this2 = this; - var startEvent = $$$1.Event(Event.HIDE); - $$$1(this._element).trigger(startEvent); + if (this._isTransitioning || !$(this._element).hasClass(ClassName$3.SHOW)) { + return; + } - if (startEvent.isDefaultPrevented()) { - return; - } + var startEvent = $.Event(Event$3.HIDE); + $(this._element).trigger(startEvent); - var dimension = this._getDimension(); + if (startEvent.isDefaultPrevented()) { + return; + } - this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px"; - Util.reflow(this._element); - $$$1(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW); + var dimension = this._getDimension(); - if (this._triggerArray.length > 0) { - for (var i = 0; i < this._triggerArray.length; i++) { - var trigger = this._triggerArray[i]; - var selector = Util.getSelectorFromElement(trigger); + this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px"; + Util.reflow(this._element); + $(this._element).addClass(ClassName$3.COLLAPSING).removeClass(ClassName$3.COLLAPSE).removeClass(ClassName$3.SHOW); + var triggerArrayLength = this._triggerArray.length; - if (selector !== null) { - var $elem = $$$1(selector); + if (triggerArrayLength > 0) { + for (var i = 0; i < triggerArrayLength; i++) { + var trigger = this._triggerArray[i]; + var selector = Util.getSelectorFromElement(trigger); - if (!$elem.hasClass(ClassName.SHOW)) { - $$$1(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false); - } + if (selector !== null) { + var $elem = $([].slice.call(document.querySelectorAll(selector))); + + if (!$elem.hasClass(ClassName$3.SHOW)) { + $(trigger).addClass(ClassName$3.COLLAPSED).attr('aria-expanded', false); } } } + } - this.setTransitioning(true); - - var complete = function complete() { - _this2.setTransitioning(false); - - $$$1(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN); - }; + this.setTransitioning(true); - this._element.style[dimension] = ''; - var transitionDuration = Util.getTransitionDurationFromElement(this._element); - $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); - }; + var complete = function complete() { + _this2.setTransitioning(false); - _proto.setTransitioning = function setTransitioning(isTransitioning) { - this._isTransitioning = isTransitioning; + $(_this2._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).trigger(Event$3.HIDDEN); }; - _proto.dispose = function dispose() { - $$$1.removeData(this._element, DATA_KEY); - this._config = null; - this._parent = null; - this._element = null; - this._triggerArray = null; - this._isTransitioning = null; - }; // Private - + this._element.style[dimension] = ''; + var transitionDuration = Util.getTransitionDurationFromElement(this._element); + $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); + }; - _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, Default, config); - config.toggle = Boolean(config.toggle); // Coerce string values + _proto.setTransitioning = function setTransitioning(isTransitioning) { + this._isTransitioning = isTransitioning; + }; - Util.typeCheckConfig(NAME, config, DefaultType); - return config; - }; + _proto.dispose = function dispose() { + $.removeData(this._element, DATA_KEY$3); + this._config = null; + this._parent = null; + this._element = null; + this._triggerArray = null; + this._isTransitioning = null; + } // Private + ; + + _proto._getConfig = function _getConfig(config) { + config = _objectSpread({}, Default$1, config); + config.toggle = Boolean(config.toggle); // Coerce string values + + Util.typeCheckConfig(NAME$3, config, DefaultType$1); + return config; + }; - _proto._getDimension = function _getDimension() { - var hasWidth = $$$1(this._element).hasClass(Dimension.WIDTH); - return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; - }; + _proto._getDimension = function _getDimension() { + var hasWidth = $(this._element).hasClass(Dimension.WIDTH); + return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; + }; - _proto._getParent = function _getParent() { - var _this3 = this; + _proto._getParent = function _getParent() { + var _this3 = this; - var parent = null; + var parent; - if (Util.isElement(this._config.parent)) { - parent = this._config.parent; // It's a jQuery object + if (Util.isElement(this._config.parent)) { + parent = this._config.parent; // It's a jQuery object - if (typeof this._config.parent.jquery !== 'undefined') { - parent = this._config.parent[0]; - } - } else { - parent = $$$1(this._config.parent)[0]; + if (typeof this._config.parent.jquery !== 'undefined') { + parent = this._config.parent[0]; } + } else { + parent = document.querySelector(this._config.parent); + } - var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]"; - $$$1(parent).find(selector).each(function (i, element) { - _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]); - }); - return parent; - }; + var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]"; + var children = [].slice.call(parent.querySelectorAll(selector)); + $(children).each(function (i, element) { + _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]); + }); + return parent; + }; - _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { - if (element) { - var isOpen = $$$1(element).hasClass(ClassName.SHOW); + _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { + var isOpen = $(element).hasClass(ClassName$3.SHOW); - if (triggerArray.length > 0) { - $$$1(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); - } - } - }; // Static + if (triggerArray.length) { + $(triggerArray).toggleClass(ClassName$3.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); + } + } // Static + ; + Collapse._getTargetFromElement = function _getTargetFromElement(element) { + var selector = Util.getSelectorFromElement(element); + return selector ? document.querySelector(selector) : null; + }; - Collapse._getTargetFromElement = function _getTargetFromElement(element) { - var selector = Util.getSelectorFromElement(element); - return selector ? $$$1(selector)[0] : null; - }; + Collapse._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var $this = $(this); + var data = $this.data(DATA_KEY$3); - Collapse._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var $this = $$$1(this); - var data = $this.data(DATA_KEY); + var _config = _objectSpread({}, Default$1, $this.data(), typeof config === 'object' && config ? config : {}); - var _config = _objectSpread({}, Default, $this.data(), typeof config === 'object' && config ? config : {}); + if (!data && _config.toggle && /show|hide/.test(config)) { + _config.toggle = false; + } - if (!data && _config.toggle && /show|hide/.test(config)) { - _config.toggle = false; - } + if (!data) { + data = new Collapse(this, _config); + $this.data(DATA_KEY$3, data); + } - if (!data) { - data = new Collapse(this, _config); - $this.data(DATA_KEY, data); + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError("No method named \"" + config + "\""); } - if (typeof config === 'string') { - if (typeof data[config] === 'undefined') { - throw new TypeError("No method named \"" + config + "\""); - } + data[config](); + } + }); + }; - data[config](); - } - }); - }; - - _createClass(Collapse, null, [{ - key: "VERSION", - get: function get() { - return VERSION; - } - }, { - key: "Default", - get: function get() { - return Default; - } - }]); + _createClass(Collapse, null, [{ + key: "VERSION", + get: function get() { + return VERSION$3; + } + }, { + key: "Default", + get: function get() { + return Default$1; + } + }]); - return Collapse; - }(); - /** - * ------------------------------------------------------------------------ - * Data Api implementation - * ------------------------------------------------------------------------ - */ + return Collapse; + }(); + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ - $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { - // preventDefault only for elements (which change the URL) not inside the collapsible element - if (event.currentTarget.tagName === 'A') { - event.preventDefault(); - } + $(document).on(Event$3.CLICK_DATA_API, Selector$3.DATA_TOGGLE, function (event) { + // preventDefault only for elements (which change the URL) not inside the collapsible element + if (event.currentTarget.tagName === 'A') { + event.preventDefault(); + } - var $trigger = $$$1(this); - var selector = Util.getSelectorFromElement(this); - $$$1(selector).each(function () { - var $target = $$$1(this); - var data = $target.data(DATA_KEY); - var config = data ? 'toggle' : $trigger.data(); + var $trigger = $(this); + var selector = Util.getSelectorFromElement(this); + var selectors = [].slice.call(document.querySelectorAll(selector)); + $(selectors).each(function () { + var $target = $(this); + var data = $target.data(DATA_KEY$3); + var config = data ? 'toggle' : $trigger.data(); - Collapse._jQueryInterface.call($target, config); - }); + Collapse._jQueryInterface.call($target, config); }); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ - - $$$1.fn[NAME] = Collapse._jQueryInterface; - $$$1.fn[NAME].Constructor = Collapse; + }); + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ - $$$1.fn[NAME].noConflict = function () { - $$$1.fn[NAME] = JQUERY_NO_CONFLICT; - return Collapse._jQueryInterface; - }; + $.fn[NAME$3] = Collapse._jQueryInterface; + $.fn[NAME$3].Constructor = Collapse; - return Collapse; - }($); + $.fn[NAME$3].noConflict = function () { + $.fn[NAME$3] = JQUERY_NO_CONFLICT$3; + return Collapse._jQueryInterface; + }; /**! * @fileOverview Kickass library to create and place poppers near their reference elements. - * @version 1.14.3 + * @version 1.14.7 * @license * Copyright (c) 2016 Federico Zivolo and contributors * @@ -1499,7 +1600,8 @@ return []; } // NOTE: 1 DOM access here - var css = getComputedStyle(element, null); + var window = element.ownerDocument.defaultView; + var css = window.getComputedStyle(element, null); return property ? css[property] : css; } @@ -1587,7 +1689,7 @@ var noOffsetParent = isIE(10) ? document.body : null; // NOTE: 1 DOM access here - var offsetParent = element.offsetParent; + var offsetParent = element.offsetParent || null; // Skip hidden elements which don't have an offsetParent while (offsetParent === noOffsetParent && element.nextElementSibling) { offsetParent = (element = element.nextElementSibling).offsetParent; @@ -1599,9 +1701,9 @@ return element ? element.ownerDocument.documentElement : document.documentElement; } - // .offsetParent will return the closest TD or TABLE in case + // .offsetParent will return the closest TH, TD or TABLE in case // no offsetParent is present, I hate this job... - if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') { + if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') { return getOffsetParent(offsetParent); } @@ -1739,10 +1841,10 @@ } function getSize(axis, body, html, computedStyle) { - return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0); + return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0); } - function getWindowSizes() { + function getWindowSizes(document) { var body = document.body; var html = document.documentElement; var computedStyle = isIE(10) && getComputedStyle(html); @@ -1859,7 +1961,7 @@ }; // subtract scrollbar size from sizes - var sizes = element.nodeName === 'HTML' ? getWindowSizes() : {}; + var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {}; var width = sizes.width || element.clientWidth || result.right - result.left; var height = sizes.height || element.clientHeight || result.bottom - result.top; @@ -1894,7 +1996,7 @@ var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10); // In cases where the parent is fixed, we must ignore negative scroll in offset calc - if (fixedPosition && parent.nodeName === 'HTML') { + if (fixedPosition && isHTML) { parentRect.top = Math.max(parentRect.top, 0); parentRect.left = Math.max(parentRect.left, 0); } @@ -1969,7 +2071,11 @@ if (getStyleComputedProperty(element, 'position') === 'fixed') { return true; } - return isFixed(getParentNode(element)); + var parentNode = getParentNode(element); + if (!parentNode) { + return false; + } + return isFixed(parentNode); } /** @@ -2032,7 +2138,7 @@ // In case of HTML, we need a different computation if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) { - var _getWindowSizes = getWindowSizes(), + var _getWindowSizes = getWindowSizes(popper.ownerDocument), height = _getWindowSizes.height, width = _getWindowSizes.width; @@ -2047,10 +2153,12 @@ } // Add paddings - boundaries.left += padding; - boundaries.top += padding; - boundaries.right -= padding; - boundaries.bottom -= padding; + padding = padding || 0; + var isPaddingNumber = typeof padding === 'number'; + boundaries.left += isPaddingNumber ? padding : padding.left || 0; + boundaries.top += isPaddingNumber ? padding : padding.top || 0; + boundaries.right -= isPaddingNumber ? padding : padding.right || 0; + boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0; return boundaries; } @@ -2147,9 +2255,10 @@ * @returns {Object} object containing width and height properties */ function getOuterSizes(element) { - var styles = getComputedStyle(element); - var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom); - var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight); + var window = element.ownerDocument.defaultView; + var styles = window.getComputedStyle(element); + var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0); + var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0); var result = { width: element.offsetWidth + y, height: element.offsetHeight + x @@ -2375,7 +2484,7 @@ } /** - * Destroy the popper + * Destroys the popper. * @method * @memberof Popper */ @@ -2482,7 +2591,7 @@ /** * It will remove resize/scroll events and won't recalculate popper position - * when they are triggered. It also won't trigger onUpdate callback anymore, + * when they are triggered. It also won't trigger `onUpdate` callback anymore, * unless you call `update` method manually. * @method * @memberof Popper @@ -2599,6 +2708,57 @@ return options; } + /** + * @function + * @memberof Popper.Utils + * @argument {Object} data - The data object generated by `update` method + * @argument {Boolean} shouldRound - If the offsets should be rounded at all + * @returns {Object} The popper's position offsets rounded + * + * The tale of pixel-perfect positioning. It's still not 100% perfect, but as + * good as it can be within reason. + * Discussion here: https://github.com/FezVrasta/popper.js/pull/715 + * + * Low DPI screens cause a popper to be blurry if not using full pixels (Safari + * as well on High DPI screens). + * + * Firefox prefers no rounding for positioning and does not have blurriness on + * high DPI screens. + * + * Only horizontal placement and left/right values need to be considered. + */ + function getRoundedOffsets(data, shouldRound) { + var _data$offsets = data.offsets, + popper = _data$offsets.popper, + reference = _data$offsets.reference; + var round = Math.round, + floor = Math.floor; + + var noRound = function noRound(v) { + return v; + }; + + var referenceWidth = round(reference.width); + var popperWidth = round(popper.width); + + var isVertical = ['left', 'right'].indexOf(data.placement) !== -1; + var isVariation = data.placement.indexOf('-') !== -1; + var sameWidthParity = referenceWidth % 2 === popperWidth % 2; + var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1; + + var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor; + var verticalToInteger = !shouldRound ? noRound : round; + + return { + left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left), + top: verticalToInteger(popper.top), + bottom: verticalToInteger(popper.bottom), + right: horizontalToInteger(popper.right) + }; + } + + var isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent); + /** * @function * @memberof Modifiers @@ -2629,15 +2789,7 @@ position: popper.position }; - // Avoid blurry text by using full pixel integers. - // For pixel-perfect positioning, top/bottom prefers rounded - // values, while left/right prefers floored values. - var offsets = { - left: Math.floor(popper.left), - top: Math.round(popper.top), - bottom: Math.round(popper.bottom), - right: Math.floor(popper.right) - }; + var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox); var sideA = x === 'bottom' ? 'top' : 'bottom'; var sideB = y === 'right' ? 'left' : 'right'; @@ -2659,12 +2811,22 @@ var left = void 0, top = void 0; if (sideA === 'bottom') { - top = -offsetParentRect.height + offsets.bottom; + // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar) + // and not the bottom of the html element + if (offsetParent.nodeName === 'HTML') { + top = -offsetParent.clientHeight + offsets.bottom; + } else { + top = -offsetParentRect.height + offsets.bottom; + } } else { top = offsets.top; } if (sideB === 'right') { - left = -offsetParentRect.width + offsets.right; + if (offsetParent.nodeName === 'HTML') { + left = -offsetParent.clientWidth + offsets.right; + } else { + left = -offsetParentRect.width + offsets.right; + } } else { left = offsets.left; } @@ -2773,7 +2935,7 @@ // // extends keepTogether behavior making sure the popper and its - // reference have enough pixels in conjuction + // reference have enough pixels in conjunction // // top/left side @@ -2843,7 +3005,7 @@ * - `top-end` (on top of reference, right aligned) * - `right-start` (on right of reference, top aligned) * - `bottom` (on bottom, centered) - * - `auto-right` (on the side with more space available, alignment depends by placement) + * - `auto-end` (on the side with more space available, alignment depends by placement) * * @static * @type {Array} @@ -3385,7 +3547,7 @@ * The `offset` modifier can shift your popper on both its axis. * * It accepts the following units: - * - `px` or unitless, interpreted as pixels + * - `px` or unit-less, interpreted as pixels * - `%` or `%r`, percentage relative to the length of the reference element * - `%p`, percentage relative to the length of the popper element * - `vw`, CSS viewport width unit @@ -3393,7 +3555,7 @@ * * For length is intended the main axis relative to the placement of the popper.
* This means that if the placement is `top` or `bottom`, the length will be the - * `width`. In case of `left` or `right`, it will be the height. + * `width`. In case of `left` or `right`, it will be the `height`. * * You can provide a single value (as `Number` or `String`), or a pair of values * as `String` divided by a comma or one (or more) white spaces.
@@ -3414,7 +3576,7 @@ * ``` * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap * > with their reference element, unfortunately, you will have to disable the `flip` modifier. - * > More on this [reading this issue](https://github.com/FezVrasta/popper.js/issues/373) + * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373). * * @memberof modifiers * @inner @@ -3435,7 +3597,7 @@ /** * Modifier used to prevent the popper from being positioned outside the boundary. * - * An scenario exists where the reference itself is not within the boundaries.
+ * A scenario exists where the reference itself is not within the boundaries.
* We can say it has "escaped the boundaries" — or just "escaped".
* In this case we need to decide whether the popper should either: * @@ -3465,23 +3627,23 @@ /** * @prop {number} padding=5 * Amount of pixel used to define a minimum distance between the boundaries - * and the popper this makes sure the popper has always a little padding + * and the popper. This makes sure the popper always has a little padding * between the edges of its container */ padding: 5, /** * @prop {String|HTMLElement} boundariesElement='scrollParent' - * Boundaries used by the modifier, can be `scrollParent`, `window`, + * Boundaries used by the modifier. Can be `scrollParent`, `window`, * `viewport` or any DOM element. */ boundariesElement: 'scrollParent' }, /** - * Modifier used to make sure the reference and its popper stay near eachothers - * without leaving any gap between the two. Expecially useful when the arrow is - * enabled and you want to assure it to point to its reference element. - * It cares only about the first axis, you can still have poppers with margin + * Modifier used to make sure the reference and its popper stay near each other + * without leaving any gap between the two. Especially useful when the arrow is + * enabled and you want to ensure that it points to its reference element. + * It cares only about the first axis. You can still have poppers with margin * between the popper and its reference element. * @memberof modifiers * @inner @@ -3499,7 +3661,7 @@ * This modifier is used to move the `arrowElement` of the popper to make * sure it is positioned between the reference element and its popper element. * It will read the outer size of the `arrowElement` node to detect how many - * pixels of conjuction are needed. + * pixels of conjunction are needed. * * It has no effect if no `arrowElement` is provided. * @memberof modifiers @@ -3538,7 +3700,7 @@ * @prop {String|Array} behavior='flip' * The behavior used to change the popper's placement. It can be one of * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid - * placements (with optional variations). + * placements (with optional variations) */ behavior: 'flip', /** @@ -3548,9 +3710,9 @@ padding: 5, /** * @prop {String|HTMLElement} boundariesElement='viewport' - * The element which will define the boundaries of the popper position, - * the popper will never be placed outside of the defined boundaries - * (except if keepTogether is enabled) + * The element which will define the boundaries of the popper position. + * The popper will never be placed outside of the defined boundaries + * (except if `keepTogether` is enabled) */ boundariesElement: 'viewport' }, @@ -3614,8 +3776,8 @@ fn: computeStyle, /** * @prop {Boolean} gpuAcceleration=true - * If true, it uses the CSS 3d transformation to position the popper. - * Otherwise, it will use the `top` and `left` properties. + * If true, it uses the CSS 3D transformation to position the popper. + * Otherwise, it will use the `top` and `left` properties */ gpuAcceleration: true, /** @@ -3642,7 +3804,7 @@ * Note that if you disable this modifier, you must make sure the popper element * has its position set to `absolute` before Popper.js can do its work! * - * Just disable this modifier and define you own to achieve the desired effect. + * Just disable this modifier and define your own to achieve the desired effect. * * @memberof modifiers * @inner @@ -3659,27 +3821,27 @@ /** * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier * @prop {Boolean} gpuAcceleration=true - * If true, it uses the CSS 3d transformation to position the popper. - * Otherwise, it will use the `top` and `left` properties. + * If true, it uses the CSS 3D transformation to position the popper. + * Otherwise, it will use the `top` and `left` properties */ gpuAcceleration: undefined } }; /** - * The `dataObject` is an object containing all the informations used by Popper.js - * this object get passed to modifiers and to the `onCreate` and `onUpdate` callbacks. + * The `dataObject` is an object containing all the information used by Popper.js. + * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks. * @name dataObject * @property {Object} data.instance The Popper.js instance * @property {String} data.placement Placement applied to popper * @property {String} data.originalPlacement Placement originally defined on init * @property {Boolean} data.flipped True if popper has been flipped by flip modifier - * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper. + * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier - * @property {Object} data.styles Any CSS property defined here will be applied to the popper, it expects the JavaScript nomenclature (eg. `marginBottom`) - * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow, it expects the JavaScript nomenclature (eg. `marginBottom`) + * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`) + * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`) * @property {Object} data.boundaries Offsets of the popper boundaries - * @property {Object} data.offsets The measurements of popper, reference and arrow elements. + * @property {Object} data.offsets The measurements of popper, reference and arrow elements * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0 @@ -3687,9 +3849,9 @@ /** * Default options provided to Popper.js constructor.
- * These can be overriden using the `options` argument of Popper.js.
- * To override an option, simply pass as 3rd argument an object with the same - * structure of this object, example: + * These can be overridden using the `options` argument of Popper.js.
+ * To override an option, simply pass an object with the same + * structure of the `options` object, as the 3rd argument. For example: * ``` * new Popper(ref, pop, { * modifiers: { @@ -3703,7 +3865,7 @@ */ var Defaults = { /** - * Popper's placement + * Popper's placement. * @prop {Popper.placements} placement='bottom' */ placement: 'bottom', @@ -3715,7 +3877,7 @@ positionFixed: false, /** - * Whether events (resize, scroll) are initially enabled + * Whether events (resize, scroll) are initially enabled. * @prop {Boolean} eventsEnabled=true */ eventsEnabled: true, @@ -3729,17 +3891,17 @@ /** * Callback called when the popper is created.
- * By default, is set to no-op.
+ * By default, it is set to no-op.
* Access Popper.js instance with `data.instance`. * @prop {onCreate} */ onCreate: function onCreate() {}, /** - * Callback called when the popper is updated, this callback is not called + * Callback called when the popper is updated. This callback is not called * on the initialization/creation of the popper, but only on subsequent * updates.
- * By default, is set to no-op.
+ * By default, it is set to no-op.
* Access Popper.js instance with `data.instance`. * @prop {onUpdate} */ @@ -3747,7 +3909,7 @@ /** * List of modifiers used to modify the offsets before they are applied to the popper. - * They provide most of the functionalities of Popper.js + * They provide most of the functionalities of Popper.js. * @prop {modifiers} */ modifiers: modifiers @@ -3767,10 +3929,10 @@ // Methods var Popper = function () { /** - * Create a new Popper.js instance + * Creates a new Popper.js instance. * @class Popper * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper - * @param {HTMLElement} popper - The HTML element used as popper. + * @param {HTMLElement} popper - The HTML element used as the popper * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults) * @return {Object} instance - The generated Popper.js instance */ @@ -3866,7 +4028,7 @@ } /** - * Schedule an update, it will run on the next UI update available + * Schedules an update. It will run on the next UI update available. * @method scheduleUpdate * @memberof Popper */ @@ -3903,7 +4065,7 @@ * new Popper(referenceObject, popperNode); * ``` * - * NB: This feature isn't supported in Internet Explorer 10 + * NB: This feature isn't supported in Internet Explorer 10. * @name referenceObject * @property {Function} data.getBoundingClientRect * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method. @@ -3919,2502 +4081,2908 @@ Popper.Defaults = Defaults; /** - * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): dropdown.js - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * -------------------------------------------------------------------------- + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ */ - var Dropdown = function ($$$1) { - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - var NAME = 'dropdown'; - var VERSION = '4.1.1'; - var DATA_KEY = 'bs.dropdown'; - var EVENT_KEY = "." + DATA_KEY; - var DATA_API_KEY = '.data-api'; - var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; - var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key - - var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key - - var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key - - var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key - - var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key - - var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse) - - var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE); - var Event = { - HIDE: "hide" + EVENT_KEY, - HIDDEN: "hidden" + EVENT_KEY, - SHOW: "show" + EVENT_KEY, - SHOWN: "shown" + EVENT_KEY, - CLICK: "click" + EVENT_KEY, - CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY, - KEYDOWN_DATA_API: "keydown" + EVENT_KEY + DATA_API_KEY, - KEYUP_DATA_API: "keyup" + EVENT_KEY + DATA_API_KEY - }; - var ClassName = { - DISABLED: 'disabled', - SHOW: 'show', - DROPUP: 'dropup', - DROPRIGHT: 'dropright', - DROPLEFT: 'dropleft', - MENURIGHT: 'dropdown-menu-right', - MENULEFT: 'dropdown-menu-left', - POSITION_STATIC: 'position-static' - }; - var Selector = { - DATA_TOGGLE: '[data-toggle="dropdown"]', - FORM_CHILD: '.dropdown form', - MENU: '.dropdown-menu', - NAVBAR_NAV: '.navbar-nav', - VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)' - }; - var AttachmentMap = { - TOP: 'top-start', - TOPEND: 'top-end', - BOTTOM: 'bottom-start', - BOTTOMEND: 'bottom-end', - RIGHT: 'right-start', - RIGHTEND: 'right-end', - LEFT: 'left-start', - LEFTEND: 'left-end' - }; - var Default = { - offset: 0, - flip: true, - boundary: 'scrollParent', - reference: 'toggle', - display: 'dynamic' - }; - var DefaultType = { - offset: '(number|string|function)', - flip: 'boolean', - boundary: '(string|element)', - reference: '(string|element)', - display: 'string' - /** - * ------------------------------------------------------------------------ - * Class Definition - * ------------------------------------------------------------------------ - */ - - }; - - var Dropdown = - /*#__PURE__*/ - function () { - function Dropdown(element, config) { - this._element = element; - this._popper = null; - this._config = this._getConfig(config); - this._menu = this._getMenuElement(); - this._inNavbar = this._detectNavbar(); + var NAME$4 = 'dropdown'; + var VERSION$4 = '4.3.1'; + var DATA_KEY$4 = 'bs.dropdown'; + var EVENT_KEY$4 = "." + DATA_KEY$4; + var DATA_API_KEY$4 = '.data-api'; + var JQUERY_NO_CONFLICT$4 = $.fn[NAME$4]; + var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key - this._addEventListeners(); - } // Getters + var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key + var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key - var _proto = Dropdown.prototype; + var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key - // Public - _proto.toggle = function toggle() { - if (this._element.disabled || $$$1(this._element).hasClass(ClassName.DISABLED)) { - return; - } + var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key - var parent = Dropdown._getParentFromElement(this._element); + var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse) - var isActive = $$$1(this._menu).hasClass(ClassName.SHOW); + var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE); + var Event$4 = { + HIDE: "hide" + EVENT_KEY$4, + HIDDEN: "hidden" + EVENT_KEY$4, + SHOW: "show" + EVENT_KEY$4, + SHOWN: "shown" + EVENT_KEY$4, + CLICK: "click" + EVENT_KEY$4, + CLICK_DATA_API: "click" + EVENT_KEY$4 + DATA_API_KEY$4, + KEYDOWN_DATA_API: "keydown" + EVENT_KEY$4 + DATA_API_KEY$4, + KEYUP_DATA_API: "keyup" + EVENT_KEY$4 + DATA_API_KEY$4 + }; + var ClassName$4 = { + DISABLED: 'disabled', + SHOW: 'show', + DROPUP: 'dropup', + DROPRIGHT: 'dropright', + DROPLEFT: 'dropleft', + MENURIGHT: 'dropdown-menu-right', + MENULEFT: 'dropdown-menu-left', + POSITION_STATIC: 'position-static' + }; + var Selector$4 = { + DATA_TOGGLE: '[data-toggle="dropdown"]', + FORM_CHILD: '.dropdown form', + MENU: '.dropdown-menu', + NAVBAR_NAV: '.navbar-nav', + VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)' + }; + var AttachmentMap = { + TOP: 'top-start', + TOPEND: 'top-end', + BOTTOM: 'bottom-start', + BOTTOMEND: 'bottom-end', + RIGHT: 'right-start', + RIGHTEND: 'right-end', + LEFT: 'left-start', + LEFTEND: 'left-end' + }; + var Default$2 = { + offset: 0, + flip: true, + boundary: 'scrollParent', + reference: 'toggle', + display: 'dynamic' + }; + var DefaultType$2 = { + offset: '(number|string|function)', + flip: 'boolean', + boundary: '(string|element)', + reference: '(string|element)', + display: 'string' + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ - Dropdown._clearMenus(); + }; - if (isActive) { - return; - } + var Dropdown = + /*#__PURE__*/ + function () { + function Dropdown(element, config) { + this._element = element; + this._popper = null; + this._config = this._getConfig(config); + this._menu = this._getMenuElement(); + this._inNavbar = this._detectNavbar(); - var relatedTarget = { - relatedTarget: this._element - }; - var showEvent = $$$1.Event(Event.SHOW, relatedTarget); - $$$1(parent).trigger(showEvent); + this._addEventListeners(); + } // Getters - if (showEvent.isDefaultPrevented()) { - return; - } // Disable totally Popper.js for Dropdown in Navbar + var _proto = Dropdown.prototype; - if (!this._inNavbar) { - /** - * Check for Popper dependency - * Popper - https://popper.js.org - */ - if (typeof Popper === 'undefined') { - throw new TypeError('Bootstrap dropdown require Popper.js (https://popper.js.org)'); - } + // Public + _proto.toggle = function toggle() { + if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED)) { + return; + } - var referenceElement = this._element; + var parent = Dropdown._getParentFromElement(this._element); - if (this._config.reference === 'parent') { - referenceElement = parent; - } else if (Util.isElement(this._config.reference)) { - referenceElement = this._config.reference; // Check if it's jQuery element + var isActive = $(this._menu).hasClass(ClassName$4.SHOW); - if (typeof this._config.reference.jquery !== 'undefined') { - referenceElement = this._config.reference[0]; - } - } // If boundary is not `scrollParent`, then set position to `static` - // to allow the menu to "escape" the scroll parent's boundaries - // https://github.com/twbs/bootstrap/issues/24251 + Dropdown._clearMenus(); + if (isActive) { + return; + } - if (this._config.boundary !== 'scrollParent') { - $$$1(parent).addClass(ClassName.POSITION_STATIC); - } + var relatedTarget = { + relatedTarget: this._element + }; + var showEvent = $.Event(Event$4.SHOW, relatedTarget); + $(parent).trigger(showEvent); - this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig()); - } // If this is a touch-enabled device we add extra - // empty mouseover listeners to the body's immediate children; - // only needed because of broken event delegation on iOS - // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html + if (showEvent.isDefaultPrevented()) { + return; + } // Disable totally Popper.js for Dropdown in Navbar - if ('ontouchstart' in document.documentElement && $$$1(parent).closest(Selector.NAVBAR_NAV).length === 0) { - $$$1(document.body).children().on('mouseover', null, $$$1.noop); + if (!this._inNavbar) { + /** + * Check for Popper dependency + * Popper - https://popper.js.org + */ + if (typeof Popper === 'undefined') { + throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)'); } - this._element.focus(); + var referenceElement = this._element; - this._element.setAttribute('aria-expanded', true); + if (this._config.reference === 'parent') { + referenceElement = parent; + } else if (Util.isElement(this._config.reference)) { + referenceElement = this._config.reference; // Check if it's jQuery element - $$$1(this._menu).toggleClass(ClassName.SHOW); - $$$1(parent).toggleClass(ClassName.SHOW).trigger($$$1.Event(Event.SHOWN, relatedTarget)); - }; - - _proto.dispose = function dispose() { - $$$1.removeData(this._element, DATA_KEY); - $$$1(this._element).off(EVENT_KEY); - this._element = null; - this._menu = null; + if (typeof this._config.reference.jquery !== 'undefined') { + referenceElement = this._config.reference[0]; + } + } // If boundary is not `scrollParent`, then set position to `static` + // to allow the menu to "escape" the scroll parent's boundaries + // https://github.com/twbs/bootstrap/issues/24251 - if (this._popper !== null) { - this._popper.destroy(); - this._popper = null; + if (this._config.boundary !== 'scrollParent') { + $(parent).addClass(ClassName$4.POSITION_STATIC); } - }; - _proto.update = function update() { - this._inNavbar = this._detectNavbar(); + this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig()); + } // If this is a touch-enabled device we add extra + // empty mouseover listeners to the body's immediate children; + // only needed because of broken event delegation on iOS + // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html - if (this._popper !== null) { - this._popper.scheduleUpdate(); - } - }; // Private + if ('ontouchstart' in document.documentElement && $(parent).closest(Selector$4.NAVBAR_NAV).length === 0) { + $(document.body).children().on('mouseover', null, $.noop); + } - _proto._addEventListeners = function _addEventListeners() { - var _this = this; + this._element.focus(); - $$$1(this._element).on(Event.CLICK, function (event) { - event.preventDefault(); - event.stopPropagation(); + this._element.setAttribute('aria-expanded', true); - _this.toggle(); - }); - }; + $(this._menu).toggleClass(ClassName$4.SHOW); + $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget)); + }; - _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, this.constructor.Default, $$$1(this._element).data(), config); - Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); - return config; - }; + _proto.show = function show() { + if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || $(this._menu).hasClass(ClassName$4.SHOW)) { + return; + } - _proto._getMenuElement = function _getMenuElement() { - if (!this._menu) { - var parent = Dropdown._getParentFromElement(this._element); + var relatedTarget = { + relatedTarget: this._element + }; + var showEvent = $.Event(Event$4.SHOW, relatedTarget); - this._menu = $$$1(parent).find(Selector.MENU)[0]; - } + var parent = Dropdown._getParentFromElement(this._element); - return this._menu; - }; + $(parent).trigger(showEvent); - _proto._getPlacement = function _getPlacement() { - var $parentDropdown = $$$1(this._element).parent(); - var placement = AttachmentMap.BOTTOM; // Handle dropup + if (showEvent.isDefaultPrevented()) { + return; + } - if ($parentDropdown.hasClass(ClassName.DROPUP)) { - placement = AttachmentMap.TOP; + $(this._menu).toggleClass(ClassName$4.SHOW); + $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget)); + }; - if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) { - placement = AttachmentMap.TOPEND; - } - } else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) { - placement = AttachmentMap.RIGHT; - } else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) { - placement = AttachmentMap.LEFT; - } else if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) { - placement = AttachmentMap.BOTTOMEND; - } + _proto.hide = function hide() { + if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || !$(this._menu).hasClass(ClassName$4.SHOW)) { + return; + } - return placement; + var relatedTarget = { + relatedTarget: this._element }; + var hideEvent = $.Event(Event$4.HIDE, relatedTarget); - _proto._detectNavbar = function _detectNavbar() { - return $$$1(this._element).closest('.navbar').length > 0; - }; + var parent = Dropdown._getParentFromElement(this._element); - _proto._getPopperConfig = function _getPopperConfig() { - var _this2 = this; + $(parent).trigger(hideEvent); - var offsetConf = {}; + if (hideEvent.isDefaultPrevented()) { + return; + } - if (typeof this._config.offset === 'function') { - offsetConf.fn = function (data) { - data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets) || {}); - return data; - }; - } else { - offsetConf.offset = this._config.offset; - } + $(this._menu).toggleClass(ClassName$4.SHOW); + $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget)); + }; - var popperConfig = { - placement: this._getPlacement(), - modifiers: { - offset: offsetConf, - flip: { - enabled: this._config.flip - }, - preventOverflow: { - boundariesElement: this._config.boundary - } - } // Disable Popper.js if we have a static display + _proto.dispose = function dispose() { + $.removeData(this._element, DATA_KEY$4); + $(this._element).off(EVENT_KEY$4); + this._element = null; + this._menu = null; - }; + if (this._popper !== null) { + this._popper.destroy(); - if (this._config.display === 'static') { - popperConfig.modifiers.applyStyle = { - enabled: false - }; - } + this._popper = null; + } + }; - return popperConfig; - }; // Static + _proto.update = function update() { + this._inNavbar = this._detectNavbar(); + if (this._popper !== null) { + this._popper.scheduleUpdate(); + } + } // Private + ; - Dropdown._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $$$1(this).data(DATA_KEY); + _proto._addEventListeners = function _addEventListeners() { + var _this = this; - var _config = typeof config === 'object' ? config : null; + $(this._element).on(Event$4.CLICK, function (event) { + event.preventDefault(); + event.stopPropagation(); - if (!data) { - data = new Dropdown(this, _config); - $$$1(this).data(DATA_KEY, data); - } + _this.toggle(); + }); + }; - if (typeof config === 'string') { - if (typeof data[config] === 'undefined') { - throw new TypeError("No method named \"" + config + "\""); - } + _proto._getConfig = function _getConfig(config) { + config = _objectSpread({}, this.constructor.Default, $(this._element).data(), config); + Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType); + return config; + }; - data[config](); - } - }); - }; + _proto._getMenuElement = function _getMenuElement() { + if (!this._menu) { + var parent = Dropdown._getParentFromElement(this._element); - Dropdown._clearMenus = function _clearMenus(event) { - if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) { - return; + if (parent) { + this._menu = parent.querySelector(Selector$4.MENU); } + } - var toggles = $$$1.makeArray($$$1(Selector.DATA_TOGGLE)); + return this._menu; + }; - for (var i = 0; i < toggles.length; i++) { - var parent = Dropdown._getParentFromElement(toggles[i]); + _proto._getPlacement = function _getPlacement() { + var $parentDropdown = $(this._element.parentNode); + var placement = AttachmentMap.BOTTOM; // Handle dropup - var context = $$$1(toggles[i]).data(DATA_KEY); - var relatedTarget = { - relatedTarget: toggles[i] - }; + if ($parentDropdown.hasClass(ClassName$4.DROPUP)) { + placement = AttachmentMap.TOP; - if (!context) { - continue; - } + if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) { + placement = AttachmentMap.TOPEND; + } + } else if ($parentDropdown.hasClass(ClassName$4.DROPRIGHT)) { + placement = AttachmentMap.RIGHT; + } else if ($parentDropdown.hasClass(ClassName$4.DROPLEFT)) { + placement = AttachmentMap.LEFT; + } else if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) { + placement = AttachmentMap.BOTTOMEND; + } - var dropdownMenu = context._menu; + return placement; + }; - if (!$$$1(parent).hasClass(ClassName.SHOW)) { - continue; - } + _proto._detectNavbar = function _detectNavbar() { + return $(this._element).closest('.navbar').length > 0; + }; - if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $$$1.contains(parent, event.target)) { - continue; - } + _proto._getOffset = function _getOffset() { + var _this2 = this; - var hideEvent = $$$1.Event(Event.HIDE, relatedTarget); - $$$1(parent).trigger(hideEvent); + var offset = {}; - if (hideEvent.isDefaultPrevented()) { - continue; - } // If this is a touch-enabled device we remove the extra - // empty mouseover listeners we added for iOS support + if (typeof this._config.offset === 'function') { + offset.fn = function (data) { + data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {}); + return data; + }; + } else { + offset.offset = this._config.offset; + } + return offset; + }; - if ('ontouchstart' in document.documentElement) { - $$$1(document.body).children().off('mouseover', null, $$$1.noop); + _proto._getPopperConfig = function _getPopperConfig() { + var popperConfig = { + placement: this._getPlacement(), + modifiers: { + offset: this._getOffset(), + flip: { + enabled: this._config.flip + }, + preventOverflow: { + boundariesElement: this._config.boundary } + } // Disable Popper.js if we have a static display - toggles[i].setAttribute('aria-expanded', 'false'); - $$$1(dropdownMenu).removeClass(ClassName.SHOW); - $$$1(parent).removeClass(ClassName.SHOW).trigger($$$1.Event(Event.HIDDEN, relatedTarget)); - } }; - Dropdown._getParentFromElement = function _getParentFromElement(element) { - var parent; - var selector = Util.getSelectorFromElement(element); + if (this._config.display === 'static') { + popperConfig.modifiers.applyStyle = { + enabled: false + }; + } - if (selector) { - parent = $$$1(selector)[0]; - } + return popperConfig; + } // Static + ; - return parent || element.parentNode; - }; // eslint-disable-next-line complexity + Dropdown._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY$4); + var _config = typeof config === 'object' ? config : null; - Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { - // If not input/textarea: - // - And not a key in REGEXP_KEYDOWN => not a dropdown command - // If input/textarea: - // - If space key => not a dropdown command - // - If key is other than escape - // - If key is not up or down => not a dropdown command - // - If trigger inside the menu => not a dropdown command - if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $$$1(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) { - return; + if (!data) { + data = new Dropdown(this, _config); + $(this).data(DATA_KEY$4, data); } - event.preventDefault(); - event.stopPropagation(); + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError("No method named \"" + config + "\""); + } - if (this.disabled || $$$1(this).hasClass(ClassName.DISABLED)) { - return; + data[config](); } + }); + }; - var parent = Dropdown._getParentFromElement(this); + Dropdown._clearMenus = function _clearMenus(event) { + if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) { + return; + } - var isActive = $$$1(parent).hasClass(ClassName.SHOW); + var toggles = [].slice.call(document.querySelectorAll(Selector$4.DATA_TOGGLE)); - if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { - if (event.which === ESCAPE_KEYCODE) { - var toggle = $$$1(parent).find(Selector.DATA_TOGGLE)[0]; - $$$1(toggle).trigger('focus'); - } + for (var i = 0, len = toggles.length; i < len; i++) { + var parent = Dropdown._getParentFromElement(toggles[i]); - $$$1(this).trigger('click'); - return; - } + var context = $(toggles[i]).data(DATA_KEY$4); + var relatedTarget = { + relatedTarget: toggles[i] + }; - var items = $$$1(parent).find(Selector.VISIBLE_ITEMS).get(); + if (event && event.type === 'click') { + relatedTarget.clickEvent = event; + } - if (items.length === 0) { - return; + if (!context) { + continue; } - var index = items.indexOf(event.target); + var dropdownMenu = context._menu; - if (event.which === ARROW_UP_KEYCODE && index > 0) { - // Up - index--; + if (!$(parent).hasClass(ClassName$4.SHOW)) { + continue; } - if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { - // Down - index++; + if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) { + continue; } - if (index < 0) { - index = 0; - } + var hideEvent = $.Event(Event$4.HIDE, relatedTarget); + $(parent).trigger(hideEvent); - items[index].focus(); - }; + if (hideEvent.isDefaultPrevented()) { + continue; + } // If this is a touch-enabled device we remove the extra + // empty mouseover listeners we added for iOS support - _createClass(Dropdown, null, [{ - key: "VERSION", - get: function get() { - return VERSION; - } - }, { - key: "Default", - get: function get() { - return Default; - } - }, { - key: "DefaultType", - get: function get() { - return DefaultType; + + if ('ontouchstart' in document.documentElement) { + $(document.body).children().off('mouseover', null, $.noop); } - }]); - return Dropdown; - }(); - /** - * ------------------------------------------------------------------------ - * Data Api implementation - * ------------------------------------------------------------------------ - */ + toggles[i].setAttribute('aria-expanded', 'false'); + $(dropdownMenu).removeClass(ClassName$4.SHOW); + $(parent).removeClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget)); + } + }; + + Dropdown._getParentFromElement = function _getParentFromElement(element) { + var parent; + var selector = Util.getSelectorFromElement(element); + + if (selector) { + parent = document.querySelector(selector); + } + return parent || element.parentNode; + } // eslint-disable-next-line complexity + ; + + Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { + // If not input/textarea: + // - And not a key in REGEXP_KEYDOWN => not a dropdown command + // If input/textarea: + // - If space key => not a dropdown command + // - If key is other than escape + // - If key is not up or down => not a dropdown command + // - If trigger inside the menu => not a dropdown command + if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(Selector$4.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) { + return; + } - $$$1(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + " " + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { event.preventDefault(); event.stopPropagation(); - Dropdown._jQueryInterface.call($$$1(this), 'toggle'); - }).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) { - e.stopPropagation(); - }); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ + if (this.disabled || $(this).hasClass(ClassName$4.DISABLED)) { + return; + } - $$$1.fn[NAME] = Dropdown._jQueryInterface; - $$$1.fn[NAME].Constructor = Dropdown; + var parent = Dropdown._getParentFromElement(this); - $$$1.fn[NAME].noConflict = function () { - $$$1.fn[NAME] = JQUERY_NO_CONFLICT; - return Dropdown._jQueryInterface; - }; + var isActive = $(parent).hasClass(ClassName$4.SHOW); - return Dropdown; - }($, Popper); + if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { + if (event.which === ESCAPE_KEYCODE) { + var toggle = parent.querySelector(Selector$4.DATA_TOGGLE); + $(toggle).trigger('focus'); + } - /** - * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): modal.js - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * -------------------------------------------------------------------------- - */ + $(this).trigger('click'); + return; + } - var Modal = function ($$$1) { - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - var NAME = 'modal'; - var VERSION = '4.1.1'; - var DATA_KEY = 'bs.modal'; - var EVENT_KEY = "." + DATA_KEY; - var DATA_API_KEY = '.data-api'; - var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; - var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key - - var Default = { - backdrop: true, - keyboard: true, - focus: true, - show: true - }; - var DefaultType = { - backdrop: '(boolean|string)', - keyboard: 'boolean', - focus: 'boolean', - show: 'boolean' - }; - var Event = { - HIDE: "hide" + EVENT_KEY, - HIDDEN: "hidden" + EVENT_KEY, - SHOW: "show" + EVENT_KEY, - SHOWN: "shown" + EVENT_KEY, - FOCUSIN: "focusin" + EVENT_KEY, - RESIZE: "resize" + EVENT_KEY, - CLICK_DISMISS: "click.dismiss" + EVENT_KEY, - KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY, - MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY, - MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY, - CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY - }; - var ClassName = { - SCROLLBAR_MEASURER: 'modal-scrollbar-measure', - BACKDROP: 'modal-backdrop', - OPEN: 'modal-open', - FADE: 'fade', - SHOW: 'show' - }; - var Selector = { - DIALOG: '.modal-dialog', - DATA_TOGGLE: '[data-toggle="modal"]', - DATA_DISMISS: '[data-dismiss="modal"]', - FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', - STICKY_CONTENT: '.sticky-top', - NAVBAR_TOGGLER: '.navbar-toggler' - /** - * ------------------------------------------------------------------------ - * Class Definition - * ------------------------------------------------------------------------ - */ + var items = [].slice.call(parent.querySelectorAll(Selector$4.VISIBLE_ITEMS)); - }; + if (items.length === 0) { + return; + } - var Modal = - /*#__PURE__*/ - function () { - function Modal(element, config) { - this._config = this._getConfig(config); - this._element = element; - this._dialog = $$$1(element).find(Selector.DIALOG)[0]; - this._backdrop = null; - this._isShown = false; - this._isBodyOverflowing = false; - this._ignoreBackdropClick = false; - this._scrollbarWidth = 0; - } // Getters + var index = items.indexOf(event.target); + if (event.which === ARROW_UP_KEYCODE && index > 0) { + // Up + index--; + } - var _proto = Modal.prototype; + if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { + // Down + index++; + } - // Public - _proto.toggle = function toggle(relatedTarget) { - return this._isShown ? this.hide() : this.show(relatedTarget); - }; + if (index < 0) { + index = 0; + } - _proto.show = function show(relatedTarget) { - var _this = this; + items[index].focus(); + }; - if (this._isTransitioning || this._isShown) { - return; - } + _createClass(Dropdown, null, [{ + key: "VERSION", + get: function get() { + return VERSION$4; + } + }, { + key: "Default", + get: function get() { + return Default$2; + } + }, { + key: "DefaultType", + get: function get() { + return DefaultType$2; + } + }]); - if ($$$1(this._element).hasClass(ClassName.FADE)) { - this._isTransitioning = true; - } + return Dropdown; + }(); + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ - var showEvent = $$$1.Event(Event.SHOW, { - relatedTarget: relatedTarget - }); - $$$1(this._element).trigger(showEvent); - if (this._isShown || showEvent.isDefaultPrevented()) { - return; - } + $(document).on(Event$4.KEYDOWN_DATA_API, Selector$4.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event$4.KEYDOWN_DATA_API, Selector$4.MENU, Dropdown._dataApiKeydownHandler).on(Event$4.CLICK_DATA_API + " " + Event$4.KEYUP_DATA_API, Dropdown._clearMenus).on(Event$4.CLICK_DATA_API, Selector$4.DATA_TOGGLE, function (event) { + event.preventDefault(); + event.stopPropagation(); - this._isShown = true; + Dropdown._jQueryInterface.call($(this), 'toggle'); + }).on(Event$4.CLICK_DATA_API, Selector$4.FORM_CHILD, function (e) { + e.stopPropagation(); + }); + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ - this._checkScrollbar(); + $.fn[NAME$4] = Dropdown._jQueryInterface; + $.fn[NAME$4].Constructor = Dropdown; - this._setScrollbar(); + $.fn[NAME$4].noConflict = function () { + $.fn[NAME$4] = JQUERY_NO_CONFLICT$4; + return Dropdown._jQueryInterface; + }; - this._adjustDialog(); + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ - $$$1(document.body).addClass(ClassName.OPEN); + var NAME$5 = 'modal'; + var VERSION$5 = '4.3.1'; + var DATA_KEY$5 = 'bs.modal'; + var EVENT_KEY$5 = "." + DATA_KEY$5; + var DATA_API_KEY$5 = '.data-api'; + var JQUERY_NO_CONFLICT$5 = $.fn[NAME$5]; + var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key + + var Default$3 = { + backdrop: true, + keyboard: true, + focus: true, + show: true + }; + var DefaultType$3 = { + backdrop: '(boolean|string)', + keyboard: 'boolean', + focus: 'boolean', + show: 'boolean' + }; + var Event$5 = { + HIDE: "hide" + EVENT_KEY$5, + HIDDEN: "hidden" + EVENT_KEY$5, + SHOW: "show" + EVENT_KEY$5, + SHOWN: "shown" + EVENT_KEY$5, + FOCUSIN: "focusin" + EVENT_KEY$5, + RESIZE: "resize" + EVENT_KEY$5, + CLICK_DISMISS: "click.dismiss" + EVENT_KEY$5, + KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY$5, + MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY$5, + MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY$5, + CLICK_DATA_API: "click" + EVENT_KEY$5 + DATA_API_KEY$5 + }; + var ClassName$5 = { + SCROLLABLE: 'modal-dialog-scrollable', + SCROLLBAR_MEASURER: 'modal-scrollbar-measure', + BACKDROP: 'modal-backdrop', + OPEN: 'modal-open', + FADE: 'fade', + SHOW: 'show' + }; + var Selector$5 = { + DIALOG: '.modal-dialog', + MODAL_BODY: '.modal-body', + DATA_TOGGLE: '[data-toggle="modal"]', + DATA_DISMISS: '[data-dismiss="modal"]', + FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', + STICKY_CONTENT: '.sticky-top' + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ - this._setEscapeEvent(); + }; - this._setResizeEvent(); + var Modal = + /*#__PURE__*/ + function () { + function Modal(element, config) { + this._config = this._getConfig(config); + this._element = element; + this._dialog = element.querySelector(Selector$5.DIALOG); + this._backdrop = null; + this._isShown = false; + this._isBodyOverflowing = false; + this._ignoreBackdropClick = false; + this._isTransitioning = false; + this._scrollbarWidth = 0; + } // Getters + + + var _proto = Modal.prototype; + + // Public + _proto.toggle = function toggle(relatedTarget) { + return this._isShown ? this.hide() : this.show(relatedTarget); + }; - $$$1(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) { - return _this.hide(event); - }); - $$$1(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () { - $$$1(_this._element).one(Event.MOUSEUP_DISMISS, function (event) { - if ($$$1(event.target).is(_this._element)) { - _this._ignoreBackdropClick = true; - } - }); - }); + _proto.show = function show(relatedTarget) { + var _this = this; - this._showBackdrop(function () { - return _this._showElement(relatedTarget); - }); - }; + if (this._isShown || this._isTransitioning) { + return; + } - _proto.hide = function hide(event) { - var _this2 = this; + if ($(this._element).hasClass(ClassName$5.FADE)) { + this._isTransitioning = true; + } - if (event) { - event.preventDefault(); - } + var showEvent = $.Event(Event$5.SHOW, { + relatedTarget: relatedTarget + }); + $(this._element).trigger(showEvent); - if (this._isTransitioning || !this._isShown) { - return; - } + if (this._isShown || showEvent.isDefaultPrevented()) { + return; + } - var hideEvent = $$$1.Event(Event.HIDE); - $$$1(this._element).trigger(hideEvent); + this._isShown = true; - if (!this._isShown || hideEvent.isDefaultPrevented()) { - return; - } + this._checkScrollbar(); - this._isShown = false; - var transition = $$$1(this._element).hasClass(ClassName.FADE); + this._setScrollbar(); - if (transition) { - this._isTransitioning = true; - } + this._adjustDialog(); - this._setEscapeEvent(); + this._setEscapeEvent(); - this._setResizeEvent(); + this._setResizeEvent(); - $$$1(document).off(Event.FOCUSIN); - $$$1(this._element).removeClass(ClassName.SHOW); - $$$1(this._element).off(Event.CLICK_DISMISS); - $$$1(this._dialog).off(Event.MOUSEDOWN_DISMISS); + $(this._element).on(Event$5.CLICK_DISMISS, Selector$5.DATA_DISMISS, function (event) { + return _this.hide(event); + }); + $(this._dialog).on(Event$5.MOUSEDOWN_DISMISS, function () { + $(_this._element).one(Event$5.MOUSEUP_DISMISS, function (event) { + if ($(event.target).is(_this._element)) { + _this._ignoreBackdropClick = true; + } + }); + }); - if (transition) { - var transitionDuration = Util.getTransitionDurationFromElement(this._element); - $$$1(this._element).one(Util.TRANSITION_END, function (event) { - return _this2._hideModal(event); - }).emulateTransitionEnd(transitionDuration); - } else { - this._hideModal(); - } - }; + this._showBackdrop(function () { + return _this._showElement(relatedTarget); + }); + }; - _proto.dispose = function dispose() { - $$$1.removeData(this._element, DATA_KEY); - $$$1(window, document, this._element, this._backdrop).off(EVENT_KEY); - this._config = null; - this._element = null; - this._dialog = null; - this._backdrop = null; - this._isShown = null; - this._isBodyOverflowing = null; - this._ignoreBackdropClick = null; - this._scrollbarWidth = null; - }; + _proto.hide = function hide(event) { + var _this2 = this; - _proto.handleUpdate = function handleUpdate() { - this._adjustDialog(); - }; // Private + if (event) { + event.preventDefault(); + } + if (!this._isShown || this._isTransitioning) { + return; + } - _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, Default, config); - Util.typeCheckConfig(NAME, config, DefaultType); - return config; - }; + var hideEvent = $.Event(Event$5.HIDE); + $(this._element).trigger(hideEvent); - _proto._showElement = function _showElement(relatedTarget) { - var _this3 = this; + if (!this._isShown || hideEvent.isDefaultPrevented()) { + return; + } - var transition = $$$1(this._element).hasClass(ClassName.FADE); + this._isShown = false; + var transition = $(this._element).hasClass(ClassName$5.FADE); - if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { - // Don't move modal's DOM position - document.body.appendChild(this._element); - } + if (transition) { + this._isTransitioning = true; + } - this._element.style.display = 'block'; + this._setEscapeEvent(); - this._element.removeAttribute('aria-hidden'); + this._setResizeEvent(); - this._element.scrollTop = 0; + $(document).off(Event$5.FOCUSIN); + $(this._element).removeClass(ClassName$5.SHOW); + $(this._element).off(Event$5.CLICK_DISMISS); + $(this._dialog).off(Event$5.MOUSEDOWN_DISMISS); - if (transition) { - Util.reflow(this._element); - } + if (transition) { + var transitionDuration = Util.getTransitionDurationFromElement(this._element); + $(this._element).one(Util.TRANSITION_END, function (event) { + return _this2._hideModal(event); + }).emulateTransitionEnd(transitionDuration); + } else { + this._hideModal(); + } + }; - $$$1(this._element).addClass(ClassName.SHOW); + _proto.dispose = function dispose() { + [window, this._element, this._dialog].forEach(function (htmlElement) { + return $(htmlElement).off(EVENT_KEY$5); + }); + /** + * `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API` + * Do not move `document` in `htmlElements` array + * It will remove `Event.CLICK_DATA_API` event that should remain + */ - if (this._config.focus) { - this._enforceFocus(); - } + $(document).off(Event$5.FOCUSIN); + $.removeData(this._element, DATA_KEY$5); + this._config = null; + this._element = null; + this._dialog = null; + this._backdrop = null; + this._isShown = null; + this._isBodyOverflowing = null; + this._ignoreBackdropClick = null; + this._isTransitioning = null; + this._scrollbarWidth = null; + }; - var shownEvent = $$$1.Event(Event.SHOWN, { - relatedTarget: relatedTarget - }); + _proto.handleUpdate = function handleUpdate() { + this._adjustDialog(); + } // Private + ; - var transitionComplete = function transitionComplete() { - if (_this3._config.focus) { - _this3._element.focus(); - } + _proto._getConfig = function _getConfig(config) { + config = _objectSpread({}, Default$3, config); + Util.typeCheckConfig(NAME$5, config, DefaultType$3); + return config; + }; - _this3._isTransitioning = false; - $$$1(_this3._element).trigger(shownEvent); - }; + _proto._showElement = function _showElement(relatedTarget) { + var _this3 = this; - if (transition) { - var transitionDuration = Util.getTransitionDurationFromElement(this._element); - $$$1(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration); - } else { - transitionComplete(); - } - }; + var transition = $(this._element).hasClass(ClassName$5.FADE); + + if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { + // Don't move modal's DOM position + document.body.appendChild(this._element); + } - _proto._enforceFocus = function _enforceFocus() { - var _this4 = this; + this._element.style.display = 'block'; - $$$1(document).off(Event.FOCUSIN) // Guard against infinite focus loop - .on(Event.FOCUSIN, function (event) { - if (document !== event.target && _this4._element !== event.target && $$$1(_this4._element).has(event.target).length === 0) { - _this4._element.focus(); - } - }); - }; + this._element.removeAttribute('aria-hidden'); - _proto._setEscapeEvent = function _setEscapeEvent() { - var _this5 = this; + this._element.setAttribute('aria-modal', true); - if (this._isShown && this._config.keyboard) { - $$$1(this._element).on(Event.KEYDOWN_DISMISS, function (event) { - if (event.which === ESCAPE_KEYCODE) { - event.preventDefault(); + if ($(this._dialog).hasClass(ClassName$5.SCROLLABLE)) { + this._dialog.querySelector(Selector$5.MODAL_BODY).scrollTop = 0; + } else { + this._element.scrollTop = 0; + } - _this5.hide(); - } - }); - } else if (!this._isShown) { - $$$1(this._element).off(Event.KEYDOWN_DISMISS); - } - }; + if (transition) { + Util.reflow(this._element); + } - _proto._setResizeEvent = function _setResizeEvent() { - var _this6 = this; + $(this._element).addClass(ClassName$5.SHOW); - if (this._isShown) { - $$$1(window).on(Event.RESIZE, function (event) { - return _this6.handleUpdate(event); - }); - } else { - $$$1(window).off(Event.RESIZE); + if (this._config.focus) { + this._enforceFocus(); + } + + var shownEvent = $.Event(Event$5.SHOWN, { + relatedTarget: relatedTarget + }); + + var transitionComplete = function transitionComplete() { + if (_this3._config.focus) { + _this3._element.focus(); } + + _this3._isTransitioning = false; + $(_this3._element).trigger(shownEvent); }; - _proto._hideModal = function _hideModal() { - var _this7 = this; + if (transition) { + var transitionDuration = Util.getTransitionDurationFromElement(this._dialog); + $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration); + } else { + transitionComplete(); + } + }; - this._element.style.display = 'none'; + _proto._enforceFocus = function _enforceFocus() { + var _this4 = this; - this._element.setAttribute('aria-hidden', true); + $(document).off(Event$5.FOCUSIN) // Guard against infinite focus loop + .on(Event$5.FOCUSIN, function (event) { + if (document !== event.target && _this4._element !== event.target && $(_this4._element).has(event.target).length === 0) { + _this4._element.focus(); + } + }); + }; - this._isTransitioning = false; + _proto._setEscapeEvent = function _setEscapeEvent() { + var _this5 = this; - this._showBackdrop(function () { - $$$1(document.body).removeClass(ClassName.OPEN); + if (this._isShown && this._config.keyboard) { + $(this._element).on(Event$5.KEYDOWN_DISMISS, function (event) { + if (event.which === ESCAPE_KEYCODE$1) { + event.preventDefault(); - _this7._resetAdjustments(); + _this5.hide(); + } + }); + } else if (!this._isShown) { + $(this._element).off(Event$5.KEYDOWN_DISMISS); + } + }; - _this7._resetScrollbar(); + _proto._setResizeEvent = function _setResizeEvent() { + var _this6 = this; - $$$1(_this7._element).trigger(Event.HIDDEN); + if (this._isShown) { + $(window).on(Event$5.RESIZE, function (event) { + return _this6.handleUpdate(event); }); - }; + } else { + $(window).off(Event$5.RESIZE); + } + }; - _proto._removeBackdrop = function _removeBackdrop() { - if (this._backdrop) { - $$$1(this._backdrop).remove(); - this._backdrop = null; - } - }; + _proto._hideModal = function _hideModal() { + var _this7 = this; - _proto._showBackdrop = function _showBackdrop(callback) { - var _this8 = this; + this._element.style.display = 'none'; - var animate = $$$1(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : ''; + this._element.setAttribute('aria-hidden', true); - if (this._isShown && this._config.backdrop) { - this._backdrop = document.createElement('div'); - this._backdrop.className = ClassName.BACKDROP; + this._element.removeAttribute('aria-modal'); - if (animate) { - $$$1(this._backdrop).addClass(animate); - } + this._isTransitioning = false; - $$$1(this._backdrop).appendTo(document.body); - $$$1(this._element).on(Event.CLICK_DISMISS, function (event) { - if (_this8._ignoreBackdropClick) { - _this8._ignoreBackdropClick = false; - return; - } + this._showBackdrop(function () { + $(document.body).removeClass(ClassName$5.OPEN); - if (event.target !== event.currentTarget) { - return; - } + _this7._resetAdjustments(); - if (_this8._config.backdrop === 'static') { - _this8._element.focus(); - } else { - _this8.hide(); - } - }); + _this7._resetScrollbar(); - if (animate) { - Util.reflow(this._backdrop); - } + $(_this7._element).trigger(Event$5.HIDDEN); + }); + }; - $$$1(this._backdrop).addClass(ClassName.SHOW); + _proto._removeBackdrop = function _removeBackdrop() { + if (this._backdrop) { + $(this._backdrop).remove(); + this._backdrop = null; + } + }; + + _proto._showBackdrop = function _showBackdrop(callback) { + var _this8 = this; + + var animate = $(this._element).hasClass(ClassName$5.FADE) ? ClassName$5.FADE : ''; + + if (this._isShown && this._config.backdrop) { + this._backdrop = document.createElement('div'); + this._backdrop.className = ClassName$5.BACKDROP; + + if (animate) { + this._backdrop.classList.add(animate); + } - if (!callback) { + $(this._backdrop).appendTo(document.body); + $(this._element).on(Event$5.CLICK_DISMISS, function (event) { + if (_this8._ignoreBackdropClick) { + _this8._ignoreBackdropClick = false; return; } - if (!animate) { - callback(); + if (event.target !== event.currentTarget) { return; } - var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); - $$$1(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration); - } else if (!this._isShown && this._backdrop) { - $$$1(this._backdrop).removeClass(ClassName.SHOW); + if (_this8._config.backdrop === 'static') { + _this8._element.focus(); + } else { + _this8.hide(); + } + }); - var callbackRemove = function callbackRemove() { - _this8._removeBackdrop(); + if (animate) { + Util.reflow(this._backdrop); + } - if (callback) { - callback(); - } - }; + $(this._backdrop).addClass(ClassName$5.SHOW); - if ($$$1(this._element).hasClass(ClassName.FADE)) { - var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); + if (!callback) { + return; + } - $$$1(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration); - } else { - callbackRemove(); - } - } else if (callback) { + if (!animate) { callback(); + return; } - }; // ---------------------------------------------------------------------- - // the following methods are used to handle overflowing modals - // todo (fat): these should probably be refactored out of modal.js - // ---------------------------------------------------------------------- + var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); + $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration); + } else if (!this._isShown && this._backdrop) { + $(this._backdrop).removeClass(ClassName$5.SHOW); - _proto._adjustDialog = function _adjustDialog() { - var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; + var callbackRemove = function callbackRemove() { + _this8._removeBackdrop(); - if (!this._isBodyOverflowing && isModalOverflowing) { - this._element.style.paddingLeft = this._scrollbarWidth + "px"; - } + if (callback) { + callback(); + } + }; - if (this._isBodyOverflowing && !isModalOverflowing) { - this._element.style.paddingRight = this._scrollbarWidth + "px"; + if ($(this._element).hasClass(ClassName$5.FADE)) { + var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); + + $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration); + } else { + callbackRemove(); } - }; + } else if (callback) { + callback(); + } + } // ---------------------------------------------------------------------- + // the following methods are used to handle overflowing modals + // todo (fat): these should probably be refactored out of modal.js + // ---------------------------------------------------------------------- + ; - _proto._resetAdjustments = function _resetAdjustments() { - this._element.style.paddingLeft = ''; - this._element.style.paddingRight = ''; - }; + _proto._adjustDialog = function _adjustDialog() { + var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; - _proto._checkScrollbar = function _checkScrollbar() { - var rect = document.body.getBoundingClientRect(); - this._isBodyOverflowing = rect.left + rect.right < window.innerWidth; - this._scrollbarWidth = this._getScrollbarWidth(); - }; + if (!this._isBodyOverflowing && isModalOverflowing) { + this._element.style.paddingLeft = this._scrollbarWidth + "px"; + } - _proto._setScrollbar = function _setScrollbar() { - var _this9 = this; - - if (this._isBodyOverflowing) { - // Note: DOMNode.style.paddingRight returns the actual value or '' if not set - // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set - // Adjust fixed content padding - $$$1(Selector.FIXED_CONTENT).each(function (index, element) { - var actualPadding = $$$1(element)[0].style.paddingRight; - var calculatedPadding = $$$1(element).css('padding-right'); - $$$1(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px"); - }); // Adjust sticky content margin - - $$$1(Selector.STICKY_CONTENT).each(function (index, element) { - var actualMargin = $$$1(element)[0].style.marginRight; - var calculatedMargin = $$$1(element).css('margin-right'); - $$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px"); - }); // Adjust navbar-toggler margin - - $$$1(Selector.NAVBAR_TOGGLER).each(function (index, element) { - var actualMargin = $$$1(element)[0].style.marginRight; - var calculatedMargin = $$$1(element).css('margin-right'); - $$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this9._scrollbarWidth + "px"); - }); // Adjust body padding - - var actualPadding = document.body.style.paddingRight; - var calculatedPadding = $$$1(document.body).css('padding-right'); - $$$1(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px"); - } - }; + if (this._isBodyOverflowing && !isModalOverflowing) { + this._element.style.paddingRight = this._scrollbarWidth + "px"; + } + }; - _proto._resetScrollbar = function _resetScrollbar() { - // Restore fixed content padding - $$$1(Selector.FIXED_CONTENT).each(function (index, element) { - var padding = $$$1(element).data('padding-right'); + _proto._resetAdjustments = function _resetAdjustments() { + this._element.style.paddingLeft = ''; + this._element.style.paddingRight = ''; + }; - if (typeof padding !== 'undefined') { - $$$1(element).css('padding-right', padding).removeData('padding-right'); - } - }); // Restore sticky content and navbar-toggler margin + _proto._checkScrollbar = function _checkScrollbar() { + var rect = document.body.getBoundingClientRect(); + this._isBodyOverflowing = rect.left + rect.right < window.innerWidth; + this._scrollbarWidth = this._getScrollbarWidth(); + }; - $$$1(Selector.STICKY_CONTENT + ", " + Selector.NAVBAR_TOGGLER).each(function (index, element) { - var margin = $$$1(element).data('margin-right'); + _proto._setScrollbar = function _setScrollbar() { + var _this9 = this; + + if (this._isBodyOverflowing) { + // Note: DOMNode.style.paddingRight returns the actual value or '' if not set + // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set + var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT)); + var stickyContent = [].slice.call(document.querySelectorAll(Selector$5.STICKY_CONTENT)); // Adjust fixed content padding + + $(fixedContent).each(function (index, element) { + var actualPadding = element.style.paddingRight; + var calculatedPadding = $(element).css('padding-right'); + $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px"); + }); // Adjust sticky content margin + + $(stickyContent).each(function (index, element) { + var actualMargin = element.style.marginRight; + var calculatedMargin = $(element).css('margin-right'); + $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px"); + }); // Adjust body padding + + var actualPadding = document.body.style.paddingRight; + var calculatedPadding = $(document.body).css('padding-right'); + $(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px"); + } - if (typeof margin !== 'undefined') { - $$$1(element).css('margin-right', margin).removeData('margin-right'); - } - }); // Restore body padding + $(document.body).addClass(ClassName$5.OPEN); + }; - var padding = $$$1(document.body).data('padding-right'); + _proto._resetScrollbar = function _resetScrollbar() { + // Restore fixed content padding + var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT)); + $(fixedContent).each(function (index, element) { + var padding = $(element).data('padding-right'); + $(element).removeData('padding-right'); + element.style.paddingRight = padding ? padding : ''; + }); // Restore sticky content - if (typeof padding !== 'undefined') { - $$$1(document.body).css('padding-right', padding).removeData('padding-right'); - } - }; + var elements = [].slice.call(document.querySelectorAll("" + Selector$5.STICKY_CONTENT)); + $(elements).each(function (index, element) { + var margin = $(element).data('margin-right'); - _proto._getScrollbarWidth = function _getScrollbarWidth() { - // thx d.walsh - var scrollDiv = document.createElement('div'); - scrollDiv.className = ClassName.SCROLLBAR_MEASURER; - document.body.appendChild(scrollDiv); - var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; - document.body.removeChild(scrollDiv); - return scrollbarWidth; - }; // Static + if (typeof margin !== 'undefined') { + $(element).css('margin-right', margin).removeData('margin-right'); + } + }); // Restore body padding + var padding = $(document.body).data('padding-right'); + $(document.body).removeData('padding-right'); + document.body.style.paddingRight = padding ? padding : ''; + }; - Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) { - return this.each(function () { - var data = $$$1(this).data(DATA_KEY); + _proto._getScrollbarWidth = function _getScrollbarWidth() { + // thx d.walsh + var scrollDiv = document.createElement('div'); + scrollDiv.className = ClassName$5.SCROLLBAR_MEASURER; + document.body.appendChild(scrollDiv); + var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + } // Static + ; - var _config = _objectSpread({}, Default, $$$1(this).data(), typeof config === 'object' && config ? config : {}); + Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) { + return this.each(function () { + var data = $(this).data(DATA_KEY$5); - if (!data) { - data = new Modal(this, _config); - $$$1(this).data(DATA_KEY, data); - } + var _config = _objectSpread({}, Default$3, $(this).data(), typeof config === 'object' && config ? config : {}); - if (typeof config === 'string') { - if (typeof data[config] === 'undefined') { - throw new TypeError("No method named \"" + config + "\""); - } + if (!data) { + data = new Modal(this, _config); + $(this).data(DATA_KEY$5, data); + } - data[config](relatedTarget); - } else if (_config.show) { - data.show(relatedTarget); + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError("No method named \"" + config + "\""); } - }); - }; - _createClass(Modal, null, [{ - key: "VERSION", - get: function get() { - return VERSION; + data[config](relatedTarget); + } else if (_config.show) { + data.show(relatedTarget); } - }, { - key: "Default", - get: function get() { - return Default; - } - }]); + }); + }; - return Modal; - }(); - /** - * ------------------------------------------------------------------------ - * Data Api implementation - * ------------------------------------------------------------------------ - */ + _createClass(Modal, null, [{ + key: "VERSION", + get: function get() { + return VERSION$5; + } + }, { + key: "Default", + get: function get() { + return Default$3; + } + }]); + + return Modal; + }(); + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ - $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { - var _this10 = this; + $(document).on(Event$5.CLICK_DATA_API, Selector$5.DATA_TOGGLE, function (event) { + var _this10 = this; - var target; - var selector = Util.getSelectorFromElement(this); + var target; + var selector = Util.getSelectorFromElement(this); - if (selector) { - target = $$$1(selector)[0]; - } + if (selector) { + target = document.querySelector(selector); + } - var config = $$$1(target).data(DATA_KEY) ? 'toggle' : _objectSpread({}, $$$1(target).data(), $$$1(this).data()); + var config = $(target).data(DATA_KEY$5) ? 'toggle' : _objectSpread({}, $(target).data(), $(this).data()); - if (this.tagName === 'A' || this.tagName === 'AREA') { - event.preventDefault(); + if (this.tagName === 'A' || this.tagName === 'AREA') { + event.preventDefault(); + } + + var $target = $(target).one(Event$5.SHOW, function (showEvent) { + if (showEvent.isDefaultPrevented()) { + // Only register focus restorer if modal will actually get shown + return; } - var $target = $$$1(target).one(Event.SHOW, function (showEvent) { - if (showEvent.isDefaultPrevented()) { - // Only register focus restorer if modal will actually get shown - return; + $target.one(Event$5.HIDDEN, function () { + if ($(_this10).is(':visible')) { + _this10.focus(); } - - $target.one(Event.HIDDEN, function () { - if ($$$1(_this10).is(':visible')) { - _this10.focus(); - } - }); }); - - Modal._jQueryInterface.call($$$1(target), config, this); }); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ - $$$1.fn[NAME] = Modal._jQueryInterface; - $$$1.fn[NAME].Constructor = Modal; + Modal._jQueryInterface.call($(target), config, this); + }); + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ - $$$1.fn[NAME].noConflict = function () { - $$$1.fn[NAME] = JQUERY_NO_CONFLICT; - return Modal._jQueryInterface; - }; + $.fn[NAME$5] = Modal._jQueryInterface; + $.fn[NAME$5].Constructor = Modal; - return Modal; - }($); + $.fn[NAME$5].noConflict = function () { + $.fn[NAME$5] = JQUERY_NO_CONFLICT$5; + return Modal._jQueryInterface; + }; /** * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): tooltip.js + * Bootstrap (v4.3.1): tools/sanitizer.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ - - var Tooltip = function ($$$1) { + var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']; + var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; + var DefaultWhitelist = { + // Global attributes allowed on any supplied element below. + '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN], + a: ['target', 'href', 'title', 'rel'], + area: [], + b: [], + br: [], + col: [], + code: [], + div: [], + em: [], + hr: [], + h1: [], + h2: [], + h3: [], + h4: [], + h5: [], + h6: [], + i: [], + img: ['src', 'alt', 'title', 'width', 'height'], + li: [], + ol: [], + p: [], + pre: [], + s: [], + small: [], + span: [], + sub: [], + sup: [], + strong: [], + u: [], + ul: [] /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ + * A pattern that recognizes a commonly useful subset of URLs that are safe. + * + * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts */ - var NAME = 'tooltip'; - var VERSION = '4.1.1'; - var DATA_KEY = 'bs.tooltip'; - var EVENT_KEY = "." + DATA_KEY; - var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; - var CLASS_PREFIX = 'bs-tooltip'; - var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); - var DefaultType = { - animation: 'boolean', - template: 'string', - title: '(string|element|function)', - trigger: 'string', - delay: '(number|object)', - html: 'boolean', - selector: '(string|boolean)', - placement: '(string|function)', - offset: '(number|string)', - container: '(string|element|boolean)', - fallbackPlacement: '(string|array)', - boundary: '(string|element)' - }; - var AttachmentMap = { - AUTO: 'auto', - TOP: 'top', - RIGHT: 'right', - BOTTOM: 'bottom', - LEFT: 'left' - }; - var Default = { - animation: true, - template: '', - trigger: 'hover focus', - title: '', - delay: 0, - html: false, - selector: false, - placement: 'top', - offset: 0, - container: false, - fallbackPlacement: 'flip', - boundary: 'scrollParent' - }; - var HoverState = { - SHOW: 'show', - OUT: 'out' - }; - var Event = { - HIDE: "hide" + EVENT_KEY, - HIDDEN: "hidden" + EVENT_KEY, - SHOW: "show" + EVENT_KEY, - SHOWN: "shown" + EVENT_KEY, - INSERTED: "inserted" + EVENT_KEY, - CLICK: "click" + EVENT_KEY, - FOCUSIN: "focusin" + EVENT_KEY, - FOCUSOUT: "focusout" + EVENT_KEY, - MOUSEENTER: "mouseenter" + EVENT_KEY, - MOUSELEAVE: "mouseleave" + EVENT_KEY - }; - var ClassName = { - FADE: 'fade', - SHOW: 'show' - }; - var Selector = { - TOOLTIP: '.tooltip', - TOOLTIP_INNER: '.tooltip-inner', - ARROW: '.arrow' - }; - var Trigger = { - HOVER: 'hover', - FOCUS: 'focus', - CLICK: 'click', - MANUAL: 'manual' - /** - * ------------------------------------------------------------------------ - * Class Definition - * ------------------------------------------------------------------------ - */ - }; + }; + var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi; + /** + * A pattern that matches safe data URLs. Only matches image, video and audio types. + * + * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts + */ - var Tooltip = - /*#__PURE__*/ - function () { - function Tooltip(element, config) { - /** - * Check for Popper dependency - * Popper - https://popper.js.org - */ - if (typeof Popper === 'undefined') { - throw new TypeError('Bootstrap tooltips require Popper.js (https://popper.js.org)'); - } // private + var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i; + function allowedAttribute(attr, allowedAttributeList) { + var attrName = attr.nodeName.toLowerCase(); - this._isEnabled = true; - this._timeout = 0; - this._hoverState = ''; - this._activeTrigger = {}; - this._popper = null; // Protected + if (allowedAttributeList.indexOf(attrName) !== -1) { + if (uriAttrs.indexOf(attrName) !== -1) { + return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN)); + } - this.element = element; - this.config = this._getConfig(config); - this.tip = null; + return true; + } - this._setListeners(); - } // Getters + var regExp = allowedAttributeList.filter(function (attrRegex) { + return attrRegex instanceof RegExp; + }); // Check if a regular expression validates the attribute. + + for (var i = 0, l = regExp.length; i < l; i++) { + if (attrName.match(regExp[i])) { + return true; + } + } + return false; + } - var _proto = Tooltip.prototype; + function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) { + if (unsafeHtml.length === 0) { + return unsafeHtml; + } - // Public - _proto.enable = function enable() { - this._isEnabled = true; - }; + if (sanitizeFn && typeof sanitizeFn === 'function') { + return sanitizeFn(unsafeHtml); + } - _proto.disable = function disable() { - this._isEnabled = false; - }; + var domParser = new window.DOMParser(); + var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html'); + var whitelistKeys = Object.keys(whiteList); + var elements = [].slice.call(createdDocument.body.querySelectorAll('*')); - _proto.toggleEnabled = function toggleEnabled() { - this._isEnabled = !this._isEnabled; - }; + var _loop = function _loop(i, len) { + var el = elements[i]; + var elName = el.nodeName.toLowerCase(); - _proto.toggle = function toggle(event) { - if (!this._isEnabled) { - return; + if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) { + el.parentNode.removeChild(el); + return "continue"; + } + + var attributeList = [].slice.call(el.attributes); + var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []); + attributeList.forEach(function (attr) { + if (!allowedAttribute(attr, whitelistedAttributes)) { + el.removeAttribute(attr.nodeName); } + }); + }; - if (event) { - var dataKey = this.constructor.DATA_KEY; - var context = $$$1(event.currentTarget).data(dataKey); + for (var i = 0, len = elements.length; i < len; i++) { + var _ret = _loop(i, len); - if (!context) { - context = new this.constructor(event.currentTarget, this._getDelegateConfig()); - $$$1(event.currentTarget).data(dataKey, context); - } + if (_ret === "continue") continue; + } - context._activeTrigger.click = !context._activeTrigger.click; + return createdDocument.body.innerHTML; + } - if (context._isWithActiveTrigger()) { - context._enter(null, context); - } else { - context._leave(null, context); - } - } else { - if ($$$1(this.getTipElement()).hasClass(ClassName.SHOW)) { - this._leave(null, this); + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ - return; - } + var NAME$6 = 'tooltip'; + var VERSION$6 = '4.3.1'; + var DATA_KEY$6 = 'bs.tooltip'; + var EVENT_KEY$6 = "." + DATA_KEY$6; + var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6]; + var CLASS_PREFIX = 'bs-tooltip'; + var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); + var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']; + var DefaultType$4 = { + animation: 'boolean', + template: 'string', + title: '(string|element|function)', + trigger: 'string', + delay: '(number|object)', + html: 'boolean', + selector: '(string|boolean)', + placement: '(string|function)', + offset: '(number|string|function)', + container: '(string|element|boolean)', + fallbackPlacement: '(string|array)', + boundary: '(string|element)', + sanitize: 'boolean', + sanitizeFn: '(null|function)', + whiteList: 'object' + }; + var AttachmentMap$1 = { + AUTO: 'auto', + TOP: 'top', + RIGHT: 'right', + BOTTOM: 'bottom', + LEFT: 'left' + }; + var Default$4 = { + animation: true, + template: '', + trigger: 'hover focus', + title: '', + delay: 0, + html: false, + selector: false, + placement: 'top', + offset: 0, + container: false, + fallbackPlacement: 'flip', + boundary: 'scrollParent', + sanitize: true, + sanitizeFn: null, + whiteList: DefaultWhitelist + }; + var HoverState = { + SHOW: 'show', + OUT: 'out' + }; + var Event$6 = { + HIDE: "hide" + EVENT_KEY$6, + HIDDEN: "hidden" + EVENT_KEY$6, + SHOW: "show" + EVENT_KEY$6, + SHOWN: "shown" + EVENT_KEY$6, + INSERTED: "inserted" + EVENT_KEY$6, + CLICK: "click" + EVENT_KEY$6, + FOCUSIN: "focusin" + EVENT_KEY$6, + FOCUSOUT: "focusout" + EVENT_KEY$6, + MOUSEENTER: "mouseenter" + EVENT_KEY$6, + MOUSELEAVE: "mouseleave" + EVENT_KEY$6 + }; + var ClassName$6 = { + FADE: 'fade', + SHOW: 'show' + }; + var Selector$6 = { + TOOLTIP: '.tooltip', + TOOLTIP_INNER: '.tooltip-inner', + ARROW: '.arrow' + }; + var Trigger = { + HOVER: 'hover', + FOCUS: 'focus', + CLICK: 'click', + MANUAL: 'manual' + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ - this._enter(null, this); - } - }; + }; - _proto.dispose = function dispose() { - clearTimeout(this._timeout); - $$$1.removeData(this.element, this.constructor.DATA_KEY); - $$$1(this.element).off(this.constructor.EVENT_KEY); - $$$1(this.element).closest('.modal').off('hide.bs.modal'); + var Tooltip = + /*#__PURE__*/ + function () { + function Tooltip(element, config) { + /** + * Check for Popper dependency + * Popper - https://popper.js.org + */ + if (typeof Popper === 'undefined') { + throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)'); + } // private - if (this.tip) { - $$$1(this.tip).remove(); - } - this._isEnabled = null; - this._timeout = null; - this._hoverState = null; - this._activeTrigger = null; + this._isEnabled = true; + this._timeout = 0; + this._hoverState = ''; + this._activeTrigger = {}; + this._popper = null; // Protected - if (this._popper !== null) { - this._popper.destroy(); - } + this.element = element; + this.config = this._getConfig(config); + this.tip = null; - this._popper = null; - this.element = null; - this.config = null; - this.tip = null; - }; + this._setListeners(); + } // Getters - _proto.show = function show() { - var _this = this; - if ($$$1(this.element).css('display') === 'none') { - throw new Error('Please use show on visible elements'); - } + var _proto = Tooltip.prototype; - var showEvent = $$$1.Event(this.constructor.Event.SHOW); + // Public + _proto.enable = function enable() { + this._isEnabled = true; + }; - if (this.isWithContent() && this._isEnabled) { - $$$1(this.element).trigger(showEvent); - var isInTheDom = $$$1.contains(this.element.ownerDocument.documentElement, this.element); + _proto.disable = function disable() { + this._isEnabled = false; + }; - if (showEvent.isDefaultPrevented() || !isInTheDom) { - return; - } + _proto.toggleEnabled = function toggleEnabled() { + this._isEnabled = !this._isEnabled; + }; - var tip = this.getTipElement(); - var tipId = Util.getUID(this.constructor.NAME); - tip.setAttribute('id', tipId); - this.element.setAttribute('aria-describedby', tipId); - this.setContent(); + _proto.toggle = function toggle(event) { + if (!this._isEnabled) { + return; + } - if (this.config.animation) { - $$$1(tip).addClass(ClassName.FADE); - } + if (event) { + var dataKey = this.constructor.DATA_KEY; + var context = $(event.currentTarget).data(dataKey); - var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $(event.currentTarget).data(dataKey, context); + } - var attachment = this._getAttachment(placement); + context._activeTrigger.click = !context._activeTrigger.click; - this.addAttachmentClass(attachment); - var container = this.config.container === false ? document.body : $$$1(this.config.container); - $$$1(tip).data(this.constructor.DATA_KEY, this); + if (context._isWithActiveTrigger()) { + context._enter(null, context); + } else { + context._leave(null, context); + } + } else { + if ($(this.getTipElement()).hasClass(ClassName$6.SHOW)) { + this._leave(null, this); - if (!$$$1.contains(this.element.ownerDocument.documentElement, this.tip)) { - $$$1(tip).appendTo(container); - } + return; + } - $$$1(this.element).trigger(this.constructor.Event.INSERTED); - this._popper = new Popper(this.element, tip, { - placement: attachment, - modifiers: { - offset: { - offset: this.config.offset - }, - flip: { - behavior: this.config.fallbackPlacement - }, - arrow: { - element: Selector.ARROW - }, - preventOverflow: { - boundariesElement: this.config.boundary - } - }, - onCreate: function onCreate(data) { - if (data.originalPlacement !== data.placement) { - _this._handlePopperPlacementChange(data); - } - }, - onUpdate: function onUpdate(data) { - _this._handlePopperPlacementChange(data); - } - }); - $$$1(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra - // empty mouseover listeners to the body's immediate children; - // only needed because of broken event delegation on iOS - // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html + this._enter(null, this); + } + }; - if ('ontouchstart' in document.documentElement) { - $$$1(document.body).children().on('mouseover', null, $$$1.noop); - } + _proto.dispose = function dispose() { + clearTimeout(this._timeout); + $.removeData(this.element, this.constructor.DATA_KEY); + $(this.element).off(this.constructor.EVENT_KEY); + $(this.element).closest('.modal').off('hide.bs.modal'); - var complete = function complete() { - if (_this.config.animation) { - _this._fixTransition(); - } + if (this.tip) { + $(this.tip).remove(); + } - var prevHoverState = _this._hoverState; - _this._hoverState = null; - $$$1(_this.element).trigger(_this.constructor.Event.SHOWN); + this._isEnabled = null; + this._timeout = null; + this._hoverState = null; + this._activeTrigger = null; - if (prevHoverState === HoverState.OUT) { - _this._leave(null, _this); - } - }; + if (this._popper !== null) { + this._popper.destroy(); + } - if ($$$1(this.tip).hasClass(ClassName.FADE)) { - var transitionDuration = Util.getTransitionDurationFromElement(this.tip); - $$$1(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); - } else { - complete(); - } - } - }; + this._popper = null; + this.element = null; + this.config = null; + this.tip = null; + }; - _proto.hide = function hide(callback) { - var _this2 = this; + _proto.show = function show() { + var _this = this; - var tip = this.getTipElement(); - var hideEvent = $$$1.Event(this.constructor.Event.HIDE); + if ($(this.element).css('display') === 'none') { + throw new Error('Please use show on visible elements'); + } - var complete = function complete() { - if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) { - tip.parentNode.removeChild(tip); - } + var showEvent = $.Event(this.constructor.Event.SHOW); - _this2._cleanTipClass(); + if (this.isWithContent() && this._isEnabled) { + $(this.element).trigger(showEvent); + var shadowRoot = Util.findShadowRoot(this.element); + var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element); - _this2.element.removeAttribute('aria-describedby'); + if (showEvent.isDefaultPrevented() || !isInTheDom) { + return; + } - $$$1(_this2.element).trigger(_this2.constructor.Event.HIDDEN); + var tip = this.getTipElement(); + var tipId = Util.getUID(this.constructor.NAME); + tip.setAttribute('id', tipId); + this.element.setAttribute('aria-describedby', tipId); + this.setContent(); - if (_this2._popper !== null) { - _this2._popper.destroy(); - } + if (this.config.animation) { + $(tip).addClass(ClassName$6.FADE); + } - if (callback) { - callback(); - } - }; + var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; - $$$1(this.element).trigger(hideEvent); + var attachment = this._getAttachment(placement); - if (hideEvent.isDefaultPrevented()) { - return; + this.addAttachmentClass(attachment); + + var container = this._getContainer(); + + $(tip).data(this.constructor.DATA_KEY, this); + + if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) { + $(tip).appendTo(container); } - $$$1(tip).removeClass(ClassName.SHOW); // If this is a touch-enabled device we remove the extra - // empty mouseover listeners we added for iOS support + $(this.element).trigger(this.constructor.Event.INSERTED); + this._popper = new Popper(this.element, tip, { + placement: attachment, + modifiers: { + offset: this._getOffset(), + flip: { + behavior: this.config.fallbackPlacement + }, + arrow: { + element: Selector$6.ARROW + }, + preventOverflow: { + boundariesElement: this.config.boundary + } + }, + onCreate: function onCreate(data) { + if (data.originalPlacement !== data.placement) { + _this._handlePopperPlacementChange(data); + } + }, + onUpdate: function onUpdate(data) { + return _this._handlePopperPlacementChange(data); + } + }); + $(tip).addClass(ClassName$6.SHOW); // If this is a touch-enabled device we add extra + // empty mouseover listeners to the body's immediate children; + // only needed because of broken event delegation on iOS + // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html if ('ontouchstart' in document.documentElement) { - $$$1(document.body).children().off('mouseover', null, $$$1.noop); + $(document.body).children().on('mouseover', null, $.noop); } - this._activeTrigger[Trigger.CLICK] = false; - this._activeTrigger[Trigger.FOCUS] = false; - this._activeTrigger[Trigger.HOVER] = false; + var complete = function complete() { + if (_this.config.animation) { + _this._fixTransition(); + } - if ($$$1(this.tip).hasClass(ClassName.FADE)) { - var transitionDuration = Util.getTransitionDurationFromElement(tip); - $$$1(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); + var prevHoverState = _this._hoverState; + _this._hoverState = null; + $(_this.element).trigger(_this.constructor.Event.SHOWN); + + if (prevHoverState === HoverState.OUT) { + _this._leave(null, _this); + } + }; + + if ($(this.tip).hasClass(ClassName$6.FADE)) { + var transitionDuration = Util.getTransitionDurationFromElement(this.tip); + $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); } else { complete(); } + } + }; - this._hoverState = ''; - }; + _proto.hide = function hide(callback) { + var _this2 = this; + + var tip = this.getTipElement(); + var hideEvent = $.Event(this.constructor.Event.HIDE); - _proto.update = function update() { - if (this._popper !== null) { - this._popper.scheduleUpdate(); + var complete = function complete() { + if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) { + tip.parentNode.removeChild(tip); } - }; // Protected + _this2._cleanTipClass(); - _proto.isWithContent = function isWithContent() { - return Boolean(this.getTitle()); - }; + _this2.element.removeAttribute('aria-describedby'); - _proto.addAttachmentClass = function addAttachmentClass(attachment) { - $$$1(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); - }; + $(_this2.element).trigger(_this2.constructor.Event.HIDDEN); - _proto.getTipElement = function getTipElement() { - this.tip = this.tip || $$$1(this.config.template)[0]; - return this.tip; - }; + if (_this2._popper !== null) { + _this2._popper.destroy(); + } - _proto.setContent = function setContent() { - var $tip = $$$1(this.getTipElement()); - this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle()); - $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW); + if (callback) { + callback(); + } }; - _proto.setElementContent = function setElementContent($element, content) { - var html = this.config.html; + $(this.element).trigger(hideEvent); - if (typeof content === 'object' && (content.nodeType || content.jquery)) { - // Content is a DOM node or a jQuery - if (html) { - if (!$$$1(content).parent().is($element)) { - $element.empty().append(content); - } - } else { - $element.text($$$1(content).text()); + if (hideEvent.isDefaultPrevented()) { + return; + } + + $(tip).removeClass(ClassName$6.SHOW); // If this is a touch-enabled device we remove the extra + // empty mouseover listeners we added for iOS support + + if ('ontouchstart' in document.documentElement) { + $(document.body).children().off('mouseover', null, $.noop); + } + + this._activeTrigger[Trigger.CLICK] = false; + this._activeTrigger[Trigger.FOCUS] = false; + this._activeTrigger[Trigger.HOVER] = false; + + if ($(this.tip).hasClass(ClassName$6.FADE)) { + var transitionDuration = Util.getTransitionDurationFromElement(tip); + $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); + } else { + complete(); + } + + this._hoverState = ''; + }; + + _proto.update = function update() { + if (this._popper !== null) { + this._popper.scheduleUpdate(); + } + } // Protected + ; + + _proto.isWithContent = function isWithContent() { + return Boolean(this.getTitle()); + }; + + _proto.addAttachmentClass = function addAttachmentClass(attachment) { + $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); + }; + + _proto.getTipElement = function getTipElement() { + this.tip = this.tip || $(this.config.template)[0]; + return this.tip; + }; + + _proto.setContent = function setContent() { + var tip = this.getTipElement(); + this.setElementContent($(tip.querySelectorAll(Selector$6.TOOLTIP_INNER)), this.getTitle()); + $(tip).removeClass(ClassName$6.FADE + " " + ClassName$6.SHOW); + }; + + _proto.setElementContent = function setElementContent($element, content) { + if (typeof content === 'object' && (content.nodeType || content.jquery)) { + // Content is a DOM node or a jQuery + if (this.config.html) { + if (!$(content).parent().is($element)) { + $element.empty().append(content); } } else { - $element[html ? 'html' : 'text'](content); + $element.text($(content).text()); } - }; - _proto.getTitle = function getTitle() { - var title = this.element.getAttribute('data-original-title'); + return; + } - if (!title) { - title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; + if (this.config.html) { + if (this.config.sanitize) { + content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn); } - return title; - }; // Private + $element.html(content); + } else { + $element.text(content); + } + }; + _proto.getTitle = function getTitle() { + var title = this.element.getAttribute('data-original-title'); - _proto._getAttachment = function _getAttachment(placement) { - return AttachmentMap[placement.toUpperCase()]; - }; + if (!title) { + title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; + } - _proto._setListeners = function _setListeners() { - var _this3 = this; - - var triggers = this.config.trigger.split(' '); - triggers.forEach(function (trigger) { - if (trigger === 'click') { - $$$1(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) { - return _this3.toggle(event); - }); - } else if (trigger !== Trigger.MANUAL) { - var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN; - var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT; - $$$1(_this3.element).on(eventIn, _this3.config.selector, function (event) { - return _this3._enter(event); - }).on(eventOut, _this3.config.selector, function (event) { - return _this3._leave(event); - }); - } + return title; + } // Private + ; - $$$1(_this3.element).closest('.modal').on('hide.bs.modal', function () { - return _this3.hide(); - }); - }); + _proto._getOffset = function _getOffset() { + var _this3 = this; + + var offset = {}; + + if (typeof this.config.offset === 'function') { + offset.fn = function (data) { + data.offsets = _objectSpread({}, data.offsets, _this3.config.offset(data.offsets, _this3.element) || {}); + return data; + }; + } else { + offset.offset = this.config.offset; + } + + return offset; + }; + + _proto._getContainer = function _getContainer() { + if (this.config.container === false) { + return document.body; + } + + if (Util.isElement(this.config.container)) { + return $(this.config.container); + } - if (this.config.selector) { - this.config = _objectSpread({}, this.config, { - trigger: 'manual', - selector: '' + return $(document).find(this.config.container); + }; + + _proto._getAttachment = function _getAttachment(placement) { + return AttachmentMap$1[placement.toUpperCase()]; + }; + + _proto._setListeners = function _setListeners() { + var _this4 = this; + + var triggers = this.config.trigger.split(' '); + triggers.forEach(function (trigger) { + if (trigger === 'click') { + $(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) { + return _this4.toggle(event); + }); + } else if (trigger !== Trigger.MANUAL) { + var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN; + var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT; + $(_this4.element).on(eventIn, _this4.config.selector, function (event) { + return _this4._enter(event); + }).on(eventOut, _this4.config.selector, function (event) { + return _this4._leave(event); }); - } else { - this._fixTitle(); } - }; + }); + $(this.element).closest('.modal').on('hide.bs.modal', function () { + if (_this4.element) { + _this4.hide(); + } + }); - _proto._fixTitle = function _fixTitle() { - var titleType = typeof this.element.getAttribute('data-original-title'); + if (this.config.selector) { + this.config = _objectSpread({}, this.config, { + trigger: 'manual', + selector: '' + }); + } else { + this._fixTitle(); + } + }; - if (this.element.getAttribute('title') || titleType !== 'string') { - this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); - this.element.setAttribute('title', ''); - } - }; + _proto._fixTitle = function _fixTitle() { + var titleType = typeof this.element.getAttribute('data-original-title'); - _proto._enter = function _enter(event, context) { - var dataKey = this.constructor.DATA_KEY; - context = context || $$$1(event.currentTarget).data(dataKey); + if (this.element.getAttribute('title') || titleType !== 'string') { + this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); + this.element.setAttribute('title', ''); + } + }; - if (!context) { - context = new this.constructor(event.currentTarget, this._getDelegateConfig()); - $$$1(event.currentTarget).data(dataKey, context); - } + _proto._enter = function _enter(event, context) { + var dataKey = this.constructor.DATA_KEY; + context = context || $(event.currentTarget).data(dataKey); - if (event) { - context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; - } + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $(event.currentTarget).data(dataKey, context); + } - if ($$$1(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) { - context._hoverState = HoverState.SHOW; - return; - } + if (event) { + context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; + } - clearTimeout(context._timeout); + if ($(context.getTipElement()).hasClass(ClassName$6.SHOW) || context._hoverState === HoverState.SHOW) { context._hoverState = HoverState.SHOW; + return; + } + + clearTimeout(context._timeout); + context._hoverState = HoverState.SHOW; + + if (!context.config.delay || !context.config.delay.show) { + context.show(); + return; + } - if (!context.config.delay || !context.config.delay.show) { + context._timeout = setTimeout(function () { + if (context._hoverState === HoverState.SHOW) { context.show(); - return; } + }, context.config.delay.show); + }; - context._timeout = setTimeout(function () { - if (context._hoverState === HoverState.SHOW) { - context.show(); - } - }, context.config.delay.show); - }; + _proto._leave = function _leave(event, context) { + var dataKey = this.constructor.DATA_KEY; + context = context || $(event.currentTarget).data(dataKey); - _proto._leave = function _leave(event, context) { - var dataKey = this.constructor.DATA_KEY; - context = context || $$$1(event.currentTarget).data(dataKey); + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $(event.currentTarget).data(dataKey, context); + } - if (!context) { - context = new this.constructor(event.currentTarget, this._getDelegateConfig()); - $$$1(event.currentTarget).data(dataKey, context); - } + if (event) { + context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; + } - if (event) { - context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; - } + if (context._isWithActiveTrigger()) { + return; + } - if (context._isWithActiveTrigger()) { - return; - } + clearTimeout(context._timeout); + context._hoverState = HoverState.OUT; - clearTimeout(context._timeout); - context._hoverState = HoverState.OUT; + if (!context.config.delay || !context.config.delay.hide) { + context.hide(); + return; + } - if (!context.config.delay || !context.config.delay.hide) { + context._timeout = setTimeout(function () { + if (context._hoverState === HoverState.OUT) { context.hide(); - return; } + }, context.config.delay.hide); + }; - context._timeout = setTimeout(function () { - if (context._hoverState === HoverState.OUT) { - context.hide(); - } - }, context.config.delay.hide); - }; + _proto._isWithActiveTrigger = function _isWithActiveTrigger() { + for (var trigger in this._activeTrigger) { + if (this._activeTrigger[trigger]) { + return true; + } + } - _proto._isWithActiveTrigger = function _isWithActiveTrigger() { - for (var trigger in this._activeTrigger) { - if (this._activeTrigger[trigger]) { - return true; - } + return false; + }; + + _proto._getConfig = function _getConfig(config) { + var dataAttributes = $(this.element).data(); + Object.keys(dataAttributes).forEach(function (dataAttr) { + if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) { + delete dataAttributes[dataAttr]; } + }); + config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {}); - return false; - }; + if (typeof config.delay === 'number') { + config.delay = { + show: config.delay, + hide: config.delay + }; + } - _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, this.constructor.Default, $$$1(this.element).data(), typeof config === 'object' && config ? config : {}); + if (typeof config.title === 'number') { + config.title = config.title.toString(); + } - if (typeof config.delay === 'number') { - config.delay = { - show: config.delay, - hide: config.delay - }; - } + if (typeof config.content === 'number') { + config.content = config.content.toString(); + } - if (typeof config.title === 'number') { - config.title = config.title.toString(); - } + Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType); - if (typeof config.content === 'number') { - config.content = config.content.toString(); - } + if (config.sanitize) { + config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn); + } - Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); - return config; - }; + return config; + }; - _proto._getDelegateConfig = function _getDelegateConfig() { - var config = {}; + _proto._getDelegateConfig = function _getDelegateConfig() { + var config = {}; - if (this.config) { - for (var key in this.config) { - if (this.constructor.Default[key] !== this.config[key]) { - config[key] = this.config[key]; - } + if (this.config) { + for (var key in this.config) { + if (this.constructor.Default[key] !== this.config[key]) { + config[key] = this.config[key]; } } + } - return config; - }; - - _proto._cleanTipClass = function _cleanTipClass() { - var $tip = $$$1(this.getTipElement()); - var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX); + return config; + }; - if (tabClass !== null && tabClass.length > 0) { - $tip.removeClass(tabClass.join('')); - } - }; + _proto._cleanTipClass = function _cleanTipClass() { + var $tip = $(this.getTipElement()); + var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX); - _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(data) { - this._cleanTipClass(); + if (tabClass !== null && tabClass.length) { + $tip.removeClass(tabClass.join('')); + } + }; - this.addAttachmentClass(this._getAttachment(data.placement)); - }; + _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) { + var popperInstance = popperData.instance; + this.tip = popperInstance.popper; - _proto._fixTransition = function _fixTransition() { - var tip = this.getTipElement(); - var initConfigAnimation = this.config.animation; + this._cleanTipClass(); - if (tip.getAttribute('x-placement') !== null) { - return; - } + this.addAttachmentClass(this._getAttachment(popperData.placement)); + }; - $$$1(tip).removeClass(ClassName.FADE); - this.config.animation = false; - this.hide(); - this.show(); - this.config.animation = initConfigAnimation; - }; // Static + _proto._fixTransition = function _fixTransition() { + var tip = this.getTipElement(); + var initConfigAnimation = this.config.animation; + if (tip.getAttribute('x-placement') !== null) { + return; + } - Tooltip._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $$$1(this).data(DATA_KEY); + $(tip).removeClass(ClassName$6.FADE); + this.config.animation = false; + this.hide(); + this.show(); + this.config.animation = initConfigAnimation; + } // Static + ; - var _config = typeof config === 'object' && config; + Tooltip._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY$6); - if (!data && /dispose|hide/.test(config)) { - return; - } + var _config = typeof config === 'object' && config; - if (!data) { - data = new Tooltip(this, _config); - $$$1(this).data(DATA_KEY, data); - } + if (!data && /dispose|hide/.test(config)) { + return; + } - if (typeof config === 'string') { - if (typeof data[config] === 'undefined') { - throw new TypeError("No method named \"" + config + "\""); - } + if (!data) { + data = new Tooltip(this, _config); + $(this).data(DATA_KEY$6, data); + } - data[config](); + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError("No method named \"" + config + "\""); } - }); - }; - _createClass(Tooltip, null, [{ - key: "VERSION", - get: function get() { - return VERSION; - } - }, { - key: "Default", - get: function get() { - return Default; - } - }, { - key: "NAME", - get: function get() { - return NAME; + data[config](); } - }, { - key: "DATA_KEY", - get: function get() { - return DATA_KEY; - } - }, { - key: "Event", - get: function get() { - return Event; - } - }, { - key: "EVENT_KEY", - get: function get() { - return EVENT_KEY; - } - }, { - key: "DefaultType", - get: function get() { - return DefaultType; - } - }]); + }); + }; - return Tooltip; - }(); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ + _createClass(Tooltip, null, [{ + key: "VERSION", + get: function get() { + return VERSION$6; + } + }, { + key: "Default", + get: function get() { + return Default$4; + } + }, { + key: "NAME", + get: function get() { + return NAME$6; + } + }, { + key: "DATA_KEY", + get: function get() { + return DATA_KEY$6; + } + }, { + key: "Event", + get: function get() { + return Event$6; + } + }, { + key: "EVENT_KEY", + get: function get() { + return EVENT_KEY$6; + } + }, { + key: "DefaultType", + get: function get() { + return DefaultType$4; + } + }]); + return Tooltip; + }(); + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ - $$$1.fn[NAME] = Tooltip._jQueryInterface; - $$$1.fn[NAME].Constructor = Tooltip; - $$$1.fn[NAME].noConflict = function () { - $$$1.fn[NAME] = JQUERY_NO_CONFLICT; - return Tooltip._jQueryInterface; - }; + $.fn[NAME$6] = Tooltip._jQueryInterface; + $.fn[NAME$6].Constructor = Tooltip; - return Tooltip; - }($, Popper); + $.fn[NAME$6].noConflict = function () { + $.fn[NAME$6] = JQUERY_NO_CONFLICT$6; + return Tooltip._jQueryInterface; + }; /** - * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): popover.js - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * -------------------------------------------------------------------------- + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ */ - var Popover = function ($$$1) { + var NAME$7 = 'popover'; + var VERSION$7 = '4.3.1'; + var DATA_KEY$7 = 'bs.popover'; + var EVENT_KEY$7 = "." + DATA_KEY$7; + var JQUERY_NO_CONFLICT$7 = $.fn[NAME$7]; + var CLASS_PREFIX$1 = 'bs-popover'; + var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g'); + + var Default$5 = _objectSpread({}, Tooltip.Default, { + placement: 'right', + trigger: 'click', + content: '', + template: '' + }); + + var DefaultType$5 = _objectSpread({}, Tooltip.DefaultType, { + content: '(string|element|function)' + }); + + var ClassName$7 = { + FADE: 'fade', + SHOW: 'show' + }; + var Selector$7 = { + TITLE: '.popover-header', + CONTENT: '.popover-body' + }; + var Event$7 = { + HIDE: "hide" + EVENT_KEY$7, + HIDDEN: "hidden" + EVENT_KEY$7, + SHOW: "show" + EVENT_KEY$7, + SHOWN: "shown" + EVENT_KEY$7, + INSERTED: "inserted" + EVENT_KEY$7, + CLICK: "click" + EVENT_KEY$7, + FOCUSIN: "focusin" + EVENT_KEY$7, + FOCUSOUT: "focusout" + EVENT_KEY$7, + MOUSEENTER: "mouseenter" + EVENT_KEY$7, + MOUSELEAVE: "mouseleave" + EVENT_KEY$7 /** * ------------------------------------------------------------------------ - * Constants + * Class Definition * ------------------------------------------------------------------------ */ - var NAME = 'popover'; - var VERSION = '4.1.1'; - var DATA_KEY = 'bs.popover'; - var EVENT_KEY = "." + DATA_KEY; - var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; - var CLASS_PREFIX = 'bs-popover'; - var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); - - var Default = _objectSpread({}, Tooltip.Default, { - placement: 'right', - trigger: 'click', - content: '', - template: '' - }); - var DefaultType = _objectSpread({}, Tooltip.DefaultType, { - content: '(string|element|function)' - }); + }; + + var Popover = + /*#__PURE__*/ + function (_Tooltip) { + _inheritsLoose(Popover, _Tooltip); - var ClassName = { - FADE: 'fade', - SHOW: 'show' + function Popover() { + return _Tooltip.apply(this, arguments) || this; + } + + var _proto = Popover.prototype; + + // Overrides + _proto.isWithContent = function isWithContent() { + return this.getTitle() || this._getContent(); }; - var Selector = { - TITLE: '.popover-header', - CONTENT: '.popover-body' + + _proto.addAttachmentClass = function addAttachmentClass(attachment) { + $(this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment); }; - var Event = { - HIDE: "hide" + EVENT_KEY, - HIDDEN: "hidden" + EVENT_KEY, - SHOW: "show" + EVENT_KEY, - SHOWN: "shown" + EVENT_KEY, - INSERTED: "inserted" + EVENT_KEY, - CLICK: "click" + EVENT_KEY, - FOCUSIN: "focusin" + EVENT_KEY, - FOCUSOUT: "focusout" + EVENT_KEY, - MOUSEENTER: "mouseenter" + EVENT_KEY, - MOUSELEAVE: "mouseleave" + EVENT_KEY - /** - * ------------------------------------------------------------------------ - * Class Definition - * ------------------------------------------------------------------------ - */ + _proto.getTipElement = function getTipElement() { + this.tip = this.tip || $(this.config.template)[0]; + return this.tip; }; - var Popover = - /*#__PURE__*/ - function (_Tooltip) { - _inheritsLoose(Popover, _Tooltip); + _proto.setContent = function setContent() { + var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events + + this.setElementContent($tip.find(Selector$7.TITLE), this.getTitle()); - function Popover() { - return _Tooltip.apply(this, arguments) || this; + var content = this._getContent(); + + if (typeof content === 'function') { + content = content.call(this.element); } - var _proto = Popover.prototype; + this.setElementContent($tip.find(Selector$7.CONTENT), content); + $tip.removeClass(ClassName$7.FADE + " " + ClassName$7.SHOW); + } // Private + ; - // Overrides - _proto.isWithContent = function isWithContent() { - return this.getTitle() || this._getContent(); - }; + _proto._getContent = function _getContent() { + return this.element.getAttribute('data-content') || this.config.content; + }; - _proto.addAttachmentClass = function addAttachmentClass(attachment) { - $$$1(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); - }; + _proto._cleanTipClass = function _cleanTipClass() { + var $tip = $(this.getTipElement()); + var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1); - _proto.getTipElement = function getTipElement() { - this.tip = this.tip || $$$1(this.config.template)[0]; - return this.tip; - }; + if (tabClass !== null && tabClass.length > 0) { + $tip.removeClass(tabClass.join('')); + } + } // Static + ; - _proto.setContent = function setContent() { - var $tip = $$$1(this.getTipElement()); // We use append for html objects to maintain js events + Popover._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY$7); - this.setElementContent($tip.find(Selector.TITLE), this.getTitle()); + var _config = typeof config === 'object' ? config : null; - var content = this._getContent(); + if (!data && /dispose|hide/.test(config)) { + return; + } - if (typeof content === 'function') { - content = content.call(this.element); + if (!data) { + data = new Popover(this, _config); + $(this).data(DATA_KEY$7, data); } - this.setElementContent($tip.find(Selector.CONTENT), content); - $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW); - }; // Private + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError("No method named \"" + config + "\""); + } + data[config](); + } + }); + }; - _proto._getContent = function _getContent() { - return this.element.getAttribute('data-content') || this.config.content; - }; + _createClass(Popover, null, [{ + key: "VERSION", + // Getters + get: function get() { + return VERSION$7; + } + }, { + key: "Default", + get: function get() { + return Default$5; + } + }, { + key: "NAME", + get: function get() { + return NAME$7; + } + }, { + key: "DATA_KEY", + get: function get() { + return DATA_KEY$7; + } + }, { + key: "Event", + get: function get() { + return Event$7; + } + }, { + key: "EVENT_KEY", + get: function get() { + return EVENT_KEY$7; + } + }, { + key: "DefaultType", + get: function get() { + return DefaultType$5; + } + }]); - _proto._cleanTipClass = function _cleanTipClass() { - var $tip = $$$1(this.getTipElement()); - var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX); + return Popover; + }(Tooltip); + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ - if (tabClass !== null && tabClass.length > 0) { - $tip.removeClass(tabClass.join('')); - } - }; // Static + $.fn[NAME$7] = Popover._jQueryInterface; + $.fn[NAME$7].Constructor = Popover; - Popover._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $$$1(this).data(DATA_KEY); + $.fn[NAME$7].noConflict = function () { + $.fn[NAME$7] = JQUERY_NO_CONFLICT$7; + return Popover._jQueryInterface; + }; - var _config = typeof config === 'object' ? config : null; + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ - if (!data && /destroy|hide/.test(config)) { - return; - } + var NAME$8 = 'scrollspy'; + var VERSION$8 = '4.3.1'; + var DATA_KEY$8 = 'bs.scrollspy'; + var EVENT_KEY$8 = "." + DATA_KEY$8; + var DATA_API_KEY$6 = '.data-api'; + var JQUERY_NO_CONFLICT$8 = $.fn[NAME$8]; + var Default$6 = { + offset: 10, + method: 'auto', + target: '' + }; + var DefaultType$6 = { + offset: 'number', + method: 'string', + target: '(string|element)' + }; + var Event$8 = { + ACTIVATE: "activate" + EVENT_KEY$8, + SCROLL: "scroll" + EVENT_KEY$8, + LOAD_DATA_API: "load" + EVENT_KEY$8 + DATA_API_KEY$6 + }; + var ClassName$8 = { + DROPDOWN_ITEM: 'dropdown-item', + DROPDOWN_MENU: 'dropdown-menu', + ACTIVE: 'active' + }; + var Selector$8 = { + DATA_SPY: '[data-spy="scroll"]', + ACTIVE: '.active', + NAV_LIST_GROUP: '.nav, .list-group', + NAV_LINKS: '.nav-link', + NAV_ITEMS: '.nav-item', + LIST_ITEMS: '.list-group-item', + DROPDOWN: '.dropdown', + DROPDOWN_ITEMS: '.dropdown-item', + DROPDOWN_TOGGLE: '.dropdown-toggle' + }; + var OffsetMethod = { + OFFSET: 'offset', + POSITION: 'position' + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ - if (!data) { - data = new Popover(this, _config); - $$$1(this).data(DATA_KEY, data); - } + }; - if (typeof config === 'string') { - if (typeof data[config] === 'undefined') { - throw new TypeError("No method named \"" + config + "\""); - } + var ScrollSpy = + /*#__PURE__*/ + function () { + function ScrollSpy(element, config) { + var _this = this; - data[config](); - } - }); - }; + this._element = element; + this._scrollElement = element.tagName === 'BODY' ? window : element; + this._config = this._getConfig(config); + this._selector = this._config.target + " " + Selector$8.NAV_LINKS + "," + (this._config.target + " " + Selector$8.LIST_ITEMS + ",") + (this._config.target + " " + Selector$8.DROPDOWN_ITEMS); + this._offsets = []; + this._targets = []; + this._activeTarget = null; + this._scrollHeight = 0; + $(this._scrollElement).on(Event$8.SCROLL, function (event) { + return _this._process(event); + }); + this.refresh(); - _createClass(Popover, null, [{ - key: "VERSION", - // Getters - get: function get() { - return VERSION; - } - }, { - key: "Default", - get: function get() { - return Default; - } - }, { - key: "NAME", - get: function get() { - return NAME; - } - }, { - key: "DATA_KEY", - get: function get() { - return DATA_KEY; - } - }, { - key: "Event", - get: function get() { - return Event; - } - }, { - key: "EVENT_KEY", - get: function get() { - return EVENT_KEY; - } - }, { - key: "DefaultType", - get: function get() { - return DefaultType; + this._process(); + } // Getters + + + var _proto = ScrollSpy.prototype; + + // Public + _proto.refresh = function refresh() { + var _this2 = this; + + var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION; + var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; + var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; + this._offsets = []; + this._targets = []; + this._scrollHeight = this._getScrollHeight(); + var targets = [].slice.call(document.querySelectorAll(this._selector)); + targets.map(function (element) { + var target; + var targetSelector = Util.getSelectorFromElement(element); + + if (targetSelector) { + target = document.querySelector(targetSelector); } - }]); - return Popover; - }(Tooltip); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ + if (target) { + var targetBCR = target.getBoundingClientRect(); + if (targetBCR.width || targetBCR.height) { + // TODO (fat): remove sketch reliance on jQuery position/offset + return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; + } + } - $$$1.fn[NAME] = Popover._jQueryInterface; - $$$1.fn[NAME].Constructor = Popover; + return null; + }).filter(function (item) { + return item; + }).sort(function (a, b) { + return a[0] - b[0]; + }).forEach(function (item) { + _this2._offsets.push(item[0]); - $$$1.fn[NAME].noConflict = function () { - $$$1.fn[NAME] = JQUERY_NO_CONFLICT; - return Popover._jQueryInterface; + _this2._targets.push(item[1]); + }); }; - return Popover; - }($); + _proto.dispose = function dispose() { + $.removeData(this._element, DATA_KEY$8); + $(this._scrollElement).off(EVENT_KEY$8); + this._element = null; + this._scrollElement = null; + this._config = null; + this._selector = null; + this._offsets = null; + this._targets = null; + this._activeTarget = null; + this._scrollHeight = null; + } // Private + ; - /** - * -------------------------------------------------------------------------- - * Bootstrap (v4.1.1): scrollspy.js - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * -------------------------------------------------------------------------- - */ + _proto._getConfig = function _getConfig(config) { + config = _objectSpread({}, Default$6, typeof config === 'object' && config ? config : {}); + + if (typeof config.target !== 'string') { + var id = $(config.target).attr('id'); + + if (!id) { + id = Util.getUID(NAME$8); + $(config.target).attr('id', id); + } + + config.target = "#" + id; + } - var ScrollSpy = function ($$$1) { - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - var NAME = 'scrollspy'; - var VERSION = '4.1.1'; - var DATA_KEY = 'bs.scrollspy'; - var EVENT_KEY = "." + DATA_KEY; - var DATA_API_KEY = '.data-api'; - var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; - var Default = { - offset: 10, - method: 'auto', - target: '' + Util.typeCheckConfig(NAME$8, config, DefaultType$6); + return config; }; - var DefaultType = { - offset: 'number', - method: 'string', - target: '(string|element)' - }; - var Event = { - ACTIVATE: "activate" + EVENT_KEY, - SCROLL: "scroll" + EVENT_KEY, - LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY - }; - var ClassName = { - DROPDOWN_ITEM: 'dropdown-item', - DROPDOWN_MENU: 'dropdown-menu', - ACTIVE: 'active' + + _proto._getScrollTop = function _getScrollTop() { + return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop; }; - var Selector = { - DATA_SPY: '[data-spy="scroll"]', - ACTIVE: '.active', - NAV_LIST_GROUP: '.nav, .list-group', - NAV_LINKS: '.nav-link', - NAV_ITEMS: '.nav-item', - LIST_ITEMS: '.list-group-item', - DROPDOWN: '.dropdown', - DROPDOWN_ITEMS: '.dropdown-item', - DROPDOWN_TOGGLE: '.dropdown-toggle' + + _proto._getScrollHeight = function _getScrollHeight() { + return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); }; - var OffsetMethod = { - OFFSET: 'offset', - POSITION: 'position' - /** - * ------------------------------------------------------------------------ - * Class Definition - * ------------------------------------------------------------------------ - */ + _proto._getOffsetHeight = function _getOffsetHeight() { + return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height; }; - var ScrollSpy = - /*#__PURE__*/ - function () { - function ScrollSpy(element, config) { - var _this = this; - - this._element = element; - this._scrollElement = element.tagName === 'BODY' ? window : element; - this._config = this._getConfig(config); - this._selector = this._config.target + " " + Selector.NAV_LINKS + "," + (this._config.target + " " + Selector.LIST_ITEMS + ",") + (this._config.target + " " + Selector.DROPDOWN_ITEMS); - this._offsets = []; - this._targets = []; - this._activeTarget = null; - this._scrollHeight = 0; - $$$1(this._scrollElement).on(Event.SCROLL, function (event) { - return _this._process(event); - }); - this.refresh(); + _proto._process = function _process() { + var scrollTop = this._getScrollTop() + this._config.offset; - this._process(); - } // Getters + var scrollHeight = this._getScrollHeight(); + var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight(); - var _proto = ScrollSpy.prototype; + if (this._scrollHeight !== scrollHeight) { + this.refresh(); + } - // Public - _proto.refresh = function refresh() { - var _this2 = this; + if (scrollTop >= maxScroll) { + var target = this._targets[this._targets.length - 1]; - var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION; - var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; - var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; - this._offsets = []; - this._targets = []; - this._scrollHeight = this._getScrollHeight(); - var targets = $$$1.makeArray($$$1(this._selector)); - targets.map(function (element) { - var target; - var targetSelector = Util.getSelectorFromElement(element); + if (this._activeTarget !== target) { + this._activate(target); + } - if (targetSelector) { - target = $$$1(targetSelector)[0]; - } + return; + } - if (target) { - var targetBCR = target.getBoundingClientRect(); + if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) { + this._activeTarget = null; - if (targetBCR.width || targetBCR.height) { - // TODO (fat): remove sketch reliance on jQuery position/offset - return [$$$1(target)[offsetMethod]().top + offsetBase, targetSelector]; - } - } + this._clear(); - return null; - }).filter(function (item) { - return item; - }).sort(function (a, b) { - return a[0] - b[0]; - }).forEach(function (item) { - _this2._offsets.push(item[0]); + return; + } - _this2._targets.push(item[1]); - }); - }; + var offsetLength = this._offsets.length; - _proto.dispose = function dispose() { - $$$1.removeData(this._element, DATA_KEY); - $$$1(this._scrollElement).off(EVENT_KEY); - this._element = null; - this._scrollElement = null; - this._config = null; - this._selector = null; - this._offsets = null; - this._targets = null; - this._activeTarget = null; - this._scrollHeight = null; - }; // Private + for (var i = offsetLength; i--;) { + var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]); + if (isActiveTarget) { + this._activate(this._targets[i]); + } + } + }; - _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, Default, typeof config === 'object' && config ? config : {}); + _proto._activate = function _activate(target) { + this._activeTarget = target; - if (typeof config.target !== 'string') { - var id = $$$1(config.target).attr('id'); + this._clear(); - if (!id) { - id = Util.getUID(NAME); - $$$1(config.target).attr('id', id); - } + var queries = this._selector.split(',').map(function (selector) { + return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]"; + }); - config.target = "#" + id; - } + var $link = $([].slice.call(document.querySelectorAll(queries.join(',')))); - Util.typeCheckConfig(NAME, config, DefaultType); - return config; - }; + if ($link.hasClass(ClassName$8.DROPDOWN_ITEM)) { + $link.closest(Selector$8.DROPDOWN).find(Selector$8.DROPDOWN_TOGGLE).addClass(ClassName$8.ACTIVE); + $link.addClass(ClassName$8.ACTIVE); + } else { + // Set triggered link as active + $link.addClass(ClassName$8.ACTIVE); // Set triggered links parents as active + // With both