From fb3532ad3cf3fc3beb1fb364de9f689e2a90c301 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Wed, 30 Oct 2024 10:43:08 +0800 Subject: [PATCH] Try move to importmap --- .gitignore | 3 + Gemfile | 8 +- Gemfile.lock | 130 +- Procfile.dev | 3 + app/assets/builds/.keep | 0 app/assets/config/manifest.js | 12 + app/assets/stylesheets/admin.scss | 2 + .../stylesheets}/admin/index.scss | 5 +- .../stylesheets}/application.tailwind.css | 0 app/assets/stylesheets/front.scss | 2 + .../stylesheets}/front/highlight.css | 0 .../stylesheets}/front/home.scss | 2 +- .../stylesheets}/front/index.scss | 13 +- .../stylesheets}/front/notifications.scss | 0 .../stylesheets}/front/search.scss | 2 +- .../stylesheets}/front/sessions.scss | 0 .../stylesheets}/front/teams.scss | 2 +- .../stylesheets}/front/toc.scss | 2 +- .../stylesheets}/front/users.scss | 2 +- .../stylesheets}/homeland/_mixins.scss | 0 .../stylesheets}/homeland/_vars.scss | 0 .../homeland/bootstrap_custom.scss | 44 + .../stylesheets}/homeland/dark-mode.scss | 0 .../stylesheets}/homeland/iconfont.scss | 0 .../stylesheets}/homeland/index.scss | 0 .../stylesheets}/homeland/markdown.scss | 0 .../stylesheets}/homeland/turbolinks-app.scss | 0 .../stylesheets}/turbolinks-app.scss | 0 .../stylesheets}/vendor/atwho.css | 0 .../stylesheets}/vendor/jquery.fluidbox.css | 0 .../vendor/social-share-button/facebook.svg | 0 .../vendor/social-share-button/index.js | 0 .../vendor/social-share-button/index.scss | 0 .../vendor/social-share-button/twitter.svg | 0 .../vendor/social-share-button/wechat.js | 0 .../vendor/social-share-button/wechat.svg | 0 .../vendor/social-share-button/weibo.svg | 0 .../vendor/tooltipster.bundle.scss | 0 app/javascript/admin.scss | 1 - app/javascript/application.js | 1 - app/javascript/front.scss | 2 - app/javascript/homeland/bootstrap_custom.scss | 44 - app/javascript/homeland/index.js | 33 +- app/javascript/vendor/bootstrap.js | 15 - app/views/layouts/admin.html.erb | 6 +- app/views/layouts/application.html.erb | 6 +- app/views/layouts/simple.html.erb | 4 +- bin/dev | 18 +- bin/importmap | 4 + bin/shakapacker | 13 - bin/shakapacker-dev-server | 13 - config/importmap.rb | 11 + config/shakapacker.yml | 84 - .../tailwind.config.js | 0 config/webpack/environment.js | 29 - config/webpack/loaders/erb.js | 11 - config/webpack/webpack.config.js | 19 - lib/assets/javascripts/underscore.js | 5 - package.json | 71 - postcss.config.js | 18 - vendor/javascript/.keep | 0 vendor/javascript/@popperjs--core.js | 3 + .../javascript}/backbone.js | 0 vendor/javascript/bootstrap-select.js | 20 + vendor/javascript/bootstrap.js | 26 + .../javascript}/google_analytics.js | 0 .../javascript}/jquery.atwho.min.js | 0 .../javascript}/jquery.autogrow-textarea.js | 0 .../javascript}/jquery.fluidbox.min.js | 0 .../javascript}/jquery.hotkeys.js | 0 .../javascript}/jquery.infinitescroll.min.js | 0 vendor/javascript/jquery.js | 57 + .../javascript}/jquery.mobile-events.js | 0 .../javascript}/jquery.qrcode.min.js | 0 .../javascript}/jquery.timeago.js | 0 .../javascript}/jquery.timeago.settings.js | 0 .../javascript}/pagination.js | 0 .../javascript}/tooltipster.bundle.min.js | 0 vendor/javascript/turbolinks-prefetch.js | 4 + vendor/javascript/underscore.js | 4 + yarn.lock | 5095 ----------------- 81 files changed, 320 insertions(+), 5529 deletions(-) create mode 100644 Procfile.dev create mode 100644 app/assets/builds/.keep create mode 100644 app/assets/stylesheets/admin.scss rename app/{javascript => assets/stylesheets}/admin/index.scss (96%) rename app/{javascript/homeland => assets/stylesheets}/application.tailwind.css (100%) create mode 100644 app/assets/stylesheets/front.scss rename app/{javascript => assets/stylesheets}/front/highlight.css (100%) rename app/{javascript => assets/stylesheets}/front/home.scss (98%) rename app/{javascript => assets/stylesheets}/front/index.scss (98%) rename app/{javascript => assets/stylesheets}/front/notifications.scss (100%) rename app/{javascript => assets/stylesheets}/front/search.scss (97%) rename app/{javascript => assets/stylesheets}/front/sessions.scss (100%) rename app/{javascript => assets/stylesheets}/front/teams.scss (98%) rename app/{javascript => assets/stylesheets}/front/toc.scss (97%) rename app/{javascript => assets/stylesheets}/front/users.scss (99%) rename app/{javascript => assets/stylesheets}/homeland/_mixins.scss (100%) rename app/{javascript => assets/stylesheets}/homeland/_vars.scss (100%) create mode 100644 app/assets/stylesheets/homeland/bootstrap_custom.scss rename app/{javascript => assets/stylesheets}/homeland/dark-mode.scss (100%) rename app/{javascript => assets/stylesheets}/homeland/iconfont.scss (100%) rename app/{javascript => assets/stylesheets}/homeland/index.scss (100%) rename app/{javascript => assets/stylesheets}/homeland/markdown.scss (100%) rename app/{javascript => assets/stylesheets}/homeland/turbolinks-app.scss (100%) rename app/{javascript => assets/stylesheets}/turbolinks-app.scss (100%) rename app/{javascript => assets/stylesheets}/vendor/atwho.css (100%) rename app/{javascript => assets/stylesheets}/vendor/jquery.fluidbox.css (100%) rename app/{javascript => assets/stylesheets}/vendor/social-share-button/facebook.svg (100%) rename app/{javascript => assets/stylesheets}/vendor/social-share-button/index.js (100%) rename app/{javascript => assets/stylesheets}/vendor/social-share-button/index.scss (100%) rename app/{javascript => assets/stylesheets}/vendor/social-share-button/twitter.svg (100%) rename app/{javascript => assets/stylesheets}/vendor/social-share-button/wechat.js (100%) rename app/{javascript => assets/stylesheets}/vendor/social-share-button/wechat.svg (100%) rename app/{javascript => assets/stylesheets}/vendor/social-share-button/weibo.svg (100%) rename app/{javascript => assets/stylesheets}/vendor/tooltipster.bundle.scss (100%) delete mode 100644 app/javascript/admin.scss delete mode 100644 app/javascript/front.scss delete mode 100644 app/javascript/homeland/bootstrap_custom.scss delete mode 100644 app/javascript/vendor/bootstrap.js create mode 100755 bin/importmap delete mode 100755 bin/shakapacker delete mode 100755 bin/shakapacker-dev-server create mode 100644 config/importmap.rb delete mode 100644 config/shakapacker.yml rename tailwind.config.js => config/tailwind.config.js (100%) delete mode 100644 config/webpack/environment.js delete mode 100644 config/webpack/loaders/erb.js delete mode 100644 config/webpack/webpack.config.js delete mode 100644 lib/assets/javascripts/underscore.js delete mode 100644 package.json delete mode 100644 postcss.config.js create mode 100644 vendor/javascript/.keep create mode 100644 vendor/javascript/@popperjs--core.js rename {lib/assets/javascripts => vendor/javascript}/backbone.js (100%) create mode 100644 vendor/javascript/bootstrap-select.js create mode 100644 vendor/javascript/bootstrap.js rename {lib/assets/javascripts => vendor/javascript}/google_analytics.js (100%) rename {lib/assets/javascripts => vendor/javascript}/jquery.atwho.min.js (100%) rename {lib/assets/javascripts => vendor/javascript}/jquery.autogrow-textarea.js (100%) rename {lib/assets/javascripts => vendor/javascript}/jquery.fluidbox.min.js (100%) rename {lib/assets/javascripts => vendor/javascript}/jquery.hotkeys.js (100%) rename {lib/assets/javascripts => vendor/javascript}/jquery.infinitescroll.min.js (100%) create mode 100644 vendor/javascript/jquery.js rename {lib/assets/javascripts => vendor/javascript}/jquery.mobile-events.js (100%) rename {lib/assets/javascripts => vendor/javascript}/jquery.qrcode.min.js (100%) rename {lib/assets/javascripts => vendor/javascript}/jquery.timeago.js (100%) rename {lib/assets/javascripts => vendor/javascript}/jquery.timeago.settings.js (100%) rename {lib/assets/javascripts => vendor/javascript}/pagination.js (100%) rename {lib/assets/javascripts => vendor/javascript}/tooltipster.bundle.min.js (100%) create mode 100644 vendor/javascript/turbolinks-prefetch.js create mode 100644 vendor/javascript/underscore.js delete mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore index 574d9633a8..cb1e05c05c 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,6 @@ yarn-debug.log* /yarn-error.log yarn-debug.log* .yarn-integrity + +/app/assets/builds/* +!/app/assets/builds/.keep diff --git a/Gemfile b/Gemfile index 8d1e7af46a..b6ede0f7b5 100644 --- a/Gemfile +++ b/Gemfile @@ -3,12 +3,12 @@ source "https://rubygems.org" git_source(:github) { |repo_name| "https://github.com/#{repo_name}.git" } gem "jbuilder" -gem "rails", "~> 8.0.0.beta1" +gem "rails", "~> 8.0.0.rc2" gem "rails_autolink" -gem "sass-rails" -gem "shakapacker", "~> 7.2.1" gem "turbolinks" gem "uglifier" +gem "sass-rails" +gem "importmap-rails", "~> 2.0" gem "view_component", "~> 2.83" @@ -107,3 +107,5 @@ group :development, :test do gem "rubocop-rails-omakase", require: false end + +gem "tailwindcss-rails", "~> 3.0" diff --git a/Gemfile.lock b/Gemfile.lock index 5b483f9a08..69dc660128 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,29 +3,29 @@ GEM specs: action-store (1.1.3) rails (>= 5.2) - actioncable (8.0.0.rc1) - actionpack (= 8.0.0.rc1) - activesupport (= 8.0.0.rc1) + actioncable (8.0.0.rc2) + actionpack (= 8.0.0.rc2) + activesupport (= 8.0.0.rc2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (8.0.0.rc1) - actionpack (= 8.0.0.rc1) - activejob (= 8.0.0.rc1) - activerecord (= 8.0.0.rc1) - activestorage (= 8.0.0.rc1) - activesupport (= 8.0.0.rc1) + actionmailbox (8.0.0.rc2) + actionpack (= 8.0.0.rc2) + activejob (= 8.0.0.rc2) + activerecord (= 8.0.0.rc2) + activestorage (= 8.0.0.rc2) + activesupport (= 8.0.0.rc2) mail (>= 2.8.0) - actionmailer (8.0.0.rc1) - actionpack (= 8.0.0.rc1) - actionview (= 8.0.0.rc1) - activejob (= 8.0.0.rc1) - activesupport (= 8.0.0.rc1) + actionmailer (8.0.0.rc2) + actionpack (= 8.0.0.rc2) + actionview (= 8.0.0.rc2) + activejob (= 8.0.0.rc2) + activesupport (= 8.0.0.rc2) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (8.0.0.rc1) - actionview (= 8.0.0.rc1) - activesupport (= 8.0.0.rc1) + actionpack (8.0.0.rc2) + actionview (= 8.0.0.rc2) + activesupport (= 8.0.0.rc2) nokogiri (>= 1.8.5) rack (>= 2.2.4) rack-session (>= 1.0.1) @@ -33,35 +33,35 @@ GEM rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (8.0.0.rc1) - actionpack (= 8.0.0.rc1) - activerecord (= 8.0.0.rc1) - activestorage (= 8.0.0.rc1) - activesupport (= 8.0.0.rc1) + actiontext (8.0.0.rc2) + actionpack (= 8.0.0.rc2) + activerecord (= 8.0.0.rc2) + activestorage (= 8.0.0.rc2) + activesupport (= 8.0.0.rc2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (8.0.0.rc1) - activesupport (= 8.0.0.rc1) + actionview (8.0.0.rc2) + activesupport (= 8.0.0.rc2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (8.0.0.rc1) - activesupport (= 8.0.0.rc1) + activejob (8.0.0.rc2) + activesupport (= 8.0.0.rc2) globalid (>= 0.3.6) - activemodel (8.0.0.rc1) - activesupport (= 8.0.0.rc1) - activerecord (8.0.0.rc1) - activemodel (= 8.0.0.rc1) - activesupport (= 8.0.0.rc1) + activemodel (8.0.0.rc2) + activesupport (= 8.0.0.rc2) + activerecord (8.0.0.rc2) + activemodel (= 8.0.0.rc2) + activesupport (= 8.0.0.rc2) timeout (>= 0.4.0) - activestorage (8.0.0.rc1) - actionpack (= 8.0.0.rc1) - activejob (= 8.0.0.rc1) - activerecord (= 8.0.0.rc1) - activesupport (= 8.0.0.rc1) + activestorage (8.0.0.rc2) + actionpack (= 8.0.0.rc2) + activejob (= 8.0.0.rc2) + activerecord (= 8.0.0.rc2) + activesupport (= 8.0.0.rc2) marcel (~> 1.0) - activesupport (8.0.0.rc1) + activesupport (8.0.0.rc2) base64 benchmark (>= 0.3) bigdecimal @@ -213,6 +213,10 @@ GEM image_processing (1.13.0) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) + importmap-rails (2.0.3) + actionpack (>= 6.0.0) + activesupport (>= 6.0.0) + railties (>= 6.0.0) io-console (0.7.2) irb (1.14.1) rdoc (>= 4.0.0) @@ -331,7 +335,6 @@ GEM omniauth-oauth2 (>= 1.7.3) orm_adapter (0.5.0) ostruct (0.6.0) - package_json (0.1.0) parallel (1.26.3) parser (3.3.5.0) ast (~> 2.4.1) @@ -367,8 +370,6 @@ GEM rack-protection (4.0.0) base64 (>= 0.1.0) rack (>= 3.0.0, < 4) - rack-proxy (0.7.7) - rack rack-session (2.0.0) rack (>= 3.0.0) rack-test (2.1.0) @@ -376,20 +377,20 @@ GEM rackup (2.1.0) rack (>= 3) webrick (~> 1.8) - rails (8.0.0.rc1) - actioncable (= 8.0.0.rc1) - actionmailbox (= 8.0.0.rc1) - actionmailer (= 8.0.0.rc1) - actionpack (= 8.0.0.rc1) - actiontext (= 8.0.0.rc1) - actionview (= 8.0.0.rc1) - activejob (= 8.0.0.rc1) - activemodel (= 8.0.0.rc1) - activerecord (= 8.0.0.rc1) - activestorage (= 8.0.0.rc1) - activesupport (= 8.0.0.rc1) + rails (8.0.0.rc2) + actioncable (= 8.0.0.rc2) + actionmailbox (= 8.0.0.rc2) + actionmailer (= 8.0.0.rc2) + actionpack (= 8.0.0.rc2) + actiontext (= 8.0.0.rc2) + actionview (= 8.0.0.rc2) + activejob (= 8.0.0.rc2) + activemodel (= 8.0.0.rc2) + activerecord (= 8.0.0.rc2) + activestorage (= 8.0.0.rc2) + activesupport (= 8.0.0.rc2) bundler (>= 1.15.0) - railties (= 8.0.0.rc1) + railties (= 8.0.0.rc2) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -407,9 +408,9 @@ GEM actionview (> 3.1) activesupport (> 3.1) railties (> 3.1) - railties (8.0.0.rc1) - actionpack (= 8.0.0.rc1) - activesupport (= 8.0.0.rc1) + railties (8.0.0.rc2) + actionpack (= 8.0.0.rc2) + activesupport (= 8.0.0.rc2) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -498,13 +499,6 @@ GEM sprockets-rails tilt securerandom (0.3.1) - semantic_range (3.0.0) - shakapacker (7.2.3) - activesupport (>= 5.2) - package_json - rack-proxy (>= 0.6.1) - railties (>= 5.2) - semantic_range (>= 2.3.0) sidekiq (7.3.4) connection_pool (>= 2.3.0) logger @@ -529,6 +523,11 @@ GEM sprockets (>= 3.0.0) ssrf_filter (1.1.2) stringio (3.1.1) + tailwindcss-rails (3.0.0) + railties (>= 7.0.0) + tailwindcss-ruby + tailwindcss-ruby (3.4.14-arm64-darwin) + tailwindcss-ruby (3.4.14-x86_64-linux) thor (1.3.2) tilt (2.4.0) timeout (0.4.1) @@ -588,6 +587,7 @@ DEPENDENCIES html-pipeline (~> 2.14) html-pipeline-auto-correct http_accept_language + importmap-rails (~> 2.0) jbuilder jieba-rb kaminari @@ -611,7 +611,7 @@ DEPENDENCIES qiniu rack-attack rack-cors - rails (~> 8.0.0.beta1) + rails (~> 8.0.0.rc2) rails-i18n rails-settings-cached rails_autolink @@ -623,11 +623,11 @@ DEPENDENCIES ruby-push-notifications rucaptcha sass-rails - shakapacker (~> 7.2.1) sidekiq (< 8) sidekiq-cron social-share-button spring + tailwindcss-rails (~> 3.0) turbolinks twemoji uglifier diff --git a/Procfile.dev b/Procfile.dev new file mode 100644 index 0000000000..8a668aa8c9 --- /dev/null +++ b/Procfile.dev @@ -0,0 +1,3 @@ +web: env RUBY_DEBUG_OPEN=true bin/rails server +css: bun run build:css --watch +css: bin/rails tailwindcss:watch diff --git a/app/assets/builds/.keep b/app/assets/builds/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index e69de29bb2..ae73b23d98 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -0,0 +1,12 @@ +//= link_tree ../../javascript .js +//= link_tree ../../../vendor/javascript .js +//= link turbolinks-prefetch/index.js +//= link bootstrap/dist/js/bootstrap.js +//= link bootstrap-select/dist/js/bootstrap-select.js +//= link jquery.caret/src/jquery.caret.js +//= link jquery/dist/jquery.js +//= link dropzone/dist/dropzone.js +//= link backbone/backbone.js +//= link underscore/underscore-umd.js +//= link_tree ../builds +//= link_directory ../stylesheets .scss diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss new file mode 100644 index 0000000000..11a2520ffc --- /dev/null +++ b/app/assets/stylesheets/admin.scss @@ -0,0 +1,2 @@ +@import "application.tailwind"; +@import "admin/index"; diff --git a/app/javascript/admin/index.scss b/app/assets/stylesheets/admin/index.scss similarity index 96% rename from app/javascript/admin/index.scss rename to app/assets/stylesheets/admin/index.scss index aae2d6780b..11ce78e3fb 100644 --- a/app/javascript/admin/index.scss +++ b/app/assets/stylesheets/admin/index.scss @@ -1,6 +1,5 @@ -@import "homeland/application.tailwind"; -@import "~homeland/index"; -@import "~homeland/dark-mode"; +@import "homeland/index"; +@import "homeland/dark-mode"; body, p, diff --git a/app/javascript/homeland/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css similarity index 100% rename from app/javascript/homeland/application.tailwind.css rename to app/assets/stylesheets/application.tailwind.css diff --git a/app/assets/stylesheets/front.scss b/app/assets/stylesheets/front.scss new file mode 100644 index 0000000000..50e0671a73 --- /dev/null +++ b/app/assets/stylesheets/front.scss @@ -0,0 +1,2 @@ +@import "application.tailwind"; +@import "front/index"; diff --git a/app/javascript/front/highlight.css b/app/assets/stylesheets/front/highlight.css similarity index 100% rename from app/javascript/front/highlight.css rename to app/assets/stylesheets/front/highlight.css diff --git a/app/javascript/front/home.scss b/app/assets/stylesheets/front/home.scss similarity index 98% rename from app/javascript/front/home.scss rename to app/assets/stylesheets/front/home.scss index 892b9de789..357bb3805b 100644 --- a/app/javascript/front/home.scss +++ b/app/assets/stylesheets/front/home.scss @@ -1,4 +1,4 @@ -@import "~homeland/_vars"; +@import "homeland/_vars"; #home_index { line-height: 160%; diff --git a/app/javascript/front/index.scss b/app/assets/stylesheets/front/index.scss similarity index 98% rename from app/javascript/front/index.scss rename to app/assets/stylesheets/front/index.scss index 556343b568..108befe5c9 100644 --- a/app/javascript/front/index.scss +++ b/app/assets/stylesheets/front/index.scss @@ -1,9 +1,8 @@ -@import "~homeland/index"; - -@import "~vendor/atwho"; -@import "~vendor/jquery.fluidbox"; -@import "~vendor/tooltipster.bundle"; -@import "~vendor/social-share-button/index"; +@import "homeland/index"; +@import "vendor/atwho"; +@import "vendor/jquery.fluidbox"; +@import "vendor/tooltipster.bundle"; +@import "vendor/social-share-button/index"; @import "notifications"; @import "home"; @@ -13,7 +12,7 @@ @import "search"; @import "toc"; @import "highlight"; -@import "~homeland/dark-mode"; +@import "homeland/dark-mode"; .page-topics { .navbar-fixed-active { diff --git a/app/javascript/front/notifications.scss b/app/assets/stylesheets/front/notifications.scss similarity index 100% rename from app/javascript/front/notifications.scss rename to app/assets/stylesheets/front/notifications.scss diff --git a/app/javascript/front/search.scss b/app/assets/stylesheets/front/search.scss similarity index 97% rename from app/javascript/front/search.scss rename to app/assets/stylesheets/front/search.scss index 97922aa3fc..42056ea406 100644 --- a/app/javascript/front/search.scss +++ b/app/assets/stylesheets/front/search.scss @@ -1,4 +1,4 @@ -@import "~homeland/_vars"; +@import "homeland/_vars"; .search-results { .pagination { margin-top: 25px; diff --git a/app/javascript/front/sessions.scss b/app/assets/stylesheets/front/sessions.scss similarity index 100% rename from app/javascript/front/sessions.scss rename to app/assets/stylesheets/front/sessions.scss diff --git a/app/javascript/front/teams.scss b/app/assets/stylesheets/front/teams.scss similarity index 98% rename from app/javascript/front/teams.scss rename to app/assets/stylesheets/front/teams.scss index 7dfa9ad6de..f267c02976 100644 --- a/app/javascript/front/teams.scss +++ b/app/assets/stylesheets/front/teams.scss @@ -1,4 +1,4 @@ -@import "~homeland/_vars"; +@import "homeland/_vars"; .team-header { background: var(--sub-navbar-background-color); diff --git a/app/javascript/front/toc.scss b/app/assets/stylesheets/front/toc.scss similarity index 97% rename from app/javascript/front/toc.scss rename to app/assets/stylesheets/front/toc.scss index 6ba2972a88..fe73711388 100644 --- a/app/javascript/front/toc.scss +++ b/app/assets/stylesheets/front/toc.scss @@ -1,4 +1,4 @@ -@import "~homeland/_vars"; +@import "homeland/_vars"; .toc-container { display: none; diff --git a/app/javascript/front/users.scss b/app/assets/stylesheets/front/users.scss similarity index 99% rename from app/javascript/front/users.scss rename to app/assets/stylesheets/front/users.scss index c0d3eae37f..f24a0d8f98 100644 --- a/app/javascript/front/users.scss +++ b/app/assets/stylesheets/front/users.scss @@ -1,4 +1,4 @@ -@import "~homeland/_vars"; +@import "homeland/_vars"; .subnav { margin-bottom: -18px; .nav-tabs { diff --git a/app/javascript/homeland/_mixins.scss b/app/assets/stylesheets/homeland/_mixins.scss similarity index 100% rename from app/javascript/homeland/_mixins.scss rename to app/assets/stylesheets/homeland/_mixins.scss diff --git a/app/javascript/homeland/_vars.scss b/app/assets/stylesheets/homeland/_vars.scss similarity index 100% rename from app/javascript/homeland/_vars.scss rename to app/assets/stylesheets/homeland/_vars.scss diff --git a/app/assets/stylesheets/homeland/bootstrap_custom.scss b/app/assets/stylesheets/homeland/bootstrap_custom.scss new file mode 100644 index 0000000000..9fd5ff8de3 --- /dev/null +++ b/app/assets/stylesheets/homeland/bootstrap_custom.scss @@ -0,0 +1,44 @@ +/*! + * Bootstrap v5.1.3 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors + * Copyright 2011-2021 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ + +// scss-docs-start import-stack +// Configuration +@import "bootstrap/scss/mixins"; +@import "bootstrap/scss/functions"; +@import "bootstrap/scss/variables"; +@import "bootstrap/scss/maps"; +@import "bootstrap/scss/utilities"; + +// Layout & components +@import "bootstrap/scss/root"; +@import "bootstrap/scss/reboot"; +@import "bootstrap/scss/images"; +@import "bootstrap/scss/grid"; +@import "bootstrap/scss/forms"; +@import "bootstrap/scss/buttons"; +@import "bootstrap/scss/transitions"; +@import "bootstrap/scss/dropdown"; +@import "bootstrap/scss/button-group"; +@import "bootstrap/scss/nav"; +@import "bootstrap/scss/card"; +@import "bootstrap/scss/breadcrumb"; +@import "bootstrap/scss/pagination"; +@import "bootstrap/scss/badge"; +@import "bootstrap/scss/alert"; +@import "bootstrap/scss/list-group"; +@import "bootstrap/scss/close"; +@import "bootstrap/scss/modal"; +@import "bootstrap/scss/tooltip"; +@import "bootstrap/scss/popover"; +@import "bootstrap/scss/spinners"; + +// Helpers +@import "bootstrap/scss/helpers"; + +// Utilities +@import "bootstrap/scss/utilities/api"; +// scss-docs-end import-stack diff --git a/app/javascript/homeland/dark-mode.scss b/app/assets/stylesheets/homeland/dark-mode.scss similarity index 100% rename from app/javascript/homeland/dark-mode.scss rename to app/assets/stylesheets/homeland/dark-mode.scss diff --git a/app/javascript/homeland/iconfont.scss b/app/assets/stylesheets/homeland/iconfont.scss similarity index 100% rename from app/javascript/homeland/iconfont.scss rename to app/assets/stylesheets/homeland/iconfont.scss diff --git a/app/javascript/homeland/index.scss b/app/assets/stylesheets/homeland/index.scss similarity index 100% rename from app/javascript/homeland/index.scss rename to app/assets/stylesheets/homeland/index.scss diff --git a/app/javascript/homeland/markdown.scss b/app/assets/stylesheets/homeland/markdown.scss similarity index 100% rename from app/javascript/homeland/markdown.scss rename to app/assets/stylesheets/homeland/markdown.scss diff --git a/app/javascript/homeland/turbolinks-app.scss b/app/assets/stylesheets/homeland/turbolinks-app.scss similarity index 100% rename from app/javascript/homeland/turbolinks-app.scss rename to app/assets/stylesheets/homeland/turbolinks-app.scss diff --git a/app/javascript/turbolinks-app.scss b/app/assets/stylesheets/turbolinks-app.scss similarity index 100% rename from app/javascript/turbolinks-app.scss rename to app/assets/stylesheets/turbolinks-app.scss diff --git a/app/javascript/vendor/atwho.css b/app/assets/stylesheets/vendor/atwho.css similarity index 100% rename from app/javascript/vendor/atwho.css rename to app/assets/stylesheets/vendor/atwho.css diff --git a/app/javascript/vendor/jquery.fluidbox.css b/app/assets/stylesheets/vendor/jquery.fluidbox.css similarity index 100% rename from app/javascript/vendor/jquery.fluidbox.css rename to app/assets/stylesheets/vendor/jquery.fluidbox.css diff --git a/app/javascript/vendor/social-share-button/facebook.svg b/app/assets/stylesheets/vendor/social-share-button/facebook.svg similarity index 100% rename from app/javascript/vendor/social-share-button/facebook.svg rename to app/assets/stylesheets/vendor/social-share-button/facebook.svg diff --git a/app/javascript/vendor/social-share-button/index.js b/app/assets/stylesheets/vendor/social-share-button/index.js similarity index 100% rename from app/javascript/vendor/social-share-button/index.js rename to app/assets/stylesheets/vendor/social-share-button/index.js diff --git a/app/javascript/vendor/social-share-button/index.scss b/app/assets/stylesheets/vendor/social-share-button/index.scss similarity index 100% rename from app/javascript/vendor/social-share-button/index.scss rename to app/assets/stylesheets/vendor/social-share-button/index.scss diff --git a/app/javascript/vendor/social-share-button/twitter.svg b/app/assets/stylesheets/vendor/social-share-button/twitter.svg similarity index 100% rename from app/javascript/vendor/social-share-button/twitter.svg rename to app/assets/stylesheets/vendor/social-share-button/twitter.svg diff --git a/app/javascript/vendor/social-share-button/wechat.js b/app/assets/stylesheets/vendor/social-share-button/wechat.js similarity index 100% rename from app/javascript/vendor/social-share-button/wechat.js rename to app/assets/stylesheets/vendor/social-share-button/wechat.js diff --git a/app/javascript/vendor/social-share-button/wechat.svg b/app/assets/stylesheets/vendor/social-share-button/wechat.svg similarity index 100% rename from app/javascript/vendor/social-share-button/wechat.svg rename to app/assets/stylesheets/vendor/social-share-button/wechat.svg diff --git a/app/javascript/vendor/social-share-button/weibo.svg b/app/assets/stylesheets/vendor/social-share-button/weibo.svg similarity index 100% rename from app/javascript/vendor/social-share-button/weibo.svg rename to app/assets/stylesheets/vendor/social-share-button/weibo.svg diff --git a/app/javascript/vendor/tooltipster.bundle.scss b/app/assets/stylesheets/vendor/tooltipster.bundle.scss similarity index 100% rename from app/javascript/vendor/tooltipster.bundle.scss rename to app/assets/stylesheets/vendor/tooltipster.bundle.scss diff --git a/app/javascript/admin.scss b/app/javascript/admin.scss deleted file mode 100644 index e9a41f39f8..0000000000 --- a/app/javascript/admin.scss +++ /dev/null @@ -1 +0,0 @@ -@import "admin/index"; diff --git a/app/javascript/application.js b/app/javascript/application.js index b81a149cd7..710d860807 100644 --- a/app/javascript/application.js +++ b/app/javascript/application.js @@ -1,3 +1,2 @@ import "homeland/index"; -import "vendor/bootstrap"; import "front/index"; diff --git a/app/javascript/front.scss b/app/javascript/front.scss deleted file mode 100644 index 3c267a6b0b..0000000000 --- a/app/javascript/front.scss +++ /dev/null @@ -1,2 +0,0 @@ -@import "front/index"; -@import "homeland/application.tailwind"; diff --git a/app/javascript/homeland/bootstrap_custom.scss b/app/javascript/homeland/bootstrap_custom.scss deleted file mode 100644 index 732ee86bc7..0000000000 --- a/app/javascript/homeland/bootstrap_custom.scss +++ /dev/null @@ -1,44 +0,0 @@ -/*! - * Bootstrap v5.1.3 (https://getbootstrap.com/) - * Copyright 2011-2021 The Bootstrap Authors - * Copyright 2011-2021 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - */ - -// scss-docs-start import-stack -// Configuration -@import "~bootstrap/scss/mixins"; -@import "~bootstrap/scss/functions"; -@import "~bootstrap/scss/variables"; -@import "~bootstrap/scss/maps"; -@import "~bootstrap/scss/utilities"; - -// Layout & components -@import "~bootstrap/scss/root"; -@import "~bootstrap/scss/reboot"; -@import "~bootstrap/scss/images"; -@import "~bootstrap/scss/grid"; -@import "~bootstrap/scss/forms"; -@import "~bootstrap/scss/buttons"; -@import "~bootstrap/scss/transitions"; -@import "~bootstrap/scss/dropdown"; -@import "~bootstrap/scss/button-group"; -@import "~bootstrap/scss/nav"; -@import "~bootstrap/scss/card"; -@import "~bootstrap/scss/breadcrumb"; -@import "~bootstrap/scss/pagination"; -@import "~bootstrap/scss/badge"; -@import "~bootstrap/scss/alert"; -@import "~bootstrap/scss/list-group"; -@import "~bootstrap/scss/close"; -@import "~bootstrap/scss/modal"; -@import "~bootstrap/scss/tooltip"; -@import "~bootstrap/scss/popover"; -@import "~bootstrap/scss/spinners"; - -// Helpers -@import "~bootstrap/scss/helpers"; - -// Utilities -@import "~bootstrap/scss/utilities/api"; -// scss-docs-end import-stack diff --git a/app/javascript/homeland/index.js b/app/javascript/homeland/index.js index 777e7c90b1..cd5a76be96 100644 --- a/app/javascript/homeland/index.js +++ b/app/javascript/homeland/index.js @@ -4,6 +4,22 @@ window.$ = jQuery; window.Backbone = require("backbone"); window._ = require("underscore"); +import * as bootstrap from "bootstrap"; +window.bootstrap = bootstrap; +require("bootstrap-select"); + +document.addEventListener("turbolinks:load", () => { + $("select.bootstrap-select").selectpicker({ + size: 10, + style: "btn-secondary", + }); +}); +document.addEventListener("turbolinks:before-cache", () => { + $("select.bootstrap-select") + .selectpicker("destroy") + .addClass("bootstrap-select"); +}); + import Turbolinks from "turbolinks"; import TubrolinksPrefetch from "turbolinks-prefetch"; @@ -14,23 +30,10 @@ Turbolinks.setProgressBarDelay(200); Turbolinks.controller.cache.size = 30; TubrolinksPrefetch.start(); -import Rails from "@rails/ujs" -window.Rails = Rails +import Rails from "@rails/ujs"; +window.Rails = Rails; Rails.start(); -require("pagination"); -require("jquery.timeago"); -require("jquery.timeago.settings"); -require("jquery.hotkeys"); -require("jquery.autogrow-textarea"); -require("tooltipster.bundle.min"); -require("dropzone"); -require("jquery.fluidbox.min"); -require("jquery.caret"); -require("jquery.atwho.min"); -require("google_analytics"); -require("jquery.infinitescroll.min"); -require("jquery.mobile-events"); require("vendor/social-share-button"); import { createConsumer } from "@rails/actioncable"; diff --git a/app/javascript/vendor/bootstrap.js b/app/javascript/vendor/bootstrap.js deleted file mode 100644 index 1ce9f7a4b0..0000000000 --- a/app/javascript/vendor/bootstrap.js +++ /dev/null @@ -1,15 +0,0 @@ -import * as bootstrap from "bootstrap/dist/js/bootstrap.esm"; -window.bootstrap = bootstrap; -require("bootstrap-select"); - -document.addEventListener("turbolinks:load", () => { - $("select.bootstrap-select").selectpicker({ - size: 10, - style: "btn-secondary", - }); -}); -document.addEventListener("turbolinks:before-cache", () => { - $("select.bootstrap-select") - .selectpicker("destroy") - .addClass("bootstrap-select"); -}); diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb index 9fe78a7446..42d1b1b2c2 100644 --- a/app/views/layouts/admin.html.erb +++ b/app/views/layouts/admin.html.erb @@ -3,8 +3,8 @@ <%= Setting.app_name %> - Admin Panel - <%= stylesheet_pack_tag "admin" %> - <%= javascript_pack_tag "application", defer: false %> + <%= stylesheet_link_tag "admin" %> + <%= javascript_importmap_tags %> <%= csrf_meta_tag %> @@ -41,7 +41,7 @@ System settings have been updated, need to restart the application to take effect <%= link_to icon_tag("power-off", label: "Reboot now"), main_app.reboot_admin_dashboards_path, data: { method: :post, confirm: "Are you sure to reboot Homeland?", disable_with: "Rebooting..." }, class: "text-danger float-right" %> <% end %> - +
<%= render AlertComponent.new %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 3d60db42b3..a78b04f3d4 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -26,10 +26,10 @@ - <%= stylesheet_pack_tag "front", "data-turbolinks-track": "reload" %> - <%= stylesheet_pack_tag "turbolinks-app", 'data-turbolinks-track': 'reload' if turbolinks_app? %> + <%= stylesheet_link_tag "front", "data-turbolinks-track": "reload" %> + <%= stylesheet_link_tag "turbolinks-app", 'data-turbolinks-track': 'reload' if turbolinks_app? %> <%= yield :stylesheets %> - <%= javascript_pack_tag "application", defer: false %> + <%= javascript_importmap_tags %> <%= yield :javascripts %> <%= action_cable_meta_tag %> <%= csrf_meta_tag %> diff --git a/app/views/layouts/simple.html.erb b/app/views/layouts/simple.html.erb index f7ce0e7484..45b2141a3a 100644 --- a/app/views/layouts/simple.html.erb +++ b/app/views/layouts/simple.html.erb @@ -7,8 +7,8 @@ <%= content_for?(:title) ? yield(:title) : Setting.app_name %> - <%= stylesheet_pack_tag "front" %> - <%= javascript_pack_tag "application", defer: false %> + <%= stylesheet_link_tag "front" %> + <%= javascript_importmap_tags %> <%= csrf_meta_tag %> <%= raw Setting.custom_head_html %> diff --git a/bin/dev b/bin/dev index 5f91c20545..ad72c7d53c 100755 --- a/bin/dev +++ b/bin/dev @@ -1,2 +1,16 @@ -#!/usr/bin/env ruby -exec "./bin/rails", "server", *ARGV +#!/usr/bin/env sh + +if ! gem list foreman -i --silent; then + echo "Installing foreman..." + gem install foreman +fi + +# Default to port 3000 if not specified +export PORT="${PORT:-3000}" + +# Let the debug gem allow remote connections, +# but avoid loading until `debugger` is called +export RUBY_DEBUG_OPEN="true" +export RUBY_DEBUG_LAZY="true" + +exec foreman start -f Procfile.dev "$@" diff --git a/bin/importmap b/bin/importmap new file mode 100755 index 0000000000..36502ab16c --- /dev/null +++ b/bin/importmap @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby + +require_relative "../config/application" +require "importmap/commands" diff --git a/bin/shakapacker b/bin/shakapacker deleted file mode 100755 index 13a008dcfe..0000000000 --- a/bin/shakapacker +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env ruby - -ENV["RAILS_ENV"] ||= "development" -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__) - -require "bundler/setup" -require "shakapacker" -require "shakapacker/webpack_runner" - -APP_ROOT = File.expand_path("..", __dir__) -Dir.chdir(APP_ROOT) do - Shakapacker::WebpackRunner.run(ARGV) -end diff --git a/bin/shakapacker-dev-server b/bin/shakapacker-dev-server deleted file mode 100755 index 5ae8897989..0000000000 --- a/bin/shakapacker-dev-server +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env ruby - -ENV["RAILS_ENV"] ||= "development" -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__) - -require "bundler/setup" -require "shakapacker" -require "shakapacker/dev_server_runner" - -APP_ROOT = File.expand_path("..", __dir__) -Dir.chdir(APP_ROOT) do - Shakapacker::DevServerRunner.run(ARGV) -end diff --git a/config/importmap.rb b/config/importmap.rb new file mode 100644 index 0000000000..56bac7cdb8 --- /dev/null +++ b/config/importmap.rb @@ -0,0 +1,11 @@ +# Pin npm packages by running ./bin/importmap +pin "application" +pin_all_from "vendor/javascript" +pin "jquery.caret" # @0.3.1 +pin "jquery" # @3.7.1 +pin "dropzone" # @5.7.6 +pin "underscore" # @1.7.0 +pin "bootstrap-select" # @1.14.0 +pin "bootstrap" # @5.3.3 +pin "@popperjs/core", to: "@popperjs--core.js" # @2.11.8 +pin "turbolinks-prefetch" # @1.0.4 diff --git a/config/shakapacker.yml b/config/shakapacker.yml deleted file mode 100644 index 62f833bceb..0000000000 --- a/config/shakapacker.yml +++ /dev/null @@ -1,84 +0,0 @@ -# Note: You must restart bin/shakapacker-dev-server for changes to take effect - -default: &default - source_path: app/javascript - source_entry_path: / - # If nested_entries is true, then we'll pick up subdirectories within the source_entry_path. - # You cannot set this option to true if you set source_entry_path to '/' - nested_entries: false - public_root_path: public - public_output_path: packs - cache_path: tmp/shakapacker - shakapacker_compile_output: true - - # Location for manifest.json, defaults to {public_output_path}/manifest.json if unset - # manifest_path: public/packs/manifest.json - - # Additional paths webpack should look up modules - # ['app/assets', 'engine/foo/app/assets'] - additional_paths: ["lib/assets/javascripts"] - - # Reload manifest.json on all requests so we reload latest compiled packs - cache_manifest: false - - # Select loader to use, available options are 'babel' (default), 'swc' or 'esbuild' - shakapacker_loader: 'babel' - - # Set to true to enable check for matching versions of shakapacker gem and NPM package - will raise an error if there is a mismatch or wildcard versioning is used - ensure_consistent_versioning: false - -development: - <<: *default - compile: true - - # Reference: https://webpack.js.org/configuration/dev-server/ - dev_server: - server: 'http' - host: localhost - port: 3035 - # Hot Module Replacement updates modules while the application is running without a full reload - hmr: false - # If HMR is on, CSS will by inlined by delivering it as part of the script payload via style-loader. Be sure - # that you add style-loader to your project dependencies. - # - # If you want to instead deliver CSS via with the mini-extract-css-plugin, set inline_css to false. - # In that case, style-loader is not needed as a dependency. - # - # mini-extract-css-plugin is a required dependency in both cases. - inline_css: true - # Defaults to the inverse of hmr. Uncomment to manually set this. - # live_reload: true - client: - # Should we show a full-screen overlay in the browser when there are compiler errors or warnings? - overlay: true - # May also be a string - # webSocketURL: - # hostname: "0.0.0.0" - # pathname: "/ws" - # port: 8080 - # Should we use gzip compression? - compress: true - # Note that apps that do not check the host are vulnerable to DNS rebinding attacks - allowed_hosts: "all" - pretty: true - headers: - "Access-Control-Allow-Origin": "*" - static: - watch: - ignored: "**/node_modules/**" - -test: - <<: *default - compile: true - - # Compile test packs to a separate directory - public_output_path: packs-test - -production: - <<: *default - - # Production depends on precompilation of packs prior to booting for performance. - compile: false - - # Cache manifest.json for performance - cache_manifest: true diff --git a/tailwind.config.js b/config/tailwind.config.js similarity index 100% rename from tailwind.config.js rename to config/tailwind.config.js diff --git a/config/webpack/environment.js b/config/webpack/environment.js deleted file mode 100644 index 16f88451ec..0000000000 --- a/config/webpack/environment.js +++ /dev/null @@ -1,29 +0,0 @@ -const { environment } = require("shakapacker"); -const erb = require("./loaders/erb"); -const webpack = require("webpack"); - -const extendConfig = { - devtool: false, - plugins: [ - new webpack.ProvidePlugin({ - $: "jquery", - jQuery: "jquery", - }), - ], - optimization: { - splitChunks: { - cacheGroups: { - vendors: { - test: /node_modules|lib\/assets|vendor/, - name: "vendors", - enforce: true, - chunks: "all", - }, - }, - }, - }, -}; - -environment.config.merge(extendConfig); -environment.loaders.prepend("erb", erb); -module.exports = environment; diff --git a/config/webpack/loaders/erb.js b/config/webpack/loaders/erb.js deleted file mode 100644 index a4049f1323..0000000000 --- a/config/webpack/loaders/erb.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - test: /\.erb$/, - enforce: 'pre', - exclude: /node_modules/, - use: [{ - loader: 'rails-erb-loader', - options: { - runner: (/^win/.test(process.platform) ? 'ruby ' : '') + 'bin/rails runner' - } - }] -} diff --git a/config/webpack/webpack.config.js b/config/webpack/webpack.config.js deleted file mode 100644 index 55a884f47d..0000000000 --- a/config/webpack/webpack.config.js +++ /dev/null @@ -1,19 +0,0 @@ -const { generateWebpackConfig } = require('shakapacker'); -const { merge } = require('webpack-merge'); -const webpack = require("webpack"); -const webpackConfig = generateWebpackConfig(); - -// See the shakacode/shakapacker README and docs directory for advice on customizing your webpackConfig. -const customConfig = { - plugins: [ - new webpack.ProvidePlugin({ - $: "jquery", - jQuery: "jquery", - }), - ], - resolve: { - extensions: [".js", ".ts", ".tsx", ".js.erb", ".css", ".scss"], - }, -} - -module.exports = merge(webpackConfig, customConfig) diff --git a/lib/assets/javascripts/underscore.js b/lib/assets/javascripts/underscore.js deleted file mode 100644 index 38de2bc99b..0000000000 --- a/lib/assets/javascripts/underscore.js +++ /dev/null @@ -1,5 +0,0 @@ -// Underscore.js 1.7.0 -// http://underscorejs.org -// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors -// Underscore may be freely distributed under the MIT license. -(function(){var n=this,t=n._,r=Array.prototype,e=Object.prototype,u=Function.prototype,i=r.push,a=r.slice,o=r.concat,l=e.toString,c=e.hasOwnProperty,f=Array.isArray,s=Object.keys,p=u.bind,h=function(n){return n instanceof h?n:this instanceof h?void(this._wrapped=n):new h(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=h),exports._=h):n._=h,h.VERSION="1.7.0";var g=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}};h.iteratee=function(n,t,r){return null==n?h.identity:h.isFunction(n)?g(n,t,r):h.isObject(n)?h.matches(n):h.property(n)},h.each=h.forEach=function(n,t,r){if(null==n)return n;t=g(t,r);var e,u=n.length;if(u===+u)for(e=0;u>e;e++)t(n[e],e,n);else{var i=h.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},h.map=h.collect=function(n,t,r){if(null==n)return[];t=h.iteratee(t,r);for(var e,u=n.length!==+n.length&&h.keys(n),i=(u||n).length,a=Array(i),o=0;i>o;o++)e=u?u[o]:o,a[o]=t(n[e],e,n);return a};var v="Reduce of empty array with no initial value";h.reduce=h.foldl=h.inject=function(n,t,r,e){null==n&&(n=[]),t=g(t,e,4);var u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length,o=0;if(arguments.length<3){if(!a)throw new TypeError(v);r=n[i?i[o++]:o++]}for(;a>o;o++)u=i?i[o]:o,r=t(r,n[u],u,n);return r},h.reduceRight=h.foldr=function(n,t,r,e){null==n&&(n=[]),t=g(t,e,4);var u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;if(arguments.length<3){if(!a)throw new TypeError(v);r=n[i?i[--a]:--a]}for(;a--;)u=i?i[a]:a,r=t(r,n[u],u,n);return r},h.find=h.detect=function(n,t,r){var e;return t=h.iteratee(t,r),h.some(n,function(n,r,u){return t(n,r,u)?(e=n,!0):void 0}),e},h.filter=h.select=function(n,t,r){var e=[];return null==n?e:(t=h.iteratee(t,r),h.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e)},h.reject=function(n,t,r){return h.filter(n,h.negate(h.iteratee(t)),r)},h.every=h.all=function(n,t,r){if(null==n)return!0;t=h.iteratee(t,r);var e,u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;for(e=0;a>e;e++)if(u=i?i[e]:e,!t(n[u],u,n))return!1;return!0},h.some=h.any=function(n,t,r){if(null==n)return!1;t=h.iteratee(t,r);var e,u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;for(e=0;a>e;e++)if(u=i?i[e]:e,t(n[u],u,n))return!0;return!1},h.contains=h.include=function(n,t){return null==n?!1:(n.length!==+n.length&&(n=h.values(n)),h.indexOf(n,t)>=0)},h.invoke=function(n,t){var r=a.call(arguments,2),e=h.isFunction(t);return h.map(n,function(n){return(e?t:n[t]).apply(n,r)})},h.pluck=function(n,t){return h.map(n,h.property(t))},h.where=function(n,t){return h.filter(n,h.matches(t))},h.findWhere=function(n,t){return h.find(n,h.matches(t))},h.max=function(n,t,r){var e,u,i=-1/0,a=-1/0;if(null==t&&null!=n){n=n.length===+n.length?n:h.values(n);for(var o=0,l=n.length;l>o;o++)e=n[o],e>i&&(i=e)}else t=h.iteratee(t,r),h.each(n,function(n,r,e){u=t(n,r,e),(u>a||u===-1/0&&i===-1/0)&&(i=n,a=u)});return i},h.min=function(n,t,r){var e,u,i=1/0,a=1/0;if(null==t&&null!=n){n=n.length===+n.length?n:h.values(n);for(var o=0,l=n.length;l>o;o++)e=n[o],i>e&&(i=e)}else t=h.iteratee(t,r),h.each(n,function(n,r,e){u=t(n,r,e),(a>u||1/0===u&&1/0===i)&&(i=n,a=u)});return i},h.shuffle=function(n){for(var t,r=n&&n.length===+n.length?n:h.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=h.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},h.sample=function(n,t,r){return null==t||r?(n.length!==+n.length&&(n=h.values(n)),n[h.random(n.length-1)]):h.shuffle(n).slice(0,Math.max(0,t))},h.sortBy=function(n,t,r){return t=h.iteratee(t,r),h.pluck(h.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var m=function(n){return function(t,r,e){var u={};return r=h.iteratee(r,e),h.each(t,function(e,i){var a=r(e,i,t);n(u,e,a)}),u}};h.groupBy=m(function(n,t,r){h.has(n,r)?n[r].push(t):n[r]=[t]}),h.indexBy=m(function(n,t,r){n[r]=t}),h.countBy=m(function(n,t,r){h.has(n,r)?n[r]++:n[r]=1}),h.sortedIndex=function(n,t,r,e){r=h.iteratee(r,e,1);for(var u=r(t),i=0,a=n.length;a>i;){var o=i+a>>>1;r(n[o])t?[]:a.call(n,0,t)},h.initial=function(n,t,r){return a.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},h.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:a.call(n,Math.max(n.length-t,0))},h.rest=h.tail=h.drop=function(n,t,r){return a.call(n,null==t||r?1:t)},h.compact=function(n){return h.filter(n,h.identity)};var y=function(n,t,r,e){if(t&&h.every(n,h.isArray))return o.apply(e,n);for(var u=0,a=n.length;a>u;u++){var l=n[u];h.isArray(l)||h.isArguments(l)?t?i.apply(e,l):y(l,t,r,e):r||e.push(l)}return e};h.flatten=function(n,t){return y(n,t,!1,[])},h.without=function(n){return h.difference(n,a.call(arguments,1))},h.uniq=h.unique=function(n,t,r,e){if(null==n)return[];h.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=h.iteratee(r,e));for(var u=[],i=[],a=0,o=n.length;o>a;a++){var l=n[a];if(t)a&&i===l||u.push(l),i=l;else if(r){var c=r(l,a,n);h.indexOf(i,c)<0&&(i.push(c),u.push(l))}else h.indexOf(u,l)<0&&u.push(l)}return u},h.union=function(){return h.uniq(y(arguments,!0,!0,[]))},h.intersection=function(n){if(null==n)return[];for(var t=[],r=arguments.length,e=0,u=n.length;u>e;e++){var i=n[e];if(!h.contains(t,i)){for(var a=1;r>a&&h.contains(arguments[a],i);a++);a===r&&t.push(i)}}return t},h.difference=function(n){var t=y(a.call(arguments,1),!0,!0,[]);return h.filter(n,function(n){return!h.contains(t,n)})},h.zip=function(n){if(null==n)return[];for(var t=h.max(arguments,"length").length,r=Array(t),e=0;t>e;e++)r[e]=h.pluck(arguments,e);return r},h.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},h.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=h.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}for(;u>e;e++)if(n[e]===t)return e;return-1},h.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=n.length;for("number"==typeof r&&(e=0>r?e+r+1:Math.min(e,r+1));--e>=0;)if(n[e]===t)return e;return-1},h.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=r||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),i=0;e>i;i++,n+=r)u[i]=n;return u};var d=function(){};h.bind=function(n,t){var r,e;if(p&&n.bind===p)return p.apply(n,a.call(arguments,1));if(!h.isFunction(n))throw new TypeError("Bind must be called on a function");return r=a.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(a.call(arguments)));d.prototype=n.prototype;var u=new d;d.prototype=null;var i=n.apply(u,r.concat(a.call(arguments)));return h.isObject(i)?i:u}},h.partial=function(n){var t=a.call(arguments,1);return function(){for(var r=0,e=t.slice(),u=0,i=e.length;i>u;u++)e[u]===h&&(e[u]=arguments[r++]);for(;r=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=h.bind(n[r],n);return n},h.memoize=function(n,t){var r=function(e){var u=r.cache,i=t?t.apply(this,arguments):e;return h.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},h.delay=function(n,t){var r=a.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},h.defer=function(n){return h.delay.apply(h,[n,1].concat(a.call(arguments,1)))},h.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var l=function(){o=r.leading===!1?0:h.now(),a=null,i=n.apply(e,u),a||(e=u=null)};return function(){var c=h.now();o||r.leading!==!1||(o=c);var f=t-(c-o);return e=this,u=arguments,0>=f||f>t?(clearTimeout(a),a=null,o=c,i=n.apply(e,u),a||(e=u=null)):a||r.trailing===!1||(a=setTimeout(l,f)),i}},h.debounce=function(n,t,r){var e,u,i,a,o,l=function(){var c=h.now()-a;t>c&&c>0?e=setTimeout(l,t-c):(e=null,r||(o=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,a=h.now();var c=r&&!e;return e||(e=setTimeout(l,t)),c&&(o=n.apply(i,u),i=u=null),o}},h.wrap=function(n,t){return h.partial(t,n)},h.negate=function(n){return function(){return!n.apply(this,arguments)}},h.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},h.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},h.before=function(n,t){var r;return function(){return--n>0?r=t.apply(this,arguments):t=null,r}},h.once=h.partial(h.before,2),h.keys=function(n){if(!h.isObject(n))return[];if(s)return s(n);var t=[];for(var r in n)h.has(n,r)&&t.push(r);return t},h.values=function(n){for(var t=h.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},h.pairs=function(n){for(var t=h.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},h.invert=function(n){for(var t={},r=h.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},h.functions=h.methods=function(n){var t=[];for(var r in n)h.isFunction(n[r])&&t.push(r);return t.sort()},h.extend=function(n){if(!h.isObject(n))return n;for(var t,r,e=1,u=arguments.length;u>e;e++){t=arguments[e];for(r in t)c.call(t,r)&&(n[r]=t[r])}return n},h.pick=function(n,t,r){var e,u={};if(null==n)return u;if(h.isFunction(t)){t=g(t,r);for(e in n){var i=n[e];t(i,e,n)&&(u[e]=i)}}else{var l=o.apply([],a.call(arguments,1));n=new Object(n);for(var c=0,f=l.length;f>c;c++)e=l[c],e in n&&(u[e]=n[e])}return u},h.omit=function(n,t,r){if(h.isFunction(t))t=h.negate(t);else{var e=h.map(o.apply([],a.call(arguments,1)),String);t=function(n,t){return!h.contains(e,t)}}return h.pick(n,t,r)},h.defaults=function(n){if(!h.isObject(n))return n;for(var t=1,r=arguments.length;r>t;t++){var e=arguments[t];for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n},h.clone=function(n){return h.isObject(n)?h.isArray(n)?n.slice():h.extend({},n):n},h.tap=function(n,t){return t(n),n};var b=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof h&&(n=n._wrapped),t instanceof h&&(t=t._wrapped);var u=l.call(n);if(u!==l.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]===n)return e[i]===t;var a=n.constructor,o=t.constructor;if(a!==o&&"constructor"in n&&"constructor"in t&&!(h.isFunction(a)&&a instanceof a&&h.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c,f;if("[object Array]"===u){if(c=n.length,f=c===t.length)for(;c--&&(f=b(n[c],t[c],r,e)););}else{var s,p=h.keys(n);if(c=p.length,f=h.keys(t).length===c)for(;c--&&(s=p[c],f=h.has(t,s)&&b(n[s],t[s],r,e)););}return r.pop(),e.pop(),f};h.isEqual=function(n,t){return b(n,t,[],[])},h.isEmpty=function(n){if(null==n)return!0;if(h.isArray(n)||h.isString(n)||h.isArguments(n))return 0===n.length;for(var t in n)if(h.has(n,t))return!1;return!0},h.isElement=function(n){return!(!n||1!==n.nodeType)},h.isArray=f||function(n){return"[object Array]"===l.call(n)},h.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},h.each(["Arguments","Function","String","Number","Date","RegExp"],function(n){h["is"+n]=function(t){return l.call(t)==="[object "+n+"]"}}),h.isArguments(arguments)||(h.isArguments=function(n){return h.has(n,"callee")}),"function"!=typeof/./&&(h.isFunction=function(n){return"function"==typeof n||!1}),h.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},h.isNaN=function(n){return h.isNumber(n)&&n!==+n},h.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===l.call(n)},h.isNull=function(n){return null===n},h.isUndefined=function(n){return n===void 0},h.has=function(n,t){return null!=n&&c.call(n,t)},h.noConflict=function(){return n._=t,this},h.identity=function(n){return n},h.constant=function(n){return function(){return n}},h.noop=function(){},h.property=function(n){return function(t){return t[n]}},h.matches=function(n){var t=h.pairs(n),r=t.length;return function(n){if(null==n)return!r;n=new Object(n);for(var e=0;r>e;e++){var u=t[e],i=u[0];if(u[1]!==n[i]||!(i in n))return!1}return!0}},h.times=function(n,t,r){var e=Array(Math.max(0,n));t=g(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},h.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},h.now=Date.now||function(){return(new Date).getTime()};var _={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},w=h.invert(_),j=function(n){var t=function(t){return n[t]},r="(?:"+h.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};h.escape=j(_),h.unescape=j(w),h.result=function(n,t){if(null==n)return void 0;var r=n[t];return h.isFunction(r)?n[t]():r};var x=0;h.uniqueId=function(n){var t=++x+"";return n?n+t:t},h.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var A=/(.)^/,k={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},O=/\\|'|\r|\n|\u2028|\u2029/g,F=function(n){return"\\"+k[n]};h.template=function(n,t,r){!t&&r&&(t=r),t=h.defaults({},t,h.templateSettings);var e=RegExp([(t.escape||A).source,(t.interpolate||A).source,(t.evaluate||A).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,a,o){return i+=n.slice(u,o).replace(O,F),u=o+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":a&&(i+="';\n"+a+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var a=new Function(t.variable||"obj","_",i)}catch(o){throw o.source=i,o}var l=function(n){return a.call(this,n,h)},c=t.variable||"obj";return l.source="function("+c+"){\n"+i+"}",l},h.chain=function(n){var t=h(n);return t._chain=!0,t};var E=function(n){return this._chain?h(n).chain():n};h.mixin=function(n){h.each(h.functions(n),function(t){var r=h[t]=n[t];h.prototype[t]=function(){var n=[this._wrapped];return i.apply(n,arguments),E.call(this,r.apply(h,n))}})},h.mixin(h),h.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=r[n];h.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],E.call(this,r)}}),h.each(["concat","join","slice"],function(n){var t=r[n];h.prototype[n]=function(){return E.call(this,t.apply(this._wrapped,arguments))}}),h.prototype.value=function(){return this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return h})}).call(this); diff --git a/package.json b/package.json deleted file mode 100644 index c43c7147c5..0000000000 --- a/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "homeland", - "private": true, - "scripts": { - "start": "./bin/shakapacker-dev-server" - }, - "dependencies": { - "@babel/core": "7.18.2", - "@babel/plugin-transform-runtime": "7.18.2", - "@babel/preset-env": "7.18.2", - "@babel/preset-typescript": "7.17.12", - "@babel/runtime": "7.18.3", - "@fortawesome/fontawesome-free": "^6.2.0", - "@popperjs/core": "^2.11.8", - "@prettier/plugin-ruby": "^2", - "@rails/actioncable": "~7.1.1", - "@rails/ujs": "~7.1.1", - "autoprefixer": "~10.4.17", - "babel-loader": "8.2.5", - "backbone": "~1.4", - "bootstrap": "~5.3.3", - "bootstrap-select": "^1.14.0-beta2", - "compression-webpack-plugin": "9", - "css-loader": "^6.5.1", - "css-minimizer-webpack-plugin": "^3.3.1", - "deep-assign": "^3.0.0", - "dropzone": "~5.7", - "i18next": "^21.6.11", - "jquery": "~1.12", - "jquery.caret": "~0.3.1", - "mini-css-extract-plugin": "^2.4.5", - "popper.js": "~1.16", - "postcss": "^8.4.31", - "postcss-flexbugs-fixes": "^5.0.2", - "postcss-import": "^14.0.2", - "postcss-loader": "^6.2.1", - "postcss-preset-env": "^7.1.0", - "prettier": "^2", - "prettier-plugin-erb": "^0", - "rails-erb-loader": "^5.5.2", - "sass": "1.52.1", - "sass-loader": "^12.4.0", - "shakapacker": "=7.2.3", - "style-loader": "^3.3.1", - "tailwindcss": "^3.3.2", - "terser-webpack-plugin": "5", - "turbolinks": "~5.2", - "turbolinks-prefetch": "~1.0", - "typescript": "4.7.2", - "underscore": "~1.13.3", - "webpack": "^5.72.0", - "webpack-assets-manifest": "5", - "webpack-cli": "^4.8.0", - "webpack-merge": "5" - }, - "babel": { - "presets": [ - "./node_modules/shakapacker/package/babel/preset.js" - ] - }, - "devDependencies": { - "prettier-plugin-sort-json": "^0.0.2", - "webpack-dev-server": "4.9.0" - }, - "resolutions": { - "@types/retry": "~0.12.5", - "autoprefixer": "~10.4.17", - "mdn-data": "~2.0.30", - "merge-descriptors": "~1.0.3" - } -} diff --git a/postcss.config.js b/postcss.config.js deleted file mode 100644 index bf276a7cb0..0000000000 --- a/postcss.config.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: { - - }, - autoprefixer: {}, - 'postcss-import': {}, - 'postcss-flexbugs-fixes':{ - - }, - 'postcss-preset-env': { - autoprefixer: { - flexbox: "no-2009", - }, - stage: 3 - } - }, -}; diff --git a/vendor/javascript/.keep b/vendor/javascript/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/vendor/javascript/@popperjs--core.js b/vendor/javascript/@popperjs--core.js new file mode 100644 index 0000000000..4dc259b205 --- /dev/null +++ b/vendor/javascript/@popperjs--core.js @@ -0,0 +1,3 @@ +// @popperjs/core@2.11.8 downloaded from https://ga.jspm.io/npm:@popperjs/core@2.11.8/lib/index.js + +export{afterMain,afterRead,afterWrite,auto,basePlacements,beforeMain,beforeRead,beforeWrite,bottom,clippingParents,end,left,main,modifierPhases,placements,popper,read,reference,right,start,top,variationPlacements,viewport,write}from"./enums.js";import"./modifiers/index.js";export{c as createPopperBase,p as popperGenerator}from"../_/a0ba12d2.js";export{createPopper}from"./popper.js";export{createPopper as createPopperLite}from"./popper-lite.js";export{default as detectOverflow}from"./utils/detectOverflow.js";export{default as applyStyles}from"./modifiers/applyStyles.js";export{default as arrow}from"./modifiers/arrow.js";export{default as computeStyles}from"./modifiers/computeStyles.js";export{default as eventListeners}from"./modifiers/eventListeners.js";export{default as flip}from"./modifiers/flip.js";export{default as hide}from"./modifiers/hide.js";export{default as offset}from"./modifiers/offset.js";export{default as popperOffsets}from"./modifiers/popperOffsets.js";export{default as preventOverflow}from"./modifiers/preventOverflow.js";import"./dom-utils/getCompositeRect.js";import"../_/7a91f8b9.js";import"./dom-utils/instanceOf.js";import"./dom-utils/getWindow.js";import"../_/7742d4ca.js";import"../_/b8df2d1e.js";import"./dom-utils/getNodeScroll.js";import"./dom-utils/getWindowScroll.js";import"./dom-utils/getHTMLElementScroll.js";import"./dom-utils/getNodeName.js";import"./dom-utils/getWindowScrollBarX.js";import"./dom-utils/getDocumentElement.js";import"./dom-utils/isScrollParent.js";import"./dom-utils/getComputedStyle.js";import"./dom-utils/getLayoutRect.js";import"./dom-utils/listScrollParents.js";import"./dom-utils/getScrollParent.js";import"./dom-utils/getParentNode.js";import"./dom-utils/getOffsetParent.js";import"../_/084d303b.js";import"./dom-utils/getViewportRect.js";import"./dom-utils/getDocumentRect.js";import"../_/a9ca29ce.js";import"../_/bb24ce41.js";import"../_/2d19854a.js";import"../_/c7d11060.js";import"./utils/getMainAxisFromPlacement.js";import"../_/1ba79728.js";import"../_/6a201025.js";import"./utils/getOppositePlacement.js";import"./utils/getOppositeVariationPlacement.js";import"./utils/computeAutoPlacement.js"; diff --git a/lib/assets/javascripts/backbone.js b/vendor/javascript/backbone.js similarity index 100% rename from lib/assets/javascripts/backbone.js rename to vendor/javascript/backbone.js diff --git a/vendor/javascript/bootstrap-select.js b/vendor/javascript/bootstrap-select.js new file mode 100644 index 0000000000..44b7431dd7 --- /dev/null +++ b/vendor/javascript/bootstrap-select.js @@ -0,0 +1,20 @@ +// bootstrap-select@1.14.0 downloaded from https://ga.jspm.io/npm:bootstrap-select@1.14.0-beta3/dist/js/bootstrap-select.js + +import*as e from"jquery";var t="default"in e?e.default:e;var i="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:global;var s={};(function(e,i){void 0===e&&void 0!==window&&(e=window);s?s=i(t):i(e.jQuery)})(s,(function(e){(function(e){var t=["sanitize","whiteList","sanitizeFn"];var s=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"];var n=/^aria-[\w-]*$/i;var o={"*":["class","dir","id","lang","role","tabindex","style",n],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:[]};var l=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;var r=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;var a=["title","placeholder"];function allowedAttribute(t,i){var n=t.nodeName.toLowerCase();if(-1!==e.inArray(n,i))return-1===e.inArray(n,s)||Boolean(t.nodeValue.match(l)||t.nodeValue.match(r));var o=e(i).filter((function(e,t){return t instanceof RegExp}));for(var a=0,c=o.length;a1?arguments[1]:void 0;var a=r?Number(r):0;a!=a&&(a=0);var c=Math.min(Math.max(a,0),n);if(l+c>n)return false;var d=-1;while(++d1){for(var s=0;s]+>/g,""));s&&(a=normalizeToBase(a));a=a.toUpperCase();o="function"===typeof i?i(a,t):"contains"===i?a.indexOf(t)>=0:a.startsWith(t);if(o)break}}return o}function toInteger(e){return parseInt(e,10)||0}var v={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"};var g=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;var b="\\u0300-\\u036f",w="\\ufe20-\\ufe2f",k="\\u20d0-\\u20ff",I="\\u1ab0-\\u1aff",y="\\u1dc0-\\u1dff",x=b+w+k+I+y;var E="["+x+"]";var S=RegExp(E,"g");function deburrLetter(e){return v[e]}function normalizeToBase(e){e=e.toString();return e&&e.replace(g,deburrLetter).replace(S,"")}var $={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};var createEscaper=function(e){var escaper=function(t){return e[t]};var t="(?:"+Object.keys(e).join("|")+")";var i=RegExp(t);var s=RegExp(t,"g");return function(e){e=null==e?"":""+e;return i.test(e)?e.replace(s,escaper):e}};var O=createEscaper($);var C={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};var A={ESCAPE:27,ENTER:13,SPACE:32,TAB:9,ARROW_UP:38,ARROW_DOWN:40};var T=window.Dropdown||bootstrap.Dropdown;function getVersion(){var t;try{t=e.fn.dropdown.Constructor.VERSION}catch(e){t=T.VERSION}return t}var z={success:false,major:"3"};try{z.full=(getVersion()||"").split(" ")[0].split(".");z.major=z.full[0];z.success=true}catch(e){}var D=0;var N=".bs.select";var L={DISABLED:"disabled",DIVIDER:"divider",SHOW:"open",DROPUP:"dropup",MENU:"dropdown-menu",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",BUTTONCLASS:"btn-default",POPOVERHEADER:"popover-title",ICONBASE:"glyphicon",TICKICON:"glyphicon-ok"};var H={MENU:"."+L.MENU,DATA_TOGGLE:'data-toggle="dropdown"'};var P={div:document.createElement("div"),span:document.createElement("span"),i:document.createElement("i"),subtext:document.createElement("small"),a:document.createElement("a"),li:document.createElement("li"),whitespace:document.createTextNode(" "),fragment:document.createDocumentFragment(),option:document.createElement("option")};P.selectedOption=P.option.cloneNode(false);P.selectedOption.setAttribute("selected",true);P.noResults=P.li.cloneNode(false);P.noResults.className="no-results";P.a.setAttribute("role","option");P.a.className="dropdown-item";P.subtext.className="text-muted";P.text=P.span.cloneNode(false);P.text.className="text";P.checkMark=P.span.cloneNode(false);var W=new RegExp(A.ARROW_UP+"|"+A.ARROW_DOWN);var R=new RegExp("^"+A.TAB+"$|"+A.ESCAPE);var M={li:function(e,t,i){var s=P.li.cloneNode(false);e&&(1===e.nodeType||11===e.nodeType?s.appendChild(e):s.innerHTML=e);"undefined"!==typeof t&&""!==t&&(s.className=t);"undefined"!==typeof i&&null!==i&&s.classList.add("optgroup-"+i);return s},a:function(e,t,i){var s=P.a.cloneNode(true);e&&(11===e.nodeType?s.appendChild(e):s.insertAdjacentHTML("beforeend",e));"undefined"!==typeof t&&""!==t&&s.classList.add.apply(s.classList,t.split(/\s+/));i&&s.setAttribute("style",i);return s},text:function(e,t){var s,n,o=P.text.cloneNode(false);if(e.content)o.innerHTML=e.content;else{o.textContent=e.text;if(e.icon){var l=P.whitespace.cloneNode(false);n=(true===t?P.i:P.span).cloneNode(false);n.className=(this||i).options.iconBase+" "+e.icon;P.fragment.appendChild(n);P.fragment.appendChild(l)}if(e.subtext){s=P.subtext.cloneNode(false);s.textContent=e.subtext;o.appendChild(s)}}if(true===t)while(o.childNodes.length>0)P.fragment.appendChild(o.childNodes[0]);else P.fragment.appendChild(o);return P.fragment},label:function(e){var t,s,n=P.text.cloneNode(false);n.innerHTML=e.display;if(e.icon){var o=P.whitespace.cloneNode(false);s=P.span.cloneNode(false);s.className=(this||i).options.iconBase+" "+e.icon;P.fragment.appendChild(s);P.fragment.appendChild(o)}if(e.subtext){t=P.subtext.cloneNode(false);t.textContent=e.subtext;n.appendChild(t)}P.fragment.appendChild(n);return P.fragment}};var B={fromOption:function(e,t){var i;switch(t){case"divider":i="true"===e.getAttribute("data-divider");break;case"text":i=e.textContent;break;case"label":i=e.label;break;case"style":i=e.style.cssText;break;case"title":i=e.title;break;default:i=e.getAttribute("data-"+toKebabCase(t));break}return i},fromDataSource:function(e,t){var i;switch(t){case"text":case"label":i=e.text||e.value||"";break;default:i=e[t];break}return i}};function showNoResults(e,t){if(!e.length){P.noResults.innerHTML=(this||i).options.noneResultsText.replace("{0}",'"'+O(t)+'"');(this||i).$menuInner[0].firstChild.appendChild(P.noResults)}}function filterHidden(e){return!(e.hidden||(this||i).options.hideDisabled&&e.disabled)}var Selectpicker=function(t,s){var n=this||i;if(!u.useDefault){e.valHooks.select.set=u._set;u.useDefault=true}(this||i).$element=e(t);(this||i).$newElement=null;(this||i).$button=null;(this||i).$menu=null;(this||i).options=s;(this||i).selectpicker={main:{data:[],optionQueue:P.fragment.cloneNode(false),hasMore:false},search:{data:[],hasMore:false},current:{},view:{},optionValuesDataMap:{},isSearching:false,keydown:{keyHistory:"",resetKeyHistory:{start:function(){return setTimeout((function(){n.selectpicker.keydown.keyHistory=""}),800)}}}};(this||i).sizeInfo={};var o=(this||i).options.windowPadding;"number"===typeof o&&((this||i).options.windowPadding=[o,o,o,o]);(this||i).val=Selectpicker.prototype.val;(this||i).render=Selectpicker.prototype.render;(this||i).refresh=Selectpicker.prototype.refresh;(this||i).setStyle=Selectpicker.prototype.setStyle;(this||i).selectAll=Selectpicker.prototype.selectAll;(this||i).deselectAll=Selectpicker.prototype.deselectAll;(this||i).destroy=Selectpicker.prototype.destroy;(this||i).remove=Selectpicker.prototype.remove;(this||i).show=Selectpicker.prototype.show;(this||i).hide=Selectpicker.prototype.hide;this.init()};Selectpicker.VERSION="1.14.0-beta3";Selectpicker.DEFAULTS={noneSelectedText:"Nothing selected",noneResultsText:"No results matched {0}",countSelectedText:function(e,t){return 1==e?"{0} item selected":"{0} items selected"},maxOptionsText:function(e,t){return[1==e?"Limit reached ({n} item max)":"Limit reached ({n} items max)",1==t?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",source:{pageSize:40},chunkSize:40,doneButton:false,doneButtonText:"Close",multipleSeparator:", ",styleBase:"btn",style:L.BUTTONCLASS,size:"auto",title:null,placeholder:null,allowClear:false,selectedTextFormat:"values",width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,liveSearchPlaceholder:null,liveSearchNormalize:false,liveSearchStyle:"contains",actionsBox:false,iconBase:L.ICONBASE,tickIcon:L.TICKICON,showTick:false,template:{caret:''},maxOptions:false,mobile:false,selectOnTab:true,dropdownAlignRight:false,windowPadding:0,virtualScroll:600,display:false,sanitize:true,sanitizeFn:null,whiteList:o};Selectpicker.prototype={constructor:Selectpicker,init:function(){var t=this||i,s=(this||i).$element.attr("id"),n=(this||i).$element[0],o=n.form;D++;(this||i).selectId="bs-select-"+D;n.classList.add("bs-select-hidden");(this||i).multiple=(this||i).$element.prop("multiple");(this||i).autofocus=(this||i).$element.prop("autofocus");n.classList.contains("show-tick")&&((this||i).options.showTick=true);(this||i).$newElement=this.createDropdown();(this||i).$element.after((this||i).$newElement).prependTo((this||i).$newElement);if(o&&null===n.form){o.id||(o.id="form-"+(this||i).selectId);n.setAttribute("form",o.id)}(this||i).$button=(this||i).$newElement.children("button");(this||i).options.allowClear&&((this||i).$clearButton=(this||i).$button.children(".bs-select-clear-selected"));(this||i).$menu=(this||i).$newElement.children(H.MENU);(this||i).$menuInner=(this||i).$menu.children(".inner");(this||i).$searchbox=(this||i).$menu.find("input");n.classList.remove("bs-select-hidden");this.fetchData((function(){t.render(true);t.buildList();requestAnimationFrame((function(){t.$element.trigger("loaded"+N)}))}));true===(this||i).options.dropdownAlignRight&&(this||i).$menu[0].classList.add(L.MENURIGHT);"undefined"!==typeof s&&(this||i).$button.attr("data-id",s);this.checkDisabled();this.clickListener();z.major>4&&((this||i).dropdown=new T((this||i).$button[0]));if((this||i).options.liveSearch){this.liveSearchListener();(this||i).focusedParent=(this||i).$searchbox[0]}else(this||i).focusedParent=(this||i).$menuInner[0];this.setStyle();this.setWidth();(this||i).options.container?this.selectPosition():(this||i).$element.on("hide"+N,(function(){if(t.isVirtual()){var e=t.$menuInner[0],i=e.firstChild.cloneNode(false);e.replaceChild(i,e.firstChild);e.scrollTop=0}}));(this||i).$menu.data("this",this||i);(this||i).$newElement.data("this",this||i);(this||i).options.mobile&&this.mobile();(this||i).$newElement.on({"hide.bs.dropdown":function(e){t.$element.trigger("hide"+N,e)},"hidden.bs.dropdown":function(e){t.$element.trigger("hidden"+N,e)},"show.bs.dropdown":function(e){t.$element.trigger("show"+N,e)},"shown.bs.dropdown":function(e){t.$element.trigger("shown"+N,e)}});n.hasAttribute("required")&&(this||i).$element.on("invalid"+N,(function(){t.$button[0].classList.add("bs-invalid");t.$element.on("shown"+N+".invalid",(function(){t.$element.val(t.$element.val()).off("shown"+N+".invalid")})).on("rendered"+N,(function(){(this||i).validity.valid&&t.$button[0].classList.remove("bs-invalid");t.$element.off("rendered"+N)}));t.$button.on("blur"+N,(function(){t.$element.trigger("focus").trigger("blur");t.$button.off("blur"+N)}))}));o&&e(o).on("reset"+N,(function(){requestAnimationFrame((function(){t.render()}))}))},createDropdown:function(){var t=(this||i).multiple||(this||i).options.showTick?" show-tick":"",s=(this||i).multiple?' aria-multiselectable="true"':"",n="",o=(this||i).autofocus?" autofocus":"";z.major<4&&(this||i).$element.parent().hasClass("input-group")&&(n=" input-group-btn");var l,r="",a="",c="",d="",h="";(this||i).options.header&&(r='
'+(this||i).options.header+"
");(this||i).options.liveSearch&&(a='');(this||i).multiple&&(this||i).options.actionsBox&&(c='
");(this||i).multiple&&(this||i).options.doneButton&&(d='
");(this||i).options.allowClear&&(h='×');l='";return e(l)},setPositionData:function(){(this||i).selectpicker.view.canHighlight=[];(this||i).selectpicker.view.size=0;(this||i).selectpicker.view.firstHighlightIndex=false;for(var e=0;e<(this||i).selectpicker.current.data.length;e++){var t=(this||i).selectpicker.current.data[e],s=true;if("divider"===t.type){s=false;t.height=(this||i).sizeInfo.dividerHeight}else if("optgroup-label"===t.type){s=false;t.height=(this||i).sizeInfo.dropdownHeaderHeight}else t.height=(this||i).sizeInfo.liHeight;t.disabled&&(s=false);(this||i).selectpicker.view.canHighlight.push(s);if(s){(this||i).selectpicker.view.size++;t.posinset=(this||i).selectpicker.view.size;false===(this||i).selectpicker.view.firstHighlightIndex&&((this||i).selectpicker.view.firstHighlightIndex=e)}t.position=(0===e?0:(this||i).selectpicker.current.data[e-1].position)+t.height}},isVirtual:function(){return false!==(this||i).options.virtualScroll&&(this||i).selectpicker.main.data.length>=(this||i).options.virtualScroll||true===(this||i).options.virtualScroll},createView:function(t,s,n){var o=this||i,l=0;(this||i).selectpicker.isSearching=t;(this||i).selectpicker.current=t?(this||i).selectpicker.search:(this||i).selectpicker.main;this.setPositionData();if(s)if(n)l=(this||i).$menuInner[0].scrollTop;else if(!o.multiple){var r=o.$element[0],a=(r.options[r.selectedIndex]||{}).liIndex;if("number"===typeof a&&false!==o.options.size){var c=o.selectpicker.main.data[a],d=c&&c.position;d&&(l=d-(o.sizeInfo.menuInnerHeight+o.sizeInfo.liHeight)/2)}}scroll(l,true);(this||i).$menuInner.off("scroll.createView").on("scroll.createView",(function(e,t){o.noScroll||scroll((this||i).scrollTop,t);o.noScroll=false}));function scroll(e,i){var s,n,l,r,a,c,d,h,p=o.selectpicker.current.data.length,u=[],f=true,m=o.isVirtual();o.selectpicker.view.scrollTop=e;s=o.options.chunkSize;n=Math.ceil(p/s)||1;for(var v=0;vp-1?0:o.selectpicker.current.data[p-1].position-o.selectpicker.current.data[o.selectpicker.view.position1-1].position;k.firstChild.style.marginTop=b+"px";k.firstChild.style.marginBottom=w+"px"}else{k.firstChild.style.marginTop=0;k.firstChild.style.marginBottom=0}k.firstChild.appendChild(I);if(true===m&&o.sizeInfo.hasScrollBar){var A=k.firstChild.offsetWidth;if(i&&Ao.sizeInfo.selectWidth)k.firstChild.style.minWidth=o.sizeInfo.menuInnerInnerWidth+"px";else if(A>o.sizeInfo.menuInnerInnerWidth){o.$menu[0].style.minWidth=0;var T=k.firstChild.offsetWidth;if(T>o.sizeInfo.menuInnerInnerWidth){o.sizeInfo.menuInnerInnerWidth=T;k.firstChild.style.minWidth=o.sizeInfo.menuInnerInnerWidth+"px"}o.$menu[0].style.minWidth=""}}}if((!t&&o.options.source.data||t&&o.options.source.search)&&o.selectpicker.current.hasMore&&a===n-1&&e>0){var z=Math.floor(a*o.options.chunkSize/o.options.source.pageSize)+2;o.fetchData((function(){o.render();o.buildList(p,t);o.setPositionData();scroll(e)}),t?"search":"data",z,t?o.selectpicker.search.previousValue:void 0)}}o.prevActiveElement=o.activeElement;if(o.options.liveSearch){if(t&&i){var D,N=0;o.selectpicker.view.canHighlight[N]||(N=1+o.selectpicker.view.canHighlight.slice(1).indexOf(true));D=o.selectpicker.view.visibleElements[N];o.defocusItem(o.selectpicker.view.currentActive);o.activeElement=(o.selectpicker.current.data[N]||{}).element;o.focusItem(D)}}else o.$menuInner.trigger("focus")}e(window).off("resize"+N+"."+(this||i).selectId+".createView").on("resize"+N+"."+(this||i).selectId+".createView",(function(){var e=o.$newElement.hasClass(L.SHOW);e&&scroll(o.$menuInner[0].scrollTop)}))},focusItem:function(e,t,s){if(e){t=t||(this||i).selectpicker.current.data[(this||i).selectpicker.current.elements.indexOf((this||i).activeElement)];var n=e.firstChild;if(n){n.setAttribute("aria-setsize",(this||i).selectpicker.view.size);n.setAttribute("aria-posinset",t.posinset);if(true!==s){(this||i).focusedParent.setAttribute("aria-activedescendant",n.id);e.classList.add("active");n.classList.add("active")}}}},defocusItem:function(e){if(e){e.classList.remove("active");e.firstChild&&e.firstChild.classList.remove("active")}},setPlaceholder:function(){var e=this||i,t=false;if(((this||i).options.placeholder||(this||i).options.allowClear)&&!(this||i).multiple){(this||i).selectpicker.view.titleOption||((this||i).selectpicker.view.titleOption=document.createElement("option"));t=true;var s=(this||i).$element[0],n=false,o=!(this||i).selectpicker.view.titleOption.parentNode,l=s.selectedIndex,r=s.options[l],a=s.querySelector("select > *:not(:disabled)"),c=a?a.index:0,d=window.performance&&window.performance.getEntriesByType("navigation"),h=d&&d.length?"back_forward"!==d[0].type:2!==window.performance.navigation.type;if(o){(this||i).selectpicker.view.titleOption.className="bs-title-option";(this||i).selectpicker.view.titleOption.value="";n=!r||l===c&&false===r.defaultSelected&&void 0===(this||i).$element.data("selected")}(o||0!==(this||i).selectpicker.view.titleOption.index)&&s.insertBefore((this||i).selectpicker.view.titleOption,s.firstChild);n&&h?s.selectedIndex=0:"complete"!==document.readyState&&window.addEventListener("pageshow",(function(){e.selectpicker.view.displayedValue!==s.value&&e.render()}))}return t},fetchData:function(e,t,s,n){s=s||1;t=t||"data";var o,l=this||i,r=(this||i).options.source[t];if(r){(this||i).options.virtualScroll=true;if("function"===typeof r)r.call(this||i,(function(i,s,n){var r=l.selectpicker["search"===t?"search":"main"];r.hasMore=s;r.totalItems=n;o=l.buildData(i,t);e.call(l,o);l.$element.trigger("fetched"+N)}),s,n);else if(Array.isArray(r)){o=l.buildData(r,t);e.call(l,o)}}else{o=this.buildData(false,t);e.call(l,o)}},buildData:function(t,s){var n=this||i;var o=false===t?B.fromOption:B.fromDataSource;var l=':not([hidden]):not([data-hidden="true"]):not([style*="display: none"])',r=[],a=(this||i).selectpicker.main.data?(this||i).selectpicker.main.data.length:0,c=0,d=this.setPlaceholder()&&!t?1:0;"search"===s&&(a=(this||i).selectpicker.search.data.length);(this||i).options.hideDisabled&&(l+=":not(:disabled)");var h=t?t.filter(filterHidden,this||i):(this||i).$element[0].querySelectorAll("select > *"+l);function addDivider(e){var t=r[r.length-1];if(!t||"divider"!==t.type||!t.optID&&!e.optID){e=e||{};e.type="divider";r.push(e)}}function addOption(i,s){s=s||{};s.divider=o(i,"divider");if(true===s.divider)addDivider({optID:s.optID});else{var l=r.length+a,c=o(i,"style"),d=c?O(c):"",h=(i.className||"")+(s.optgroupClass||"");s.optID&&(h="opt "+h);s.optionClass=h.trim();s.inlineStyle=d;s.text=o(i,"text");s.title=o(i,"title");s.content=o(i,"content");s.tokens=o(i,"tokens");s.subtext=o(i,"subtext");s.icon=o(i,"icon");s.display=s.content||s.text;s.value=void 0===i.value?i.text:i.value;s.type="option";s.index=l;s.option=i.option?i.option:i;s.option.liIndex=l;s.selected=!!i.selected;s.disabled=s.disabled||!!i.disabled;false!==t&&(n.selectpicker.optionValuesDataMap[s.value]?s=e.extend(n.selectpicker.optionValuesDataMap[s.value],s):n.selectpicker.optionValuesDataMap[s.value]=s);r.push(s)}}function addOptgroup(e,s){var n=s[e],a=!(e-1l){l=n;s.selectpicker.view.widestOption=e[e.length-1]}}var r=e||0;for(var a=n.length,c=r;c li")},render:function(e){var t,s,n=this||i,o=(this||i).$element[0],l=this.setPlaceholder()&&0===o.selectedIndex,r=getSelectedOptions.call(this||i),a=r.length,c=getSelectValues.call(this||i,r),d=(this||i).$button[0],h=d.querySelector(".filter-option-inner-inner"),p=document.createTextNode((this||i).options.multipleSeparator),u=P.fragment.cloneNode(false),f=false;function createSelected(e){e.selected?n.createOption(e,true):e.children&&e.children.length&&e.children.map(createSelected)}if((this||i).options.source.data&&e){r.map(createSelected);o.appendChild((this||i).selectpicker.main.optionQueue);l&&(l=0===o.selectedIndex)}d.classList.toggle("bs-placeholder",n.multiple?!a:!c&&0!==c);n.multiple||1!==r.length||(n.selectpicker.view.displayedValue=c);if("static"===(this||i).options.selectedTextFormat)u=M.text.call(this||i,{text:(this||i).options.placeholder},true);else{t=(this||i).multiple&&-1!==(this||i).options.selectedTextFormat.indexOf("count")&&a>0;if(t){s=(this||i).options.selectedTextFormat.split(">");t=s.length>1&&a>s[1]||1===s.length&&a>=2}if(false===t){if(!l){for(var m=0;m0&&u.appendChild(p.cloneNode(false));if(v.title)g.text=v.title;else if(v.content&&n.options.showContent){g.content=v.content.toString();f=true}else{n.options.showIcon&&(g.icon=v.icon);n.options.showSubtext&&!n.multiple&&v.subtext&&(g.subtext=" "+v.subtext);g.text=v.text.trim()}u.appendChild(M.text.call(this||i,g,true))}}a>49&&u.appendChild(document.createTextNode("..."))}}else{var b=':not([hidden]):not([data-hidden="true"]):not([data-divider="true"]):not([style*="display: none"])';(this||i).options.hideDisabled&&(b+=":not(:disabled)");var w=(this||i).$element[0].querySelectorAll("select > option"+b+", optgroup"+b+" option"+b).length,k="function"===typeof(this||i).options.countSelectedText?(this||i).options.countSelectedText(a,w):(this||i).options.countSelectedText;u=M.text.call(this||i,{text:k.replace("{0}",a.toString()).replace("{1}",w.toString())},true)}}u.childNodes.length||(u=M.text.call(this||i,{text:(this||i).options.placeholder?(this||i).options.placeholder:(this||i).options.noneSelectedText},true));d.title=u.textContent.replace(/<[^>]*>?/g,"").trim();(this||i).options.sanitize&&f&&sanitizeHtml([u],n.options.whiteList,n.options.sanitizeFn);h.innerHTML="";h.appendChild(u);if(z.major<4&&(this||i).$newElement[0].classList.contains("bs3-has-addon")){var I=d.querySelector(".filter-expand"),y=h.cloneNode(true);y.className="filter-expand";I?d.replaceChild(y,I):d.appendChild(y)}(this||i).$element.trigger("rendered"+N)}, +/** + * @param [style] + * @param [status] + */ +setStyle:function(e,t){var s,n=(this||i).$button[0],o=(this||i).$newElement[0],l=(this||i).options.style.trim();(this||i).$element.attr("class")&&(this||i).$newElement.addClass((this||i).$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));if(z.major<4){o.classList.add("bs3");o.parentNode.classList&&o.parentNode.classList.contains("input-group")&&(o.previousElementSibling||o.nextElementSibling)&&(o.previousElementSibling||o.nextElementSibling).classList.contains("input-group-addon")&&o.classList.add("bs3-has-addon")}s=e?e.trim():l;if("add"==t)s&&n.classList.add.apply(n.classList,s.split(" "));else if("remove"==t)s&&n.classList.remove.apply(n.classList,s.split(" "));else{l&&n.classList.remove.apply(n.classList,l.split(" "));s&&n.classList.add.apply(n.classList,s.split(" "))}},liHeight:function(t){if(t||false!==(this||i).options.size&&!Object.keys((this||i).sizeInfo).length){var s,n=P.div.cloneNode(false),o=P.div.cloneNode(false),l=P.div.cloneNode(false),r=document.createElement("ul"),a=P.li.cloneNode(false),c=P.li.cloneNode(false),d=P.a.cloneNode(false),h=P.span.cloneNode(false),p=(this||i).options.header&&(this||i).$menu.find("."+L.POPOVERHEADER).length>0?(this||i).$menu.find("."+L.POPOVERHEADER)[0].cloneNode(true):null,u=(this||i).options.liveSearch?P.div.cloneNode(false):null,f=(this||i).options.actionsBox&&(this||i).multiple&&(this||i).$menu.find(".bs-actionsbox").length>0?(this||i).$menu.find(".bs-actionsbox")[0].cloneNode(true):null,m=(this||i).options.doneButton&&(this||i).multiple&&(this||i).$menu.find(".bs-donebutton").length>0?(this||i).$menu.find(".bs-donebutton")[0].cloneNode(true):null,v=(this||i).$element[0].options[0];(this||i).sizeInfo.selectWidth=(this||i).$newElement[0].offsetWidth;h.className="text";d.className="dropdown-item "+(v?v.className:"");n.className=(this||i).$menu[0].parentNode.className+" "+L.SHOW;n.style.width=0;"auto"===(this||i).options.width&&(o.style.minWidth=0);o.className=L.MENU+" "+L.SHOW;l.className="inner "+L.SHOW;r.className=L.MENU+" inner "+(z.major>="4"?L.SHOW:"");a.className=L.DIVIDER;c.className="dropdown-header";h.appendChild(document.createTextNode("​"));if((this||i).selectpicker.current.data.length)for(var g=0;g<(this||i).selectpicker.current.data.length;g++){var b=(this||i).selectpicker.current.data[g];if("option"===b.type&&"none"!==e(b.element.firstChild).css("display")){s=b.element;break}}else{s=P.li.cloneNode(false);d.appendChild(h);s.appendChild(d)}c.appendChild(h.cloneNode(true));(this||i).selectpicker.view.widestOption&&r.appendChild((this||i).selectpicker.view.widestOption.cloneNode(true));r.appendChild(s);r.appendChild(a);r.appendChild(c);p&&o.appendChild(p);if(u){var w=document.createElement("input");u.className="bs-searchbox";w.className="form-control";u.appendChild(w);o.appendChild(u)}f&&o.appendChild(f);l.appendChild(r);o.appendChild(l);m&&o.appendChild(m);n.appendChild(o);document.body.appendChild(n);var k,I=s.offsetHeight,y=c?c.offsetHeight:0,x=p?p.offsetHeight:0,E=u?u.offsetHeight:0,S=f?f.offsetHeight:0,$=m?m.offsetHeight:0,O=e(a).outerHeight(true),C=window.getComputedStyle(o),A=o.offsetWidth,T={vert:toInteger(C.paddingTop)+toInteger(C.paddingBottom)+toInteger(C.borderTopWidth)+toInteger(C.borderBottomWidth),horiz:toInteger(C.paddingLeft)+toInteger(C.paddingRight)+toInteger(C.borderLeftWidth)+toInteger(C.borderRightWidth)},D={vert:T.vert+toInteger(C.marginTop)+toInteger(C.marginBottom)+2,horiz:T.horiz+toInteger(C.marginLeft)+toInteger(C.marginRight)+2};l.style.overflowY="scroll";k=o.offsetWidth-A;document.body.removeChild(n);(this||i).sizeInfo.liHeight=I;(this||i).sizeInfo.dropdownHeaderHeight=y;(this||i).sizeInfo.headerHeight=x;(this||i).sizeInfo.searchHeight=E;(this||i).sizeInfo.actionsHeight=S;(this||i).sizeInfo.doneButtonHeight=$;(this||i).sizeInfo.dividerHeight=O;(this||i).sizeInfo.menuPadding=T;(this||i).sizeInfo.menuExtras=D;(this||i).sizeInfo.menuWidth=A;(this||i).sizeInfo.menuInnerInnerWidth=A-T.horiz;(this||i).sizeInfo.totalMenuWidth=(this||i).sizeInfo.menuWidth;(this||i).sizeInfo.scrollBarWidth=k;(this||i).sizeInfo.selectHeight=(this||i).$newElement[0].offsetHeight;this.setPositionData()}},getSelectPosition:function(){var t,s=this||i,n=e(window),o=s.$newElement.offset(),l=e(s.options.container);if(s.options.container&&l.length&&!l.is("body")){t=l.offset();t.top+=parseInt(l.css("borderTopWidth"));t.left+=parseInt(l.css("borderLeftWidth"))}else t={top:0,left:0};var r=s.options.windowPadding;(this||i).sizeInfo.selectOffsetTop=o.top-t.top-n.scrollTop();(this||i).sizeInfo.selectOffsetBot=n.height()-(this||i).sizeInfo.selectOffsetTop-(this||i).sizeInfo.selectHeight-t.top-r[2];(this||i).sizeInfo.selectOffsetLeft=o.left-t.left-n.scrollLeft();(this||i).sizeInfo.selectOffsetRight=n.width()-(this||i).sizeInfo.selectOffsetLeft-(this||i).sizeInfo.selectWidth-t.left-r[1];(this||i).sizeInfo.selectOffsetTop-=r[0];(this||i).sizeInfo.selectOffsetLeft-=r[3]},setMenuSize:function(e){this.getSelectPosition();var t,s,n,o,l,r,a,c,d=(this||i).sizeInfo.selectWidth,h=(this||i).sizeInfo.liHeight,p=(this||i).sizeInfo.headerHeight,u=(this||i).sizeInfo.searchHeight,f=(this||i).sizeInfo.actionsHeight,m=(this||i).sizeInfo.doneButtonHeight,v=(this||i).sizeInfo.dividerHeight,g=(this||i).sizeInfo.menuPadding,b=0;if((this||i).options.dropupAuto){a=h*(this||i).selectpicker.current.data.length+g.vert;c=(this||i).sizeInfo.selectOffsetTop-(this||i).sizeInfo.selectOffsetBot>(this||i).sizeInfo.menuExtras.vert&&a+(this||i).sizeInfo.menuExtras.vert+50>(this||i).sizeInfo.selectOffsetBot;true===(this||i).selectpicker.isSearching&&(c=(this||i).selectpicker.dropup);(this||i).$newElement.toggleClass(L.DROPUP,c);(this||i).selectpicker.dropup=c}if("auto"===(this||i).options.size){o=(this||i).selectpicker.current.data.length>3?3*(this||i).sizeInfo.liHeight+(this||i).sizeInfo.menuExtras.vert-2:0;s=(this||i).sizeInfo.selectOffsetBot-(this||i).sizeInfo.menuExtras.vert;n=o+p+u+f+m;r=Math.max(o-g.vert,0);(this||i).$newElement.hasClass(L.DROPUP)&&(s=(this||i).sizeInfo.selectOffsetTop-(this||i).sizeInfo.menuExtras.vert);l=s;t=s-p-u-f-m-g.vert}else if((this||i).options.size&&"auto"!=(this||i).options.size&&(this||i).selectpicker.current.elements.length>(this||i).options.size){for(var w=0;w<(this||i).options.size;w++)"divider"===(this||i).selectpicker.current.data[w].type&&b++;s=h*(this||i).options.size+b*v+g.vert;t=s-g.vert;l=s+p+u+f+m;n=r=""}(this||i).$menu.css({"max-height":l+"px",overflow:"hidden","min-height":n+"px"});(this||i).$menuInner.css({"max-height":t+"px",overflow:"hidden auto","min-height":r+"px"});(this||i).sizeInfo.menuInnerHeight=Math.max(t,1);if((this||i).selectpicker.current.data.length&&(this||i).selectpicker.current.data[(this||i).selectpicker.current.data.length-1].position>(this||i).sizeInfo.menuInnerHeight){(this||i).sizeInfo.hasScrollBar=true;(this||i).sizeInfo.totalMenuWidth=(this||i).sizeInfo.menuWidth+(this||i).sizeInfo.scrollBarWidth}"auto"===(this||i).options.dropdownAlignRight&&(this||i).$menu.toggleClass(L.MENURIGHT,(this||i).sizeInfo.selectOffsetLeft>(this||i).sizeInfo.selectOffsetRight&&(this||i).sizeInfo.selectOffsetRight<(this||i).sizeInfo.totalMenuWidth-d);(this||i).dropdown&&(this||i).dropdown._popper&&(this||i).dropdown._popper.update()},setSize:function(t){this.liHeight(t);(this||i).options.header&&(this||i).$menu.css("padding-top",0);if(false!==(this||i).options.size){var s=this||i,n=e(window);this.setMenuSize();(this||i).options.liveSearch&&(this||i).$searchbox.off("input.setMenuSize propertychange.setMenuSize").on("input.setMenuSize propertychange.setMenuSize",(function(){return s.setMenuSize()}));"auto"===(this||i).options.size?n.off("resize"+N+"."+(this||i).selectId+".setMenuSize scroll"+N+"."+(this||i).selectId+".setMenuSize").on("resize"+N+"."+(this||i).selectId+".setMenuSize scroll"+N+"."+(this||i).selectId+".setMenuSize",(function(){return s.setMenuSize()})):(this||i).options.size&&"auto"!=(this||i).options.size&&(this||i).selectpicker.current.elements.length>(this||i).options.size&&n.off("resize"+N+"."+(this||i).selectId+".setMenuSize scroll"+N+"."+(this||i).selectId+".setMenuSize")}this.createView(false,true,t)},setWidth:function(){var e=this||i;if("auto"===(this||i).options.width)requestAnimationFrame((function(){e.$menu.css("min-width","0");e.$element.on("loaded"+N,(function(){e.liHeight();e.setMenuSize();var t=e.$newElement.clone().appendTo("body"),i=t.css("width","auto").children("button").outerWidth();t.remove();e.sizeInfo.selectWidth=Math.max(e.sizeInfo.totalMenuWidth,i);e.$newElement.css("width",e.sizeInfo.selectWidth+"px")}))}));else if("fit"===(this||i).options.width){(this||i).$menu.css("min-width","");(this||i).$newElement.css("width","").addClass("fit-width")}else if((this||i).options.width){(this||i).$menu.css("min-width","");(this||i).$newElement.css("width",(this||i).options.width)}else{(this||i).$menu.css("min-width","");(this||i).$newElement.css("width","")}(this||i).$newElement.hasClass("fit-width")&&"fit"!==(this||i).options.width&&(this||i).$newElement[0].classList.remove("fit-width")},selectPosition:function(){(this||i).$bsContainer=e('
');var t,s,n,o=this||i,l=e((this||i).options.container),getPlacement=function(i){var r={},a=o.options.display||!!e.fn.dropdown.Constructor.Default&&e.fn.dropdown.Constructor.Default.display;o.$bsContainer.addClass(i.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass(L.DROPUP,i.hasClass(L.DROPUP));t=i.offset();if(l.is("body"))s={top:0,left:0};else{s=l.offset();s.top+=parseInt(l.css("borderTopWidth"))-l.scrollTop();s.left+=parseInt(l.css("borderLeftWidth"))-l.scrollLeft()}n=i.hasClass(L.DROPUP)?0:i[0].offsetHeight;if(z.major<4||"static"===a){r.top=t.top-s.top+n;r.left=t.left-s.left}r.width=i[0].offsetWidth;o.$bsContainer.css(r)};(this||i).$button.on("click.bs.dropdown.data-api",(function(){if(!o.isDisabled()){getPlacement(o.$newElement);o.$bsContainer.appendTo(o.options.container).toggleClass(L.SHOW,!o.$button.hasClass(L.SHOW)).append(o.$menu)}}));e(window).off("resize"+N+"."+(this||i).selectId+" scroll"+N+"."+(this||i).selectId).on("resize"+N+"."+(this||i).selectId+" scroll"+N+"."+(this||i).selectId,(function(){var e=o.$newElement.hasClass(L.SHOW);e&&getPlacement(o.$newElement)}));(this||i).$element.on("hide"+N,(function(){o.$menu.data("height",o.$menu.height());o.$bsContainer.detach()}))},createOption:function(e,t){var s=e.option?e.option:e;if(s&&1!==s.nodeType){var n=(t?P.selectedOption:P.option).cloneNode(true);void 0!==s.value&&(n.value=s.value);n.textContent=s.text;n.selected=true;void 0!==s.liIndex?n.liIndex=s.liIndex:t||(n.liIndex=e.index);e.option=n;(this||i).selectpicker.main.optionQueue.appendChild(n)}},setOptionStatus:function(e){var t=this||i;t.noScroll=false;if(t.selectpicker.view.visibleElements&&t.selectpicker.view.visibleElements.length){for(var s=0;s="4"&&t.classList.toggle(L.DISABLED,i);if(i){t.setAttribute("aria-disabled",i);t.setAttribute("tabindex",-1)}else{t.removeAttribute("aria-disabled");t.setAttribute("tabindex",0)}}}},isDisabled:function(){return(this||i).$element[0].disabled},checkDisabled:function(){if(this.isDisabled()){(this||i).$newElement[0].classList.add(L.DISABLED);(this||i).$button.addClass(L.DISABLED).attr("aria-disabled",true)}else if((this||i).$button[0].classList.contains(L.DISABLED)){(this||i).$newElement[0].classList.remove(L.DISABLED);(this||i).$button.removeClass(L.DISABLED).attr("aria-disabled",false)}},clickListener:function(){var t=this||i,s=e(document);s.data("spaceSelect",false);(this||i).$button.on("keyup",(function(e){if(/(32)/.test(e.keyCode.toString(10))&&s.data("spaceSelect")){e.preventDefault();s.data("spaceSelect",false)}}));(this||i).$newElement.on("show.bs.dropdown",(function(){if(!t.dropdown&&"4"===z.major){t.dropdown=t.$button.data("bs.dropdown");t.dropdown._menu=t.$menu[0]}}));function clearSelection(e){if(t.multiple)t.deselectAll();else{var i=t.$element[0],s=i.value,n=i.selectedIndex,o=i.options[n],l=!!o&&t.selectpicker.main.data[o.liIndex];l&&t.setSelected(l,false);i.selectedIndex=0;f=[n,false,s];t.$element.triggerNative("change")}if(t.$newElement.hasClass(L.SHOW)){t.options.liveSearch&&t.$searchbox.trigger("focus");t.createView(false)}}(this||i).$button.on("click.bs.dropdown.data-api",(function(e){if(t.options.allowClear){var i=e.target,s=t.$clearButton[0];/MSIE|Trident/.test(window.navigator.userAgent)&&(i=document.elementFromPoint(e.clientX,e.clientY));if(i===s||i.parentElement===s){e.stopImmediatePropagation();clearSelection(e)}}t.$newElement.hasClass(L.SHOW)||t.setSize()}));function setFocus(){t.options.liveSearch?t.$searchbox.trigger("focus"):t.$menuInner.trigger("focus")}function checkPopperExists(){t.dropdown&&t.dropdown._popper&&t.dropdown._popper.state?setFocus():requestAnimationFrame(checkPopperExists)}(this||i).$element.on("shown"+N,(function(){t.$menuInner[0].scrollTop!==t.selectpicker.view.scrollTop&&(t.$menuInner[0].scrollTop=t.selectpicker.view.scrollTop);z.major>3?requestAnimationFrame(checkPopperExists):setFocus()}));(this||i).$menuInner.on("mouseenter","li a",(function(e){var s=(this||i).parentElement,n=t.isVirtual()?t.selectpicker.view.position0:0,o=Array.prototype.indexOf.call(s.parentElement.children,s),l=t.selectpicker.current.data[o+n];t.focusItem(s,l,true)}));(this||i).$menuInner.on("click","li a",(function(s,n){var o=e(this||i),l=t.$element[0],r=t.isVirtual()?t.selectpicker.view.position0:0,a=t.selectpicker.current.data[o.parent().index()+r],c=a.element,d=getSelectValues.call(t),h=l.selectedIndex,p=l.options[h],u=!!p&&t.selectpicker.main.data[p.liIndex],m=true;t.multiple&&1!==t.options.maxOptions&&s.stopPropagation();s.preventDefault();if(!t.isDisabled()&&!o.parent().hasClass(L.DISABLED)){var v=a.option,g=e(v),b=v.selected,w=t.selectpicker.current.data.find((function(e){return e.optID===a.optID&&"optgroup-label"===e.type})),k=w?w.optgroup:void 0,I=k instanceof Element?B.fromOption:B.fromDataSource,y=k&&k.children,x=parseInt(t.options.maxOptions),E=k&&parseInt(I(k,"maxOptions"))||false;c===t.activeElement&&(n=true);if(!n){t.prevActiveElement=t.activeElement;t.activeElement=void 0}if(t.multiple&&1!==x){t.setSelected(a,!b);t.focusedParent.focus();if(false!==x||false!==E){var S=x
'); +/** @deprecated */if(z[2]){D=D.replace("{var}",z[2][x>1?0:1]);H=H.replace("{var}",z[2][E>1?0:1])}t.$menu.append(P);if(x&&S){P.append(e("
"+D+"
"));m=false;t.$element.trigger("maxReached"+N)}if(E&&C){P.append(e("
"+H+"
"));m=false;t.$element.trigger("maxReachedGrp"+N)}setTimeout((function(){t.setSelected(a,false)}),10);P[0].classList.add("fadeOut");setTimeout((function(){P.remove()}),1050)}}}else{u&&t.setSelected(u,false);t.setSelected(a,true)}t.options.source.data&&t.$element[0].appendChild(t.selectpicker.main.optionQueue);!t.multiple||t.multiple&&1===t.options.maxOptions?t.$button.trigger("focus"):t.options.liveSearch&&t.$searchbox.trigger("focus");if(m&&(t.multiple||h!==l.selectedIndex)){f=[v.index,g.prop("selected"),d];t.$element.triggerNative("change")}}}));(this||i).$menu.on("click","li."+L.DISABLED+" a, ."+L.POPOVERHEADER+", ."+L.POPOVERHEADER+" :not(.close)",(function(s){if(s.currentTarget==(this||i)){s.preventDefault();s.stopPropagation();t.options.liveSearch&&!e(s.target).hasClass("close")?t.$searchbox.trigger("focus"):t.$button.trigger("focus")}}));(this||i).$menuInner.on("click",".divider, .dropdown-header",(function(e){e.preventDefault();e.stopPropagation();t.options.liveSearch?t.$searchbox.trigger("focus"):t.$button.trigger("focus")}));(this||i).$menu.on("click","."+L.POPOVERHEADER+" .close",(function(){t.$button.trigger("click")}));(this||i).$searchbox.on("click",(function(e){e.stopPropagation()}));(this||i).$menu.on("click",".actions-btn",(function(s){t.options.liveSearch?t.$searchbox.trigger("focus"):t.$button.trigger("focus");s.preventDefault();s.stopPropagation();e(this||i).hasClass("bs-select-all")?t.selectAll():t.deselectAll()}));(this||i).$button.on("focus"+N,(function(e){var i=t.$element[0].getAttribute("tabindex");if(void 0!==i&&e.originalEvent&&e.originalEvent.isTrusted){this.setAttribute("tabindex",i);t.$element[0].setAttribute("tabindex",-1);t.selectpicker.view.tabindex=i}})).on("blur"+N,(function(e){if(void 0!==t.selectpicker.view.tabindex&&e.originalEvent&&e.originalEvent.isTrusted){t.$element[0].setAttribute("tabindex",t.selectpicker.view.tabindex);this.setAttribute("tabindex",-1);t.selectpicker.view.tabindex=void 0}}));(this||i).$element.on("change"+N,(function(){t.render();t.$element.trigger("changed"+N,f);f=null})).on("focus"+N,(function(){t.options.mobile||t.$button[0].focus()}))},liveSearchListener:function(){var e=this||i;(this||i).$button.on("click.bs.dropdown.data-api",(function(){if(!!e.$searchbox.val()){e.$searchbox.val("");e.selectpicker.search.previousValue=void 0}}));(this||i).$searchbox.on("click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api",(function(e){e.stopPropagation()}));(this||i).$searchbox.on("input propertychange",(function(){var t=e.$searchbox[0].value;e.selectpicker.search.elements=[];e.selectpicker.search.data=[];if(t){e.selectpicker.search.previousValue=t;if(e.options.source.search)e.fetchData((function(i){e.render();e.buildList(void 0,true);e.noScroll=true;e.$menuInner.scrollTop(0);e.createView(true);showNoResults.call(e,i,t)}),"search",0,t);else{var i=[],s=t.toUpperCase(),n={},o=[],l=e._searchStyle(),r=e.options.liveSearchNormalize;r&&(s=normalizeToBase(s));for(var a=0;a0){n[c.headerIndex-1]=true;o.push(c.headerIndex-1)}n[c.headerIndex]=true;o.push(c.headerIndex);n[c.lastIndex+1]=true}n[a]&&"optgroup-label"!==c.type&&o.push(a)}a=0;for(var d=o.length;a=112&&t.which<=123)){n=h.$menu.hasClass(L.SHOW);if(!n&&(m||t.which>=48&&t.which<=57||t.which>=96&&t.which<=105||t.which>=65&&t.which<=90)){h.$button.trigger("click.bs.dropdown.data-api");if(h.options.liveSearch){h.$searchbox.trigger("focus");return}}if(t.which===A.ESCAPE&&n){t.preventDefault();h.$button.trigger("click.bs.dropdown.data-api").trigger("focus")}if(m){if(!p.length)return;o=h.activeElement;s=o?Array.prototype.indexOf.call(o.parentElement.children,o):-1;-1!==s&&h.defocusItem(o);if(t.which===A.ARROW_UP){-1!==s&&s--;s+b<0&&(s+=p.length);if(!h.selectpicker.view.canHighlight[s+b]){s=h.selectpicker.view.canHighlight.slice(0,s+b).lastIndexOf(true)-b;-1===s&&(s=p.length-1)}}else if(t.which===A.ARROW_DOWN||f){s++;s+b>=h.selectpicker.view.canHighlight.length&&(s=h.selectpicker.view.firstHighlightIndex);h.selectpicker.view.canHighlight[s+b]||(s=s+1+h.selectpicker.view.canHighlight.slice(s+b+1).indexOf(true))}t.preventDefault();var w=b+s;if(t.which===A.ARROW_UP)if(0===b&&s===p.length-1){h.$menuInner[0].scrollTop=h.$menuInner[0].scrollHeight;w=h.selectpicker.current.elements.length-1}else{l=h.selectpicker.current.data[w];if(l){r=l.position-l.height;u=rv}}o=h.selectpicker.current.elements[w];h.activeElement=(h.selectpicker.current.data[w]||{}).element;h.focusItem(o);h.selectpicker.view.currentActive=o;u&&(h.$menuInner[0].scrollTop=r);h.options.liveSearch?h.$searchbox.trigger("focus"):a.trigger("focus")}else if(!a.is("input")&&!R.test(t.which)||t.which===A.SPACE&&h.selectpicker.keydown.keyHistory){var k,I,y=[];t.preventDefault();h.selectpicker.keydown.keyHistory+=C[t.which];h.selectpicker.keydown.resetKeyHistory.cancel&&clearTimeout(h.selectpicker.keydown.resetKeyHistory.cancel);h.selectpicker.keydown.resetKeyHistory.cancel=h.selectpicker.keydown.resetKeyHistory.start();I=h.selectpicker.keydown.keyHistory;/^(.)\1+$/.test(I)&&(I=I.charAt(0));for(var x=0;x0){r=l.position-l.height;u=true}else{r=l.position-h.sizeInfo.menuInnerHeight;u=l.position>v+h.sizeInfo.menuInnerHeight}o=h.selectpicker.main.elements[k];h.activeElement=o;h.focusItem(o);o&&o.firstChild.focus();u&&(h.$menuInner[0].scrollTop=r);a.trigger("focus")}}if(n&&(t.which===A.SPACE&&!h.selectpicker.keydown.keyHistory||t.which===A.ENTER||t.which===A.TAB&&h.options.selectOnTab)){t.which!==A.SPACE&&t.preventDefault();if(!h.options.liveSearch||t.which!==A.SPACE){h.$menuInner.find(".active a").trigger("click",true);a.trigger("focus");if(!h.options.liveSearch){t.preventDefault();e(document).data("spaceSelect",true)}}}}},mobile:function(){(this||i).options.mobile=true;(this||i).$element[0].classList.add("mobile-device")},refresh:function(){var t=this||i;var s=e.extend({},(this||i).options,getAttributesObject((this||i).$element),(this||i).$element.data());(this||i).options=s;if((this||i).options.source.data){this.render();this.buildList()}else this.fetchData((function(){t.render();t.buildList()}));this.checkDisabled();this.setStyle();this.setWidth();this.setSize(true);(this||i).$element.trigger("refreshed"+N)},hide:function(){(this||i).$newElement.hide()},show:function(){(this||i).$newElement.show()},remove:function(){(this||i).$newElement.remove();(this||i).$element.remove()},destroy:function(){(this||i).$newElement.before((this||i).$element).remove();(this||i).$bsContainer?(this||i).$bsContainer.remove():(this||i).$menu.remove();(this||i).selectpicker.view.titleOption&&(this||i).selectpicker.view.titleOption.parentNode&&(this||i).selectpicker.view.titleOption.parentNode.removeChild((this||i).selectpicker.view.titleOption);(this||i).$element.off(N).removeData("selectpicker").removeClass("bs-select-hidden selectpicker mobile-device");e(window).off(N+"."+(this||i).selectId)}};function Plugin(s){var n=arguments;var o=s;[].shift.apply(n);if(!z.success){try{z.full=(getVersion()||"").split(" ")[0].split(".")}catch(e){if(Selectpicker.BootstrapVersion)z.full=Selectpicker.BootstrapVersion.split(" ")[0].split(".");else{z.full=[z.major,"0","0"];console.warn("There was an issue retrieving Bootstrap's version. Ensure Bootstrap is being loaded before bootstrap-select and there is no namespace collision. If loading Bootstrap asynchronously, the version may need to be manually specified via $.fn.selectpicker.Constructor.BootstrapVersion.",e)}}z.major=z.full[0];z.success=true}if(z.major>="4"){var l=[];Selectpicker.DEFAULTS.style===L.BUTTONCLASS&&l.push({name:"style",className:"BUTTONCLASS"});Selectpicker.DEFAULTS.iconBase===L.ICONBASE&&l.push({name:"iconBase",className:"ICONBASE"});Selectpicker.DEFAULTS.tickIcon===L.TICKICON&&l.push({name:"tickIcon",className:"TICKICON"});L.DIVIDER="dropdown-divider";L.SHOW="show";L.BUTTONCLASS="btn-light";L.POPOVERHEADER="popover-header";L.ICONBASE="";L.TICKICON="bs-ok-default";for(var r=0;r"4"&&(H.DATA_TOGGLE='data-bs-toggle="dropdown"');var a;var c=this.each((function(){var s=e(this||i);if(s.is("select")){var l=s.data("selectpicker"),r="object"==typeof o&&o;r.title&&(r.placeholder=r.title);if(l){if(r)for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(l.options[c]=r[c])}else{var d=s.data();for(var h in d)Object.prototype.hasOwnProperty.call(d,h)&&-1!==e.inArray(h,t)&&delete d[h];var p=e.extend({},Selectpicker.DEFAULTS,e.fn.selectpicker.defaults||{},getAttributesObject(s),d,r);p.template=e.extend({},Selectpicker.DEFAULTS.template,e.fn.selectpicker.defaults?e.fn.selectpicker.defaults.template:{},d.template,r.template);p.source=e.extend({},Selectpicker.DEFAULTS.source,e.fn.selectpicker.defaults?e.fn.selectpicker.defaults.source:{},r.source);s.data("selectpicker",l=new Selectpicker(this||i,p))}"string"==typeof o&&(a=l[o]instanceof Function?l[o].apply(l,n):l.options[o])}}));return"undefined"!==typeof a?a:c}var V=e.fn.selectpicker;e.fn.selectpicker=Plugin;e.fn.selectpicker.Constructor=Selectpicker;e.fn.selectpicker.noConflict=function(){e.fn.selectpicker=V;return this||i};function keydownHandler(){if(!(z.major<5))return T.dataApiKeydownHandler;if(e.fn.dropdown){var t=e.fn.dropdown.Constructor._dataApiKeydownHandler||e.fn.dropdown.Constructor.prototype.keydown;return t.apply(this||i,arguments)}}e(document).off("keydown.bs.dropdown.data-api").on("keydown.bs.dropdown.data-api",":not(.bootstrap-select) > ["+H.DATA_TOGGLE+"]",keydownHandler).on("keydown.bs.dropdown.data-api",":not(.bootstrap-select) > .dropdown-menu",keydownHandler).on("keydown"+N,".bootstrap-select ["+H.DATA_TOGGLE+'], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',Selectpicker.prototype.keydown).on("focusin.modal",".bootstrap-select ["+H.DATA_TOGGLE+'], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',(function(e){e.stopPropagation()}));document.addEventListener("DOMContentLoaded",(function(){e(".selectpicker").each((function(){var t=e(this||i);Plugin.call(t,t.data())}))}))})(e)}));var n=s;export{n as default}; + diff --git a/vendor/javascript/bootstrap.js b/vendor/javascript/bootstrap.js new file mode 100644 index 0000000000..1ef348ed2d --- /dev/null +++ b/vendor/javascript/bootstrap.js @@ -0,0 +1,26 @@ +// bootstrap@5.3.3 downloaded from https://ga.jspm.io/npm:bootstrap@5.3.3/dist/js/bootstrap.esm.js + +import*as t from"@popperjs/core";const e=new Map;const s={set(t,s,n){e.has(t)||e.set(t,new Map);const i=e.get(t);i.has(s)||i.size===0?i.set(s,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get(t,s){return e.has(t)&&e.get(t).get(s)||null},remove(t,s){if(!e.has(t))return;const n=e.get(t);n.delete(s);n.size===0&&e.delete(t)}};const n=1e6;const i=1e3;const o="transitionend"; +/** + * Properly escape IDs selectors to handle weird IDs + * @param {string} selector + * @returns {string} + */const parseSelector=t=>{t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`)));return t};const toType=t=>t===null||t===void 0?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase();const getUID=t=>{do{t+=Math.floor(Math.random()*n)}while(document.getElementById(t));return t};const getTransitionDurationFromElement=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:s}=window.getComputedStyle(t);const n=Number.parseFloat(e);const o=Number.parseFloat(s);if(!n&&!o)return 0;e=e.split(",")[0];s=s.split(",")[0];return(Number.parseFloat(e)+Number.parseFloat(s))*i};const triggerTransitionEnd=t=>{t.dispatchEvent(new Event(o))};const isElement=t=>{if(!t||typeof t!=="object")return false;typeof t.jquery!=="undefined"&&(t=t[0]);return typeof t.nodeType!=="undefined"};const getElement=t=>isElement(t)?t.jquery?t[0]:t:typeof t==="string"&&t.length>0?document.querySelector(parseSelector(t)):null;const isVisible=t=>{if(!isElement(t)||t.getClientRects().length===0)return false;const e=getComputedStyle(t).getPropertyValue("visibility")==="visible";const s=t.closest("details:not([open])");if(!s)return e;if(s!==t){const e=t.closest("summary");if(e&&e.parentNode!==s)return false;if(e===null)return false}return e};const isDisabled=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||(typeof t.disabled!=="undefined"?t.disabled:t.hasAttribute("disabled")&&t.getAttribute("disabled")!=="false"));const findShadowRoot=t=>{if(!document.documentElement.attachShadow)return null;if(typeof t.getRootNode==="function"){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?findShadowRoot(t.parentNode):null};const noop=()=>{}; +/** + * Trick to restart an element's animation + * + * @param {HTMLElement} element + * @return void + * + * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation + */const reflow=t=>{t.offsetHeight};const getjQuery=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null;const r=[];const onDOMContentLoaded=t=>{if(document.readyState==="loading"){r.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of r)t()}));r.push(t)}else t()};const isRTL=()=>document.documentElement.dir==="rtl";const defineJQueryPlugin=t=>{onDOMContentLoaded((()=>{const e=getjQuery();if(e){const s=t.NAME;const n=e.fn[s];e.fn[s]=t.jQueryInterface;e.fn[s].Constructor=t;e.fn[s].noConflict=()=>{e.fn[s]=n;return t.jQueryInterface}}}))};const execute=(t,e=[],s=t)=>typeof t==="function"?t(...e):s;const executeAfterTransition=(t,e,s=true)=>{if(!s){execute(t);return}const n=5;const i=getTransitionDurationFromElement(e)+n;let r=false;const handler=({target:s})=>{if(s===e){r=true;e.removeEventListener(o,handler);execute(t)}};e.addEventListener(o,handler);setTimeout((()=>{r||triggerTransitionEnd(e)}),i)}; +/** + * Return the previous/next element of a list. + * + * @param {array} list The list of elements + * @param activeElement The active element + * @param shouldGetNext Choose to get next or previous element + * @param isCycleAllowed + * @return {Element|elem} The proper element + */const getNextActiveElement=(t,e,s,n)=>{const i=t.length;let o=t.indexOf(e);if(o===-1)return!s&&n?t[i-1]:t[0];o+=s?1:-1;n&&(o=(o+i)%i);return t[Math.max(0,Math.min(o,i-1))]};const a=/[^.]*(?=\..*)\.|.*/;const c=/\..*/;const l=/::\d+$/;const h={};let u=1;const d={mouseenter:"mouseover",mouseleave:"mouseout"};const f=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function makeEventUid(t,e){return e&&`${e}::${u++}`||t.uidEvent||u++}function getElementEvents(t){const e=makeEventUid(t);t.uidEvent=e;h[e]=h[e]||{};return h[e]}function bootstrapHandler(t,e){return function handler(s){hydrateObj(s,{delegateTarget:t});handler.oneOff&&_.off(t,s.type,e);return e.apply(t,[s])}}function bootstrapDelegationHandler(t,e,s){return function handler(n){const i=t.querySelectorAll(e);for(let{target:o}=n;o&&o!==this;o=o.parentNode)for(const r of i)if(r===o){hydrateObj(n,{delegateTarget:o});handler.oneOff&&_.off(t,n.type,e,s);return s.apply(o,[n])}}}function findHandler(t,e,s=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===s))}function normalizeParameters(t,e,s){const n=typeof e==="string";const i=n?s:e||s;let o=getTypeEvent(t);f.has(o)||(o=t);return[n,i,o]}function addHandler(t,e,s,n,i){if(typeof e!=="string"||!t)return;let[o,r,c]=normalizeParameters(e,s,n);if(e in d){const wrapFunction=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=wrapFunction(r)}const l=getElementEvents(t);const h=l[c]||(l[c]={});const u=findHandler(h,r,o?s:null);if(u){u.oneOff=u.oneOff&&i;return}const f=makeEventUid(r,e.replace(a,""));const _=o?bootstrapDelegationHandler(t,s,r):bootstrapHandler(t,r);_.delegationSelector=o?s:null;_.callable=r;_.oneOff=i;_.uidEvent=f;h[f]=_;t.addEventListener(c,_,o)}function removeHandler(t,e,s,n,i){const o=findHandler(e[s],n,i);if(o){t.removeEventListener(s,o,Boolean(i));delete e[s][o.uidEvent]}}function removeNamespacedHandlers(t,e,s,n){const i=e[s]||{};for(const[o,r]of Object.entries(i))o.includes(n)&&removeHandler(t,e,s,r.callable,r.delegationSelector)}function getTypeEvent(t){t=t.replace(c,"");return d[t]||t}const _={on(t,e,s,n){addHandler(t,e,s,n,false)},one(t,e,s,n){addHandler(t,e,s,n,true)},off(t,e,s,n){if(typeof e!=="string"||!t)return;const[i,o,r]=normalizeParameters(e,s,n);const a=r!==e;const c=getElementEvents(t);const h=c[r]||{};const u=e.startsWith(".");if(typeof o==="undefined"){if(u)for(const s of Object.keys(c))removeNamespacedHandlers(t,c,s,e.slice(1));for(const[s,n]of Object.entries(h)){const i=s.replace(l,"");a&&!e.includes(i)||removeHandler(t,c,r,n.callable,n.delegationSelector)}}else{if(!Object.keys(h).length)return;removeHandler(t,c,r,o,i?s:null)}},trigger(t,e,s){if(typeof e!=="string"||!t)return null;const n=getjQuery();const i=getTypeEvent(e);const o=e!==i;let r=null;let a=true;let c=true;let l=false;if(o&&n){r=n.Event(e,s);n(t).trigger(r);a=!r.isPropagationStopped();c=!r.isImmediatePropagationStopped();l=r.isDefaultPrevented()}const h=hydrateObj(new Event(e,{bubbles:a,cancelable:true}),s);l&&h.preventDefault();c&&t.dispatchEvent(h);h.defaultPrevented&&r&&r.preventDefault();return h}};function hydrateObj(t,e={}){for(const[s,n]of Object.entries(e))try{t[s]=n}catch(e){Object.defineProperty(t,s,{configurable:true,get(){return n}})}return t}function normalizeData(t){if(t==="true")return true;if(t==="false")return false;if(t===Number(t).toString())return Number(t);if(t===""||t==="null")return null;if(typeof t!=="string")return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function normalizeDataKey(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const g={setDataAttribute(t,e,s){t.setAttribute(`data-bs-${normalizeDataKey(e)}`,s)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${normalizeDataKey(e)}`)},getDataAttributes(t){if(!t)return{};const e={};const s=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of s){let s=n.replace(/^bs/,"");s=s.charAt(0).toLowerCase()+s.slice(1,s.length);e[s]=normalizeData(t.dataset[n])}return e},getDataAttribute(t,e){return normalizeData(t.getAttribute(`data-bs-${normalizeDataKey(e)}`))}};class Config{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){t=this._mergeConfigObj(t);t=this._configAfterMerge(t);this._typeCheckConfig(t);return t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const s=isElement(e)?g.getDataAttribute(e,"config"):{};return{...this.constructor.Default,...typeof s==="object"?s:{},...isElement(e)?g.getDataAttributes(e):{},...typeof t==="object"?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[s,n]of Object.entries(e)){const e=t[s];const i=isElement(e)?"element":toType(e);if(!new RegExp(n).test(i))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${i}" but expected type "${n}".`)}}}const p="5.3.3";class BaseComponent extends Config{constructor(t,e){super();t=getElement(t);if(t){this._element=t;this._config=this._getConfig(e);s.set(this._element,this.constructor.DATA_KEY,this)}}dispose(){s.remove(this._element,this.constructor.DATA_KEY);_.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,s=true){executeAfterTransition(t,e,s)}_getConfig(t){t=this._mergeConfigObj(t,this._element);t=this._configAfterMerge(t);this._typeCheckConfig(t);return t}static getInstance(t){return s.get(getElement(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,typeof e==="object"?e:null)}static get VERSION(){return p}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const getSelector=t=>{let e=t.getAttribute("data-bs-target");if(!e||e==="#"){let s=t.getAttribute("href");if(!s||!s.includes("#")&&!s.startsWith("."))return null;s.includes("#")&&!s.startsWith("#")&&(s=`#${s.split("#")[1]}`);e=s&&s!=="#"?s.trim():null}return e?e.split(",").map((t=>parseSelector(t))).join(","):null};const m={find(t,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,t))},findOne(t,e=document.documentElement){return Element.prototype.querySelector.call(e,t)},children(t,e){return[].concat(...t.children).filter((t=>t.matches(e)))},parents(t,e){const s=[];let n=t.parentNode.closest(e);while(n){s.push(n);n=n.parentNode.closest(e)}return s},prev(t,e){let s=t.previousElementSibling;while(s){if(s.matches(e))return[s];s=s.previousElementSibling}return[]},next(t,e){let s=t.nextElementSibling;while(s){if(s.matches(e))return[s];s=s.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!isDisabled(t)&&isVisible(t)))},getSelectorFromElement(t){const e=getSelector(t);return e&&m.findOne(e)?e:null},getElementFromSelector(t){const e=getSelector(t);return e?m.findOne(e):null},getMultipleElementsFromSelector(t){const e=getSelector(t);return e?m.find(e):[]}};const enableDismissTrigger=(t,e="hide")=>{const s=`click.dismiss${t.EVENT_KEY}`;const n=t.NAME;_.on(document,s,`[data-bs-dismiss="${n}"]`,(function(s){["A","AREA"].includes(this.tagName)&&s.preventDefault();if(isDisabled(this))return;const i=m.getElementFromSelector(this)||this.closest(`.${n}`);const o=t.getOrCreateInstance(i);o[e]()}))};const b="alert";const v="bs.alert";const y=`.${v}`;const w=`close${y}`;const E=`closed${y}`;const A="fade";const C="show";class Alert extends BaseComponent{static get NAME(){return b}close(){const t=_.trigger(this._element,w);if(t.defaultPrevented)return;this._element.classList.remove(C);const e=this._element.classList.contains(A);this._queueCallback((()=>this._destroyElement()),this._element,e)}_destroyElement(){this._element.remove();_.trigger(this._element,E);this.dispose()}static jQueryInterface(t){return this.each((function(){const e=Alert.getOrCreateInstance(this);if(typeof t==="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}enableDismissTrigger(Alert,"close");defineJQueryPlugin(Alert);const T="button";const k="bs.button";const $=`.${k}`;const S=".data-api";const O="active";const L='[data-bs-toggle="button"]';const D=`click${$}${S}`;class Button extends BaseComponent{static get NAME(){return T}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(O))}static jQueryInterface(t){return this.each((function(){const e=Button.getOrCreateInstance(this);t==="toggle"&&e[t]()}))}}_.on(document,D,L,(t=>{t.preventDefault();const e=t.target.closest(L);const s=Button.getOrCreateInstance(e);s.toggle()}));defineJQueryPlugin(Button);const I="swipe";const N=".bs.swipe";const P=`touchstart${N}`;const M=`touchmove${N}`;const x=`touchend${N}`;const j=`pointerdown${N}`;const F=`pointerup${N}`;const H="touch";const B="pen";const z="pointer-event";const q=40;const W={endCallback:null,leftCallback:null,rightCallback:null};const R={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Swipe extends Config{constructor(t,e){super();this._element=t;if(t&&Swipe.isSupported()){this._config=this._getConfig(e);this._deltaX=0;this._supportPointerEvents=Boolean(window.PointerEvent);this._initEvents()}}static get Default(){return W}static get DefaultType(){return R}static get NAME(){return I}dispose(){_.off(this._element,N)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX);this._handleSwipe();execute(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=q)return;const e=t/this._deltaX;this._deltaX=0;e&&execute(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){if(this._supportPointerEvents){_.on(this._element,j,(t=>this._start(t)));_.on(this._element,F,(t=>this._end(t)));this._element.classList.add(z)}else{_.on(this._element,P,(t=>this._start(t)));_.on(this._element,M,(t=>this._move(t)));_.on(this._element,x,(t=>this._end(t)))}}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&(t.pointerType===B||t.pointerType===H)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const K="carousel";const V="bs.carousel";const Q=`.${V}`;const U=".data-api";const X="ArrowLeft";const Y="ArrowRight";const G=500;const J="next";const Z="prev";const tt="left";const et="right";const st=`slide${Q}`;const nt=`slid${Q}`;const it=`keydown${Q}`;const ot=`mouseenter${Q}`;const rt=`mouseleave${Q}`;const at=`dragstart${Q}`;const ct=`load${Q}${U}`;const lt=`click${Q}${U}`;const ht="carousel";const ut="active";const dt="slide";const ft="carousel-item-end";const _t="carousel-item-start";const gt="carousel-item-next";const pt="carousel-item-prev";const mt=".active";const bt=".carousel-item";const vt=mt+bt;const yt=".carousel-item img";const wt=".carousel-indicators";const Et="[data-bs-slide], [data-bs-slide-to]";const At='[data-bs-ride="carousel"]';const Ct={[X]:et,[Y]:tt};const Tt={interval:5e3,keyboard:true,pause:"hover",ride:false,touch:true,wrap:true};const kt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Carousel extends BaseComponent{constructor(t,e){super(t,e);this._interval=null;this._activeElement=null;this._isSliding=false;this.touchTimeout=null;this._swipeHelper=null;this._indicatorsElement=m.findOne(wt,this._element);this._addEventListeners();this._config.ride===ht&&this.cycle()}static get Default(){return Tt}static get DefaultType(){return kt}static get NAME(){return K}next(){this._slide(J)}nextWhenVisible(){!document.hidden&&isVisible(this._element)&&this.next()}prev(){this._slide(Z)}pause(){this._isSliding&&triggerTransitionEnd(this._element);this._clearInterval()}cycle(){this._clearInterval();this._updateInterval();this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?_.one(this._element,nt,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding){_.one(this._element,nt,(()=>this.to(t)));return}const s=this._getItemIndex(this._getActive());if(s===t)return;const n=t>s?J:Z;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose();super.dispose()}_configAfterMerge(t){t.defaultInterval=t.interval;return t}_addEventListeners(){this._config.keyboard&&_.on(this._element,it,(t=>this._keydown(t)));if(this._config.pause==="hover"){_.on(this._element,ot,(()=>this.pause()));_.on(this._element,rt,(()=>this._maybeEnableCycle()))}this._config.touch&&Swipe.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of m.find(yt,this._element))_.on(t,at,(t=>t.preventDefault()));const endCallBack=()=>{if(this._config.pause==="hover"){this.pause();this.touchTimeout&&clearTimeout(this.touchTimeout);this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),G+this._config.interval)}};const t={leftCallback:()=>this._slide(this._directionToOrder(tt)),rightCallback:()=>this._slide(this._directionToOrder(et)),endCallback:endCallBack};this._swipeHelper=new Swipe(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=Ct[t.key];if(e){t.preventDefault();this._slide(this._directionToOrder(e))}}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=m.findOne(mt,this._indicatorsElement);e.classList.remove(ut);e.removeAttribute("aria-current");const s=m.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);if(s){s.classList.add(ut);s.setAttribute("aria-current","true")}}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const s=this._getActive();const n=t===J;const i=e||getNextActiveElement(this._getItems(),s,n,this._config.wrap);if(i===s)return;const o=this._getItemIndex(i);const triggerEvent=e=>_.trigger(this._element,e,{relatedTarget:i,direction:this._orderToDirection(t),from:this._getItemIndex(s),to:o});const r=triggerEvent(st);if(r.defaultPrevented)return;if(!s||!i)return;const a=Boolean(this._interval);this.pause();this._isSliding=true;this._setActiveIndicatorElement(o);this._activeElement=i;const c=n?_t:ft;const l=n?gt:pt;i.classList.add(l);reflow(i);s.classList.add(c);i.classList.add(c);const completeCallBack=()=>{i.classList.remove(c,l);i.classList.add(ut);s.classList.remove(ut,l,c);this._isSliding=false;triggerEvent(nt)};this._queueCallback(completeCallBack,s,this._isAnimated());a&&this.cycle()}_isAnimated(){return this._element.classList.contains(dt)}_getActive(){return m.findOne(vt,this._element)}_getItems(){return m.find(bt,this._element)}_clearInterval(){if(this._interval){clearInterval(this._interval);this._interval=null}}_directionToOrder(t){return isRTL()?t===tt?Z:J:t===tt?J:Z}_orderToDirection(t){return isRTL()?t===Z?tt:et:t===Z?et:tt}static jQueryInterface(t){return this.each((function(){const e=Carousel.getOrCreateInstance(this,t);if(typeof t!=="number"){if(typeof t==="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}_.on(document,lt,Et,(function(t){const e=m.getElementFromSelector(this);if(!e||!e.classList.contains(ht))return;t.preventDefault();const s=Carousel.getOrCreateInstance(e);const n=this.getAttribute("data-bs-slide-to");if(n){s.to(n);s._maybeEnableCycle()}else if(g.getDataAttribute(this,"slide")!=="next"){s.prev();s._maybeEnableCycle()}else{s.next();s._maybeEnableCycle()}}));_.on(window,ct,(()=>{const t=m.find(At);for(const e of t)Carousel.getOrCreateInstance(e)}));defineJQueryPlugin(Carousel);const $t="collapse";const St="bs.collapse";const Ot=`.${St}`;const Lt=".data-api";const Dt=`show${Ot}`;const It=`shown${Ot}`;const Nt=`hide${Ot}`;const Pt=`hidden${Ot}`;const Mt=`click${Ot}${Lt}`;const xt="show";const jt="collapse";const Ft="collapsing";const Ht="collapsed";const Bt=`:scope .${jt} .${jt}`;const zt="collapse-horizontal";const qt="width";const Wt="height";const Rt=".collapse.show, .collapse.collapsing";const Kt='[data-bs-toggle="collapse"]';const Vt={parent:null,toggle:true};const Qt={parent:"(null|element)",toggle:"boolean"};class Collapse extends BaseComponent{constructor(t,e){super(t,e);this._isTransitioning=false;this._triggerArray=[];const s=m.find(Kt);for(const t of s){const e=m.getSelectorFromElement(t);const s=m.find(e).filter((t=>t===this._element));e!==null&&s.length&&this._triggerArray.push(t)}this._initializeChildren();this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown());this._config.toggle&&this.toggle()}static get Default(){return Vt}static get DefaultType(){return Qt}static get NAME(){return $t}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];this._config.parent&&(t=this._getFirstLevelChildren(Rt).filter((t=>t!==this._element)).map((t=>Collapse.getOrCreateInstance(t,{toggle:false}))));if(t.length&&t[0]._isTransitioning)return;const e=_.trigger(this._element,Dt);if(e.defaultPrevented)return;for(const e of t)e.hide();const s=this._getDimension();this._element.classList.remove(jt);this._element.classList.add(Ft);this._element.style[s]=0;this._addAriaAndCollapsedClass(this._triggerArray,true);this._isTransitioning=true;const complete=()=>{this._isTransitioning=false;this._element.classList.remove(Ft);this._element.classList.add(jt,xt);this._element.style[s]="";_.trigger(this._element,It)};const n=s[0].toUpperCase()+s.slice(1);const i=`scroll${n}`;this._queueCallback(complete,this._element,true);this._element.style[s]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;const t=_.trigger(this._element,Nt);if(t.defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`;reflow(this._element);this._element.classList.add(Ft);this._element.classList.remove(jt,xt);for(const t of this._triggerArray){const e=m.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],false)}this._isTransitioning=true;const complete=()=>{this._isTransitioning=false;this._element.classList.remove(Ft);this._element.classList.add(jt);_.trigger(this._element,Pt)};this._element.style[e]="";this._queueCallback(complete,this._element,true)}_isShown(t=this._element){return t.classList.contains(xt)}_configAfterMerge(t){t.toggle=Boolean(t.toggle);t.parent=getElement(t.parent);return t}_getDimension(){return this._element.classList.contains(zt)?qt:Wt}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Kt);for(const e of t){const t=m.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=m.find(Bt,this._config.parent);return m.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const s of t){s.classList.toggle(Ht,!e);s.setAttribute("aria-expanded",e)}}static jQueryInterface(t){const e={};typeof t==="string"&&/show|hide/.test(t)&&(e.toggle=false);return this.each((function(){const s=Collapse.getOrCreateInstance(this,e);if(typeof t==="string"){if(typeof s[t]==="undefined")throw new TypeError(`No method named "${t}"`);s[t]()}}))}}_.on(document,Mt,Kt,(function(t){(t.target.tagName==="A"||t.delegateTarget&&t.delegateTarget.tagName==="A")&&t.preventDefault();for(const t of m.getMultipleElementsFromSelector(this))Collapse.getOrCreateInstance(t,{toggle:false}).toggle()}));defineJQueryPlugin(Collapse);const Ut="dropdown";const Xt="bs.dropdown";const Yt=`.${Xt}`;const Gt=".data-api";const Jt="Escape";const Zt="Tab";const te="ArrowUp";const ee="ArrowDown";const se=2;const ne=`hide${Yt}`;const ie=`hidden${Yt}`;const oe=`show${Yt}`;const re=`shown${Yt}`;const ae=`click${Yt}${Gt}`;const ce=`keydown${Yt}${Gt}`;const le=`keyup${Yt}${Gt}`;const he="show";const ue="dropup";const de="dropend";const fe="dropstart";const _e="dropup-center";const ge="dropdown-center";const pe='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)';const me=`${pe}.${he}`;const be=".dropdown-menu";const ve=".navbar";const ye=".navbar-nav";const we=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)";const Ee=isRTL()?"top-end":"top-start";const Ae=isRTL()?"top-start":"top-end";const Ce=isRTL()?"bottom-end":"bottom-start";const Te=isRTL()?"bottom-start":"bottom-end";const ke=isRTL()?"left-start":"right-start";const $e=isRTL()?"right-start":"left-start";const Se="top";const Oe="bottom";const Le={autoClose:true,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"};const De={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Dropdown extends BaseComponent{constructor(t,e){super(t,e);this._popper=null;this._parent=this._element.parentNode;this._menu=m.next(this._element,be)[0]||m.prev(this._element,be)[0]||m.findOne(be,this._parent);this._inNavbar=this._detectNavbar()}static get Default(){return Le}static get DefaultType(){return De}static get NAME(){return Ut}toggle(){return this._isShown()?this.hide():this.show()}show(){if(isDisabled(this._element)||this._isShown())return;const t={relatedTarget:this._element};const e=_.trigger(this._element,oe,t);if(!e.defaultPrevented){this._createPopper();if("ontouchstart"in document.documentElement&&!this._parent.closest(ye))for(const t of[].concat(...document.body.children))_.on(t,"mouseover",noop);this._element.focus();this._element.setAttribute("aria-expanded",true);this._menu.classList.add(he);this._element.classList.add(he);_.trigger(this._element,re,t)}}hide(){if(isDisabled(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy();super.dispose()}update(){this._inNavbar=this._detectNavbar();this._popper&&this._popper.update()}_completeHide(t){const e=_.trigger(this._element,ne,t);if(!e.defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))_.off(t,"mouseover",noop);this._popper&&this._popper.destroy();this._menu.classList.remove(he);this._element.classList.remove(he);this._element.setAttribute("aria-expanded","false");g.removeDataAttribute(this._menu,"popper");_.trigger(this._element,ie,t)}}_getConfig(t){t=super._getConfig(t);if(typeof t.reference==="object"&&!isElement(t.reference)&&typeof t.reference.getBoundingClientRect!=="function")throw new TypeError(`${Ut.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(typeof t==="undefined")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=this._parent:isElement(this._config.reference)?e=getElement(this._config.reference):typeof this._config.reference==="object"&&(e=this._config.reference);const s=this._getPopperConfig();this._popper=t.createPopper(e,this._menu,s)}_isShown(){return this._menu.classList.contains(he)}_getPlacement(){const t=this._parent;if(t.classList.contains(de))return ke;if(t.classList.contains(fe))return $e;if(t.classList.contains(_e))return Se;if(t.classList.contains(ge))return Oe;const e=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return t.classList.contains(ue)?e?Ae:Ee:e?Te:Ce}_detectNavbar(){return this._element.closest(ve)!==null}_getOffset(){const{offset:t}=this._config;return typeof t==="string"?t.split(",").map((t=>Number.parseInt(t,10))):typeof t==="function"?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};if(this._inNavbar||this._config.display==="static"){g.setDataAttribute(this._menu,"popper","static");t.modifiers=[{name:"applyStyles",enabled:false}]}return{...t,...execute(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const s=m.find(we,this._menu).filter((t=>isVisible(t)));s.length&&getNextActiveElement(s,e,t===ee,!s.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=Dropdown.getOrCreateInstance(this,t);if(typeof t==="string"){if(typeof e[t]==="undefined")throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(t.button===se||t.type==="keyup"&&t.key!==Zt)return;const e=m.find(me);for(const s of e){const e=Dropdown.getInstance(s);if(!e||e._config.autoClose===false)continue;const n=t.composedPath();const i=n.includes(e._menu);if(n.includes(e._element)||e._config.autoClose==="inside"&&!i||e._config.autoClose==="outside"&&i)continue;if(e._menu.contains(t.target)&&(t.type==="keyup"&&t.key===Zt||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};t.type==="click"&&(o.clickEvent=t);e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName);const s=t.key===Jt;const n=[te,ee].includes(t.key);if(!n&&!s)return;if(e&&!s)return;t.preventDefault();const i=this.matches(pe)?this:m.prev(this,pe)[0]||m.next(this,pe)[0]||m.findOne(pe,t.delegateTarget.parentNode);const o=Dropdown.getOrCreateInstance(i);if(n){t.stopPropagation();o.show();o._selectMenuItem(t)}else if(o._isShown()){t.stopPropagation();o.hide();i.focus()}}}_.on(document,ce,pe,Dropdown.dataApiKeydownHandler);_.on(document,ce,be,Dropdown.dataApiKeydownHandler);_.on(document,ae,Dropdown.clearMenus);_.on(document,le,Dropdown.clearMenus);_.on(document,ae,pe,(function(t){t.preventDefault();Dropdown.getOrCreateInstance(this).toggle()}));defineJQueryPlugin(Dropdown);const Ie="backdrop";const Ne="fade";const Pe="show";const Me=`mousedown.bs.${Ie}`;const xe={className:"modal-backdrop",clickCallback:null,isAnimated:false,isVisible:true,rootElement:"body"};const je={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Backdrop extends Config{constructor(t){super();this._config=this._getConfig(t);this._isAppended=false;this._element=null}static get Default(){return xe}static get DefaultType(){return je}static get NAME(){return Ie}show(t){if(!this._config.isVisible){execute(t);return}this._append();const e=this._getElement();this._config.isAnimated&&reflow(e);e.classList.add(Pe);this._emulateAnimation((()=>{execute(t)}))}hide(t){if(this._config.isVisible){this._getElement().classList.remove(Pe);this._emulateAnimation((()=>{this.dispose();execute(t)}))}else execute(t)}dispose(){if(this._isAppended){_.off(this._element,Me);this._element.remove();this._isAppended=false}}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className;this._config.isAnimated&&t.classList.add(Ne);this._element=t}return this._element}_configAfterMerge(t){t.rootElement=getElement(t.rootElement);return t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t);_.on(t,Me,(()=>{execute(this._config.clickCallback)}));this._isAppended=true}_emulateAnimation(t){executeAfterTransition(t,this._getElement(),this._config.isAnimated)}}const Fe="focustrap";const He="bs.focustrap";const Be=`.${He}`;const ze=`focusin${Be}`;const qe=`keydown.tab${Be}`;const We="Tab";const Re="forward";const Ke="backward";const Ve={autofocus:true,trapElement:null};const Qe={autofocus:"boolean",trapElement:"element"};class FocusTrap extends Config{constructor(t){super();this._config=this._getConfig(t);this._isActive=false;this._lastTabNavDirection=null}static get Default(){return Ve}static get DefaultType(){return Qe}static get NAME(){return Fe}activate(){if(!this._isActive){this._config.autofocus&&this._config.trapElement.focus();_.off(document,Be);_.on(document,ze,(t=>this._handleFocusin(t)));_.on(document,qe,(t=>this._handleKeydown(t)));this._isActive=true}}deactivate(){if(this._isActive){this._isActive=false;_.off(document,Be)}}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const s=m.focusableChildren(e);s.length===0?e.focus():this._lastTabNavDirection===Ke?s[s.length-1].focus():s[0].focus()}_handleKeydown(t){t.key===We&&(this._lastTabNavDirection=t.shiftKey?Ke:Re)}}const Ue=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top";const Xe=".sticky-top";const Ye="padding-right";const Ge="margin-right";class ScrollBarHelper{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow();this._setElementAttributes(this._element,Ye,(e=>e+t));this._setElementAttributes(Ue,Ye,(e=>e+t));this._setElementAttributes(Xe,Ge,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow");this._resetElementAttributes(this._element,Ye);this._resetElementAttributes(Ue,Ye);this._resetElementAttributes(Xe,Ge)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow");this._element.style.overflow="hidden"}_setElementAttributes(t,e,s){const n=this.getWidth();const manipulationCallBack=t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const i=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${s(Number.parseFloat(i))}px`)};this._applyManipulationCallback(t,manipulationCallBack)}_saveInitialAttribute(t,e){const s=t.style.getPropertyValue(e);s&&g.setDataAttribute(t,e,s)}_resetElementAttributes(t,e){const manipulationCallBack=t=>{const s=g.getDataAttribute(t,e);if(s!==null){g.removeDataAttribute(t,e);t.style.setProperty(e,s)}else t.style.removeProperty(e)};this._applyManipulationCallback(t,manipulationCallBack)}_applyManipulationCallback(t,e){if(isElement(t))e(t);else for(const s of m.find(t,this._element))e(s)}}const Je="modal";const Ze="bs.modal";const ts=`.${Ze}`;const es=".data-api";const ss="Escape";const ns=`hide${ts}`;const is=`hidePrevented${ts}`;const os=`hidden${ts}`;const rs=`show${ts}`;const as=`shown${ts}`;const cs=`resize${ts}`;const ls=`click.dismiss${ts}`;const hs=`mousedown.dismiss${ts}`;const us=`keydown.dismiss${ts}`;const ds=`click${ts}${es}`;const fs="modal-open";const _s="fade";const gs="show";const ps="modal-static";const ms=".modal.show";const bs=".modal-dialog";const vs=".modal-body";const ys='[data-bs-toggle="modal"]';const ws={backdrop:true,focus:true,keyboard:true};const Es={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Modal extends BaseComponent{constructor(t,e){super(t,e);this._dialog=m.findOne(bs,this._element);this._backdrop=this._initializeBackDrop();this._focustrap=this._initializeFocusTrap();this._isShown=false;this._isTransitioning=false;this._scrollBar=new ScrollBarHelper;this._addEventListeners()}static get Default(){return ws}static get DefaultType(){return Es}static get NAME(){return Je}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||this._isTransitioning)return;const e=_.trigger(this._element,rs,{relatedTarget:t});if(!e.defaultPrevented){this._isShown=true;this._isTransitioning=true;this._scrollBar.hide();document.body.classList.add(fs);this._adjustDialog();this._backdrop.show((()=>this._showElement(t)))}}hide(){if(!this._isShown||this._isTransitioning)return;const t=_.trigger(this._element,ns);if(!t.defaultPrevented){this._isShown=false;this._isTransitioning=true;this._focustrap.deactivate();this._element.classList.remove(gs);this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())}}dispose(){_.off(window,ts);_.off(this._dialog,ts);this._backdrop.dispose();this._focustrap.deactivate();super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Backdrop({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new FocusTrap({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element);this._element.style.display="block";this._element.removeAttribute("aria-hidden");this._element.setAttribute("aria-modal",true);this._element.setAttribute("role","dialog");this._element.scrollTop=0;const e=m.findOne(vs,this._dialog);e&&(e.scrollTop=0);reflow(this._element);this._element.classList.add(gs);const transitionComplete=()=>{this._config.focus&&this._focustrap.activate();this._isTransitioning=false;_.trigger(this._element,as,{relatedTarget:t})};this._queueCallback(transitionComplete,this._dialog,this._isAnimated())}_addEventListeners(){_.on(this._element,us,(t=>{t.key===ss&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}));_.on(window,cs,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}));_.on(this._element,hs,(t=>{_.one(this._element,ls,(e=>{this._element===t.target&&this._element===e.target&&(this._config.backdrop!=="static"?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none";this._element.setAttribute("aria-hidden",true);this._element.removeAttribute("aria-modal");this._element.removeAttribute("role");this._isTransitioning=false;this._backdrop.hide((()=>{document.body.classList.remove(fs);this._resetAdjustments();this._scrollBar.reset();_.trigger(this._element,os)}))}_isAnimated(){return this._element.classList.contains(_s)}_triggerBackdropTransition(){const t=_.trigger(this._element,is);if(t.defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight;const s=this._element.style.overflowY;if(s!=="hidden"&&!this._element.classList.contains(ps)){e||(this._element.style.overflowY="hidden");this._element.classList.add(ps);this._queueCallback((()=>{this._element.classList.remove(ps);this._queueCallback((()=>{this._element.style.overflowY=s}),this._dialog)}),this._dialog);this._element.focus()}}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight;const e=this._scrollBar.getWidth();const s=e>0;if(s&&!t){const t=isRTL()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!s&&t){const t=isRTL()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="";this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const s=Modal.getOrCreateInstance(this,t);if(typeof t==="string"){if(typeof s[t]==="undefined")throw new TypeError(`No method named "${t}"`);s[t](e)}}))}}_.on(document,ds,ys,(function(t){const e=m.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault();_.one(e,rs,(t=>{t.defaultPrevented||_.one(e,os,(()=>{isVisible(this)&&this.focus()}))}));const s=m.findOne(ms);s&&Modal.getInstance(s).hide();const n=Modal.getOrCreateInstance(e);n.toggle(this)}));enableDismissTrigger(Modal);defineJQueryPlugin(Modal);const As="offcanvas";const Cs="bs.offcanvas";const Ts=`.${Cs}`;const ks=".data-api";const $s=`load${Ts}${ks}`;const Ss="Escape";const Os="show";const Ls="showing";const Ds="hiding";const Is="offcanvas-backdrop";const Ns=".offcanvas.show";const Ps=`show${Ts}`;const Ms=`shown${Ts}`;const xs=`hide${Ts}`;const js=`hidePrevented${Ts}`;const Fs=`hidden${Ts}`;const Hs=`resize${Ts}`;const Bs=`click${Ts}${ks}`;const zs=`keydown.dismiss${Ts}`;const qs='[data-bs-toggle="offcanvas"]';const Ws={backdrop:true,keyboard:true,scroll:false};const Rs={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Offcanvas extends BaseComponent{constructor(t,e){super(t,e);this._isShown=false;this._backdrop=this._initializeBackDrop();this._focustrap=this._initializeFocusTrap();this._addEventListeners()}static get Default(){return Ws}static get DefaultType(){return Rs}static get NAME(){return As}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;const e=_.trigger(this._element,Ps,{relatedTarget:t});if(e.defaultPrevented)return;this._isShown=true;this._backdrop.show();this._config.scroll||(new ScrollBarHelper).hide();this._element.setAttribute("aria-modal",true);this._element.setAttribute("role","dialog");this._element.classList.add(Ls);const completeCallBack=()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate();this._element.classList.add(Os);this._element.classList.remove(Ls);_.trigger(this._element,Ms,{relatedTarget:t})};this._queueCallback(completeCallBack,this._element,true)}hide(){if(!this._isShown)return;const t=_.trigger(this._element,xs);if(t.defaultPrevented)return;this._focustrap.deactivate();this._element.blur();this._isShown=false;this._element.classList.add(Ds);this._backdrop.hide();const completeCallback=()=>{this._element.classList.remove(Os,Ds);this._element.removeAttribute("aria-modal");this._element.removeAttribute("role");this._config.scroll||(new ScrollBarHelper).reset();_.trigger(this._element,Fs)};this._queueCallback(completeCallback,this._element,true)}dispose(){this._backdrop.dispose();this._focustrap.deactivate();super.dispose()}_initializeBackDrop(){const clickCallback=()=>{this._config.backdrop!=="static"?this.hide():_.trigger(this._element,js)};const t=Boolean(this._config.backdrop);return new Backdrop({className:Is,isVisible:t,isAnimated:true,rootElement:this._element.parentNode,clickCallback:t?clickCallback:null})}_initializeFocusTrap(){return new FocusTrap({trapElement:this._element})}_addEventListeners(){_.on(this._element,zs,(t=>{t.key===Ss&&(this._config.keyboard?this.hide():_.trigger(this._element,js))}))}static jQueryInterface(t){return this.each((function(){const e=Offcanvas.getOrCreateInstance(this,t);if(typeof t==="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}_.on(document,Bs,qs,(function(t){const e=m.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault();if(isDisabled(this))return;_.one(e,Fs,(()=>{isVisible(this)&&this.focus()}));const s=m.findOne(Ns);s&&s!==e&&Offcanvas.getInstance(s).hide();const n=Offcanvas.getOrCreateInstance(e);n.toggle(this)}));_.on(window,$s,(()=>{for(const t of m.find(Ns))Offcanvas.getOrCreateInstance(t).show()}));_.on(window,Hs,(()=>{for(const t of m.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(t).position!=="fixed"&&Offcanvas.getOrCreateInstance(t).hide()}));enableDismissTrigger(Offcanvas);defineJQueryPlugin(Offcanvas);const Ks=/^aria-[\w-]*$/i;const Vs={"*":["class","dir","id","lang","role",Ks],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};const Qs=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]);const Us=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i;const allowedAttribute=(t,e)=>{const s=t.nodeName.toLowerCase();return e.includes(s)?!Qs.has(s)||Boolean(Us.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(s)))};function sanitizeHtml(t,e,s){if(!t.length)return t;if(s&&typeof s==="function")return s(t);const n=new window.DOMParser;const i=n.parseFromString(t,"text/html");const o=[].concat(...i.body.querySelectorAll("*"));for(const t of o){const s=t.nodeName.toLowerCase();if(!Object.keys(e).includes(s)){t.remove();continue}const n=[].concat(...t.attributes);const i=[].concat(e["*"]||[],e[s]||[]);for(const e of n)allowedAttribute(e,i)||t.removeAttribute(e.nodeName)}return i.body.innerHTML}const Xs="TemplateFactory";const Ys={allowList:Vs,content:{},extraClass:"",html:false,sanitize:true,sanitizeFn:null,template:"
"};const Gs={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"};const Js={entry:"(string|element|function|null)",selector:"(string|element)"};class TemplateFactory extends Config{constructor(t){super();this._config=this._getConfig(t)}static get Default(){return Ys}static get DefaultType(){return Gs}static get NAME(){return Xs}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){this._checkContent(t);this._config.content={...this._config.content,...t};return this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,s]of Object.entries(this._config.content))this._setContent(t,s,e);const e=t.children[0];const s=this._resolvePossibleFunction(this._config.extraClass);s&&e.classList.add(...s.split(" "));return e}_typeCheckConfig(t){super._typeCheckConfig(t);this._checkContent(t.content)}_checkContent(t){for(const[e,s]of Object.entries(t))super._typeCheckConfig({selector:e,entry:s},Js)}_setContent(t,e,s){const n=m.findOne(s,t);if(n){e=this._resolvePossibleFunction(e);e?isElement(e)?this._putElementInTemplate(getElement(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove()}}_maybeSanitize(t){return this._config.sanitize?sanitizeHtml(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return execute(t,[this])}_putElementInTemplate(t,e){if(this._config.html){e.innerHTML="";e.append(t)}else e.textContent=t.textContent}}const Zs="tooltip";const tn=new Set(["sanitize","allowList","sanitizeFn"]);const en="fade";const sn="modal";const nn="show";const on=".tooltip-inner";const rn=`.${sn}`;const an="hide.bs.modal";const cn="hover";const ln="focus";const hn="click";const un="manual";const dn="hide";const fn="hidden";const _n="show";const gn="shown";const pn="inserted";const mn="click";const bn="focusin";const vn="focusout";const yn="mouseenter";const wn="mouseleave";const En={AUTO:"auto",TOP:"top",RIGHT:isRTL()?"left":"right",BOTTOM:"bottom",LEFT:isRTL()?"right":"left"};const An={allowList:Vs,animation:true,boundary:"clippingParents",container:false,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:false,offset:[0,6],placement:"top",popperConfig:null,sanitize:true,sanitizeFn:null,selector:false,template:'',title:"",trigger:"hover focus"};const Cn={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Tooltip extends BaseComponent{constructor(e,s){if(typeof t==="undefined")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,s);this._isEnabled=true;this._timeout=0;this._isHovered=null;this._activeTrigger={};this._popper=null;this._templateFactory=null;this._newContent=null;this.tip=null;this._setListeners();this._config.selector||this._fixTitle()}static get Default(){return An}static get DefaultType(){return Cn}static get NAME(){return Zs}enable(){this._isEnabled=true}disable(){this._isEnabled=false}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){this._activeTrigger.click=!this._activeTrigger.click;this._isShown()?this._leave():this._enter()}}dispose(){clearTimeout(this._timeout);_.off(this._element.closest(rn),an,this._hideModalHandler);this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title"));this._disposePopper();super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const t=_.trigger(this._element,this.constructor.eventName(_n));const e=findShadowRoot(this._element);const s=(e||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!s)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:i}=this._config;if(!this._element.ownerDocument.documentElement.contains(this.tip)){i.append(n);_.trigger(this._element,this.constructor.eventName(pn))}this._popper=this._createPopper(n);n.classList.add(nn);if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))_.on(t,"mouseover",noop);const complete=()=>{_.trigger(this._element,this.constructor.eventName(gn));this._isHovered===false&&this._leave();this._isHovered=false};this._queueCallback(complete,this.tip,this._isAnimated())}hide(){if(!this._isShown())return;const t=_.trigger(this._element,this.constructor.eventName(dn));if(t.defaultPrevented)return;const e=this._getTipElement();e.classList.remove(nn);if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))_.off(t,"mouseover",noop);this._activeTrigger[hn]=false;this._activeTrigger[ln]=false;this._activeTrigger[cn]=false;this._isHovered=null;const complete=()=>{if(!this._isWithActiveTrigger()){this._isHovered||this._disposePopper();this._element.removeAttribute("aria-describedby");_.trigger(this._element,this.constructor.eventName(fn))}};this._queueCallback(complete,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate()));return this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(en,nn);e.classList.add(`bs-${this.constructor.NAME}-auto`);const s=getUID(this.constructor.NAME).toString();e.setAttribute("id",s);this._isAnimated()&&e.classList.add(en);return e}setContent(t){this._newContent=t;if(this._isShown()){this._disposePopper();this.show()}}_getTemplateFactory(t){this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new TemplateFactory({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)});return this._templateFactory}_getContentForTemplate(){return{[on]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(en)}_isShown(){return this.tip&&this.tip.classList.contains(nn)}_createPopper(e){const s=execute(this._config.placement,[this,e,this._element]);const n=En[s.toUpperCase()];return t.createPopper(this._element,e,this._getPopperConfig(n))}_getOffset(){const{offset:t}=this._config;return typeof t==="string"?t.split(",").map((t=>Number.parseInt(t,10))):typeof t==="function"?e=>t(e,this._element):t}_resolvePossibleFunction(t){return execute(t,[this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:true,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...execute(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if(e==="click")_.on(this._element,this.constructor.eventName(mn),this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e.toggle()}));else if(e!==un){const t=e===cn?this.constructor.eventName(yn):this.constructor.eventName(bn);const s=e===cn?this.constructor.eventName(wn):this.constructor.eventName(vn);_.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger[t.type==="focusin"?ln:cn]=true;e._enter()}));_.on(this._element,s,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger[t.type==="focusout"?ln:cn]=e._element.contains(t.relatedTarget);e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()};_.on(this._element.closest(rn),an,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");if(t){this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t);this._element.setAttribute("data-bs-original-title",t);this._element.removeAttribute("title")}}_enter(){if(this._isShown()||this._isHovered)this._isHovered=true;else{this._isHovered=true;this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show)}}_leave(){if(!this._isWithActiveTrigger()){this._isHovered=false;this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide)}}_setTimeout(t,e){clearTimeout(this._timeout);this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(true)}_getConfig(t){const e=g.getDataAttributes(this._element);for(const t of Object.keys(e))tn.has(t)&&delete e[t];t={...e,...typeof t==="object"&&t?t:{}};t=this._mergeConfigObj(t);t=this._configAfterMerge(t);this._typeCheckConfig(t);return t}_configAfterMerge(t){t.container=t.container===false?document.body:getElement(t.container);typeof t.delay==="number"&&(t.delay={show:t.delay,hide:t.delay});typeof t.title==="number"&&(t.title=t.title.toString());typeof t.content==="number"&&(t.content=t.content.toString());return t}_getDelegateConfig(){const t={};for(const[e,s]of Object.entries(this._config))this.constructor.Default[e]!==s&&(t[e]=s);t.selector=false;t.trigger="manual";return t}_disposePopper(){if(this._popper){this._popper.destroy();this._popper=null}if(this.tip){this.tip.remove();this.tip=null}}static jQueryInterface(t){return this.each((function(){const e=Tooltip.getOrCreateInstance(this,t);if(typeof t==="string"){if(typeof e[t]==="undefined")throw new TypeError(`No method named "${t}"`);e[t]()}}))}}defineJQueryPlugin(Tooltip);const Tn="popover";const kn=".popover-header";const $n=".popover-body";const Sn={...Tooltip.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"};const On={...Tooltip.DefaultType,content:"(null|string|element|function)"};class Popover extends Tooltip{static get Default(){return Sn}static get DefaultType(){return On}static get NAME(){return Tn}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[kn]:this._getTitle(),[$n]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=Popover.getOrCreateInstance(this,t);if(typeof t==="string"){if(typeof e[t]==="undefined")throw new TypeError(`No method named "${t}"`);e[t]()}}))}}defineJQueryPlugin(Popover);const Ln="scrollspy";const Dn="bs.scrollspy";const In=`.${Dn}`;const Nn=".data-api";const Pn=`activate${In}`;const Mn=`click${In}`;const xn=`load${In}${Nn}`;const jn="dropdown-item";const Fn="active";const Hn='[data-bs-spy="scroll"]';const Bn="[href]";const zn=".nav, .list-group";const qn=".nav-link";const Wn=".nav-item";const Rn=".list-group-item";const Kn=`${qn}, ${Wn} > ${qn}, ${Rn}`;const Vn=".dropdown";const Qn=".dropdown-toggle";const Un={offset:null,rootMargin:"0px 0px -25%",smoothScroll:false,target:null,threshold:[.1,.5,1]};const Xn={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class ScrollSpy extends BaseComponent{constructor(t,e){super(t,e);this._targetLinks=new Map;this._observableSections=new Map;this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element;this._activeTarget=null;this._observer=null;this._previousScrollData={visibleEntryTop:0,parentScrollTop:0};this.refresh()}static get Default(){return Un}static get DefaultType(){return Xn}static get NAME(){return Ln}refresh(){this._initializeTargetsAndObservables();this._maybeEnableSmoothScroll();this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect();super.dispose()}_configAfterMerge(t){t.target=getElement(t.target)||document.body;t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin;typeof t.threshold==="string"&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t))));return t}_maybeEnableSmoothScroll(){if(this._config.smoothScroll){_.off(this._config.target,Mn);_.on(this._config.target,Mn,Bn,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const s=this._rootElement||window;const n=e.offsetTop-this._element.offsetTop;if(s.scrollTo){s.scrollTo({top:n,behavior:"smooth"});return}s.scrollTop=n}}))}}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const targetElement=t=>this._targetLinks.get(`#${t.target.id}`);const activate=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop;this._process(targetElement(t))};const e=(this._rootElement||document.documentElement).scrollTop;const s=e>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=e;for(const n of t){if(!n.isIntersecting){this._activeTarget=null;this._clearActiveClass(targetElement(n));continue}const t=n.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){activate(n);if(!e)return}else s||t||activate(n)}}_initializeTargetsAndObservables(){this._targetLinks=new Map;this._observableSections=new Map;const t=m.find(Bn,this._config.target);for(const e of t){if(!e.hash||isDisabled(e))continue;const t=m.findOne(decodeURI(e.hash),this._element);if(isVisible(t)){this._targetLinks.set(decodeURI(e.hash),e);this._observableSections.set(e.hash,t)}}}_process(t){if(this._activeTarget!==t){this._clearActiveClass(this._config.target);this._activeTarget=t;t.classList.add(Fn);this._activateParents(t);_.trigger(this._element,Pn,{relatedTarget:t})}}_activateParents(t){if(t.classList.contains(jn))m.findOne(Qn,t.closest(Vn)).classList.add(Fn);else for(const e of m.parents(t,zn))for(const t of m.prev(e,Kn))t.classList.add(Fn)}_clearActiveClass(t){t.classList.remove(Fn);const e=m.find(`${Bn}.${Fn}`,t);for(const t of e)t.classList.remove(Fn)}static jQueryInterface(t){return this.each((function(){const e=ScrollSpy.getOrCreateInstance(this,t);if(typeof t==="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t]()}}))}}_.on(window,xn,(()=>{for(const t of m.find(Hn))ScrollSpy.getOrCreateInstance(t)}));defineJQueryPlugin(ScrollSpy);const Yn="tab";const Gn="bs.tab";const Jn=`.${Gn}`;const Zn=`hide${Jn}`;const ti=`hidden${Jn}`;const ei=`show${Jn}`;const si=`shown${Jn}`;const ni=`click${Jn}`;const ii=`keydown${Jn}`;const oi=`load${Jn}`;const ri="ArrowLeft";const ai="ArrowRight";const ci="ArrowUp";const li="ArrowDown";const hi="Home";const ui="End";const di="active";const fi="fade";const _i="show";const gi="dropdown";const pi=".dropdown-toggle";const mi=".dropdown-menu";const bi=`:not(${pi})`;const vi='.list-group, .nav, [role="tablist"]';const yi=".nav-item, .list-group-item";const wi=`.nav-link${bi}, .list-group-item${bi}, [role="tab"]${bi}`;const Ei='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]';const Ai=`${wi}, ${Ei}`;const Ci=`.${di}[data-bs-toggle="tab"], .${di}[data-bs-toggle="pill"], .${di}[data-bs-toggle="list"]`;class Tab extends BaseComponent{constructor(t){super(t);this._parent=this._element.closest(vi);if(this._parent){this._setInitialAttributes(this._parent,this._getChildren());_.on(this._element,ii,(t=>this._keydown(t)))}}static get NAME(){return Yn}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem();const s=e?_.trigger(e,Zn,{relatedTarget:t}):null;const n=_.trigger(t,ei,{relatedTarget:e});if(!(n.defaultPrevented||s&&s.defaultPrevented)){this._deactivate(e,t);this._activate(t,e)}}_activate(t,e){if(!t)return;t.classList.add(di);this._activate(m.getElementFromSelector(t));const complete=()=>{if(t.getAttribute("role")==="tab"){t.removeAttribute("tabindex");t.setAttribute("aria-selected",true);this._toggleDropDown(t,true);_.trigger(t,si,{relatedTarget:e})}else t.classList.add(_i)};this._queueCallback(complete,t,t.classList.contains(fi))}_deactivate(t,e){if(!t)return;t.classList.remove(di);t.blur();this._deactivate(m.getElementFromSelector(t));const complete=()=>{if(t.getAttribute("role")==="tab"){t.setAttribute("aria-selected",false);t.setAttribute("tabindex","-1");this._toggleDropDown(t,false);_.trigger(t,ti,{relatedTarget:e})}else t.classList.remove(_i)};this._queueCallback(complete,t,t.classList.contains(fi))}_keydown(t){if(![ri,ai,ci,li,hi,ui].includes(t.key))return;t.stopPropagation();t.preventDefault();const e=this._getChildren().filter((t=>!isDisabled(t)));let s;if([hi,ui].includes(t.key))s=e[t.key===hi?0:e.length-1];else{const n=[ai,li].includes(t.key);s=getNextActiveElement(e,t.target,n,true)}if(s){s.focus({preventScroll:true});Tab.getOrCreateInstance(s).show()}}_getChildren(){return m.find(Ai,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t);const s=this._getOuterElement(t);t.setAttribute("aria-selected",e);s!==t&&this._setAttributeIfNotExists(s,"role","presentation");e||t.setAttribute("tabindex","-1");this._setAttributeIfNotExists(t,"role","tab");this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=m.getElementFromSelector(t);if(e){this._setAttributeIfNotExists(e,"role","tabpanel");t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`)}}_toggleDropDown(t,e){const s=this._getOuterElement(t);if(!s.classList.contains(gi))return;const toggle=(t,n)=>{const i=m.findOne(t,s);i&&i.classList.toggle(n,e)};toggle(pi,di);toggle(mi,_i);s.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,s){t.hasAttribute(e)||t.setAttribute(e,s)}_elemIsActive(t){return t.classList.contains(di)}_getInnerElement(t){return t.matches(Ai)?t:m.findOne(Ai,t)}_getOuterElement(t){return t.closest(yi)||t}static jQueryInterface(t){return this.each((function(){const e=Tab.getOrCreateInstance(this);if(typeof t==="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t]()}}))}}_.on(document,ni,Ei,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault();isDisabled(this)||Tab.getOrCreateInstance(this).show()}));_.on(window,oi,(()=>{for(const t of m.find(Ci))Tab.getOrCreateInstance(t)}));defineJQueryPlugin(Tab);const Ti="toast";const ki="bs.toast";const $i=`.${ki}`;const Si=`mouseover${$i}`;const Oi=`mouseout${$i}`;const Li=`focusin${$i}`;const Di=`focusout${$i}`;const Ii=`hide${$i}`;const Ni=`hidden${$i}`;const Pi=`show${$i}`;const Mi=`shown${$i}`;const xi="fade";const ji="hide";const Fi="show";const Hi="showing";const Bi={animation:"boolean",autohide:"boolean",delay:"number"};const zi={animation:true,autohide:true,delay:5e3};class Toast extends BaseComponent{constructor(t,e){super(t,e);this._timeout=null;this._hasMouseInteraction=false;this._hasKeyboardInteraction=false;this._setListeners()}static get Default(){return zi}static get DefaultType(){return Bi}static get NAME(){return Ti}show(){const t=_.trigger(this._element,Pi);if(t.defaultPrevented)return;this._clearTimeout();this._config.animation&&this._element.classList.add(xi);const complete=()=>{this._element.classList.remove(Hi);_.trigger(this._element,Mi);this._maybeScheduleHide()};this._element.classList.remove(ji);reflow(this._element);this._element.classList.add(Fi,Hi);this._queueCallback(complete,this._element,this._config.animation)}hide(){if(!this.isShown())return;const t=_.trigger(this._element,Ii);if(t.defaultPrevented)return;const complete=()=>{this._element.classList.add(ji);this._element.classList.remove(Hi,Fi);_.trigger(this._element,Ni)};this._element.classList.add(Hi);this._queueCallback(complete,this._element,this._config.animation)}dispose(){this._clearTimeout();this.isShown()&&this._element.classList.remove(Fi);super.dispose()}isShown(){return this._element.classList.contains(Fi)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e;break}if(e){this._clearTimeout();return}const s=t.relatedTarget;this._element===s||this._element.contains(s)||this._maybeScheduleHide()}_setListeners(){_.on(this._element,Si,(t=>this._onInteraction(t,true)));_.on(this._element,Oi,(t=>this._onInteraction(t,false)));_.on(this._element,Li,(t=>this._onInteraction(t,true)));_.on(this._element,Di,(t=>this._onInteraction(t,false)))}_clearTimeout(){clearTimeout(this._timeout);this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Toast.getOrCreateInstance(this,t);if(typeof t==="string"){if(typeof e[t]==="undefined")throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}enableDismissTrigger(Toast);defineJQueryPlugin(Toast);export{Alert,Button,Carousel,Collapse,Dropdown,Modal,Offcanvas,Popover,ScrollSpy,Tab,Toast,Tooltip}; + diff --git a/lib/assets/javascripts/google_analytics.js b/vendor/javascript/google_analytics.js similarity index 100% rename from lib/assets/javascripts/google_analytics.js rename to vendor/javascript/google_analytics.js diff --git a/lib/assets/javascripts/jquery.atwho.min.js b/vendor/javascript/jquery.atwho.min.js similarity index 100% rename from lib/assets/javascripts/jquery.atwho.min.js rename to vendor/javascript/jquery.atwho.min.js diff --git a/lib/assets/javascripts/jquery.autogrow-textarea.js b/vendor/javascript/jquery.autogrow-textarea.js similarity index 100% rename from lib/assets/javascripts/jquery.autogrow-textarea.js rename to vendor/javascript/jquery.autogrow-textarea.js diff --git a/lib/assets/javascripts/jquery.fluidbox.min.js b/vendor/javascript/jquery.fluidbox.min.js similarity index 100% rename from lib/assets/javascripts/jquery.fluidbox.min.js rename to vendor/javascript/jquery.fluidbox.min.js diff --git a/lib/assets/javascripts/jquery.hotkeys.js b/vendor/javascript/jquery.hotkeys.js similarity index 100% rename from lib/assets/javascripts/jquery.hotkeys.js rename to vendor/javascript/jquery.hotkeys.js diff --git a/lib/assets/javascripts/jquery.infinitescroll.min.js b/vendor/javascript/jquery.infinitescroll.min.js similarity index 100% rename from lib/assets/javascripts/jquery.infinitescroll.min.js rename to vendor/javascript/jquery.infinitescroll.min.js diff --git a/vendor/javascript/jquery.js b/vendor/javascript/jquery.js new file mode 100644 index 0000000000..7c97c5004a --- /dev/null +++ b/vendor/javascript/jquery.js @@ -0,0 +1,57 @@ +// jquery@3.7.1 downloaded from https://ga.jspm.io/npm:jquery@3.7.1/dist/jquery.js + +var e="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:global;var t={};(function(e,n){t=e.document?n(e,true):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}})("undefined"!==typeof window?window:t,(function(t,n){var r=[];var i=Object.getPrototypeOf;var o=r.slice;var a=r.flat?function(e){return r.flat.call(e)}:function(e){return r.concat.apply([],e)};var s=r.push;var u=r.indexOf;var l={};var c=l.toString;var f=l.hasOwnProperty;var d=f.toString;var p=d.call(Object);var h={};var g=function isFunction(e){return"function"===typeof e&&"number"!==typeof e.nodeType&&"function"!==typeof e.item};var m=function isWindow(e){return null!=e&&e===e.window};var v=t.document;var y={type:true,src:true,nonce:true,noModule:true};function DOMEval(e,t,n){n=n||v;var r,i,o=n.createElement("script");o.text=e;if(t)for(r in y){i=t[r]||t.getAttribute&&t.getAttribute(r);i&&o.setAttribute(r,i)}n.head.appendChild(o).parentNode.removeChild(o)}function toType(e){return null==e?e+"":"object"===typeof e||"function"===typeof e?l[c.call(e)]||"object":typeof e}var x="3.7.1",b=/HTML$/i,jQuery=function(e,t){return new jQuery.fn.init(e,t)};jQuery.fn=jQuery.prototype={jquery:x,constructor:jQuery,length:0,toArray:function(){return o.call(this||e)},get:function(t){return null==t?o.call(this||e):t<0?(this||e)[t+(this||e).length]:(this||e)[t]},pushStack:function(t){var n=jQuery.merge(this.constructor(),t);n.prevObject=this||e;return n},each:function(t){return jQuery.each(this||e,t)},map:function(t){return this.pushStack(jQuery.map(this||e,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(o.apply(this||e,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(jQuery.grep(this||e,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(jQuery.grep(this||e,(function(e,t){return t%2})))},eq:function(t){var n=(this||e).length,r=+t+(t<0?n:0);return this.pushStack(r>=0&&r0&&t-1 in e)}function nodeName(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var w=r.pop;var T=r.sort;var C=r.splice;var S="[\\x20\\t\\r\\n\\f]";var k=new RegExp("^"+S+"+|((?:^|[^\\\\])(?:\\\\.)*)"+S+"+$","g");jQuery.contains=function(e,t){var n=t&&t.parentNode;return e===n||!!(n&&1===n.nodeType&&(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var A=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function fcssescape(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}jQuery.escapeSelector=function(e){return(e+"").replace(A,fcssescape)};var E=v,D=s;(function(){var n,i,a,s,l,c,d,p,g,m,v=D,y=jQuery.expando,x=0,b=0,A=createCache(),N=createCache(),j=createCache(),P=createCache(),sortOrder=function(e,t){e===t&&(l=true);return 0},H="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="(?:\\\\[\\da-fA-F]{1,6}"+S+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",L="\\["+S+"*("+M+")(?:"+S+"*([*^$|!~]?=)"+S+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+S+"*\\]",q=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+L+")*)|.*)\\)|)",O=new RegExp(S+"+","g"),F=new RegExp("^"+S+"*,"+S+"*"),R=new RegExp("^"+S+"*([>+~]|"+S+")"+S+"*"),I=new RegExp(S+"|>"),W=new RegExp(q),$=new RegExp("^"+M+"$"),B={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+L),PSEUDO:new RegExp("^"+q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+S+"*(even|odd|(([+-]|)(\\d*)n|)"+S+"*(?:([+-]|)"+S+"*(\\d+)|))"+S+"*\\)|)","i"),bool:new RegExp("^(?:"+H+")$","i"),needsContext:new RegExp("^"+S+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+S+"*((?:-\\d)?\\d*)"+S+"*\\)|)(?=[^-]|$)","i")},_=/^(?:input|select|textarea|button)$/i,z=/^h\d$/i,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,U=/[+~]/,G=new RegExp("\\\\[\\da-fA-F]{1,6}"+S+"?|\\\\([^\\r\\n\\f])","g"),funescape=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},unloadHandler=function(){setDocument()},V=addCombinator((function(e){return true===e.disabled&&nodeName(e,"fieldset")}),{dir:"parentNode",next:"legend"});function safeActiveElement(){try{return c.activeElement}catch(e){}}try{v.apply(r=o.call(E.childNodes),E.childNodes);r[E.childNodes.length].nodeType}catch(e){v={apply:function(e,t){D.apply(e,o.call(t))},call:function(e){D.apply(e,o.call(arguments,1))}}}function find(e,t,n,r){var i,o,a,s,u,l,f,d=t&&t.ownerDocument,m=t?t.nodeType:9;n=n||[];if("string"!==typeof e||!e||1!==m&&9!==m&&11!==m)return n;if(!r){setDocument(t);t=t||c;if(p){if(11!==m&&(u=X.exec(e)))if(i=u[1]){if(9===m){if(!(a=t.getElementById(i)))return n;if(a.id===i){v.call(n,a);return n}}else if(d&&(a=d.getElementById(i))&&find.contains(t,a)&&a.id===i){v.call(n,a);return n}}else{if(u[2]){v.apply(n,t.getElementsByTagName(e));return n}if((i=u[3])&&t.getElementsByClassName){v.apply(n,t.getElementsByClassName(i));return n}}if(!P[e+" "]&&(!g||!g.test(e))){f=e;d=t;if(1===m&&(I.test(e)||R.test(e))){d=U.test(e)&&testContext(t.parentNode)||t;d==t&&h.scope||((s=t.getAttribute("id"))?s=jQuery.escapeSelector(s):t.setAttribute("id",s=y));l=tokenize(e);o=l.length;while(o--)l[o]=(s?"#"+s:":scope")+" "+toSelector(l[o]);f=l.join(",")}try{v.apply(n,d.querySelectorAll(f));return n}catch(t){P(e,true)}finally{s===y&&t.removeAttribute("id")}}}}return select(e.replace(k,"$1"),t,n,r)} +/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */function createCache(){var e=[];function cache(t,n){e.push(t+" ")>i.cacheLength&&delete cache[e.shift()];return cache[t+" "]=n}return cache} +/** + * Mark a function for special use by jQuery selector module + * @param {Function} fn The function to mark + */function markFunction(e){e[y]=true;return e} +/** + * Support testing using an element + * @param {Function} fn Passed the created element and returns a boolean result + */function assert(e){var t=c.createElement("fieldset");try{return!!e(t)}catch(e){return false}finally{t.parentNode&&t.parentNode.removeChild(t);t=null}} +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */function createInputPseudo(e){return function(t){return nodeName(t,"input")&&t.type===e}} +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */function createButtonPseudo(e){return function(t){return(nodeName(t,"input")||nodeName(t,"button"))&&t.type===e}} +/** + * Returns a function to use in pseudos for :enabled/:disabled + * @param {Boolean} disabled true for :disabled; false for :enabled + */function createDisabledPseudo(e){return function(t){return"form"in t?t.parentNode&&false===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&V(t)===e:t.disabled===e:"label"in t&&t.disabled===e}} +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */function createPositionalPseudo(e){return markFunction((function(t){t=+t;return markFunction((function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))} +/** + * Checks a node for validity as a jQuery selector context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */function testContext(e){return e&&"undefined"!==typeof e.getElementsByTagName&&e} +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [node] An element or document object to use to set the document + * @returns {Object} Returns the current document + */function setDocument(e){var t,n=e?e.ownerDocument||e:E;if(n==c||9!==n.nodeType||!n.documentElement)return c;c=n;d=c.documentElement;p=!jQuery.isXMLDoc(c);m=d.matches||d.webkitMatchesSelector||d.msMatchesSelector;d.msMatchesSelector&&E!=c&&(t=c.defaultView)&&t.top!==t&&t.addEventListener("unload",unloadHandler);h.getById=assert((function(e){d.appendChild(e).id=jQuery.expando;return!c.getElementsByName||!c.getElementsByName(jQuery.expando).length}));h.disconnectedMatch=assert((function(e){return m.call(e,"*")}));h.scope=assert((function(){return c.querySelectorAll(":scope")}));h.cssHas=assert((function(){try{c.querySelector(":has(*,:jqfake)");return false}catch(e){return true}}));if(h.getById){i.filter.ID=function(e){var t=e.replace(G,funescape);return function(e){return e.getAttribute("id")===t}};i.find.ID=function(e,t){if("undefined"!==typeof t.getElementById&&p){var n=t.getElementById(e);return n?[n]:[]}}}else{i.filter.ID=function(e){var t=e.replace(G,funescape);return function(e){var n="undefined"!==typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}};i.find.ID=function(e,t){if("undefined"!==typeof t.getElementById&&p){var n,r,i,o=t.getElementById(e);if(o){n=o.getAttributeNode("id");if(n&&n.value===e)return[o];i=t.getElementsByName(e);r=0;while(o=i[r++]){n=o.getAttributeNode("id");if(n&&n.value===e)return[o]}}return[]}}}i.find.TAG=function(e,t){return"undefined"!==typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)};i.find.CLASS=function(e,t){if("undefined"!==typeof t.getElementsByClassName&&p)return t.getElementsByClassName(e)};g=[];assert((function(e){var t;d.appendChild(e).innerHTML="";e.querySelectorAll("[selected]").length||g.push("\\["+S+"*(?:value|"+H+")");e.querySelectorAll("[id~="+y+"-]").length||g.push("~=");e.querySelectorAll("a#"+y+"+*").length||g.push(".#.+[+~]");e.querySelectorAll(":checked").length||g.push(":checked");t=c.createElement("input");t.setAttribute("type","hidden");e.appendChild(t).setAttribute("name","D");d.appendChild(e).disabled=true;2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled");t=c.createElement("input");t.setAttribute("name","");e.appendChild(t);e.querySelectorAll("[name='']").length||g.push("\\["+S+"*name"+S+"*="+S+"*(?:''|\"\")")}));h.cssHas||g.push(":has");g=g.length&&new RegExp(g.join("|"));sortOrder=function(e,t){if(e===t){l=true;return 0}var n=!e.compareDocumentPosition-!t.compareDocumentPosition;if(n)return n;n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1;return 1&n||!h.sortDetached&&t.compareDocumentPosition(e)===n?e===c||e.ownerDocument==E&&find.contains(E,e)?-1:t===c||t.ownerDocument==E&&find.contains(E,t)?1:s?u.call(s,e)-u.call(s,t):0:4&n?-1:1};return c}find.matches=function(e,t){return find(e,null,null,t)};find.matchesSelector=function(e,t){setDocument(e);if(p&&!P[t+" "]&&(!g||!g.test(t)))try{var n=m.call(e,t);if(n||h.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){P(t,true)}return find(t,c,null,[e]).length>0};find.contains=function(e,t){(e.ownerDocument||e)!=c&&setDocument(e);return jQuery.contains(e,t)};find.attr=function(e,t){(e.ownerDocument||e)!=c&&setDocument(e);var n=i.attrHandle[t.toLowerCase()],r=n&&f.call(i.attrHandle,t.toLowerCase())?n(e,t,!p):void 0;return void 0!==r?r:e.getAttribute(t)};find.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)}; +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */jQuery.uniqueSort=function(e){var t,n=[],r=0,i=0;l=!h.sortStable;s=!h.sortStable&&o.call(e,0);T.call(e,sortOrder);if(l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)C.call(e,n[r],1)}s=null;return e};jQuery.fn.uniqueSort=function(){return this.pushStack(jQuery.uniqueSort(o.apply(this||e)))};i=jQuery.expr={cacheLength:50,createPseudo:markFunction,match:B,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){e[1]=e[1].replace(G,funescape);e[3]=(e[3]||e[4]||e[5]||"").replace(G,funescape);"~="===e[2]&&(e[3]=" "+e[3]+" ");return e.slice(0,4)},CHILD:function(e){e[1]=e[1].toLowerCase();if("nth"===e[1].slice(0,3)){e[3]||find.error(e[0]);e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3]));e[5]=+(e[7]+e[8]||"odd"===e[3])}else e[3]&&find.error(e[0]);return e},PSEUDO:function(e){var t,n=!e[6]&&e[2];if(B.CHILD.test(e[0]))return null;if(e[3])e[2]=e[4]||e[5]||"";else if(n&&W.test(n)&&(t=tokenize(n,true))&&(t=n.indexOf(")",n.length-t)-n.length)){e[0]=e[0].slice(0,t);e[2]=n.slice(0,t)}return e.slice(0,3)}},filter:{TAG:function(e){var t=e.replace(G,funescape).toLowerCase();return"*"===e?function(){return true}:function(e){return nodeName(e,t)}},CLASS:function(e){var t=A[e+" "];return t||(t=new RegExp("(^|"+S+")"+e+"("+S+"|$)"))&&A(e,(function(e){return t.test("string"===typeof e.className&&e.className||"undefined"!==typeof e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=find.attr(r,e);if(null==i)return"!="===t;if(!t)return true;i+="";return"="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(O," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-")}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h=o!==a?"nextSibling":"previousSibling",g=t.parentNode,m=s&&t.nodeName.toLowerCase(),v=!u&&!s,b=false;if(g){if(o){while(h){f=t;while(f=f[h])if(s?nodeName(f,m):1===f.nodeType)return false;p=h="only"===e&&!p&&"nextSibling"}return true}p=[a?g.firstChild:g.lastChild];if(a&&v){c=g[y]||(g[y]={});l=c[e]||[];d=l[0]===x&&l[1];b=d&&l[2];f=d&&g.childNodes[d];while(f=++d&&f&&f[h]||(b=d=0)||p.pop())if(1===f.nodeType&&++b&&f===t){c[e]=[x,d,b];break}}else{if(v){c=t[y]||(t[y]={});l=c[e]||[];d=l[0]===x&&l[1];b=d}if(false===b)while(f=++d&&f&&f[h]||(b=d=0)||p.pop())if((s?nodeName(f,m):1===f.nodeType)&&++b){if(v){c=f[y]||(f[y]={});c[e]=[x,b]}if(f===t)break}}b-=i;return b===r||b%r===0&&b/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||find.error("unsupported pseudo: "+e);if(r[y])return r(t);if(r.length>1){n=[e,e,"",t];return i.setFilters.hasOwnProperty(e.toLowerCase())?markFunction((function(e,n){var i,o=r(e,t),a=o.length;while(a--){i=u.call(e,o[a]);e[i]=!(n[i]=o[a])}})):function(e){return r(e,0,n)}}return r}},pseudos:{not:markFunction((function(e){var t=[],n=[],r=compile(e.replace(k,"$1"));return r[y]?markFunction((function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){t[0]=e;r(t,null,o,n);t[0]=null;return!n.pop()}})),has:markFunction((function(e){return function(t){return find(e,t).length>0}})),contains:markFunction((function(e){e=e.replace(G,funescape);return function(t){return(t.textContent||jQuery.text(t)).indexOf(e)>-1}})),lang:markFunction((function(e){$.test(e||"")||find.error("unsupported lang: "+e);e=e.replace(G,funescape).toLowerCase();return function(t){var n;do{if(n=p?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang")){n=n.toLowerCase();return n===e||0===n.indexOf(e+"-")}}while((t=t.parentNode)&&1===t.nodeType);return false}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(e){return e===d},focus:function(e){return e===safeActiveElement()&&c.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:createDisabledPseudo(false),disabled:createDisabledPseudo(true),checked:function(e){return nodeName(e,"input")&&!!e.checked||nodeName(e,"option")&&!!e.selected},selected:function(e){e.parentNode&&e.parentNode.selectedIndex;return true===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return false;return true},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return z.test(e.nodeName)},input:function(e){return _.test(e.nodeName)},button:function(e){return nodeName(e,"input")&&"button"===e.type||nodeName(e,"button")},text:function(e){var t;return nodeName(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:createPositionalPseudo((function(){return[0]})),last:createPositionalPseudo((function(e,t){return[t-1]})),eq:createPositionalPseudo((function(e,t,n){return[n<0?n+t:n]})),even:createPositionalPseudo((function(e,t){var n=0;for(;nt?t:n;for(;--r>=0;)e.push(r);return e})),gt:createPositionalPseudo((function(e,t,n){var r=n<0?n+t:n;for(;++r1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return false;return true}:e[0]}function multipleContexts(e,t,n){var r=0,i=t.length;for(;r-1&&(o[c]=!(a[c]=d))}}else{p=condense(p===a?p.splice(m,p.length):p);i?i(null,a,p,l):v.apply(a,p)}}))}function matcherFromTokens(e){var t,n,r,o=e.length,s=i.relative[e[0].type],l=s||i.relative[" "],c=s?1:0,f=addCombinator((function(e){return e===t}),l,true),d=addCombinator((function(e){return u.call(t,e)>-1}),l,true),p=[function(e,n,r){var i=!s&&(r||n!=a)||((t=n).nodeType?f(e,n,r):d(e,n,r));t=null;return i}];for(;c1&&elementMatcher(p),c>1&&toSelector(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(k,"$1"),n,c0,r=e.length>0,superMatcher=function(o,s,u,l,f){var d,h,g,m=0,y="0",b=o&&[],T=[],C=a,S=o||r&&i.find.TAG("*",f),k=x+=null==C?1:Math.random()||.1,A=S.length;f&&(a=s==c||s||f);for(;y!==A&&null!=(d=S[y]);y++){if(r&&d){h=0;if(!s&&d.ownerDocument!=c){setDocument(d);u=!p}while(g=e[h++])if(g(d,s||c,u)){v.call(l,d);break}f&&(x=k)}if(n){(d=!g&&d)&&m--;o&&b.push(d)}}m+=y;if(n&&y!==m){h=0;while(g=t[h++])g(b,T,s,u);if(o){if(m>0)while(y--)b[y]||T[y]||(T[y]=w.call(l));T=condense(T)}v.apply(l,T);f&&!o&&T.length>0&&m+t.length>1&&jQuery.uniqueSort(l)}if(f){x=k;a=C}return b};return n?markFunction(superMatcher):superMatcher}function compile(e,t){var n,r=[],i=[],o=j[e+" "];if(!o){t||(t=tokenize(e));n=t.length;while(n--){o=matcherFromTokens(t[n]);o[y]?r.push(o):i.push(o)}o=j(e,matcherFromGroupMatchers(i,r));o.selector=e}return o} +/** + * A low-level selection function that works with jQuery's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with jQuery selector compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */function select(e,t,n,r){var o,a,s,u,l,c="function"===typeof e&&e,f=!r&&tokenize(e=c.selector||e);n=n||[];if(1===f.length){a=f[0]=f[0].slice(0);if(a.length>2&&"ID"===(s=a[0]).type&&9===t.nodeType&&p&&i.relative[a[1].type]){t=(i.find.ID(s.matches[0].replace(G,funescape),t)||[])[0];if(!t)return n;c&&(t=t.parentNode);e=e.slice(a.shift().value.length)}o=B.needsContext.test(e)?0:a.length;while(o--){s=a[o];if(i.relative[u=s.type])break;if((l=i.find[u])&&(r=l(s.matches[0].replace(G,funescape),U.test(a[0].type)&&testContext(t.parentNode)||t))){a.splice(o,1);e=r.length&&toSelector(a);if(!e){v.apply(n,r);return n}break}}}(c||compile(e,f))(r,t,!p,n,!t||U.test(e)&&testContext(t.parentNode)||t);return n}h.sortStable=y.split("").sort(sortOrder).join("")===y;setDocument();h.sortDetached=assert((function(e){return 1&e.compareDocumentPosition(c.createElement("fieldset"))}));jQuery.find=find;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.unique=jQuery.uniqueSort;find.compile=compile;find.select=select;find.setDocument=setDocument;find.tokenize=tokenize;find.escape=jQuery.escapeSelector;find.getText=jQuery.text;find.isXML=jQuery.isXMLDoc;find.selectors=jQuery.expr;find.support=jQuery.support;find.uniqueSort=jQuery.uniqueSort})();var dir=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&jQuery(e).is(n))break;r.push(e)}return r};var siblings=function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n};var N=jQuery.expr.match.needsContext;var j=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function winnow(e,t,n){return g(t)?jQuery.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?jQuery.grep(e,(function(e){return e===t!==n})):"string"!==typeof t?jQuery.grep(e,(function(e){return u.call(t,e)>-1!==n})):jQuery.filter(t,e,n)}jQuery.filter=function(e,t,n){var r=t[0];n&&(e=":not("+e+")");return 1===t.length&&1===r.nodeType?jQuery.find.matchesSelector(r,e)?[r]:[]:jQuery.find.matches(e,jQuery.grep(t,(function(e){return 1===e.nodeType})))};jQuery.fn.extend({find:function(t){var n,r,i=(this||e).length,o=this||e;if("string"!==typeof t)return this.pushStack(jQuery(t).filter((function(){for(n=0;n1?jQuery.uniqueSort(r):r},filter:function(t){return this.pushStack(winnow(this||e,t||[],false))},not:function(t){return this.pushStack(winnow(this||e,t||[],true))},is:function(t){return!!winnow(this||e,"string"===typeof t&&N.test(t)?jQuery(t):t||[],false).length}});var P,H=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,M=jQuery.fn.init=function(t,n,r){var i,o;if(!t)return this||e;r=r||P;if("string"===typeof t){i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:H.exec(t);if(!i||!i[1]&&n)return!n||n.jquery?(n||r).find(t):this.constructor(n).find(t);if(i[1]){n=n instanceof jQuery?n[0]:n;jQuery.merge(this||e,jQuery.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:v,true));if(j.test(i[1])&&jQuery.isPlainObject(n))for(i in n)g((this||e)[i])?this[i](n[i]):this.attr(i,n[i]);return this||e}o=v.getElementById(i[2]);if(o){(this||e)[0]=o;(this||e).length=1}return this||e}if(t.nodeType){(this||e)[0]=t;(this||e).length=1;return this||e}return g(t)?void 0!==r.ready?r.ready(t):t(jQuery):jQuery.makeArray(t,this||e)};M.prototype=jQuery.fn;P=jQuery(v);var L=/^(?:parents|prev(?:Until|All))/,q={children:true,contents:true,next:true,prev:true};jQuery.fn.extend({has:function(t){var n=jQuery(t,this||e),r=n.length;return this.filter((function(){var t=0;for(;t-1:1===r.nodeType&&jQuery.find.matchesSelector(r,t))){a.push(r);break}return this.pushStack(a.length>1?jQuery.uniqueSort(a):a)},index:function(t){return t?"string"===typeof t?u.call(jQuery(t),(this||e)[0]):u.call(this||e,t.jquery?t[0]:t):(this||e)[0]&&(this||e)[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(),jQuery(e,t))))},addBack:function(t){return this.add(null==t?(this||e).prevObject:(this||e).prevObject.filter(t))}});function sibling(e,t){while((e=e[t])&&1!==e.nodeType);return e}jQuery.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return dir(e,"parentNode")},parentsUntil:function(e,t,n){return dir(e,"parentNode",n)},next:function(e){return sibling(e,"nextSibling")},prev:function(e){return sibling(e,"previousSibling")},nextAll:function(e){return dir(e,"nextSibling")},prevAll:function(e){return dir(e,"previousSibling")},nextUntil:function(e,t,n){return dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return dir(e,"previousSibling",n)},siblings:function(e){return siblings((e.parentNode||{}).firstChild,e)},children:function(e){return siblings(e.firstChild)},contents:function(e){if(null!=e.contentDocument&&i(e.contentDocument))return e.contentDocument;nodeName(e,"template")&&(e=e.content||e);return jQuery.merge([],e.childNodes)}},(function(t,n){jQuery.fn[t]=function(r,i){var o=jQuery.map(this||e,n,r);"Until"!==t.slice(-5)&&(i=r);i&&"string"===typeof i&&(o=jQuery.filter(i,o));if((this||e).length>1){q[t]||jQuery.uniqueSort(o);L.test(t)&&o.reverse()}return this.pushStack(o)}}));var O=/[^\x20\t\r\n\f]+/g;function createOptions(e){var t={};jQuery.each(e.match(O)||[],(function(e,n){t[n]=true}));return t}jQuery.Callbacks=function(t){t="string"===typeof t?createOptions(t):jQuery.extend({},t);var n,r,i,o,a=[],s=[],u=-1,fire=function(){o=o||t.once;i=n=true;for(;s.length;u=-1){r=s.shift();while(++u-1){a.splice(n,1);n<=u&&u--}}));return this||e},has:function(e){return e?jQuery.inArray(e,a)>-1:a.length>0},empty:function(){a&&(a=[]);return this||e},disable:function(){o=s=[];a=r="";return this||e},disabled:function(){return!a},lock:function(){o=s=[];r||n||(a=r="");return this||e},locked:function(){return!!o},fireWith:function(t,r){if(!o){r=r||[];r=[t,r.slice?r.slice():r];s.push(r);n||fire()}return this||e},fire:function(){l.fireWith(this||e,arguments);return this||e},fired:function(){return!!i}};return l};function Identity(e){return e}function Thrower(e){throw e}function adoptValue(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}jQuery.extend({Deferred:function(n){var r=[["notify","progress",jQuery.Callbacks("memory"),jQuery.Callbacks("memory"),2],["resolve","done",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),0,"resolved"],["reject","fail",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),1,"rejected"]],i="pending",o={state:function(){return i},always:function(){a.done(arguments).fail(arguments);return this||e},catch:function(e){return o.then(null,e)},pipe:function(){var t=arguments;return jQuery.Deferred((function(n){jQuery.each(r,(function(r,i){var o=g(t[i[4]])&&t[i[4]];a[i[1]]((function(){var t=o&&o.apply(this||e,arguments);t&&g(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this||e,o?[t]:arguments)}))}));t=null})).promise()},then:function(n,i,o){var a=0;function resolve(n,r,i,o){return function(){var s=this||e,u=arguments,mightThrow=function(){var e,t;if(!(n=a){if(i!==Thrower){s=void 0;u=[e]}r.rejectWith(s,u)}}};if(n)l();else{jQuery.Deferred.getErrorHook?l.error=jQuery.Deferred.getErrorHook():jQuery.Deferred.getStackHook&&(l.error=jQuery.Deferred.getStackHook());t.setTimeout(l)}}}return jQuery.Deferred((function(e){r[0][3].add(resolve(0,e,g(o)?o:Identity,e.notifyWith));r[1][3].add(resolve(0,e,g(n)?n:Identity));r[2][3].add(resolve(0,e,g(i)?i:Thrower))})).promise()},promise:function(e){return null!=e?jQuery.extend(e,o):o}},a={};jQuery.each(r,(function(t,n){var s=n[2],u=n[5];o[n[1]]=s.add;u&&s.add((function(){i=u}),r[3-t][2].disable,r[3-t][3].disable,r[0][2].lock,r[0][3].lock);s.add(n[3].fire);a[n[0]]=function(){a[n[0]+"With"]((this||e)===a?void 0:this||e,arguments);return this||e};a[n[0]+"With"]=s.fireWith}));o.promise(a);n&&n.call(a,a);return a},when:function(t){var n=arguments.length,r=n,i=Array(r),a=o.call(arguments),s=jQuery.Deferred(),updateFunc=function(t){return function(r){i[t]=this||e;a[t]=arguments.length>1?o.call(arguments):r;--n||s.resolveWith(i,a)}};if(n<=1){adoptValue(t,s.done(updateFunc(r)).resolve,s.reject,!n);if("pending"===s.state()||g(a[r]&&a[r].then))return s.then()}while(r--)adoptValue(a[r],updateFunc(r),s.reject);return s.promise()}});var F=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;jQuery.Deferred.exceptionHook=function(e,n){t.console&&t.console.warn&&e&&F.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)};jQuery.readyException=function(e){t.setTimeout((function(){throw e}))};var R=jQuery.Deferred();jQuery.fn.ready=function(t){R.then(t).catch((function(e){jQuery.readyException(e)}));return this||e};jQuery.extend({isReady:false,readyWait:1,ready:function(e){if(!(true===e?--jQuery.readyWait:jQuery.isReady)){jQuery.isReady=true;true!==e&&--jQuery.readyWait>0||R.resolveWith(v,[jQuery])}}});jQuery.ready.then=R.then;function completed(){v.removeEventListener("DOMContentLoaded",completed);t.removeEventListener("load",completed);jQuery.ready()}if("complete"===v.readyState||"loading"!==v.readyState&&!v.documentElement.doScroll)t.setTimeout(jQuery.ready);else{v.addEventListener("DOMContentLoaded",completed);t.addEventListener("load",completed)}var access=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===toType(n)){i=true;for(s in n)access(e,t,s,n[s],true,o,a)}else if(void 0!==r){i=true;g(r)||(a=true);if(l)if(a){t.call(e,r);t=null}else{l=t;t=function(e,t,n){return l.call(jQuery(e),n)}}if(t)for(;s1,null,true)},removeData:function(t){return this.each((function(){B.remove(this||e,t)}))}});jQuery.extend({queue:function(e,t,n){var r;if(e){t=(t||"fx")+"queue";r=$.get(e,t);n&&(!r||Array.isArray(n)?r=$.access(e,t,jQuery.makeArray(n)):r.push(n));return r||[]}},dequeue:function(e,t){t=t||"fx";var n=jQuery.queue(e,t),r=n.length,i=n.shift(),o=jQuery._queueHooks(e,t),next=function(){jQuery.dequeue(e,t)};if("inprogress"===i){i=n.shift();r--}if(i){"fx"===t&&n.unshift("inprogress");delete o.stop;i.call(e,next,o)}!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return $.get(e,n)||$.access(e,n,{empty:jQuery.Callbacks("once memory").add((function(){$.remove(e,[t+"queue",n])}))})}});jQuery.fn.extend({queue:function(t,n){var r=2;if("string"!==typeof t){n=t;t="fx";r--}return arguments.length\x20\t\r\n\f]*)/i;var Z=/^$|^module$|\/(?:java|ecma)script/i;(function(){var e=v.createDocumentFragment(),t=e.appendChild(v.createElement("div")),n=v.createElement("input");n.setAttribute("type","radio");n.setAttribute("checked","checked");n.setAttribute("name","t");t.appendChild(n);h.checkClone=t.cloneNode(true).cloneNode(true).lastChild.checked;t.innerHTML="";h.noCloneChecked=!!t.cloneNode(true).lastChild.defaultValue;t.innerHTML="";h.option=!!t.lastChild})();var ee={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ee.tbody=ee.tfoot=ee.colgroup=ee.caption=ee.thead;ee.th=ee.td;h.option||(ee.optgroup=ee.option=[1,""]);function getAll(e,t){var n;n="undefined"!==typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!==typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&nodeName(e,t)?jQuery.merge([e],n):n}function setGlobalEval(e,t){var n=0,r=e.length;for(;n-1)i&&i.push(o);else{l=isAttached(o);a=getAll(f.appendChild(o),"script");l&&setGlobalEval(a);if(n){c=0;while(o=a[c++])Z.test(o.type||"")&&n.push(o)}}return f}var ne=/^([^.]*)(?:\.(.+)|)/;function returnTrue(){return true}function returnFalse(){return false}function on(t,n,r,i,o,a){var s,u;if("object"===typeof n){if("string"!==typeof r){i=i||r;r=void 0}for(u in n)on(t,u,r,i,n[u],a);return t}if(null==i&&null==o){o=r;i=r=void 0}else if(null==o)if("string"===typeof r){o=i;i=void 0}else{o=i;i=r;r=void 0}if(false===o)o=returnFalse;else if(!o)return t;if(1===a){s=o;o=function(t){jQuery().off(t);return s.apply(this||e,arguments)};o.guid=s.guid||(s.guid=jQuery.guid++)}return t.each((function(){jQuery.event.add(this||e,n,o,i,r)}))}jQuery.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,m=$.get(e);if(acceptData(e)){if(n.handler){o=n;n=o.handler;i=o.selector}i&&jQuery.find.matchesSelector(V,i);n.guid||(n.guid=jQuery.guid++);(u=m.events)||(u=m.events=Object.create(null));(a=m.handle)||(a=m.handle=function(t){return"undefined"!==typeof jQuery&&jQuery.event.triggered!==t.type?jQuery.event.dispatch.apply(e,arguments):void 0});t=(t||"").match(O)||[""];l=t.length;while(l--){s=ne.exec(t[l])||[];p=g=s[1];h=(s[2]||"").split(".").sort();if(p){f=jQuery.event.special[p]||{};p=(i?f.delegateType:f.bindType)||p;f=jQuery.event.special[p]||{};c=jQuery.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&jQuery.expr.match.needsContext.test(i),namespace:h.join(".")},o);if(!(d=u[p])){d=u[p]=[];d.delegateCount=0;f.setup&&false!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)}if(f.add){f.add.call(e,c);c.handler.guid||(c.handler.guid=n.guid)}i?d.splice(d.delegateCount++,0,c):d.push(c);jQuery.event.global[p]=true}}}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,m=$.hasData(e)&&$.get(e);if(m&&(u=m.events)){t=(t||"").match(O)||[""];l=t.length;while(l--){s=ne.exec(t[l])||[];p=g=s[1];h=(s[2]||"").split(".").sort();if(p){f=jQuery.event.special[p]||{};p=(r?f.delegateType:f.bindType)||p;d=u[p]||[];s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)");a=o=d.length;while(o--){c=d[o];if((i||g===c.origType)&&(!n||n.guid===c.guid)&&(!s||s.test(c.namespace))&&(!r||r===c.selector||"**"===r&&c.selector)){d.splice(o,1);c.selector&&d.delegateCount--;f.remove&&f.remove.call(e,c)}}if(a&&!d.length){f.teardown&&false!==f.teardown.call(e,h,m.handle)||jQuery.removeEvent(e,p,m.handle);delete u[p]}}else for(p in u)jQuery.event.remove(e,p+t[l],n,r,true)}jQuery.isEmptyObject(u)&&$.remove(e,"handle events")}},dispatch:function(t){var n,r,i,o,a,s,u=new Array(arguments.length),l=jQuery.event.fix(t),c=($.get(this||e,"events")||Object.create(null))[l.type]||[],f=jQuery.event.special[l.type]||{};u[0]=l;for(n=1;n=1))for(;c!==(this||e);c=c.parentNode||this||e)if(1===c.nodeType&&!("click"===t.type&&true===c.disabled)){a=[];s={};for(r=0;r-1:jQuery.find(o,this||e,null,[c]).length);s[o]&&a.push(i)}a.length&&u.push({elem:c,handlers:a})}c=this||e;l\s*$/g;function manipulationTarget(e,t){return nodeName(e,"table")&&nodeName(11!==t.nodeType?t:t.firstChild,"tr")&&jQuery(e).children("tbody")[0]||e}function disableScript(e){e.type=(null!==e.getAttribute("type"))+"/"+e.type;return e}function restoreScript(e){"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type");return e}function cloneCopyEvent(e,t){var n,r,i,o,a,s,u;if(1===t.nodeType){if($.hasData(e)){o=$.get(e);u=o.events;if(u){$.remove(t,"handle events");for(i in u)for(n=0,r=u[i].length;n1&&"string"===typeof v&&!h.checkClone&&ie.test(v))return t.each((function(o){var a=t.eq(o);y&&(n[0]=v.call(this||e,o,a.html()));domManip(a,n,r,i)}));if(p){o=buildFragment(n,t[0].ownerDocument,false,t,i);s=o.firstChild;1===o.childNodes.length&&(o=s);if(s||i){u=jQuery.map(getAll(o,"script"),disableScript);l=u.length;for(;d0&&setGlobalEval(a,!u&&getAll(e,"script"));return s},cleanData:function(e){var t,n,r,i=jQuery.event.special,o=0;for(;void 0!==(n=e[o]);o++)if(acceptData(n)){if(t=n[$.expando]){if(t.events)for(r in t.events)i[r]?jQuery.event.remove(n,r):jQuery.removeEvent(n,r,t.handle);n[$.expando]=void 0}n[B.expando]&&(n[B.expando]=void 0)}}});jQuery.fn.extend({detach:function(t){return remove(this||e,t,true)},remove:function(t){return remove(this||e,t)},text:function(t){return access(this||e,(function(t){return void 0===t?jQuery.text(this||e):this.empty().each((function(){1!==(this||e).nodeType&&11!==(this||e).nodeType&&9!==(this||e).nodeType||((this||e).textContent=t)}))}),null,t,arguments.length)},append:function(){return domManip(this||e,arguments,(function(t){if(1===(this||e).nodeType||11===(this||e).nodeType||9===(this||e).nodeType){var n=manipulationTarget(this||e,t);n.appendChild(t)}}))},prepend:function(){return domManip(this||e,arguments,(function(t){if(1===(this||e).nodeType||11===(this||e).nodeType||9===(this||e).nodeType){var n=manipulationTarget(this||e,t);n.insertBefore(t,n.firstChild)}}))},before:function(){return domManip(this||e,arguments,(function(t){(this||e).parentNode&&(this||e).parentNode.insertBefore(t,this||e)}))},after:function(){return domManip(this||e,arguments,(function(t){(this||e).parentNode&&(this||e).parentNode.insertBefore(t,(this||e).nextSibling)}))},empty:function(){var t,n=0;for(;null!=(t=(this||e)[n]);n++)if(1===t.nodeType){jQuery.cleanData(getAll(t,false));t.textContent=""}return this||e},clone:function(t,n){t=null!=t&&t;n=null==n?t:n;return this.map((function(){return jQuery.clone(this||e,t,n)}))},html:function(t){return access(this||e,(function(t){var n=(this||e)[0]||{},r=0,i=(this||e).length;if(void 0===t&&1===n.nodeType)return n.innerHTML;if("string"===typeof t&&!re.test(t)&&!ee[(K.exec(t)||["",""])[1].toLowerCase()]){t=jQuery.htmlPrefilter(t);try{for(;r=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0);return u+l}function getWidthOrHeight(e,t,n){var r=getStyles(e),i=!h.boxSizingReliable()||n,o=i&&"border-box"===jQuery.css(e,"boxSizing",false,r),a=o,s=curCSS(e,t,r),u="offset"+t[0].toUpperCase()+t.slice(1);if(ae.test(s)){if(!n)return s;s="auto"}if((!h.boxSizingReliable()&&o||!h.reliableTrDimensions()&&nodeName(e,"tr")||"auto"===s||!parseFloat(s)&&"inline"===jQuery.css(e,"display",false,r))&&e.getClientRects().length){o="border-box"===jQuery.css(e,"boxSizing",false,r);a=u in e;a&&(s=e[u])}s=parseFloat(s)||0;return s+boxModelAdjustment(e,t,n||(o?"border":"content"),a,r,s)+"px"}jQuery.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=curCSS(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:true,aspectRatio:true,borderImageSlice:true,columnCount:true,flexGrow:true,flexShrink:true,fontWeight:true,gridArea:true,gridColumn:true,gridColumnEnd:true,gridColumnStart:true,gridRow:true,gridRowEnd:true,gridRowStart:true,lineHeight:true,opacity:true,order:true,orphans:true,scale:true,widows:true,zIndex:true,zoom:true,fillOpacity:true,floodOpacity:true,stopOpacity:true,strokeMiterlimit:true,strokeOpacity:true},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=camelCase(t),u=se.test(t),l=e.style;u||(t=finalPropName(s));a=jQuery.cssHooks[t]||jQuery.cssHooks[s];if(void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,false,r))?i:l[t];o=typeof n;if("string"===o&&(i=U.exec(n))&&i[1]){n=adjustCSS(e,t,i);o="number"}if(null!=n&&n===n){"number"!==o||u||(n+=i&&i[3]||(jQuery.cssNumber[s]?"":"px"));h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit");a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n)}}},css:function(e,t,n,r){var i,o,a,s=camelCase(t),u=se.test(t);u||(t=finalPropName(s));a=jQuery.cssHooks[t]||jQuery.cssHooks[s];a&&"get"in a&&(i=a.get(e,true,n));void 0===i&&(i=curCSS(e,t,r));"normal"===i&&t in he&&(i=he[t]);if(""===n||n){o=parseFloat(i);return true===n||isFinite(o)?o||0:i}return i}});jQuery.each(["height","width"],(function(e,t){jQuery.cssHooks[t]={get:function(e,n,r){if(n)return!de.test(jQuery.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?getWidthOrHeight(e,t,r):swap(e,pe,(function(){return getWidthOrHeight(e,t,r)}))},set:function(e,n,r){var i,o=getStyles(e),a=!h.scrollboxSize()&&"absolute"===o.position,s=a||r,u=s&&"border-box"===jQuery.css(e,"boxSizing",false,o),l=r?boxModelAdjustment(e,t,r,u,o):0;u&&a&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-boxModelAdjustment(e,t,"border",false,o)-.5));if(l&&(i=U.exec(n))&&"px"!==(i[3]||"px")){e.style[t]=n;n=jQuery.css(e,t)}return setPositiveNumber(e,n,l)}}}));jQuery.cssHooks.marginLeft=addGetHookIf(h.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(curCSS(e,"marginLeft"))||e.getBoundingClientRect().left-swap(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"}));jQuery.each({margin:"",padding:"",border:"Width"},(function(e,t){jQuery.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"===typeof n?n.split(" "):[n];for(;r<4;r++)i[e+G[r]+t]=o[r]||o[r-2]||o[0];return i}};"margin"!==e&&(jQuery.cssHooks[e+t].set=setPositiveNumber)}));jQuery.fn.extend({css:function(t,n){return access(this||e,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){r=getStyles(e);i=t.length;for(;a1)}});function Tween(e,t,n,r,i){return new Tween.prototype.init(e,t,n,r,i)}jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function(t,n,r,i,o,a){(this||e).elem=t;(this||e).prop=r;(this||e).easing=o||jQuery.easing._default;(this||e).options=n;(this||e).start=(this||e).now=this.cur();(this||e).end=i;(this||e).unit=a||(jQuery.cssNumber[r]?"":"px")},cur:function(){var t=Tween.propHooks[(this||e).prop];return t&&t.get?t.get(this||e):Tween.propHooks._default.get(this||e)},run:function(t){var n,r=Tween.propHooks[(this||e).prop];(this||e).options.duration?(this||e).pos=n=jQuery.easing[(this||e).easing](t,(this||e).options.duration*t,0,1,(this||e).options.duration):(this||e).pos=n=t;(this||e).now=((this||e).end-(this||e).start)*n+(this||e).start;(this||e).options.step&&(this||e).options.step.call((this||e).elem,(this||e).now,this||e);r&&r.set?r.set(this||e):Tween.propHooks._default.set(this||e);return this||e}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(e){var t;if(1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop])return e.elem[e.prop];t=jQuery.css(e.elem,e.prop,"");return t&&"auto"!==t?t:0},set:function(e){jQuery.fx.step[e.prop]?jQuery.fx.step[e.prop](e):1!==e.elem.nodeType||!jQuery.cssHooks[e.prop]&&null==e.elem.style[finalPropName(e.prop)]?e.elem[e.prop]=e.now:jQuery.style(e.elem,e.prop,e.now+e.unit)}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}};jQuery.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"};jQuery.fx=Tween.prototype.init;jQuery.fx.step={};var ge,me,ve=/^(?:toggle|show|hide)$/,ye=/queueHooks$/;function schedule(){if(me){false===v.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(schedule):t.setTimeout(schedule,jQuery.fx.interval);jQuery.fx.tick()}}function createFxNow(){t.setTimeout((function(){ge=void 0}));return ge=Date.now()}function genFx(e,t){var n,r=0,i={height:e};t=t?1:0;for(;r<4;r+=2-t){n=G[r];i["margin"+n]=i["padding"+n]=e}t&&(i.opacity=i.width=e);return i}function createTween(e,t,n){var r,i=(Animation.tweeners[t]||[]).concat(Animation.tweeners["*"]),o=0,a=i.length;for(;o1)},removeAttr:function(t){return this.each((function(){jQuery.removeAttr(this||e,t)}))}});jQuery.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o){if("undefined"===typeof e.getAttribute)return jQuery.prop(e,t,n);1===o&&jQuery.isXMLDoc(e)||(i=jQuery.attrHooks[t.toLowerCase()]||(jQuery.expr.match.bool.test(t)?xe:void 0));if(void 0!==n){if(null===n){jQuery.removeAttr(e,t);return}if(i&&"set"in i&&void 0!==(r=i.set(e,n,t)))return r;e.setAttribute(t,n+"");return n}if(i&&"get"in i&&null!==(r=i.get(e,t)))return r;r=jQuery.find.attr(e,t);return null==r?void 0:r}},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&nodeName(e,"input")){var n=e.value;e.setAttribute("type",t);n&&(e.value=n);return t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(O);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}});xe={set:function(e,t,n){false===t?jQuery.removeAttr(e,n):e.setAttribute(n,n);return n}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=be[t]||jQuery.find.attr;be[t]=function(e,t,r){var i,o,a=t.toLowerCase();if(!r){o=be[a];be[a]=i;i=null!=n(e,t,r)?a:null;be[a]=o}return i}}));var we=/^(?:input|select|textarea|button)$/i,Te=/^(?:a|area)$/i;jQuery.fn.extend({prop:function(t,n){return access(this||e,jQuery.prop,t,n,arguments.length>1)},removeProp:function(t){return this.each((function(){delete(this||e)[jQuery.propFix[t]||t]}))}});jQuery.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o){if(1!==o||!jQuery.isXMLDoc(e)){t=jQuery.propFix[t]||t;i=jQuery.propHooks[t]}return void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]}},propHooks:{tabIndex:{get:function(e){var t=jQuery.find.attr(e,"tabindex");return t?parseInt(t,10):we.test(e.nodeName)||Te.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}});h.optSelected||(jQuery.propHooks.selected={get:function(e){var t=e.parentNode;t&&t.parentNode&&t.parentNode.selectedIndex;return null},set:function(e){var t=e.parentNode;if(t){t.selectedIndex;t.parentNode&&t.parentNode.selectedIndex}}});jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){jQuery.propFix[this.toLowerCase()]=this||e}));function stripAndCollapse(e){var t=e.match(O)||[];return t.join(" ")}function getClass(e){return e.getAttribute&&e.getAttribute("class")||""}function classesToArray(e){return Array.isArray(e)?e:"string"===typeof e&&e.match(O)||[]}jQuery.fn.extend({addClass:function(t){var n,r,i,o,a,s;if(g(t))return this.each((function(n){jQuery(this||e).addClass(t.call(this||e,n,getClass(this||e)))}));n=classesToArray(t);return n.length?this.each((function(){i=getClass(this||e);r=1===(this||e).nodeType&&" "+stripAndCollapse(i)+" ";if(r){for(a=0;a-1)r=r.replace(" "+o+" "," ")}s=stripAndCollapse(r);i!==s&&this.setAttribute("class",s)}})):this||e},toggleClass:function(t,n){var r,i,o,a,s=typeof t,u="string"===s||Array.isArray(t);if(g(t))return this.each((function(r){jQuery(this||e).toggleClass(t.call(this||e,r,getClass(this||e),n),n)}));if("boolean"===typeof n&&u)return n?this.addClass(t):this.removeClass(t);r=classesToArray(t);return this.each((function(){if(u){a=jQuery(this||e);for(o=0;o-1)return true;return false}});var Ce=/\r/g;jQuery.fn.extend({val:function(t){var n,r,i,o=(this||e)[0];if(arguments.length){i=g(t);return this.each((function(r){var o;if(1===(this||e).nodeType){o=i?t.call(this||e,r,jQuery(this||e).val()):t;null==o?o="":"number"===typeof o?o+="":Array.isArray(o)&&(o=jQuery.map(o,(function(e){return null==e?"":e+""})));n=jQuery.valHooks[(this||e).type]||jQuery.valHooks[(this||e).nodeName.toLowerCase()];n&&"set"in n&&void 0!==n.set(this||e,o,"value")||((this||e).value=o)}}))}if(o){n=jQuery.valHooks[o.type]||jQuery.valHooks[o.nodeName.toLowerCase()];if(n&&"get"in n&&void 0!==(r=n.get(o,"value")))return r;r=o.value;return"string"===typeof r?r.replace(Ce,""):null==r?"":r}}});jQuery.extend({valHooks:{option:{get:function(e){var t=jQuery.find.attr(e,"value");return null!=t?t:stripAndCollapse(jQuery.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;r=o<0?u:a?o:0;for(;r-1)&&(n=true)}n||(e.selectedIndex=-1);return o}}}});jQuery.each(["radio","checkbox"],(function(){jQuery.valHooks[this||e]={set:function(e,t){if(Array.isArray(t))return e.checked=jQuery.inArray(jQuery(e).val(),t)>-1}};h.checkOn||(jQuery.valHooks[this||e].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var Se=t.location;var ke={guid:Date.now()};var Ae=/\?/;jQuery.parseXML=function(e){var n,r;if(!e||"string"!==typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(e){}r=n&&n.getElementsByTagName("parsererror")[0];n&&!r||jQuery.error("Invalid XML: "+(r?jQuery.map(r.childNodes,(function(e){return e.textContent})).join("\n"):e));return n};var Ee=/^(?:focusinfocus|focusoutblur)$/,stopPropagationCallback=function(e){e.stopPropagation()};jQuery.extend(jQuery.event,{trigger:function(e,n,r,i){var o,a,s,u,l,c,d,p,h=[r||v],y=f.call(e,"type")?e.type:e,x=f.call(e,"namespace")?e.namespace.split("."):[];a=p=s=r=r||v;if(3!==r.nodeType&&8!==r.nodeType&&!Ee.test(y+jQuery.event.triggered)){if(y.indexOf(".")>-1){x=y.split(".");y=x.shift();x.sort()}l=y.indexOf(":")<0&&"on"+y;e=e[jQuery.expando]?e:new jQuery.Event(y,"object"===typeof e&&e);e.isTrigger=i?2:3;e.namespace=x.join(".");e.rnamespace=e.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;e.result=void 0;e.target||(e.target=r);n=null==n?[e]:jQuery.makeArray(n,[e]);d=jQuery.event.special[y]||{};if(i||!d.trigger||false!==d.trigger.apply(r,n)){if(!i&&!d.noBubble&&!m(r)){u=d.delegateType||y;Ee.test(u+y)||(a=a.parentNode);for(;a;a=a.parentNode){h.push(a);s=a}s===(r.ownerDocument||v)&&h.push(s.defaultView||s.parentWindow||t)}o=0;while((a=h[o++])&&!e.isPropagationStopped()){p=a;e.type=o>1?u:d.bindType||y;c=($.get(a,"events")||Object.create(null))[e.type]&&$.get(a,"handle");c&&c.apply(a,n);c=l&&a[l];if(c&&c.apply&&acceptData(a)){e.result=c.apply(a,n);false===e.result&&e.preventDefault()}}e.type=y;if(!i&&!e.isDefaultPrevented()&&(!d._default||false===d._default.apply(h.pop(),n))&&acceptData(r)&&l&&g(r[y])&&!m(r)){s=r[l];s&&(r[l]=null);jQuery.event.triggered=y;e.isPropagationStopped()&&p.addEventListener(y,stopPropagationCallback);r[y]();e.isPropagationStopped()&&p.removeEventListener(y,stopPropagationCallback);jQuery.event.triggered=void 0;s&&(r[l]=s)}return e.result}}},simulate:function(e,t,n){var r=jQuery.extend(new jQuery.Event,n,{type:e,isSimulated:true});jQuery.event.trigger(r,null,t)}});jQuery.fn.extend({trigger:function(t,n){return this.each((function(){jQuery.event.trigger(t,n,this||e)}))},triggerHandler:function(t,n){var r=(this||e)[0];if(r)return jQuery.event.trigger(t,n,r,true)}});var De=/\[\]$/,Ne=/\r?\n/g,je=/^(?:submit|button|image|reset|file)$/i,Pe=/^(?:input|select|textarea|keygen)/i;function buildParams(e,t,n,r){var i;if(Array.isArray(t))jQuery.each(t,(function(t,i){n||De.test(e)?r(e,i):buildParams(e+"["+("object"===typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==toType(t))r(e,t);else for(i in t)buildParams(e+"["+i+"]",t[i],n,r)}jQuery.param=function(t,n){var r,i=[],add=function(e,t){var n=g(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!jQuery.isPlainObject(t))jQuery.each(t,(function(){add((this||e).name,(this||e).value)}));else for(r in t)buildParams(r,t[r],n,add);return i.join("&")};jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=jQuery.prop(this||e,"elements");return t?jQuery.makeArray(t):this||e})).filter((function(){var t=(this||e).type;return(this||e).name&&!jQuery(this||e).is(":disabled")&&Pe.test((this||e).nodeName)&&!je.test(t)&&((this||e).checked||!J.test(t))})).map((function(t,n){var r=jQuery(this||e).val();return null==r?null:Array.isArray(r)?jQuery.map(r,(function(e){return{name:n.name,value:e.replace(Ne,"\r\n")}})):{name:n.name,value:r.replace(Ne,"\r\n")}})).get()}});var He=/%20/g,Me=/#.*$/,Le=/([?&])_=[^&]*/,qe=/^(.*?):[ \t]*([^\r\n]*)$/gm,Oe=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fe=/^(?:GET|HEAD)$/,Re=/^\/\//,Ie={},We={},$e="*/".concat("*"),Be=v.createElement("a");Be.href=Se.href;function addToPrefiltersOrTransports(e){return function(t,n){if("string"!==typeof t){n=t;t="*"}var r,i=0,o=t.toLowerCase().match(O)||[];if(g(n))while(r=o[i++])if("+"===r[0]){r=r.slice(1)||"*";(e[r]=e[r]||[]).unshift(n)}else(e[r]=e[r]||[]).push(n)}}function inspectPrefiltersOrTransports(e,t,n,r){var i={},o=e===We;function inspect(a){var s;i[a]=true;jQuery.each(e[a]||[],(function(e,a){var u=a(t,n,r);if("string"===typeof u&&!o&&!i[u]){t.dataTypes.unshift(u);inspect(u);return false}if(o)return!(s=u)}));return s}return inspect(t.dataTypes[0])||!i["*"]&&inspect("*")}function ajaxExtend(e,t){var n,r,i=jQuery.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);r&&jQuery.extend(true,e,r);return e}function ajaxHandleResponses(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0]){u.shift();void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"))}if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o){o!==u[0]&&u.unshift(o);return n[o]}}function ajaxConvert(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o){e.responseFields[o]&&(n[e.responseFields[o]]=t);!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType));u=o;o=c.shift();if(o)if("*"===o)o=u;else if("*"!==u&&u!==o){a=l[u+" "+o]||l["* "+o];if(!a)for(i in l){s=i.split(" ");if(s[1]===o){a=l[u+" "+s[0]]||l["* "+s[0]];if(a){if(true===a)a=l[i];else if(true!==l[i]){o=s[0];c.unshift(s[1])}break}}}if(true!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}}return{state:"success",data:t}}jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Se.href,type:"GET",isLocal:Oe.test(Se.protocol),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$e,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":JSON.parse,"text xml":jQuery.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(e,t){return t?ajaxExtend(ajaxExtend(e,jQuery.ajaxSettings),t):ajaxExtend(jQuery.ajaxSettings,e)},ajaxPrefilter:addToPrefiltersOrTransports(Ie),ajaxTransport:addToPrefiltersOrTransports(We),ajax:function(n,r){if("object"===typeof n){r=n;n=void 0}r=r||{};var i,o,a,s,u,l,c,f,d,p,h=jQuery.ajaxSetup({},r),g=h.context||h,m=h.context&&(g.nodeType||g.jquery)?jQuery(g):jQuery.event,y=jQuery.Deferred(),x=jQuery.Callbacks("once memory"),b=h.statusCode||{},w={},T={},C="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s){s={};while(t=qe.exec(a))s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(t,n){if(null==c){t=T[t.toLowerCase()]=T[t.toLowerCase()]||t;w[t]=n}return this||e},overrideMimeType:function(t){null==c&&(h.mimeType=t);return this||e},statusCode:function(t){var n;if(t)if(c)S.always(t[S.status]);else for(n in t)b[n]=[b[n],t[n]];return this||e},abort:function(t){var n=t||C;i&&i.abort(n);done(0,n);return this||e}};y.promise(S);h.url=((n||h.url||Se.href)+"").replace(Re,Se.protocol+"//");h.type=r.method||r.type||h.method||h.type;h.dataTypes=(h.dataType||"*").toLowerCase().match(O)||[""];if(null==h.crossDomain){l=v.createElement("a");try{l.href=h.url;l.href=l.href;h.crossDomain=Be.protocol+"//"+Be.host!==l.protocol+"//"+l.host}catch(e){h.crossDomain=true}}h.data&&h.processData&&"string"!==typeof h.data&&(h.data=jQuery.param(h.data,h.traditional));inspectPrefiltersOrTransports(Ie,h,r,S);if(c)return S;f=jQuery.event&&h.global;f&&0===jQuery.active++&&jQuery.event.trigger("ajaxStart");h.type=h.type.toUpperCase();h.hasContent=!Fe.test(h.type);o=h.url.replace(Me,"");if(h.hasContent)h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(He,"+"));else{p=h.url.slice(o.length);if(h.data&&(h.processData||"string"===typeof h.data)){o+=(Ae.test(o)?"&":"?")+h.data;delete h.data}if(false===h.cache){o=o.replace(Le,"$1");p=(Ae.test(o)?"&":"?")+"_="+ke.guid+++p}h.url=o+p}if(h.ifModified){jQuery.lastModified[o]&&S.setRequestHeader("If-Modified-Since",jQuery.lastModified[o]);jQuery.etag[o]&&S.setRequestHeader("If-None-Match",jQuery.etag[o])}(h.data&&h.hasContent&&false!==h.contentType||r.contentType)&&S.setRequestHeader("Content-Type",h.contentType);S.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+$e+"; q=0.01":""):h.accepts["*"]);for(d in h.headers)S.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(false===h.beforeSend.call(g,S,h)||c))return S.abort();C="abort";x.add(h.complete);S.done(h.success);S.fail(h.error);i=inspectPrefiltersOrTransports(We,h,r,S);if(i){S.readyState=1;f&&m.trigger("ajaxSend",[S,h]);if(c)return S;h.async&&h.timeout>0&&(u=t.setTimeout((function(){S.abort("timeout")}),h.timeout));try{c=false;i.send(w,done)}catch(e){if(c)throw e;done(-1,e)}}else done(-1,"No Transport");function done(e,n,r,s){var l,d,p,v,w,T=n;if(!c){c=true;u&&t.clearTimeout(u);i=void 0;a=s||"";S.readyState=e>0?4:0;l=e>=200&&e<300||304===e;r&&(v=ajaxHandleResponses(h,S,r));!l&&jQuery.inArray("script",h.dataTypes)>-1&&jQuery.inArray("json",h.dataTypes)<0&&(h.converters["text script"]=function(){});v=ajaxConvert(h,v,S,l);if(l){if(h.ifModified){w=S.getResponseHeader("Last-Modified");w&&(jQuery.lastModified[o]=w);w=S.getResponseHeader("etag");w&&(jQuery.etag[o]=w)}if(204===e||"HEAD"===h.type)T="nocontent";else if(304===e)T="notmodified";else{T=v.state;d=v.data;p=v.error;l=!p}}else{p=T;if(e||!T){T="error";e<0&&(e=0)}}S.status=e;S.statusText=(n||T)+"";l?y.resolveWith(g,[d,T,S]):y.rejectWith(g,[S,T,p]);S.statusCode(b);b=void 0;f&&m.trigger(l?"ajaxSuccess":"ajaxError",[S,h,l?d:p]);x.fireWith(g,[S,T]);if(f){m.trigger("ajaxComplete",[S,h]);--jQuery.active||jQuery.event.trigger("ajaxStop")}}}return S},getJSON:function(e,t,n){return jQuery.get(e,t,n,"json")},getScript:function(e,t){return jQuery.get(e,void 0,t,"script")}});jQuery.each(["get","post"],(function(e,t){jQuery[t]=function(e,n,r,i){if(g(n)){i=i||r;r=n;n=void 0}return jQuery.ajax(jQuery.extend({url:e,type:t,dataType:i,data:n,success:r},jQuery.isPlainObject(e)&&e))}}));jQuery.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}));jQuery._evalUrl=function(e,t,n){return jQuery.ajax({url:e,type:"GET",dataType:"script",cache:true,async:false,global:false,converters:{"text script":function(){}},dataFilter:function(e){jQuery.globalEval(e,t,n)}})};jQuery.fn.extend({wrapAll:function(t){var n;if((this||e)[0]){g(t)&&(t=t.call((this||e)[0]));n=jQuery(t,(this||e)[0].ownerDocument).eq(0).clone(true);(this||e)[0].parentNode&&n.insertBefore((this||e)[0]);n.map((function(){var t=this||e;while(t.firstElementChild)t=t.firstElementChild;return t})).append(this||e)}return this||e},wrapInner:function(t){return g(t)?this.each((function(n){jQuery(this||e).wrapInner(t.call(this||e,n))})):this.each((function(){var n=jQuery(this||e),r=n.contents();r.length?r.wrapAll(t):n.append(t)}))},wrap:function(t){var n=g(t);return this.each((function(r){jQuery(this||e).wrapAll(n?t.call(this||e,r):t)}))},unwrap:function(t){this.parent(t).not("body").each((function(){jQuery(this||e).replaceWith((this||e).childNodes)}));return this||e}});jQuery.expr.pseudos.hidden=function(e){return!jQuery.expr.pseudos.visible(e)};jQuery.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)};jQuery.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(e){}};var _e={0:200,1223:204},ze=jQuery.ajaxSettings.xhr();h.cors=!!ze&&"withCredentials"in ze;h.ajax=ze=!!ze;jQuery.ajaxTransport((function(e){var n,r;if(h.cors||ze&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();s.open(e.type,e.url,e.async,e.username,e.password);if(e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType);e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){if(n){n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null;"abort"===e?s.abort():"error"===e?"number"!==typeof s.status?o(0,"error"):o(s.status,s.statusText):o(_e[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!==typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders())}}};s.onload=n();r=s.onerror=s.ontimeout=n("error");void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&t.setTimeout((function(){n&&r()}))};n=n("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}));jQuery.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=false)}));jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){jQuery.globalEval(e);return e}}});jQuery.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=false);e.crossDomain&&(e.type="GET")}));jQuery.ajaxTransport("script",(function(e){if(e.crossDomain||e.scriptAttrs){var t,n;return{send:function(r,i){t=jQuery("