diff --git a/.env.example b/.env.example
deleted file mode 100644
index 383f11b..0000000
--- a/.env.example
+++ /dev/null
@@ -1,58 +0,0 @@
-APP_NAME=Statamic
-APP_ENV=local
-APP_KEY=
-APP_DEBUG=true
-APP_URL=http://localhost
-
-STATAMIC_LICENSE_KEY=
-STATAMIC_STACHE_WATCHER=true
-STATAMIC_STATIC_CACHING_STRATEGY=null
-STATAMIC_REVISIONS_ENABLED=false
-STATAMIC_GRAPHQL_ENABLED=false
-STATAMIC_API_ENABLED=false
-STATAMIC_GIT_ENABLED=false
-
-PODCASTER_PUBSUBHUBBUB_ENABLED=false
-
-LOG_CHANNEL=stack
-
-DB_CONNECTION=mysql
-DB_HOST=127.0.0.1
-DB_PORT=3306
-DB_DATABASE=laravel
-DB_USERNAME=root
-DB_PASSWORD=
-
-BROADCAST_DRIVER=log
-CACHE_DRIVER=file
-QUEUE_CONNECTION=sync
-SESSION_DRIVER=file
-SESSION_LIFETIME=120
-
-REDIS_HOST=127.0.0.1
-REDIS_PASSWORD=null
-REDIS_PORT=6379
-
-MAIL_MAILER=smtp
-MAIL_HOST=smtp.mailtrap.io
-MAIL_PORT=2525
-MAIL_USERNAME=null
-MAIL_PASSWORD=null
-MAIL_ENCRYPTION=null
-MAIL_FROM_ADDRESS=null
-MAIL_FROM_NAME="${APP_NAME}"
-
-PUSHER_APP_ID=
-PUSHER_APP_KEY=
-PUSHER_APP_SECRET=
-PUSHER_APP_CLUSTER=mt1
-
-AWS_ACCESS_KEY_ID=
-AWS_SECRET_ACCESS_KEY=
-AWS_DEFAULT_REGION=us-east-1
-AWS_BUCKET=
-
-MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
-MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
-
-DEBUGBAR_ENABLED=false
diff --git a/LICENSE.md b/LICENSE.md
deleted file mode 100644
index 0a36475..0000000
--- a/LICENSE.md
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright © Statamic, LLC.
-
-Permission is hereby granted to any person obtaining a copy of this software (the “Software”) to use, copy, modify, merge, publish and/or distribute copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-1. **Do not plagiarize.** The above copyright notice and this license shall be included in all copies or substantial portions of the Software.
-
-2. **Do not use the same license on more than one project.** Each licensed copy of the Software shall be actively installed in no more than one production environment at a time.
-
-3. **Do not alter the licensing features.** Software features related to licensing shall not be altered or circumvented in any way, including (but not limited to) license validation, feature or edition restrictions, and update eligibility.
-
-4. **Not for reuse.** The Software and the proprietary code therein, not limited to but including designs, components, classes, and patterns, may not be reused in other projects without the express written consent of Statamic, LLC.
-
-5. **Follow the law.** All use of the Software shall not violate any applicable law or regulation, nor infringe the rights of any other person or entity.
-
-Failure to comply with the foregoing conditions will automatically and immediately result in termination of the permission granted hereby. This license does not include any right to receive updates to the Software or technical support. Licensees bear all risk related to the quality and
-performance of the Software and any modifications made or obtained to it, including liability for actual and consequential harm, such as loss or corruption of data, and any necessary service, repair, or correction.
-
-THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, INCLUDING SPECIAL, INCIDENTAL AND CONSEQUENTIAL DAMAGES, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/app/Modifiers/AddSlashes.php b/app/Modifiers/AddSlashes.php
deleted file mode 100644
index 47d33e2..0000000
--- a/app/Modifiers/AddSlashes.php
+++ /dev/null
@@ -1,21 +0,0 @@
-resolvedPath());
-
- return $track->getPlaytime();
- }
-}
diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php
deleted file mode 100644
index 6801cc0..0000000
--- a/app/Providers/AppServiceProvider.php
+++ /dev/null
@@ -1,28 +0,0 @@
- [
- SendEmailVerificationNotification::class,
- ],
- EntrySaved::class => [
- PubSubHubbub::class,
- ],
- ];
-
- /**
- * Register any events for your application.
- *
- * @return void
- */
- public function boot()
- {
- //
- }
-}
diff --git a/composer.json b/composer.json
index 36e7e35..216d865 100644
--- a/composer.json
+++ b/composer.json
@@ -1,10 +1,25 @@
{
"name": "statamic/starter-kit-podcaster",
"license": "proprietary",
+ "autoload": {
+ "psr-4": {
+ "Statamic\\Podcaster\\": "src/"
+ }
+ },
+ "require": {
+ "livewire/livewire": "^3.0",
+ "statamic/podcast-categories": "^1.0"
+ },
"extra": {
"statamic": {
"name": "Starter Kit Podcaster",
+ "slug": "podcaster",
"description": "Starter Kit Podcaster starter kit"
+ },
+ "laravel": {
+ "providers": [
+ "Statamic\\Podcaster\\ServiceProvider"
+ ]
}
},
"config": {
diff --git a/README.md b/export/README.md
similarity index 99%
rename from README.md
rename to export/README.md
index f0a2cbd..e635cc7 100644
--- a/README.md
+++ b/export/README.md
@@ -72,7 +72,6 @@ PODCASTER_PUBSUBHUBBUB_ENABLED=true
Just a few extra things built on the PHP/Laravel site to make the experience better.
-- AddSlashes Modifier
- PubSubHubbub Event Listener
- Getting Started Dashboard Widget
diff --git a/config/podcaster.php b/export/config/podcaster.php
similarity index 100%
rename from config/podcaster.php
rename to export/config/podcaster.php
diff --git a/config/statamic/cp.php b/export/config/statamic/cp.php
similarity index 100%
rename from config/statamic/cp.php
rename to export/config/statamic/cp.php
diff --git a/export/config/statamic/system.php b/export/config/statamic/system.php
new file mode 100644
index 0000000..5661c50
--- /dev/null
+++ b/export/config/statamic/system.php
@@ -0,0 +1,208 @@
+ env('STATAMIC_LICENSE_KEY'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Enable Multi-site
+ |--------------------------------------------------------------------------
+ |
+ | Whether Statamic's multi-site functionality should be enabled. It is
+ | assumed Statamic Pro is also enabled. To get started, you can run
+ | the `php please multisite` command to update your content file
+ | structure, after which you can manage your sites in the CP.
+ |
+ | https://statamic.dev/multi-site
+ |
+ */
+
+ 'multisite' => false,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Default Addons Paths
+ |--------------------------------------------------------------------------
+ |
+ | When generating addons via `php please make:addon`, this path will be
+ | used by default. You can still specify custom repository paths in
+ | your composer.json, but this is the path used by the generator.
+ |
+ */
+
+ 'addons_path' => base_path('addons'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Send the Powered-By Header
+ |--------------------------------------------------------------------------
+ |
+ | Websites like builtwith.com use the X-Powered-By header to determine
+ | what technologies are used on a particular site. By default, we'll
+ | send this header, but you are absolutely allowed to disable it.
+ |
+ */
+
+ 'send_powered_by_header' => true,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Date Format
+ |--------------------------------------------------------------------------
+ |
+ | Whenever a Carbon date is cast to a string on front-end routes, it will
+ | use this format. On CP routes, the format defined in cp.php is used.
+ | You can customize this format using PHP's date string constants.
+ | Setting this value to null will use Carbon's default format.
+ |
+ | https://www.php.net/manual/en/function.date.php
+ |
+ */
+
+ 'date_format' => 'F jS, Y',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Default Character Set
+ |--------------------------------------------------------------------------
+ |
+ | Statamic will use this character set when performing specific string
+ | encoding and decoding operations; This does not apply everywhere.
+ |
+ */
+
+ 'charset' => 'UTF-8',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Track Last Update
+ |--------------------------------------------------------------------------
+ |
+ | Statamic will automatically set an `updated_at` timestamp (along with
+ | `updated_by`, where applicable) when specific content is updated.
+ | In some situations, you may wish disable this functionality.
+ |
+ */
+
+ 'track_last_update' => true,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Enable Cache Tags
+ |--------------------------------------------------------------------------
+ |
+ | Sometimes you'll want to be able to disable the {{ cache }} tags in
+ | Antlers, so here is where you can do that. Otherwise, it will be
+ | enabled all the time.
+ |
+ */
+
+ 'cache_tags_enabled' => env('STATAMIC_CACHE_TAGS_ENABLED', true),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Intensive Operations
+ |--------------------------------------------------------------------------
+ |
+ | Sometimes Statamic requires extra resources to complete intensive
+ | operations. Here you may configure system resource limits for
+ | those rare times when we need to turn things up to eleven!
+ |
+ */
+
+ 'php_memory_limit' => '-1',
+ 'php_max_execution_time' => '0',
+ 'ajax_timeout' => '600000',
+ 'pcre_backtrack_limit' => '-1',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Debugbar Integration
+ |--------------------------------------------------------------------------
+ |
+ | Statamic integrates with Laravel Debugbar to bring more detail to your
+ | debugging experience. Here you may adjust various default options.
+ |
+ */
+
+ 'debugbar' => [
+ 'pretty_print_variables' => true,
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | ASCII
+ |--------------------------------------------------------------------------
+ |
+ | During various string manipulations (e.g. slugification), Statamic will
+ | need to make ASCII character conversions. Here you may define whether
+ | or not extra characters get converted. e.g. "%" becomes "percent".
+ |
+ */
+
+ 'ascii_replace_extra_symbols' => false,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Update References on Change
+ |--------------------------------------------------------------------------
+ |
+ | With this enabled, Statamic will attempt to update references to assets
+ | and terms when moving, renaming, replacing, deleting, etc. This will
+ | be queued, but it can disabled as needed for performance reasons.
+ |
+ */
+
+ 'update_references' => true,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Row ID handle
+ |--------------------------------------------------------------------------
+ |
+ | Rows in Grid, Replicator, and Bard fields will be given a unique ID using
+ | the "id" field. You may need your own field named "id", in which case
+ | you may customize the handle of the field that Statamic will use.
+ |
+ */
+
+ 'row_id_handle' => 'id',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Fake SQL Queries
+ |--------------------------------------------------------------------------
+ |
+ | Enable while using the flat-file Stache driver to show fake "SQL" query
+ | approximations in your database debugging tools — including Debugbar,
+ | Laravel Telescope, and Ray with the ray()->showQueries() helper.
+ |
+ */
+
+ 'fake_sql_queries' => config('app.debug'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Layout
+ |--------------------------------------------------------------------------
+ |
+ | Define the default layout that will be used by views.
+ |
+ */
+
+ 'layout' => env('STATAMIC_LAYOUT', 'podcaster::layout'),
+
+];
diff --git a/content/assets/.gitkeep b/export/content/assets/.gitkeep
similarity index 100%
rename from content/assets/.gitkeep
rename to export/content/assets/.gitkeep
diff --git a/content/assets/assets.yaml b/export/content/assets/assets.yaml
similarity index 100%
rename from content/assets/assets.yaml
rename to export/content/assets/assets.yaml
diff --git a/content/collections/.gitkeep b/export/content/collections/.gitkeep
similarity index 100%
rename from content/collections/.gitkeep
rename to export/content/collections/.gitkeep
diff --git a/content/collections/episodes.yaml b/export/content/collections/episodes.yaml
similarity index 83%
rename from content/collections/episodes.yaml
rename to export/content/collections/episodes.yaml
index 1d7c8ee..f0f57de 100644
--- a/content/collections/episodes.yaml
+++ b/export/content/collections/episodes.yaml
@@ -1,6 +1,5 @@
title: Episodes
-template: episodes/show
-layout: layout
+template: 'podcaster::episodes/show'
mount: 902d111c-b83e-43fe-98e0-80b83a33d750
revisions: false
route: '/{mount}/{slug}'
diff --git a/content/collections/episodes/2021-06-21-1422.honey-nut-cheerios.md b/export/content/collections/episodes/2021-06-21-1422.honey-nut-cheerios.md
similarity index 97%
rename from content/collections/episodes/2021-06-21-1422.honey-nut-cheerios.md
rename to export/content/collections/episodes/2021-06-21-1422.honey-nut-cheerios.md
index f0cd6b3..b4da97f 100644
--- a/content/collections/episodes/2021-06-21-1422.honey-nut-cheerios.md
+++ b/export/content/collections/episodes/2021-06-21-1422.honey-nut-cheerios.md
@@ -7,7 +7,7 @@ audio_file: audio/breakfast-cereal-101.m4a
episode_type: full
summary: 'This week I eat Honey Nut Cheerios and tell you all about it.'
description: '
Here are a few high level nutrition facts about Honey Nut Cheerios.
They're gluten free
140 calories per serving
3 grams of fiber per serving (<1g of them soluble)
12 grams of sugar per serving (all of them added)
3 grams of protein per serving
'
-explicit: false
+explicit: true
itunes_block: false
google_block: false
artwork: artwork/101-honey-nut-cheerios.jpg
diff --git a/content/collections/episodes/2021-06-22-1446.kix.md b/export/content/collections/episodes/2021-06-22-1446.kix.md
similarity index 100%
rename from content/collections/episodes/2021-06-22-1446.kix.md
rename to export/content/collections/episodes/2021-06-22-1446.kix.md
diff --git a/content/collections/episodes/2021-06-23-1527.honey-bunches-of-oats.md b/export/content/collections/episodes/2021-06-23-1527.honey-bunches-of-oats.md
similarity index 100%
rename from content/collections/episodes/2021-06-23-1527.honey-bunches-of-oats.md
rename to export/content/collections/episodes/2021-06-23-1527.honey-bunches-of-oats.md
diff --git a/content/collections/links.yaml b/export/content/collections/links.yaml
similarity index 80%
rename from content/collections/links.yaml
rename to export/content/collections/links.yaml
index 6a8c9d7..30d6f83 100644
--- a/content/collections/links.yaml
+++ b/export/content/collections/links.yaml
@@ -1,6 +1,4 @@
title: Links
-template: default
-layout: layout
mount: 4c620c7f-b39e-4046-ab29-e095cedd57f4
revisions: false
sort_dir: asc
diff --git a/content/collections/links/apple-podcasts.md b/export/content/collections/links/apple-podcasts.md
similarity index 100%
rename from content/collections/links/apple-podcasts.md
rename to export/content/collections/links/apple-podcasts.md
diff --git a/content/collections/links/rss-feed.md b/export/content/collections/links/rss-feed.md
similarity index 100%
rename from content/collections/links/rss-feed.md
rename to export/content/collections/links/rss-feed.md
diff --git a/content/collections/pages.yaml b/export/content/collections/pages.yaml
similarity index 100%
rename from content/collections/pages.yaml
rename to export/content/collections/pages.yaml
diff --git a/content/collections/pages/episodes.md b/export/content/collections/pages/episodes.md
similarity index 68%
rename from content/collections/pages/episodes.md
rename to export/content/collections/pages/episodes.md
index 9cc01ea..26176f1 100644
--- a/content/collections/pages/episodes.md
+++ b/export/content/collections/pages/episodes.md
@@ -2,5 +2,5 @@
id: 902d111c-b83e-43fe-98e0-80b83a33d750
blueprint: pages
title: Episodes
-template: episodes/index
+template: 'podcaster::episodes/index'
---
diff --git a/content/collections/pages/home.md b/export/content/collections/pages/home.md
similarity index 86%
rename from content/collections/pages/home.md
rename to export/content/collections/pages/home.md
index 0d33ec3..b90513f 100644
--- a/content/collections/pages/home.md
+++ b/export/content/collections/pages/home.md
@@ -2,7 +2,7 @@
id: home
blueprint: pages
title: Home
-template: home
+template: 'podcaster::home'
links:
- 81941744-4782-4304-96eb-f6b289c41351
- 541c8100-e539-493a-b3f3-4ce474024e4a
diff --git a/content/collections/pages/subscribe.md b/export/content/collections/pages/subscribe.md
similarity index 83%
rename from content/collections/pages/subscribe.md
rename to export/content/collections/pages/subscribe.md
index 1bb1d76..c1c9cd7 100644
--- a/content/collections/pages/subscribe.md
+++ b/export/content/collections/pages/subscribe.md
@@ -2,7 +2,7 @@
id: 4c620c7f-b39e-4046-ab29-e095cedd57f4
blueprint: pages
title: Subscribe
-template: subscribe
+template: 'podcaster::subscribe'
links:
- 81941744-4782-4304-96eb-f6b289c41351
- 541c8100-e539-493a-b3f3-4ce474024e4a
diff --git a/content/globals/.gitkeep b/export/content/globals/.gitkeep
similarity index 100%
rename from content/globals/.gitkeep
rename to export/content/globals/.gitkeep
diff --git a/content/globals/podcast.yaml b/export/content/globals/podcast.yaml
similarity index 100%
rename from content/globals/podcast.yaml
rename to export/content/globals/podcast.yaml
diff --git a/content/globals/theme.yaml b/export/content/globals/theme.yaml
similarity index 100%
rename from content/globals/theme.yaml
rename to export/content/globals/theme.yaml
diff --git a/content/navigation/.gitkeep b/export/content/navigation/.gitkeep
similarity index 100%
rename from content/navigation/.gitkeep
rename to export/content/navigation/.gitkeep
diff --git a/content/taxonomies/.gitkeep b/export/content/taxonomies/.gitkeep
similarity index 100%
rename from content/taxonomies/.gitkeep
rename to export/content/taxonomies/.gitkeep
diff --git a/content/trees/.gitkeep b/export/content/trees/.gitkeep
similarity index 100%
rename from content/trees/.gitkeep
rename to export/content/trees/.gitkeep
diff --git a/content/trees/collections/pages.yaml b/export/content/trees/collections/pages.yaml
similarity index 100%
rename from content/trees/collections/pages.yaml
rename to export/content/trees/collections/pages.yaml
diff --git a/package.json b/export/package.json
similarity index 100%
rename from package.json
rename to export/package.json
diff --git a/postcss.config.js b/export/postcss.config.js
similarity index 100%
rename from postcss.config.js
rename to export/postcss.config.js
diff --git a/public/assets/.gitkeep b/export/public/assets/.gitkeep
similarity index 100%
rename from public/assets/.gitkeep
rename to export/public/assets/.gitkeep
diff --git a/public/assets/artwork/.meta/101-honey-nut-cheerios.jpg.yaml b/export/public/assets/artwork/.meta/101-honey-nut-cheerios.jpg.yaml
similarity index 51%
rename from public/assets/artwork/.meta/101-honey-nut-cheerios.jpg.yaml
rename to export/public/assets/artwork/.meta/101-honey-nut-cheerios.jpg.yaml
index 9d0004b..8c2d5eb 100644
--- a/public/assets/artwork/.meta/101-honey-nut-cheerios.jpg.yaml
+++ b/export/public/assets/artwork/.meta/101-honey-nut-cheerios.jpg.yaml
@@ -1,6 +1,7 @@
data: { }
-size: 257556
-last_modified: 1624458739
+size: 340900
+last_modified: 1731349007
width: 1400
height: 1400
mime_type: image/jpeg
+duration: null
diff --git a/public/assets/artwork/.meta/102-kix.jpg.yaml b/export/public/assets/artwork/.meta/102-kix.jpg.yaml
similarity index 63%
rename from public/assets/artwork/.meta/102-kix.jpg.yaml
rename to export/public/assets/artwork/.meta/102-kix.jpg.yaml
index 071359c..537d6d4 100644
--- a/public/assets/artwork/.meta/102-kix.jpg.yaml
+++ b/export/public/assets/artwork/.meta/102-kix.jpg.yaml
@@ -1,6 +1,7 @@
data: { }
size: 125425
-last_modified: 1624462022
+last_modified: 1731349007
width: 1400
height: 1400
mime_type: image/jpeg
+duration: null
diff --git a/public/assets/artwork/.meta/103-honey-bunches-of-oats.jpg.yaml b/export/public/assets/artwork/.meta/103-honey-bunches-of-oats.jpg.yaml
similarity index 63%
rename from public/assets/artwork/.meta/103-honey-bunches-of-oats.jpg.yaml
rename to export/public/assets/artwork/.meta/103-honey-bunches-of-oats.jpg.yaml
index 5d464ec..e62c169 100644
--- a/public/assets/artwork/.meta/103-honey-bunches-of-oats.jpg.yaml
+++ b/export/public/assets/artwork/.meta/103-honey-bunches-of-oats.jpg.yaml
@@ -1,6 +1,7 @@
data: { }
size: 155736
-last_modified: 1624462124
+last_modified: 1731349007
width: 1400
height: 1400
mime_type: image/jpeg
+duration: null
diff --git a/public/assets/artwork/.meta/breakfast-cereal-cover.jpg.yaml b/export/public/assets/artwork/.meta/breakfast-cereal-cover.jpg.yaml
similarity index 63%
rename from public/assets/artwork/.meta/breakfast-cereal-cover.jpg.yaml
rename to export/public/assets/artwork/.meta/breakfast-cereal-cover.jpg.yaml
index 17965de..4670ea2 100644
--- a/public/assets/artwork/.meta/breakfast-cereal-cover.jpg.yaml
+++ b/export/public/assets/artwork/.meta/breakfast-cereal-cover.jpg.yaml
@@ -1,6 +1,7 @@
data: { }
size: 128019
-last_modified: 1624457904
+last_modified: 1731349007
width: 1400
height: 1400
mime_type: image/jpeg
+duration: null
diff --git a/public/assets/artwork/101-honey-nut-cheerios.jpg b/export/public/assets/artwork/101-honey-nut-cheerios.jpg
similarity index 100%
rename from public/assets/artwork/101-honey-nut-cheerios.jpg
rename to export/public/assets/artwork/101-honey-nut-cheerios.jpg
diff --git a/public/assets/artwork/102-kix.jpg b/export/public/assets/artwork/102-kix.jpg
similarity index 100%
rename from public/assets/artwork/102-kix.jpg
rename to export/public/assets/artwork/102-kix.jpg
diff --git a/public/assets/artwork/103-honey-bunches-of-oats.jpg b/export/public/assets/artwork/103-honey-bunches-of-oats.jpg
similarity index 100%
rename from public/assets/artwork/103-honey-bunches-of-oats.jpg
rename to export/public/assets/artwork/103-honey-bunches-of-oats.jpg
diff --git a/public/assets/artwork/breakfast-cereal-cover.jpg b/export/public/assets/artwork/breakfast-cereal-cover.jpg
similarity index 100%
rename from public/assets/artwork/breakfast-cereal-cover.jpg
rename to export/public/assets/artwork/breakfast-cereal-cover.jpg
diff --git a/public/assets/audio/.meta/breakfast-cereal-101.m4a.yaml b/export/public/assets/audio/.meta/breakfast-cereal-101.m4a.yaml
similarity index 79%
rename from public/assets/audio/.meta/breakfast-cereal-101.m4a.yaml
rename to export/public/assets/audio/.meta/breakfast-cereal-101.m4a.yaml
index 1716ebe..c82952c 100644
--- a/public/assets/audio/.meta/breakfast-cereal-101.m4a.yaml
+++ b/export/public/assets/audio/.meta/breakfast-cereal-101.m4a.yaml
@@ -1,6 +1,6 @@
data: { }
size: 2312297
-last_modified: 1641931575
+last_modified: 1731349007
width: null
height: null
mime_type: audio/x-m4a
diff --git a/public/assets/audio/.meta/breakfast-cereal-102.m4a.yaml b/export/public/assets/audio/.meta/breakfast-cereal-102.m4a.yaml
similarity index 79%
rename from public/assets/audio/.meta/breakfast-cereal-102.m4a.yaml
rename to export/public/assets/audio/.meta/breakfast-cereal-102.m4a.yaml
index 83963c6..9a25a6a 100644
--- a/public/assets/audio/.meta/breakfast-cereal-102.m4a.yaml
+++ b/export/public/assets/audio/.meta/breakfast-cereal-102.m4a.yaml
@@ -1,6 +1,6 @@
data: { }
size: 2370204
-last_modified: 1641931575
+last_modified: 1731349007
width: null
height: null
mime_type: audio/x-m4a
diff --git a/public/assets/audio/.meta/breakfast-cereal-103.m4a.yaml b/export/public/assets/audio/.meta/breakfast-cereal-103.m4a.yaml
similarity index 79%
rename from public/assets/audio/.meta/breakfast-cereal-103.m4a.yaml
rename to export/public/assets/audio/.meta/breakfast-cereal-103.m4a.yaml
index a4d29ac..107385a 100644
--- a/public/assets/audio/.meta/breakfast-cereal-103.m4a.yaml
+++ b/export/public/assets/audio/.meta/breakfast-cereal-103.m4a.yaml
@@ -1,6 +1,6 @@
data: { }
size: 2350038
-last_modified: 1641931575
+last_modified: 1731349007
width: null
height: null
mime_type: audio/x-m4a
diff --git a/public/assets/audio/breakfast-cereal-101.m4a b/export/public/assets/audio/breakfast-cereal-101.m4a
similarity index 100%
rename from public/assets/audio/breakfast-cereal-101.m4a
rename to export/public/assets/audio/breakfast-cereal-101.m4a
diff --git a/public/assets/audio/breakfast-cereal-102.m4a b/export/public/assets/audio/breakfast-cereal-102.m4a
similarity index 100%
rename from public/assets/audio/breakfast-cereal-102.m4a
rename to export/public/assets/audio/breakfast-cereal-102.m4a
diff --git a/public/assets/audio/breakfast-cereal-103.m4a b/export/public/assets/audio/breakfast-cereal-103.m4a
similarity index 100%
rename from public/assets/audio/breakfast-cereal-103.m4a
rename to export/public/assets/audio/breakfast-cereal-103.m4a
diff --git a/public/assets/theme/badges/.meta/apple.svg.yaml b/export/public/assets/theme/badges/.meta/apple.svg.yaml
similarity index 65%
rename from public/assets/theme/badges/.meta/apple.svg.yaml
rename to export/public/assets/theme/badges/.meta/apple.svg.yaml
index adb12a4..45970b8 100644
--- a/public/assets/theme/badges/.meta/apple.svg.yaml
+++ b/export/public/assets/theme/badges/.meta/apple.svg.yaml
@@ -1,6 +1,7 @@
data: { }
size: 15299
-last_modified: 1525296024
+last_modified: 1731349007
width: '164.8566'
height: '40'
mime_type: image/svg+xml
+duration: null
diff --git a/export/public/assets/theme/badges/.meta/google.svg.yaml b/export/public/assets/theme/badges/.meta/google.svg.yaml
new file mode 100644
index 0000000..e86d7d6
--- /dev/null
+++ b/export/public/assets/theme/badges/.meta/google.svg.yaml
@@ -0,0 +1,7 @@
+data: { }
+size: 24222
+last_modified: 1731349007
+width: '135'
+height: '34'
+mime_type: image/svg+xml
+duration: null
diff --git a/public/assets/theme/badges/.meta/rss.svg.yaml b/export/public/assets/theme/badges/.meta/rss.svg.yaml
similarity index 64%
rename from public/assets/theme/badges/.meta/rss.svg.yaml
rename to export/public/assets/theme/badges/.meta/rss.svg.yaml
index a66462d..2b08635 100644
--- a/public/assets/theme/badges/.meta/rss.svg.yaml
+++ b/export/public/assets/theme/badges/.meta/rss.svg.yaml
@@ -1,6 +1,7 @@
data: { }
size: 6060
-last_modified: 1624395987
+last_modified: 1731349007
width: '121'
height: '42'
mime_type: image/svg+xml
+duration: null
diff --git a/export/public/assets/theme/badges/.meta/spotify.svg.yaml b/export/public/assets/theme/badges/.meta/spotify.svg.yaml
new file mode 100644
index 0000000..ca7877e
--- /dev/null
+++ b/export/public/assets/theme/badges/.meta/spotify.svg.yaml
@@ -0,0 +1,7 @@
+data: { }
+size: 8404
+last_modified: 1731349007
+width: 132.24001
+height: 32.160034
+mime_type: image/svg+xml
+duration: null
diff --git a/public/assets/theme/badges/apple.svg b/export/public/assets/theme/badges/apple.svg
similarity index 100%
rename from public/assets/theme/badges/apple.svg
rename to export/public/assets/theme/badges/apple.svg
diff --git a/public/assets/theme/badges/google.svg b/export/public/assets/theme/badges/google.svg
similarity index 100%
rename from public/assets/theme/badges/google.svg
rename to export/public/assets/theme/badges/google.svg
diff --git a/public/assets/theme/badges/rss.svg b/export/public/assets/theme/badges/rss.svg
similarity index 100%
rename from public/assets/theme/badges/rss.svg
rename to export/public/assets/theme/badges/rss.svg
diff --git a/public/assets/theme/badges/spotify.svg b/export/public/assets/theme/badges/spotify.svg
similarity index 100%
rename from public/assets/theme/badges/spotify.svg
rename to export/public/assets/theme/badges/spotify.svg
diff --git a/export/public/assets/theme/social/.meta/behance.svg.yaml b/export/public/assets/theme/social/.meta/behance.svg.yaml
new file mode 100644
index 0000000..7d501a4
--- /dev/null
+++ b/export/public/assets/theme/social/.meta/behance.svg.yaml
@@ -0,0 +1,7 @@
+data: { }
+size: 1436
+last_modified: 1731349007
+width: 32.0
+height: 32.0
+mime_type: image/svg+xml
+duration: null
diff --git a/export/public/assets/theme/social/.meta/dribbble.svg.yaml b/export/public/assets/theme/social/.meta/dribbble.svg.yaml
new file mode 100644
index 0000000..7689059
--- /dev/null
+++ b/export/public/assets/theme/social/.meta/dribbble.svg.yaml
@@ -0,0 +1,7 @@
+data: { }
+size: 1056
+last_modified: 1731349007
+width: 32.0
+height: 32.0
+mime_type: image/svg+xml
+duration: null
diff --git a/export/public/assets/theme/social/.meta/email.svg.yaml b/export/public/assets/theme/social/.meta/email.svg.yaml
new file mode 100644
index 0000000..2e8b0ae
--- /dev/null
+++ b/export/public/assets/theme/social/.meta/email.svg.yaml
@@ -0,0 +1,7 @@
+data: { }
+size: 985
+last_modified: 1731349007
+width: 32.0
+height: 32.0
+mime_type: image/svg+xml
+duration: null
diff --git a/export/public/assets/theme/social/.meta/facebook.svg.yaml b/export/public/assets/theme/social/.meta/facebook.svg.yaml
new file mode 100644
index 0000000..433566e
--- /dev/null
+++ b/export/public/assets/theme/social/.meta/facebook.svg.yaml
@@ -0,0 +1,7 @@
+data: { }
+size: 814
+last_modified: 1731349007
+width: 32.0
+height: 32.0
+mime_type: image/svg+xml
+duration: null
diff --git a/export/public/assets/theme/social/.meta/github.svg.yaml b/export/public/assets/theme/social/.meta/github.svg.yaml
new file mode 100644
index 0000000..a3b3379
--- /dev/null
+++ b/export/public/assets/theme/social/.meta/github.svg.yaml
@@ -0,0 +1,7 @@
+data: { }
+size: 1017
+last_modified: 1731349007
+width: 32.0
+height: 32.0
+mime_type: image/svg+xml
+duration: null
diff --git a/export/public/assets/theme/social/.meta/instagram.svg.yaml b/export/public/assets/theme/social/.meta/instagram.svg.yaml
new file mode 100644
index 0000000..5b65e8a
--- /dev/null
+++ b/export/public/assets/theme/social/.meta/instagram.svg.yaml
@@ -0,0 +1,7 @@
+data: { }
+size: 495
+last_modified: 1731349007
+width: 32.0
+height: 32.0
+mime_type: image/svg+xml
+duration: null
diff --git a/export/public/assets/theme/social/.meta/podcast.svg.yaml b/export/public/assets/theme/social/.meta/podcast.svg.yaml
new file mode 100644
index 0000000..edd4dc6
--- /dev/null
+++ b/export/public/assets/theme/social/.meta/podcast.svg.yaml
@@ -0,0 +1,7 @@
+data: { }
+size: 1043
+last_modified: 1731349007
+width: 32.0
+height: 32.0
+mime_type: image/svg+xml
+duration: null
diff --git a/export/public/assets/theme/social/.meta/snapchat.svg.yaml b/export/public/assets/theme/social/.meta/snapchat.svg.yaml
new file mode 100644
index 0000000..ea94df6
--- /dev/null
+++ b/export/public/assets/theme/social/.meta/snapchat.svg.yaml
@@ -0,0 +1,7 @@
+data: { }
+size: 807
+last_modified: 1731349007
+width: 32.0
+height: 32.0
+mime_type: image/svg+xml
+duration: null
diff --git a/export/public/assets/theme/social/.meta/soundcloud.svg.yaml b/export/public/assets/theme/social/.meta/soundcloud.svg.yaml
new file mode 100644
index 0000000..a9c52a0
--- /dev/null
+++ b/export/public/assets/theme/social/.meta/soundcloud.svg.yaml
@@ -0,0 +1,7 @@
+data: { }
+size: 1216
+last_modified: 1731349007
+width: 32.0
+height: 32.0
+mime_type: image/svg+xml
+duration: null
diff --git a/export/public/assets/theme/social/.meta/spotify.svg.yaml b/export/public/assets/theme/social/.meta/spotify.svg.yaml
new file mode 100644
index 0000000..af9e21d
--- /dev/null
+++ b/export/public/assets/theme/social/.meta/spotify.svg.yaml
@@ -0,0 +1,7 @@
+data: { }
+size: 838
+last_modified: 1731349007
+width: 32.0
+height: 32.0
+mime_type: image/svg+xml
+duration: null
diff --git a/export/public/assets/theme/social/.meta/tiktok.svg.yaml b/export/public/assets/theme/social/.meta/tiktok.svg.yaml
new file mode 100644
index 0000000..5b65e8a
--- /dev/null
+++ b/export/public/assets/theme/social/.meta/tiktok.svg.yaml
@@ -0,0 +1,7 @@
+data: { }
+size: 495
+last_modified: 1731349007
+width: 32.0
+height: 32.0
+mime_type: image/svg+xml
+duration: null
diff --git a/export/public/assets/theme/social/.meta/twitter.svg.yaml b/export/public/assets/theme/social/.meta/twitter.svg.yaml
new file mode 100644
index 0000000..3f61079
--- /dev/null
+++ b/export/public/assets/theme/social/.meta/twitter.svg.yaml
@@ -0,0 +1,7 @@
+data: { }
+size: 828
+last_modified: 1731349007
+width: 32.0
+height: 32.0
+mime_type: image/svg+xml
+duration: null
diff --git a/export/public/assets/theme/social/.meta/youtube.svg.yaml b/export/public/assets/theme/social/.meta/youtube.svg.yaml
new file mode 100644
index 0000000..f0dc100
--- /dev/null
+++ b/export/public/assets/theme/social/.meta/youtube.svg.yaml
@@ -0,0 +1,7 @@
+data: { }
+size: 2012
+last_modified: 1731349007
+width: 32.0
+height: 32.0
+mime_type: image/svg+xml
+duration: null
diff --git a/public/assets/theme/social/behance.svg b/export/public/assets/theme/social/behance.svg
similarity index 100%
rename from public/assets/theme/social/behance.svg
rename to export/public/assets/theme/social/behance.svg
diff --git a/public/assets/theme/social/dribbble.svg b/export/public/assets/theme/social/dribbble.svg
similarity index 100%
rename from public/assets/theme/social/dribbble.svg
rename to export/public/assets/theme/social/dribbble.svg
diff --git a/public/assets/theme/social/email.svg b/export/public/assets/theme/social/email.svg
similarity index 100%
rename from public/assets/theme/social/email.svg
rename to export/public/assets/theme/social/email.svg
diff --git a/public/assets/theme/social/facebook.svg b/export/public/assets/theme/social/facebook.svg
similarity index 100%
rename from public/assets/theme/social/facebook.svg
rename to export/public/assets/theme/social/facebook.svg
diff --git a/public/assets/theme/social/github.svg b/export/public/assets/theme/social/github.svg
similarity index 100%
rename from public/assets/theme/social/github.svg
rename to export/public/assets/theme/social/github.svg
diff --git a/public/assets/theme/social/instagram.svg b/export/public/assets/theme/social/instagram.svg
similarity index 100%
rename from public/assets/theme/social/instagram.svg
rename to export/public/assets/theme/social/instagram.svg
diff --git a/public/assets/theme/social/podcast.svg b/export/public/assets/theme/social/podcast.svg
similarity index 100%
rename from public/assets/theme/social/podcast.svg
rename to export/public/assets/theme/social/podcast.svg
diff --git a/public/assets/theme/social/snapchat.svg b/export/public/assets/theme/social/snapchat.svg
similarity index 100%
rename from public/assets/theme/social/snapchat.svg
rename to export/public/assets/theme/social/snapchat.svg
diff --git a/public/assets/theme/social/soundcloud.svg b/export/public/assets/theme/social/soundcloud.svg
similarity index 100%
rename from public/assets/theme/social/soundcloud.svg
rename to export/public/assets/theme/social/soundcloud.svg
diff --git a/public/assets/theme/social/spotify.svg b/export/public/assets/theme/social/spotify.svg
similarity index 100%
rename from public/assets/theme/social/spotify.svg
rename to export/public/assets/theme/social/spotify.svg
diff --git a/public/assets/theme/social/tiktok.svg b/export/public/assets/theme/social/tiktok.svg
similarity index 100%
rename from public/assets/theme/social/tiktok.svg
rename to export/public/assets/theme/social/tiktok.svg
diff --git a/public/assets/theme/social/twitter.svg b/export/public/assets/theme/social/twitter.svg
similarity index 100%
rename from public/assets/theme/social/twitter.svg
rename to export/public/assets/theme/social/twitter.svg
diff --git a/public/assets/theme/social/youtube.svg b/export/public/assets/theme/social/youtube.svg
similarity index 100%
rename from public/assets/theme/social/youtube.svg
rename to export/public/assets/theme/social/youtube.svg
diff --git a/export/public/build/assets/site-DV-45XBv.css b/export/public/build/assets/site-DV-45XBv.css
new file mode 100644
index 0000000..a9f430e
--- /dev/null
+++ b/export/public/build/assets/site-DV-45XBv.css
@@ -0,0 +1 @@
+@import"https://rsms.me/inter/inter.css";@import"https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;700&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter var,Inter,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:IBM Plex Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}@keyframes plyr-progress{to{background-position:25px 0;background-position:var(--plyr-progress-loading-size, 25px) 0}}@keyframes plyr-popup{0%{opacity:.5;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes plyr-fade-in{0%{opacity:0}to{opacity:1}}.plyr{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;align-items:center;direction:ltr;display:flex;flex-direction:column;font-family:inherit;font-family:var(--plyr-font-family, inherit);font-variant-numeric:tabular-nums;font-weight:400;font-weight:var(--plyr-font-weight-regular, 400);line-height:1.7;line-height:var(--plyr-line-height, 1.7);max-width:100%;min-width:200px;position:relative;text-shadow:none;transition:box-shadow .3s ease;z-index:0}.plyr audio,.plyr iframe,.plyr video{display:block;height:100%;width:100%}.plyr button{font:inherit;line-height:inherit;width:auto}.plyr:focus{outline:0}.plyr--full-ui{box-sizing:border-box}.plyr--full-ui *,.plyr--full-ui :after,.plyr--full-ui :before{box-sizing:inherit}.plyr--full-ui a,.plyr--full-ui button,.plyr--full-ui input,.plyr--full-ui label{touch-action:manipulation}.plyr__badge{background:#4a5464;background:var(--plyr-badge-background, #4a5464);border-radius:2px;border-radius:var(--plyr-badge-border-radius, 2px);color:#fff;color:var(--plyr-badge-text-color, #fff);font-size:9px;font-size:var(--plyr-font-size-badge, 9px);line-height:1;padding:3px 4px}.plyr--full-ui ::-webkit-media-text-track-container{display:none}.plyr__captions{animation:plyr-fade-in .3s ease;bottom:0;display:none;font-size:13px;font-size:var(--plyr-font-size-small, 13px);left:0;padding:10px;padding:var(--plyr-control-spacing, 10px);position:absolute;text-align:center;transition:transform .4s ease-in-out;width:100%}.plyr__captions span:empty{display:none}@media (min-width:480px){.plyr__captions{font-size:15px;font-size:var(--plyr-font-size-base, 15px);padding:20px;padding:calc(var(--plyr-control-spacing, 10px)*2)}}@media (min-width:768px){.plyr__captions{font-size:18px;font-size:var(--plyr-font-size-large, 18px)}}.plyr--captions-active .plyr__captions{display:block}.plyr:not(.plyr--hide-controls) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(-40px);transform:translateY(calc(var(--plyr-control-spacing, 10px)*-4))}.plyr__caption{background:#000c;background:var(--plyr-captions-background, rgba(0, 0, 0, .8));border-radius:2px;-webkit-box-decoration-break:clone;box-decoration-break:clone;color:#fff;color:var(--plyr-captions-text-color, #fff);line-height:185%;padding:.2em .5em;white-space:pre-wrap}.plyr__caption div{display:inline}.plyr__control{background:0 0;border:0;border-radius:3px;border-radius:var(--plyr-control-radius, 3px);color:inherit;cursor:pointer;flex-shrink:0;overflow:visible;padding:7px;padding:calc(var(--plyr-control-spacing, 10px)*.7);position:relative;transition:all .3s ease}.plyr__control svg{fill:currentColor;display:block;height:18px;height:var(--plyr-control-icon-size, 18px);pointer-events:none;width:18px;width:var(--plyr-control-icon-size, 18px)}.plyr__control:focus{outline:0}.plyr__control.plyr__tab-focus{outline-color:#00b3ff;outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}a.plyr__control{text-decoration:none}.plyr__control.plyr__control--pressed .icon--not-pressed,.plyr__control.plyr__control--pressed .label--not-pressed,.plyr__control:not(.plyr__control--pressed) .icon--pressed,.plyr__control:not(.plyr__control--pressed) .label--pressed,a.plyr__control:after,a.plyr__control:before{display:none}.plyr--full-ui ::-webkit-media-controls{display:none}.plyr__controls{align-items:center;display:flex;justify-content:flex-end;text-align:center}.plyr__controls .plyr__progress__container{flex:1;min-width:0}.plyr__controls .plyr__controls__item{margin-left:2.5px;margin-left:calc(var(--plyr-control-spacing, 10px)/4)}.plyr__controls .plyr__controls__item:first-child{margin-left:0;margin-right:auto}.plyr__controls .plyr__controls__item.plyr__progress__container{padding-left:2.5px;padding-left:calc(var(--plyr-control-spacing, 10px)/4)}.plyr__controls .plyr__controls__item.plyr__time{padding:0 5px;padding:0 calc(var(--plyr-control-spacing, 10px)/2)}.plyr__controls .plyr__controls__item.plyr__progress__container:first-child,.plyr__controls .plyr__controls__item.plyr__time+.plyr__time,.plyr__controls .plyr__controls__item.plyr__time:first-child{padding-left:0}.plyr [data-plyr=airplay],.plyr [data-plyr=captions],.plyr [data-plyr=fullscreen],.plyr [data-plyr=pip],.plyr__controls:empty{display:none}.plyr--airplay-supported [data-plyr=airplay],.plyr--captions-enabled [data-plyr=captions],.plyr--fullscreen-enabled [data-plyr=fullscreen],.plyr--pip-supported [data-plyr=pip]{display:inline-block}.plyr__menu{display:flex;position:relative}.plyr__menu .plyr__control svg{transition:transform .3s ease}.plyr__menu .plyr__control[aria-expanded=true] svg{transform:rotate(90deg)}.plyr__menu .plyr__control[aria-expanded=true] .plyr__tooltip{display:none}.plyr__menu__container{animation:plyr-popup .2s ease;background:#ffffffe6;background:var(--plyr-menu-background, hsla(0, 0%, 100%, .9));border-radius:4px;bottom:100%;box-shadow:0 1px 2px #00000026;box-shadow:var(--plyr-menu-shadow, 0 1px 2px rgba(0, 0, 0, .15));color:#4a5464;color:var(--plyr-menu-color, #4a5464);font-size:15px;font-size:var(--plyr-font-size-base, 15px);margin-bottom:10px;position:absolute;right:-3px;text-align:left;white-space:nowrap;z-index:3}.plyr__menu__container>div{overflow:hidden;transition:height .35s cubic-bezier(.4,0,.2,1),width .35s cubic-bezier(.4,0,.2,1)}.plyr__menu__container:after{border:4px solid transparent;border-top:var(--plyr-menu-arrow-size, 4px) solid hsla(0,0%,100%,.9);border-width:var(--plyr-menu-arrow-size, 4px);content:"";height:0;position:absolute;right:14px;right:calc(var(--plyr-control-icon-size, 18px)/2 + var(--plyr-control-spacing, 10px)*.7 - var(--plyr-menu-arrow-size, 4px)/2);top:100%;width:0}.plyr__menu__container [role=menu]{padding:7px;padding:calc(var(--plyr-control-spacing, 10px)*.7)}.plyr__menu__container [role=menuitem],.plyr__menu__container [role=menuitemradio]{margin-top:2px}.plyr__menu__container [role=menuitem]:first-child,.plyr__menu__container [role=menuitemradio]:first-child{margin-top:0}.plyr__menu__container .plyr__control{align-items:center;color:#4a5464;color:var(--plyr-menu-color, #4a5464);display:flex;font-size:13px;font-size:var(--plyr-font-size-menu, var(--plyr-font-size-small, 13px));padding:4.66667px 10.5px;padding:calc(var(--plyr-control-spacing, 10px)*.7/1.5) calc(var(--plyr-control-spacing, 10px)*.7*1.5);-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.plyr__menu__container .plyr__control>span{align-items:inherit;display:flex;width:100%}.plyr__menu__container .plyr__control:after{border:4px solid transparent;border:var(--plyr-menu-item-arrow-size, 4px) solid transparent;content:"";position:absolute;top:50%;transform:translateY(-50%)}.plyr__menu__container .plyr__control--forward{padding-right:28px;padding-right:calc(var(--plyr-control-spacing, 10px)*.7*4)}.plyr__menu__container .plyr__control--forward:after{border-left-color:#728197;border-left-color:var(--plyr-menu-arrow-color, #728197);right:6.5px;right:calc(var(--plyr-control-spacing, 10px)*.7*1.5 - var(--plyr-menu-item-arrow-size, 4px))}.plyr__menu__container .plyr__control--forward.plyr__tab-focus:after,.plyr__menu__container .plyr__control--forward:hover:after{border-left-color:initial}.plyr__menu__container .plyr__control--back{font-weight:400;font-weight:var(--plyr-font-weight-regular, 400);margin:7px;margin:calc(var(--plyr-control-spacing, 10px)*.7);margin-bottom:3.5px;margin-bottom:calc(var(--plyr-control-spacing, 10px)*.7/2);padding-left:28px;padding-left:calc(var(--plyr-control-spacing, 10px)*.7*4);position:relative;width:calc(100% - 14px);width:calc(100% - var(--plyr-control-spacing, 10px)*.7*2)}.plyr__menu__container .plyr__control--back:after{border-right-color:#728197;border-right-color:var(--plyr-menu-arrow-color, #728197);left:6.5px;left:calc(var(--plyr-control-spacing, 10px)*.7*1.5 - var(--plyr-menu-item-arrow-size, 4px))}.plyr__menu__container .plyr__control--back:before{background:#dcdfe5;background:var(--plyr-menu-back-border-color, #dcdfe5);box-shadow:0 1px #fff;box-shadow:0 1px 0 var(--plyr-menu-back-border-shadow-color, #fff);content:"";height:1px;left:0;margin-top:3.5px;margin-top:calc(var(--plyr-control-spacing, 10px)*.7/2);overflow:hidden;position:absolute;right:0;top:100%}.plyr__menu__container .plyr__control--back.plyr__tab-focus:after,.plyr__menu__container .plyr__control--back:hover:after{border-right-color:initial}.plyr__menu__container .plyr__control[role=menuitemradio]{padding-left:7px;padding-left:calc(var(--plyr-control-spacing, 10px)*.7)}.plyr__menu__container .plyr__control[role=menuitemradio]:after,.plyr__menu__container .plyr__control[role=menuitemradio]:before{border-radius:100%}.plyr__menu__container .plyr__control[role=menuitemradio]:before{background:#0000001a;content:"";display:block;flex-shrink:0;height:16px;margin-right:10px;margin-right:var(--plyr-control-spacing, 10px);transition:all .3s ease;width:16px}.plyr__menu__container .plyr__control[role=menuitemradio]:after{background:#fff;border:0;height:6px;left:12px;opacity:0;top:50%;transform:translateY(-50%) scale(0);transition:transform .3s ease,opacity .3s ease;width:6px}.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]:before{background:#00b3ff;background:var(--plyr-control-toggle-checked-background, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)))}.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]:after{opacity:1;transform:translateY(-50%) scale(1)}.plyr__menu__container .plyr__control[role=menuitemradio].plyr__tab-focus:before,.plyr__menu__container .plyr__control[role=menuitemradio]:hover:before{background:#23282f1a}.plyr__menu__container .plyr__menu__value{align-items:center;display:flex;margin-left:auto;margin-right:calc(-7px + 2);margin-right:calc(var(--plyr-control-spacing, 10px)*.7*-1 - -2);overflow:hidden;padding-left:24.5px;padding-left:calc(var(--plyr-control-spacing, 10px)*.7*3.5);pointer-events:none}.plyr--full-ui input[type=range]{-webkit-appearance:none;background:0 0;border:0;border-radius:26px;border-radius:calc(var(--plyr-range-thumb-height, 13px)*2);color:#00b3ff;color:var(--plyr-range-fill-background, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));display:block;height:19px;height:calc(var(--plyr-range-thumb-active-shadow-width, 3px)*2 + var(--plyr-range-thumb-height, 13px));margin:0;min-width:0;padding:0;transition:box-shadow .3s ease;width:100%}.plyr--full-ui input[type=range]::-webkit-slider-runnable-track{background:0 0;background-image:linear-gradient(90deg,currentColor 0,transparent 0);background-image:linear-gradient(to right,currentColor var(--value, 0),transparent var(--value, 0));border:0;border-radius:2.5px;border-radius:calc(var(--plyr-range-track-height, 5px)/2);height:5px;height:var(--plyr-range-track-height, 5px);-webkit-transition:box-shadow .3s ease;transition:box-shadow .3s ease;-webkit-user-select:none;user-select:none}.plyr--full-ui input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background:#fff;background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:0 1px 1px #23282f26,0 0 0 1px #23282f33;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, .15), 0 0 0 1px rgba(35, 40, 47, .2));height:13px;height:var(--plyr-range-thumb-height, 13px);margin-top:-4px;margin-top:calc(var(--plyr-range-thumb-height, 13px)/2*-1 - var(--plyr-range-track-height, 5px)/2*-1);position:relative;-webkit-transition:all .2s ease;transition:all .2s ease;width:13px;width:var(--plyr-range-thumb-height, 13px)}.plyr--full-ui input[type=range]::-moz-range-track{background:0 0;border:0;border-radius:2.5px;border-radius:calc(var(--plyr-range-track-height, 5px)/2);height:5px;height:var(--plyr-range-track-height, 5px);-moz-transition:box-shadow .3s ease;transition:box-shadow .3s ease;-moz-user-select:none;-webkit-user-select:none;user-select:none}.plyr--full-ui input[type=range]::-moz-range-thumb{background:#fff;background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:0 1px 1px #23282f26,0 0 0 1px #23282f33;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, .15), 0 0 0 1px rgba(35, 40, 47, .2));height:13px;height:var(--plyr-range-thumb-height, 13px);position:relative;-moz-transition:all .2s ease;transition:all .2s ease;width:13px;width:var(--plyr-range-thumb-height, 13px)}.plyr--full-ui input[type=range]::-moz-range-progress{background:currentColor;border-radius:2.5px;border-radius:calc(var(--plyr-range-track-height, 5px)/2);height:5px;height:var(--plyr-range-track-height, 5px)}.plyr--full-ui input[type=range]::-ms-track{color:transparent}.plyr--full-ui input[type=range]::-ms-fill-upper,.plyr--full-ui input[type=range]::-ms-track{background:0 0;border:0;border-radius:2.5px;border-radius:calc(var(--plyr-range-track-height, 5px)/2);height:5px;height:var(--plyr-range-track-height, 5px);-ms-transition:box-shadow .3s ease;transition:box-shadow .3s ease;-webkit-user-select:none;user-select:none}.plyr--full-ui input[type=range]::-ms-fill-lower{background:0 0;background:currentColor;border:0;border-radius:2.5px;border-radius:calc(var(--plyr-range-track-height, 5px)/2);height:5px;height:var(--plyr-range-track-height, 5px);-ms-transition:box-shadow .3s ease;transition:box-shadow .3s ease;-webkit-user-select:none;user-select:none}.plyr--full-ui input[type=range]::-ms-thumb{background:#fff;background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:0 1px 1px #23282f26,0 0 0 1px #23282f33;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, .15), 0 0 0 1px rgba(35, 40, 47, .2));height:13px;height:var(--plyr-range-thumb-height, 13px);margin-top:0;position:relative;-ms-transition:all .2s ease;transition:all .2s ease;width:13px;width:var(--plyr-range-thumb-height, 13px)}.plyr--full-ui input[type=range]::-ms-tooltip{display:none}.plyr--full-ui input[type=range]:focus{outline:0}.plyr--full-ui input[type=range]::-moz-focus-outer{border:0}.plyr--full-ui input[type=range].plyr__tab-focus::-webkit-slider-runnable-track{outline-color:#00b3ff;outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr--full-ui input[type=range].plyr__tab-focus::-moz-range-track{outline-color:#00b3ff;outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr--full-ui input[type=range].plyr__tab-focus::-ms-track{outline-color:#00b3ff;outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr__poster{background-color:#000;background-color:var(--plyr-video-background, var(--plyr-video-background, #000));background-position:50% 50%;background-repeat:no-repeat;background-size:contain;height:100%;left:0;opacity:0;position:absolute;top:0;transition:opacity .2s ease;width:100%;z-index:1}.plyr--stopped.plyr__poster-enabled .plyr__poster{opacity:1}.plyr--youtube.plyr--paused.plyr__poster-enabled:not(.plyr--stopped) .plyr__poster{display:none}.plyr__time{font-size:13px;font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px))}.plyr__time+.plyr__time:before{content:"⁄";margin-right:10px;margin-right:var(--plyr-control-spacing, 10px)}@media (max-width:767px){.plyr__time+.plyr__time{display:none}}.plyr__tooltip{background:#ffffffe6;background:var(--plyr-tooltip-background, hsla(0, 0%, 100%, .9));border-radius:3px;border-radius:var(--plyr-tooltip-radius, 3px);bottom:100%;box-shadow:0 1px 2px #00000026;box-shadow:var(--plyr-tooltip-shadow, 0 1px 2px rgba(0, 0, 0, .15));color:#4a5464;color:var(--plyr-tooltip-color, #4a5464);font-size:13px;font-size:var(--plyr-font-size-small, 13px);font-weight:400;font-weight:var(--plyr-font-weight-regular, 400);left:50%;line-height:1.3;margin-bottom:10px;margin-bottom:calc(var(--plyr-control-spacing, 10px)/2*2);opacity:0;padding:5px 7.5px;padding:calc(var(--plyr-control-spacing, 10px)/2) calc(var(--plyr-control-spacing, 10px)/2*1.5);pointer-events:none;position:absolute;transform:translate(-50%,10px) scale(.8);transform-origin:50% 100%;transition:transform .2s ease .1s,opacity .2s ease .1s;white-space:nowrap;z-index:2}.plyr__tooltip:before{border-left:4px solid transparent;border-left:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-right:4px solid transparent;border-right:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-top:4px solid hsla(0,0%,100%,.9);border-top:var(--plyr-tooltip-arrow-size, 4px) solid var(--plyr-tooltip-background, hsla(0, 0%, 100%, .9));bottom:-4px;bottom:calc(var(--plyr-tooltip-arrow-size, 4px)*-1);content:"";height:0;left:50%;position:absolute;transform:translate(-50%);width:0;z-index:2}.plyr .plyr__control.plyr__tab-focus .plyr__tooltip,.plyr .plyr__control:hover .plyr__tooltip,.plyr__tooltip--visible{opacity:1;transform:translate(-50%) scale(1)}.plyr .plyr__control:hover .plyr__tooltip{z-index:3}.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip,.plyr__controls>.plyr__control:first-child .plyr__tooltip{left:0;transform:translateY(10px) scale(.8);transform-origin:0 100%}.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip:before,.plyr__controls>.plyr__control:first-child .plyr__tooltip:before{left:16px;left:calc(var(--plyr-control-icon-size, 18px)/2 + var(--plyr-control-spacing, 10px)*.7)}.plyr__controls>.plyr__control:last-child .plyr__tooltip{left:auto;right:0;transform:translateY(10px) scale(.8);transform-origin:100% 100%}.plyr__controls>.plyr__control:last-child .plyr__tooltip:before{left:auto;right:16px;right:calc(var(--plyr-control-icon-size, 18px)/2 + var(--plyr-control-spacing, 10px)*.7);transform:translate(50%)}.plyr__controls>.plyr__control:first-child+.plyr__control.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip--visible,.plyr__controls>.plyr__control:first-child+.plyr__control:hover .plyr__tooltip,.plyr__controls>.plyr__control:first-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child .plyr__tooltip--visible,.plyr__controls>.plyr__control:first-child:hover .plyr__tooltip,.plyr__controls>.plyr__control:last-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:last-child .plyr__tooltip--visible,.plyr__controls>.plyr__control:last-child:hover .plyr__tooltip{transform:translate(0) scale(1)}.plyr__progress{left:6.5px;left:calc(var(--plyr-range-thumb-height, 13px)*.5);margin-right:13px;margin-right:var(--plyr-range-thumb-height, 13px);position:relative}.plyr__progress__buffer,.plyr__progress input[type=range]{margin-left:-6.5px;margin-left:calc(var(--plyr-range-thumb-height, 13px)*-.5);margin-right:-6.5px;margin-right:calc(var(--plyr-range-thumb-height, 13px)*-.5);width:calc(100% + 13px);width:calc(100% + var(--plyr-range-thumb-height, 13px))}.plyr__progress input[type=range]{position:relative;z-index:2}.plyr__progress .plyr__tooltip{font-size:13px;font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px));left:0}.plyr__progress__buffer{-webkit-appearance:none;background:0 0;border:0;border-radius:100px;height:5px;height:var(--plyr-range-track-height, 5px);left:0;margin-top:-2.5px;margin-top:calc(var(--plyr-range-track-height, 5px)/2*-1);padding:0;position:absolute;top:50%}.plyr__progress__buffer::-webkit-progress-bar{background:0 0}.plyr__progress__buffer::-webkit-progress-value{background:currentColor;border-radius:100px;min-width:5px;min-width:var(--plyr-range-track-height, 5px);-webkit-transition:width .2s ease;transition:width .2s ease}.plyr__progress__buffer::-moz-progress-bar{background:currentColor;border-radius:100px;min-width:5px;min-width:var(--plyr-range-track-height, 5px);-moz-transition:width .2s ease;transition:width .2s ease}.plyr__progress__buffer::-ms-fill{border-radius:100px;-ms-transition:width .2s ease;transition:width .2s ease}.plyr--loading .plyr__progress__buffer{animation:plyr-progress 1s linear infinite;background-image:linear-gradient(-45deg,rgba(35,40,47,.6) 25%,transparent 0,transparent 50%,rgba(35,40,47,.6) 0,rgba(35,40,47,.6) 75%,transparent 0,transparent);background-image:linear-gradient(-45deg,var(--plyr-progress-loading-background, rgba(35, 40, 47, .6)) 25%,transparent 25%,transparent 50%,var(--plyr-progress-loading-background, rgba(35, 40, 47, .6)) 50%,var(--plyr-progress-loading-background, rgba(35, 40, 47, .6)) 75%,transparent 75%,transparent);background-repeat:repeat-x;background-size:25px 25px;background-size:var(--plyr-progress-loading-size, 25px) var(--plyr-progress-loading-size, 25px);color:transparent}.plyr--video.plyr--loading .plyr__progress__buffer{background-color:#ffffff40;background-color:var(--plyr-video-progress-buffered-background, hsla(0, 0%, 100%, .25))}.plyr--audio.plyr--loading .plyr__progress__buffer{background-color:#c1c8d199;background-color:var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, .6))}.plyr__volume{align-items:center;display:flex;max-width:110px;min-width:80px;position:relative;width:20%}.plyr__volume input[type=range]{margin-left:5px;margin-left:calc(var(--plyr-control-spacing, 10px)/2);margin-right:5px;margin-right:calc(var(--plyr-control-spacing, 10px)/2);position:relative;z-index:2}.plyr--is-ios .plyr__volume{min-width:0;width:auto}.plyr--audio{display:block}.plyr--audio .plyr__controls{background:#fff;background:var(--plyr-audio-controls-background, #fff);border-radius:inherit;color:#4a5464;color:var(--plyr-audio-control-color, #4a5464);padding:10px;padding:var(--plyr-control-spacing, 10px)}.plyr--audio .plyr__control.plyr__tab-focus,.plyr--audio .plyr__control:hover,.plyr--audio .plyr__control[aria-expanded=true]{background:#00b3ff;background:var(--plyr-audio-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:#fff;color:var(--plyr-audio-control-color-hover, #fff)}.plyr--full-ui.plyr--audio input[type=range]::-webkit-slider-runnable-track{background-color:#c1c8d199;background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, .6)))}.plyr--full-ui.plyr--audio input[type=range]::-moz-range-track{background-color:#c1c8d199;background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, .6)))}.plyr--full-ui.plyr--audio input[type=range]::-ms-track{background-color:#c1c8d199;background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, .6)))}.plyr--full-ui.plyr--audio input[type=range]:active::-webkit-slider-thumb{box-shadow:0 1px 1px #23282f26,0 0 0 1px #23282f33,0 0 0 3px #23282f1a;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, .15), 0 0 0 1px rgba(35, 40, 47, .2)),0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, .1))}.plyr--full-ui.plyr--audio input[type=range]:active::-moz-range-thumb{box-shadow:0 1px 1px #23282f26,0 0 0 1px #23282f33,0 0 0 3px #23282f1a;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, .15), 0 0 0 1px rgba(35, 40, 47, .2)),0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, .1))}.plyr--full-ui.plyr--audio input[type=range]:active::-ms-thumb{box-shadow:0 1px 1px #23282f26,0 0 0 1px #23282f33,0 0 0 3px #23282f1a;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, .15), 0 0 0 1px rgba(35, 40, 47, .2)),0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, .1))}.plyr--audio .plyr__progress__buffer{color:#c1c8d199;color:var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, .6))}.plyr--video{background:#000;background:var(--plyr-video-background, var(--plyr-video-background, #000));overflow:hidden}.plyr--video.plyr--menu-open{overflow:visible}.plyr__video-wrapper{background:#000;background:var(--plyr-video-background, var(--plyr-video-background, #000));margin:auto;overflow:hidden;position:relative;width:100%}.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{aspect-ratio:16/9}@supports not (aspect-ratio:16/9){.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{height:0;padding-bottom:56.25%;position:relative}}.plyr__video-embed iframe,.plyr__video-wrapper--fixed-ratio video{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.plyr--full-ui .plyr__video-embed>.plyr__video-embed__container{padding-bottom:240%;position:relative;transform:translateY(-38.28125%)}.plyr--video .plyr__controls{background:linear-gradient(transparent,#000000bf);background:var(--plyr-video-controls-background, linear-gradient(transparent, rgba(0, 0, 0, .75)));border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;bottom:0;color:#fff;color:var(--plyr-video-control-color, #fff);left:0;padding:5px;padding:calc(var(--plyr-control-spacing, 10px)/2);padding-top:20px;padding-top:calc(var(--plyr-control-spacing, 10px)*2);position:absolute;right:0;transition:opacity .4s ease-in-out,transform .4s ease-in-out;z-index:3}@media (min-width:480px){.plyr--video .plyr__controls{padding:10px;padding:var(--plyr-control-spacing, 10px);padding-top:35px;padding-top:calc(var(--plyr-control-spacing, 10px)*3.5)}}.plyr--video.plyr--hide-controls .plyr__controls{opacity:0;pointer-events:none;transform:translateY(100%)}.plyr--video .plyr__control.plyr__tab-focus,.plyr--video .plyr__control:hover,.plyr--video .plyr__control[aria-expanded=true]{background:#00b3ff;background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:#fff;color:var(--plyr-video-control-color-hover, #fff)}.plyr__control--overlaid{background:#00b3ff;background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));border:0;border-radius:100%;color:#fff;color:var(--plyr-video-control-color, #fff);display:none;left:50%;opacity:.9;padding:15px;padding:calc(var(--plyr-control-spacing, 10px)*1.5);position:absolute;top:50%;transform:translate(-50%,-50%);transition:.3s;z-index:2}.plyr__control--overlaid svg{left:2px;position:relative}.plyr__control--overlaid:focus,.plyr__control--overlaid:hover{opacity:1}.plyr--playing .plyr__control--overlaid{opacity:0;visibility:hidden}.plyr--full-ui.plyr--video .plyr__control--overlaid{display:block}.plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{background-color:#ffffff40;background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, hsla(0, 0%, 100%, .25)))}.plyr--full-ui.plyr--video input[type=range]::-moz-range-track{background-color:#ffffff40;background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, hsla(0, 0%, 100%, .25)))}.plyr--full-ui.plyr--video input[type=range]::-ms-track{background-color:#ffffff40;background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, hsla(0, 0%, 100%, .25)))}.plyr--full-ui.plyr--video input[type=range]:active::-webkit-slider-thumb{box-shadow:0 1px 1px #23282f26,0 0 0 1px #23282f33,0 0 0 3px #ffffff80;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, .15), 0 0 0 1px rgba(35, 40, 47, .2)),0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, hsla(0, 0%, 100%, .5))}.plyr--full-ui.plyr--video input[type=range]:active::-moz-range-thumb{box-shadow:0 1px 1px #23282f26,0 0 0 1px #23282f33,0 0 0 3px #ffffff80;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, .15), 0 0 0 1px rgba(35, 40, 47, .2)),0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, hsla(0, 0%, 100%, .5))}.plyr--full-ui.plyr--video input[type=range]:active::-ms-thumb{box-shadow:0 1px 1px #23282f26,0 0 0 1px #23282f33,0 0 0 3px #ffffff80;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, .15), 0 0 0 1px rgba(35, 40, 47, .2)),0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, hsla(0, 0%, 100%, .5))}.plyr--video .plyr__progress__buffer{color:#ffffff40;color:var(--plyr-video-progress-buffered-background, hsla(0, 0%, 100%, .25))}.plyr:fullscreen{background:#000;border-radius:0!important;height:100%;margin:0;width:100%}.plyr:fullscreen video{height:100%}.plyr:fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:fullscreen.plyr--hide-controls{cursor:none}@media (min-width:1024px){.plyr:fullscreen .plyr__captions{font-size:21px;font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr:-webkit-full-screen{background:#000;border-radius:0!important;height:100%;margin:0;width:100%}.plyr:-webkit-full-screen video{height:100%}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-webkit-full-screen.plyr--hide-controls{cursor:none}@media (min-width:1024px){.plyr:-webkit-full-screen .plyr__captions{font-size:21px;font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr:-moz-full-screen{background:#000;border-radius:0!important;height:100%;margin:0;width:100%}.plyr:-moz-full-screen video{height:100%}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-moz-full-screen.plyr--hide-controls{cursor:none}@media (min-width:1024px){.plyr:-moz-full-screen .plyr__captions{font-size:21px;font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr:-ms-fullscreen{background:#000;border-radius:0!important;height:100%;margin:0;width:100%}.plyr:-ms-fullscreen video{height:100%}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-ms-fullscreen.plyr--hide-controls{cursor:none}@media (min-width:1024px){.plyr:-ms-fullscreen .plyr__captions{font-size:21px;font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr--fullscreen-fallback{background:#000;border-radius:0!important;bottom:0;display:block;height:100%;left:0;margin:0;position:fixed;right:0;top:0;width:100%;z-index:10000000}.plyr--fullscreen-fallback video{height:100%}.plyr--fullscreen-fallback .plyr__control .icon--exit-fullscreen{display:block}.plyr--fullscreen-fallback .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr--fullscreen-fallback.plyr--hide-controls{cursor:none}@media (min-width:1024px){.plyr--fullscreen-fallback .plyr__captions{font-size:21px;font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr__ads{border-radius:inherit;bottom:0;cursor:pointer;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:-1}.plyr__ads>div,.plyr__ads>div iframe{height:100%;position:absolute;width:100%}.plyr__ads:after{background:#23282f;border-radius:2px;bottom:10px;bottom:var(--plyr-control-spacing, 10px);color:#fff;content:attr(data-badge-text);font-size:11px;padding:2px 6px;pointer-events:none;position:absolute;right:10px;right:var(--plyr-control-spacing, 10px);z-index:3}.plyr__ads:after:empty{display:none}.plyr__cues{background:currentColor;display:block;height:5px;height:var(--plyr-range-track-height, 5px);left:0;margin:-var(--plyr-range-track-height,5px)/2 0 0;opacity:.8;position:absolute;top:50%;width:3px;z-index:3}.plyr__preview-thumb{background-color:#ffffffe6;background-color:var(--plyr-tooltip-background, hsla(0, 0%, 100%, .9));border-radius:3px;bottom:100%;box-shadow:0 1px 2px #00000026;box-shadow:var(--plyr-tooltip-shadow, 0 1px 2px rgba(0, 0, 0, .15));margin-bottom:10px;margin-bottom:calc(var(--plyr-control-spacing, 10px)/2*2);opacity:0;padding:3px;padding:var(--plyr-tooltip-radius, 3px);pointer-events:none;position:absolute;transform:translateY(10px) scale(.8);transform-origin:50% 100%;transition:transform .2s ease .1s,opacity .2s ease .1s;z-index:2}.plyr__preview-thumb--is-shown{opacity:1;transform:translate(0) scale(1)}.plyr__preview-thumb:before{border-left:4px solid transparent;border-left:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-right:4px solid transparent;border-right:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-top:4px solid hsla(0,0%,100%,.9);border-top:var(--plyr-tooltip-arrow-size, 4px) solid var(--plyr-tooltip-background, hsla(0, 0%, 100%, .9));bottom:-4px;bottom:calc(var(--plyr-tooltip-arrow-size, 4px)*-1);content:"";height:0;left:50%;position:absolute;transform:translate(-50%);width:0;z-index:2}.plyr__preview-thumb__image-container{background:#c1c8d1;border-radius:2px;border-radius:calc(var(--plyr-tooltip-radius, 3px) - 1px);overflow:hidden;position:relative;z-index:0}.plyr__preview-thumb__image-container img{height:100%;left:0;max-height:none;max-width:none;position:absolute;top:0;width:100%}.plyr__preview-thumb__time-container{bottom:6px;left:0;position:absolute;right:0;white-space:nowrap;z-index:3}.plyr__preview-thumb__time-container span{background-color:#0000008c;border-radius:2px;border-radius:calc(var(--plyr-tooltip-radius, 3px) - 1px);color:#fff;font-size:13px;font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px));padding:3px 6px}.plyr__preview-scrubbing{bottom:0;filter:blur(1px);height:100%;left:0;margin:auto;opacity:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0;transition:opacity .3s ease;width:100%;z-index:1}.plyr__preview-scrubbing--is-shown{opacity:1}.plyr__preview-scrubbing img{height:100%;left:0;max-height:none;max-width:none;-o-object-fit:contain;object-fit:contain;position:absolute;top:0;width:100%}.plyr--no-transition{transition:none!important}.plyr__sr-only{clip:rect(1px,1px,1px,1px);border:0!important;height:1px!important;overflow:hidden;padding:0!important;position:absolute!important;width:1px!important}.plyr [hidden]{display:none!important}html{font-family:Inter,sans-serif}@supports (font-variation-settings: normal){html{font-family:Inter var,sans-serif}}:root{--plyr-audio-controls-background: transparent}.player{position:fixed;left:0;right:0;bottom:0;display:flex;align-items:center;border-top-width:1px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background-color:#fffc;height:60px;z-index:100}.player .plyr{width:100%}@media (min-width: 768px){.player{height:80px}}h1{font-family:Inter var,Inter,sans-serif;font-size:3rem;line-height:1;font-weight:900}.content{font-family:Inter var,Inter,sans-serif}.content h2{margin-bottom:2rem;font-size:1.5rem;line-height:2rem;font-weight:700}.content h3{margin-bottom:1rem;font-size:1.125rem;line-height:1.75rem;font-weight:700}.content>p{margin-bottom:2em}.content a{text-decoration-line:underline}.content a:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.content ul:not(.list-none){margin-left:2rem;margin-bottom:2rem;list-style-type:disc;padding-left:0}.content ul:not(.list-none) li{margin-bottom:.25rem}.content ul:not(.list-none) li ul{margin-bottom:0}.content ol{margin-left:2rem;margin-bottom:2rem;list-style-type:decimal;padding-left:0}.content ol li{margin-bottom:.25rem}.turbo-progress-bar{background-color:var(--primary-color);height:5px}[x-cloak]{display:none}.absolute{position:absolute!important}.relative{position:relative!important}.inset-0{top:0!important;right:0!important;bottom:0!important;left:0!important}.bottom-0{bottom:0!important}.right-0{right:0!important}.top-0{top:0!important}.z-10{z-index:10!important}.order-1{order:1!important}.order-2{order:2!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.my-8{margin-top:2rem!important;margin-bottom:2rem!important}.mb-0{margin-bottom:0!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:.75rem!important}.mb-6{margin-bottom:1.5rem!important}.mb-8{margin-bottom:2rem!important}.ml-4{margin-left:1rem!important}.mr-2{margin-right:.5rem!important}.mr-3{margin-right:.75rem!important}.mr-4{margin-right:1rem!important}.mt-1{margin-top:.25rem!important}.mt-16{margin-top:4rem!important}.mt-4{margin-top:1rem!important}.mt-6{margin-top:1.5rem!important}.mt-8{margin-top:2rem!important}.mt-px{margin-top:1px!important}.inline-block{display:inline-block!important}.flex{display:flex!important}.hidden{display:none!important}.h-10{height:2.5rem!important}.h-12{height:3rem!important}.h-5{height:1.25rem!important}.h-8{height:2rem!important}.h-full{height:100%!important}.min-h-full{min-height:100%!important}.min-h-screen{min-height:100vh!important}.w-12{width:3rem!important}.w-16{width:4rem!important}.w-5{width:1.25rem!important}.w-8{width:2rem!important}.w-\[300px\]{width:300px!important}.w-\[350px\]{width:350px!important}.w-full{width:100%!important}.max-w-6xl{max-width:72rem!important}.max-w-md{max-width:28rem!important}.flex-1{flex:1 1 0%!important}.origin-bottom-left{transform-origin:bottom left!important}.translate-y-0{--tw-translate-y: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-y-24{--tw-translate-y: 6rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.flex-col{flex-direction:column!important}.flex-wrap{flex-wrap:wrap!important}.items-start{align-items:flex-start!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.space-x-10>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(2.5rem * var(--tw-space-x-reverse))!important;margin-left:calc(2.5rem * calc(1 - var(--tw-space-x-reverse)))!important}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(.5rem * var(--tw-space-x-reverse))!important;margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))!important}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(.75rem * var(--tw-space-x-reverse))!important;margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))!important}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(1rem * var(--tw-space-x-reverse))!important;margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))!important}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(1.25rem * var(--tw-space-x-reverse))!important;margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))!important}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(1.5rem * var(--tw-space-x-reverse))!important;margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))!important}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(.5rem * var(--tw-space-y-reverse))!important}.overflow-visible{overflow:visible!important}.whitespace-nowrap{white-space:nowrap!important}.rounded{border-radius:.25rem!important}.rounded-full{border-radius:9999px!important}.rounded-md{border-radius:.375rem!important}.border{border-width:1px!important}.border-b{border-bottom-width:1px!important}.border-b-3{border-bottom-width:3px!important}.border-r{border-right-width:1px!important}.border-t{border-top-width:1px!important}.border-black{--tw-border-opacity: 1 !important;border-color:rgb(0 0 0 / var(--tw-border-opacity))!important}.border-gray-300{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important}.bg-blue-100{--tw-bg-opacity: 1 !important;background-color:rgb(219 234 254 / var(--tw-bg-opacity))!important}.bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.p-0{padding:0!important}.p-2{padding:.5rem!important}.p-6{padding:1.5rem!important}.px-3{padding-left:.75rem!important;padding-right:.75rem!important}.px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:.75rem!important;padding-bottom:.75rem!important}.py-4{padding-top:1rem!important;padding-bottom:1rem!important}.py-6{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-8{padding-top:2rem!important;padding-bottom:2rem!important}.py-px{padding-top:1px!important;padding-bottom:1px!important}.pb-24{padding-bottom:6rem!important}.pb-8{padding-bottom:2rem!important}.pl-3{padding-left:.75rem!important}.pr-24{padding-right:6rem!important}.pr-32{padding-right:8rem!important}.pr-6{padding-right:1.5rem!important}.pt-16{padding-top:4rem!important}.pt-4{padding-top:1rem!important}.pt-8{padding-top:2rem!important}.pt-\[2px\]{padding-top:2px!important}.text-left{text-align:left!important}.text-center{text-align:center!important}.font-mono{font-family:IBM Plex Mono,monospace!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-bold{font-weight:700!important}.font-semibold{font-weight:600!important}.uppercase{text-transform:uppercase!important}.leading-snug{line-height:1.375!important}.tracking-widest{letter-spacing:.1em!important}.text-blue-800{--tw-text-opacity: 1 !important;color:rgb(30 64 175 / var(--tw-text-opacity))!important}.text-blue-900{--tw-text-opacity: 1 !important;color:rgb(30 58 138 / var(--tw-text-opacity))!important}.text-gray-300{--tw-text-opacity: 1 !important;color:rgb(209 213 219 / var(--tw-text-opacity))!important}.text-gray-400{--tw-text-opacity: 1 !important;color:rgb(156 163 175 / var(--tw-text-opacity))!important}.text-gray-500{--tw-text-opacity: 1 !important;color:rgb(107 114 128 / var(--tw-text-opacity))!important}.text-gray-700{--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.text-gray-800{--tw-text-opacity: 1 !important;color:rgb(31 41 55 / var(--tw-text-opacity))!important}.underline{text-decoration-line:underline!important}.antialiased{-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25) !important;--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.duration-200{transition-duration:.2s!important}.duration-300{transition-duration:.3s!important}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)!important}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)!important}.hover\:-translate-y-1:hover{--tw-translate-y: -.25rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1 !important;background-color:rgb(219 234 254 / var(--tw-bg-opacity))!important}.hover\:text-black:hover{--tw-text-opacity: 1 !important;color:rgb(0 0 0 / var(--tw-text-opacity))!important}.hover\:text-gray-700:hover{--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.hover\:drop-shadow-lg:hover{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1)) !important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.group:hover .group-hover\:-translate-y-16{--tw-translate-y: -4rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.group:hover .group-hover\:-rotate-12{--tw-rotate: -12deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.group:hover .group-hover\:rotate-12{--tw-rotate: 12deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.group:hover .group-hover\:bg-blue-200{--tw-bg-opacity: 1 !important;background-color:rgb(191 219 254 / var(--tw-bg-opacity))!important}.group:hover .group-hover\:text-gray-700{--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}@media (min-width: 768px){.md\:order-first{order:-9999!important}.md\:mb-8{margin-bottom:2rem!important}.md\:mt-24{margin-top:6rem!important}.md\:block{display:block!important}.md\:flex{display:flex!important}.md\:hidden{display:none!important}.md\:w-1\/2{width:50%!important}.md\:w-\[1000px\]{width:1000px!important}.md\:w-\[350px\]{width:350px!important}.md\:w-\[500px\]{width:500px!important}.md\:w-auto{width:auto!important}.md\:flex-row{flex-direction:row!important}.md\:flex-col{flex-direction:column!important}.md\:justify-start{justify-content:flex-start!important}.md\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(1rem * var(--tw-space-x-reverse))!important;margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))!important}.md\:border-0{border-width:0px!important}.md\:border-none{border-style:none!important}.md\:py-16{padding-top:4rem!important;padding-bottom:4rem!important}.md\:py-20{padding-top:5rem!important;padding-bottom:5rem!important}.md\:pr-32{padding-right:8rem!important}.md\:shadow-3xl{--tw-shadow: 40px 60px 90px -15px rgba(0, 0, 0, .3) !important;--tw-shadow-colored: 40px 60px 90px -15px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}}
diff --git a/export/public/build/assets/site-Dg49c9BR.js b/export/public/build/assets/site-Dg49c9BR.js
new file mode 100644
index 0000000..ea90ae9
--- /dev/null
+++ b/export/public/build/assets/site-Dg49c9BR.js
@@ -0,0 +1,2 @@
+function v(e,i,t){return(i=Zi(i))in e?Object.defineProperty(e,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[i]=t,e}function Ji(e,i){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var s=t.call(e,i||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(e)}function Zi(e){var i=Ji(e,"string");return typeof i=="symbol"?i:String(i)}function es(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}function jt(e,i){for(var t=0;ti){var t=hs(i);return parseFloat(e.toFixed(t))}return Math.round(e/i)*i}var ps=function(){function e(i,t){es(this,e),X.element(i)?this.element=i:X.string(i)&&(this.element=document.querySelector(i)),X.element(this.element)&&X.empty(this.element.rangeTouch)&&(this.config=qt({},Ht,{},t),this.init())}return ts(e,[{key:"init",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(i){var t=this,s=i?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(n){t.element[s](n,function(r){return t.set(r)},!1)})}},{key:"get",value:function(i){if(!e.enabled||!X.event(i))return null;var t,s=i.target,n=i.changedTouches[0],r=parseFloat(s.getAttribute("min"))||0,a=parseFloat(s.getAttribute("max"))||100,o=parseFloat(s.getAttribute("step"))||1,c=s.getBoundingClientRect(),u=100/c.width*(this.config.thumbWidth/2)/100;return 0>(t=100/c.width*(n.clientX-c.left))?t=0:100t?t-=(100-2*t)*u:50e!=null?e.constructor:null,ae=(e,i)=>!!(e&&i&&e instanceof i),Pt=e=>e==null,ri=e=>_e(e)===Object,ms=e=>_e(e)===Number&&!Number.isNaN(e),We=e=>_e(e)===String,fs=e=>_e(e)===Boolean,ai=e=>typeof e=="function",oi=e=>Array.isArray(e),gs=e=>ae(e,WeakMap),li=e=>ae(e,NodeList),bs=e=>_e(e)===Text,ys=e=>ae(e,Event),ws=e=>ae(e,KeyboardEvent),vs=e=>ae(e,window.TextTrackCue)||ae(e,window.VTTCue),ks=e=>ae(e,TextTrack)||!Pt(e)&&We(e.kind),Ts=e=>ae(e,Promise)&&ai(e.then),As=e=>e!==null&&typeof e=="object"&&e.nodeType===1&&typeof e.style=="object"&&typeof e.ownerDocument=="object",ci=e=>Pt(e)||(We(e)||oi(e)||li(e))&&!e.length||ri(e)&&!Object.keys(e).length,Cs=e=>{if(ae(e,window.URL))return!0;if(!We(e))return!1;let i=e;e.startsWith("http://")&&e.startsWith("https://")||(i=`http://${e}`);try{return!ci(new URL(i).hostname)}catch{return!1}};var l={nullOrUndefined:Pt,object:ri,number:ms,string:We,boolean:fs,function:ai,array:oi,weakMap:gs,nodeList:li,element:As,textNode:bs,event:ys,keyboardEvent:ws,cue:vs,track:ks,promise:Ts,url:Cs,empty:ci};const yt=(()=>{const e=document.createElement("span"),i={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},t=Object.keys(i).find(s=>e.style[s]!==void 0);return!!l.string(t)&&i[t]})();function ui(e,i){setTimeout(()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch{}},i)}const Es=!!window.document.documentMode,Ss=/Edge/g.test(navigator.userAgent),Ps="WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),Ms=/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,Ns=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,_s=/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1;var G={isIE:Es,isEdge:Ss,isWebKit:Ps,isIPhone:Ms,isIPadOS:Ns,isIos:_s};function $s(e){return JSON.parse(JSON.stringify(e))}function hi(e,i){return i.split(".").reduce((t,s)=>t&&t[s],e)}function U(e={},...i){if(!i.length)return e;const t=i.shift();return l.object(t)?(Object.keys(t).forEach(s=>{l.object(t[s])?(Object.keys(e).includes(s)||Object.assign(e,{[s]:{}}),U(e[s],t[s])):Object.assign(e,{[s]:t[s]})}),U(e,...i)):e}function di(e,i){const t=e.length?e:[e];Array.from(t).reverse().forEach((s,n)=>{const r=n>0?i.cloneNode(!0):i,a=s.parentNode,o=s.nextSibling;r.appendChild(s),o?a.insertBefore(r,o):a.appendChild(r)})}function wt(e,i){l.element(e)&&!l.empty(i)&&Object.entries(i).filter(([,t])=>!l.nullOrUndefined(t)).forEach(([t,s])=>e.setAttribute(t,s))}function S(e,i,t){const s=document.createElement(e);return l.object(i)&&wt(s,i),l.string(t)&&(s.innerText=t),s}function xs(e,i){l.element(e)&&l.element(i)&&i.parentNode.insertBefore(e,i.nextSibling)}function Dt(e,i,t,s){l.element(i)&&i.appendChild(S(e,t,s))}function re(e){l.nodeList(e)||l.array(e)?Array.from(e).forEach(re):l.element(e)&&l.element(e.parentNode)&&e.parentNode.removeChild(e)}function Re(e){if(!l.element(e))return;let{length:i}=e.childNodes;for(;i>0;)e.removeChild(e.lastChild),i-=1}function Be(e,i){return l.element(i)&&l.element(i.parentNode)&&l.element(e)?(i.parentNode.replaceChild(e,i),e):null}function te(e,i){if(!l.string(e)||l.empty(e))return{};const t={},s=U({},i);return e.split(",").forEach(n=>{const r=n.trim(),a=r.replace(".",""),o=r.replace(/[[\]]/g,"").split("="),[c]=o,u=o.length>1?o[1].replace(/["']/g,""):"";switch(r.charAt(0)){case".":l.string(s.class)?t.class=`${s.class} ${a}`:t.class=a;break;case"#":t.id=r.replace("#","");break;case"[":t[c]=u}}),U(s,t)}function de(e,i){if(!l.element(e))return;let t=i;l.boolean(t)||(t=!e.hidden),e.hidden=t}function D(e,i,t){if(l.nodeList(e))return Array.from(e).map(s=>D(s,i,t));if(l.element(e)){let s="toggle";return t!==void 0&&(s=t?"add":"remove"),e.classList[s](i),e.classList.contains(i)}return!1}function Fe(e,i){return l.element(e)&&e.classList.contains(i)}function pe(e,i){const{prototype:t}=Element;return(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||function(){return Array.from(document.querySelectorAll(i)).includes(this)}).call(e,i)}function Ls(e,i){const{prototype:t}=Element;return(t.closest||function(){let s=this;do{if(pe.matches(s,i))return s;s=s.parentElement||s.parentNode}while(s!==null&&s.nodeType===1);return null}).call(e,i)}function Ce(e){return this.elements.container.querySelectorAll(e)}function K(e){return this.elements.container.querySelector(e)}function Je(e=null,i=!1){l.element(e)&&e.focus({preventScroll:!0,focusVisible:i})}const Vt={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},z={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,i){const t=z[e]||i!=="html5";return{api:t,ui:t&&z.rangeInput}},pip:!(G.isIPhone||!l.function(S("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||S("video").disablePictureInPicture)),airplay:l.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(l.empty(e))return!1;const[i]=e.split("/");let t=e;if(!this.isHTML5||i!==this.type)return!1;Object.keys(Vt).includes(t)&&(t+=`; codecs="${Vt[e]}"`);try{return!!(t&&this.media.canPlayType(t).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const e=document.createElement("input");return e.type="range",e.type==="range"})(),touch:"ontouchstart"in document.documentElement,transitions:yt!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},Is=(()=>{let e=!1;try{const i=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,i),window.removeEventListener("test",null,i)}catch{}return e})();function Ee(e,i,t,s=!1,n=!0,r=!1){if(!e||!("addEventListener"in e)||l.empty(i)||!l.function(t))return;const a=i.split(" ");let o=r;Is&&(o={passive:n,capture:r}),a.forEach(c=>{this&&this.eventListeners&&s&&this.eventListeners.push({element:e,type:c,callback:t,options:o}),e[s?"addEventListener":"removeEventListener"](c,t,o)})}function q(e,i="",t,s=!0,n=!1){Ee.call(this,e,i,t,!0,s,n)}function Ke(e,i="",t,s=!0,n=!1){Ee.call(this,e,i,t,!1,s,n)}function Mt(e,i="",t,s=!0,n=!1){const r=(...a)=>{Ke(e,i,r,s,n),t.apply(this,a)};Ee.call(this,e,i,r,!0,s,n)}function P(e,i="",t=!1,s={}){if(!l.element(e)||l.empty(i))return;const n=new CustomEvent(i,{bubbles:t,detail:{...s,plyr:this}});e.dispatchEvent(n)}function Os(){this&&this.eventListeners&&(this.eventListeners.forEach(e=>{const{element:i,type:t,callback:s,options:n}=e;i.removeEventListener(t,s,n)}),this.eventListeners=[])}function js(){return new Promise(e=>this.ready?setTimeout(e,0):q.call(this,this.elements.container,"ready",e)).then(()=>{})}function ie(e){l.promise(e)&&e.then(null,()=>{})}function vt(e){return l.array(e)?e.filter((i,t)=>e.indexOf(i)===t):e}function pi(e,i){return l.array(e)&&e.length?e.reduce((t,s)=>Math.abs(s-i)({...e,[i/t]:[i,t]}),{});function fi(e){return l.array(e)||l.string(e)&&e.includes(":")?(l.array(e)?e:e.split(":")).map(Number).every(l.number):!1}function Ue(e){if(!l.array(e)||!e.every(l.number))return null;const[i,t]=e,s=(r,a)=>a===0?r:s(a,r%a),n=s(i,t);return[i/n,t/n]}function Nt(e){const i=s=>fi(s)?s.split(":").map(Number):null;let t=i(e);if(t===null&&(t=i(this.config.ratio)),t===null&&!l.empty(this.embed)&&l.array(this.embed.ratio)&&({ratio:t}=this.embed),t===null&&this.isHTML5){const{videoWidth:s,videoHeight:n}=this.media;t=[s,n]}return Ue(t)}function be(e){if(!this.isVideo)return{};const{wrapper:i}=this.elements,t=Nt.call(this,e);if(!l.array(t))return{};const[s,n]=Ue(t),r=100/s*n;if(mi(`aspect-ratio: ${s}/${n}`)?i.style.aspectRatio=`${s}/${n}`:i.style.paddingBottom=`${r}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const a=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),o=(a-r)/(a/50);this.fullscreen.active?i.style.paddingBottom=null:this.media.style.transform=`translateY(-${o}%)`}else this.isHTML5&&i.classList.add(this.config.classNames.videoFixedRatio);return{padding:r,ratio:t}}function gi(e,i,t=.05){const s=e/i,n=pi(Object.keys(Bt),s);return Math.abs(n-s)<=t?Bt[n]:[e,i]}function Rs(){return[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)]}const le={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(e=>{const i=e.getAttribute("type");return!!l.empty(i)||z.mime.call(this,i)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:le.getSources.call(this).map(e=>Number(e.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const e=this;e.options.speed=e.config.speed.options,l.empty(this.config.ratio)||be.call(e),Object.defineProperty(e.media,"quality",{get(){const i=le.getSources.call(e).find(t=>t.getAttribute("src")===e.source);return i&&Number(i.getAttribute("size"))},set(i){if(e.quality!==i){if(e.config.quality.forced&&l.function(e.config.quality.onChange))e.config.quality.onChange(i);else{const t=le.getSources.call(e).find(c=>Number(c.getAttribute("size"))===i);if(!t)return;const{currentTime:s,paused:n,preload:r,readyState:a,playbackRate:o}=e.media;e.media.src=t.getAttribute("src"),(r!=="none"||a)&&(e.once("loadedmetadata",()=>{e.speed=o,e.currentTime=s,n||ie(e.play())}),e.media.load())}P.call(e,e.media,"qualitychange",!1,{quality:i})}}})},cancelRequests(){this.isHTML5&&(re(le.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function qs(e){return`${e}-${Math.floor(1e4*Math.random())}`}function kt(e,...i){return l.empty(e)?e:e.toString().replace(/{(\d+)}/g,(t,s)=>i[s].toString())}function Hs(e,i){return e===0||i===0||Number.isNaN(e)||Number.isNaN(i)?0:(e/i*100).toFixed(2)}const Ae=(e="",i="",t="")=>e.replace(new RegExp(i.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),t.toString()),bi=(e="")=>e.toString().replace(/\w\S*/g,i=>i.charAt(0).toUpperCase()+i.slice(1).toLowerCase());function Ds(e=""){let i=e.toString();return i=Ae(i,"-"," "),i=Ae(i,"_"," "),i=bi(i),Ae(i," ","")}function Vs(e=""){let i=e.toString();return i=Ds(i),i.charAt(0).toLowerCase()+i.slice(1)}function Bs(e){const i=document.createDocumentFragment(),t=document.createElement("div");return i.appendChild(t),t.innerHTML=e,i.firstChild.innerText}function Fs(e){const i=document.createElement("div");return i.appendChild(e),i.innerHTML}const Ft={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Y={get(e="",i={}){if(l.empty(e)||l.empty(i))return"";let t=hi(i.i18n,e);if(l.empty(t))return Object.keys(Ft).includes(e)?Ft[e]:"";const s={"{seektime}":i.seekTime,"{title}":i.title};return Object.entries(s).forEach(([n,r])=>{t=Ae(t,n,r)}),t}};class Se{constructor(i){v(this,"get",t=>{if(!Se.supported||!this.enabled)return null;const s=window.localStorage.getItem(this.key);if(l.empty(s))return null;const n=JSON.parse(s);return l.string(t)&&t.length?n[t]:n}),v(this,"set",t=>{if(!Se.supported||!this.enabled||!l.object(t))return;let s=this.get();l.empty(s)&&(s={}),U(s,t);try{window.localStorage.setItem(this.key,JSON.stringify(s))}catch{}}),this.enabled=i.config.storage.enabled,this.key=i.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const i="___test";return window.localStorage.setItem(i,i),window.localStorage.removeItem(i),!0}catch{return!1}}}function $e(e,i="text"){return new Promise((t,s)=>{try{const n=new XMLHttpRequest;if(!("withCredentials"in n))return;n.addEventListener("load",()=>{if(i==="text")try{t(JSON.parse(n.responseText))}catch{t(n.responseText)}else t(n.response)}),n.addEventListener("error",()=>{throw new Error(n.status)}),n.open("GET",e,!0),n.responseType=i,n.send()}catch(n){s(n)}})}function yi(e,i){if(!l.string(e))return;const t="cache",s=l.string(i);let n=!1;const r=()=>document.getElementById(i)!==null,a=(o,c)=>{o.innerHTML=c,s&&r()||document.body.insertAdjacentElement("afterbegin",o)};if(!s||!r()){const o=Se.supported,c=document.createElement("div");if(c.setAttribute("hidden",""),s&&c.setAttribute("id",i),o){const u=window.localStorage.getItem(`${t}-${i}`);if(n=u!==null,n){const d=JSON.parse(u);a(c,d.content)}}$e(e).then(u=>{if(!l.empty(u)){if(o)try{window.localStorage.setItem(`${t}-${i}`,JSON.stringify({content:u}))}catch{}a(c,u)}}).catch(()=>{})}}const wi=e=>Math.trunc(e/60/60%60,10),Us=e=>Math.trunc(e/60%60,10),zs=e=>Math.trunc(e%60,10);function Ye(e=0,i=!1,t=!1){if(!l.number(e))return Ye(void 0,i,t);const s=o=>`0${o}`.slice(-2);let n=wi(e);const r=Us(e),a=zs(e);return n=i||n>0?`${n}:`:"",`${t&&e>0?"-":""}${n}${s(r)}:${s(a)}`}const w={getIconUrl(){const e=new URL(this.config.iconUrl,window.location),i=window.location.host?window.location.host:window.top.location.host,t=e.host!==i||G.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:t}},findElements(){try{return this.elements.controls=K.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:Ce.call(this,this.config.selectors.buttons.play),pause:K.call(this,this.config.selectors.buttons.pause),restart:K.call(this,this.config.selectors.buttons.restart),rewind:K.call(this,this.config.selectors.buttons.rewind),fastForward:K.call(this,this.config.selectors.buttons.fastForward),mute:K.call(this,this.config.selectors.buttons.mute),pip:K.call(this,this.config.selectors.buttons.pip),airplay:K.call(this,this.config.selectors.buttons.airplay),settings:K.call(this,this.config.selectors.buttons.settings),captions:K.call(this,this.config.selectors.buttons.captions),fullscreen:K.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=K.call(this,this.config.selectors.progress),this.elements.inputs={seek:K.call(this,this.config.selectors.inputs.seek),volume:K.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:K.call(this,this.config.selectors.display.buffer),currentTime:K.call(this,this.config.selectors.display.currentTime),duration:K.call(this,this.config.selectors.display.duration)},l.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon(e,i){const t="http://www.w3.org/2000/svg",s=w.getIconUrl.call(this),n=`${s.cors?"":s.url}#${this.config.iconPrefix}`,r=document.createElementNS(t,"svg");wt(r,U(i,{"aria-hidden":"true",focusable:"false"}));const a=document.createElementNS(t,"use"),o=`${n}-${e}`;return"href"in a&&a.setAttributeNS("http://www.w3.org/1999/xlink","href",o),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o),r.appendChild(a),r},createLabel(e,i={}){const t=Y.get(e,this.config);return S("span",{...i,class:[i.class,this.config.classNames.hidden].filter(Boolean).join(" ")},t)},createBadge(e){if(l.empty(e))return null;const i=S("span",{class:this.config.classNames.menu.value});return i.appendChild(S("span",{class:this.config.classNames.menu.badge},e)),i},createButton(e,i){const t=U({},i);let s=Vs(e);const n={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(a=>{Object.keys(t).includes(a)&&(n[a]=t[a],delete t[a])}),n.element!=="button"||Object.keys(t).includes("type")||(t.type="button"),Object.keys(t).includes("class")?t.class.split(" ").some(a=>a===this.config.classNames.control)||U(t,{class:`${t.class} ${this.config.classNames.control}`}):t.class=this.config.classNames.control,e){case"play":n.toggle=!0,n.label="play",n.labelPressed="pause",n.icon="play",n.iconPressed="pause";break;case"mute":n.toggle=!0,n.label="mute",n.labelPressed="unmute",n.icon="volume",n.iconPressed="muted";break;case"captions":n.toggle=!0,n.label="enableCaptions",n.labelPressed="disableCaptions",n.icon="captions-off",n.iconPressed="captions-on";break;case"fullscreen":n.toggle=!0,n.label="enterFullscreen",n.labelPressed="exitFullscreen",n.icon="enter-fullscreen",n.iconPressed="exit-fullscreen";break;case"play-large":t.class+=` ${this.config.classNames.control}--overlaid`,s="play",n.label="play",n.icon="play";break;default:l.empty(n.label)&&(n.label=s),l.empty(n.icon)&&(n.icon=e)}const r=S(n.element);return n.toggle?(r.appendChild(w.createIcon.call(this,n.iconPressed,{class:"icon--pressed"})),r.appendChild(w.createIcon.call(this,n.icon,{class:"icon--not-pressed"})),r.appendChild(w.createLabel.call(this,n.labelPressed,{class:"label--pressed"})),r.appendChild(w.createLabel.call(this,n.label,{class:"label--not-pressed"}))):(r.appendChild(w.createIcon.call(this,n.icon)),r.appendChild(w.createLabel.call(this,n.label))),U(t,te(this.config.selectors.buttons[s],t)),wt(r,t),s==="play"?(l.array(this.elements.buttons[s])||(this.elements.buttons[s]=[]),this.elements.buttons[s].push(r)):this.elements.buttons[s]=r,r},createRange(e,i){const t=S("input",U(te(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Y.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},i));return this.elements.inputs[e]=t,w.updateRangeFill.call(this,t),ps.setup(t),t},createProgress(e,i){const t=S("progress",U(te(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},i));if(e!=="volume"){t.appendChild(S("span",null,"0"));const s={played:"played",buffer:"buffered"}[e],n=s?Y.get(s,this.config):"";t.innerText=`% ${n.toLowerCase()}`}return this.elements.display[e]=t,t},createTime(e,i){const t=te(this.config.selectors.display[e],i),s=S("div",U(t,{class:`${t.class?t.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":Y.get(e,this.config),role:"timer"}),"00:00");return this.elements.display[e]=s,s},bindMenuItemShortcuts(e,i){q.call(this,e,"keydown keyup",t=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(t.key)||(t.preventDefault(),t.stopPropagation(),t.type==="keydown"))return;const s=pe(e,'[role="menuitemradio"]');if(!s&&[" ","ArrowRight"].includes(t.key))w.showMenuPanel.call(this,i,!0);else{let n;t.key!==" "&&(t.key==="ArrowDown"||s&&t.key==="ArrowRight"?(n=e.nextElementSibling,l.element(n)||(n=e.parentNode.firstElementChild)):(n=e.previousElementSibling,l.element(n)||(n=e.parentNode.lastElementChild)),Je.call(this,n,!0))}},!1),q.call(this,e,"keyup",t=>{t.key==="Return"&&w.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:e,list:i,type:t,title:s,badge:n=null,checked:r=!1}){const a=te(this.config.selectors.inputs[t]),o=S("button",U(a,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${a.class?a.class:""}`.trim(),"aria-checked":r,value:e})),c=S("span");c.innerHTML=s,l.element(n)&&c.appendChild(n),o.appendChild(c),Object.defineProperty(o,"checked",{enumerable:!0,get:()=>o.getAttribute("aria-checked")==="true",set(u){u&&Array.from(o.parentNode.children).filter(d=>pe(d,'[role="menuitemradio"]')).forEach(d=>d.setAttribute("aria-checked","false")),o.setAttribute("aria-checked",u?"true":"false")}}),this.listeners.bind(o,"click keyup",u=>{if(!l.keyboardEvent(u)||u.key===" "){switch(u.preventDefault(),u.stopPropagation(),o.checked=!0,t){case"language":this.currentTrack=Number(e);break;case"quality":this.quality=e;break;case"speed":this.speed=parseFloat(e)}w.showMenuPanel.call(this,"home",l.keyboardEvent(u))}},t,!1),w.bindMenuItemShortcuts.call(this,o,t),i.appendChild(o)},formatTime(e=0,i=!1){return l.number(e)?Ye(e,wi(this.duration)>0,i):e},updateTimeDisplay(e=null,i=0,t=!1){l.element(e)&&l.number(i)&&(e.innerText=w.formatTime(i,t))},updateVolume(){this.supported.ui&&(l.element(this.elements.inputs.volume)&&w.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),l.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(e,i=0){l.element(e)&&(e.value=i,w.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!l.event(e))return;let i=0;const t=(s,n)=>{const r=l.number(n)?n:0,a=l.element(s)?s:this.elements.display.buffer;if(l.element(a)){a.value=r;const o=a.getElementsByTagName("span")[0];l.element(o)&&(o.childNodes[0].nodeValue=r)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":i=Hs(this.currentTime,this.duration),e.type==="timeupdate"&&w.setRange.call(this,this.elements.inputs.seek,i);break;case"playing":case"progress":t(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(e){const i=l.event(e)?e.target:e;if(l.element(i)&&i.getAttribute("type")==="range"){if(pe(i,this.config.selectors.inputs.seek)){i.setAttribute("aria-valuenow",this.currentTime);const t=w.formatTime(this.currentTime),s=w.formatTime(this.duration),n=Y.get("seekLabel",this.config);i.setAttribute("aria-valuetext",n.replace("{currentTime}",t).replace("{duration}",s))}else if(pe(i,this.config.selectors.inputs.volume)){const t=100*i.value;i.setAttribute("aria-valuenow",t),i.setAttribute("aria-valuetext",`${t.toFixed(1)}%`)}else i.setAttribute("aria-valuenow",i.value);(G.isWebKit||G.isIPadOS)&&i.style.setProperty("--value",i.value/i.max*100+"%")}},updateSeekTooltip(e){var i,t;if(!this.config.tooltips.seek||!l.element(this.elements.inputs.seek)||!l.element(this.elements.display.seekTooltip)||this.duration===0)return;const s=this.elements.display.seekTooltip,n=`${this.config.classNames.tooltip}--visible`,r=d=>D(s,n,d);if(this.touch)return void r(!1);let a=0;const o=this.elements.progress.getBoundingClientRect();if(l.event(e))a=100/o.width*(e.pageX-o.left);else{if(!Fe(s,n))return;a=parseFloat(s.style.left,10)}a<0?a=0:a>100&&(a=100);const c=this.duration/100*a;s.innerText=w.formatTime(c);const u=(i=this.config.markers)===null||i===void 0||(t=i.points)===null||t===void 0?void 0:t.find(({time:d})=>d===Math.round(c));u&&s.insertAdjacentHTML("afterbegin",`${u.label}
`),s.style.left=`${a}%`,l.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&r(e.type==="mouseenter")},timeUpdate(e){const i=!l.element(this.elements.display.duration)&&this.config.invertTime;w.updateTimeDisplay.call(this,this.elements.display.currentTime,i?this.duration-this.currentTime:this.currentTime,i),e&&e.type==="timeupdate"&&this.media.seeking||w.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return de(this.elements.display.currentTime,!0),void de(this.elements.progress,!0);l.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=l.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&w.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&w.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&w.setMarkers.call(this),w.updateSeekTooltip.call(this)},toggleMenuButton(e,i){de(this.elements.settings.buttons[e],!i)},updateSetting(e,i,t){const s=this.elements.settings.panels[e];let n=null,r=i;if(e==="captions")n=this.currentTrack;else{if(n=l.empty(t)?this[e]:t,l.empty(n)&&(n=this.config[e].default),!l.empty(this.options[e])&&!this.options[e].includes(n))return void this.debug.warn(`Unsupported value of '${n}' for ${e}`);if(!this.config[e].options.includes(n))return void this.debug.warn(`Disabled value of '${n}' for ${e}`)}if(l.element(r)||(r=s&&s.querySelector('[role="menu"]')),!l.element(r))return;this.elements.settings.buttons[e].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=w.getLabel.call(this,e,n);const a=r&&r.querySelector(`[value="${n}"]`);l.element(a)&&(a.checked=!0)},getLabel(e,i){switch(e){case"speed":return i===1?Y.get("normal",this.config):`${i}×`;case"quality":if(l.number(i)){const t=Y.get(`qualityLabel.${i}`,this.config);return t.length?t:`${i}p`}return bi(i);case"captions":return H.getLabel.call(this);default:return null}},setQualityMenu(e){if(!l.element(this.elements.settings.panels.quality))return;const i="quality",t=this.elements.settings.panels.quality.querySelector('[role="menu"]');l.array(e)&&(this.options.quality=vt(e).filter(r=>this.config.quality.options.includes(r)));const s=!l.empty(this.options.quality)&&this.options.quality.length>1;if(w.toggleMenuButton.call(this,i,s),Re(t),w.checkMenu.call(this),!s)return;const n=r=>{const a=Y.get(`qualityBadge.${r}`,this.config);return a.length?w.createBadge.call(this,a):null};this.options.quality.sort((r,a)=>{const o=this.config.quality.options;return o.indexOf(r)>o.indexOf(a)?1:-1}).forEach(r=>{w.createMenuItem.call(this,{value:r,list:t,type:i,title:w.getLabel.call(this,"quality",r),badge:n(r)})}),w.updateSetting.call(this,i,t)},setCaptionsMenu(){if(!l.element(this.elements.settings.panels.captions))return;const e="captions",i=this.elements.settings.panels.captions.querySelector('[role="menu"]'),t=H.getTracks.call(this),s=!!t.length;if(w.toggleMenuButton.call(this,e,s),Re(i),w.checkMenu.call(this),!s)return;const n=t.map((r,a)=>({value:a,checked:this.captions.toggled&&this.currentTrack===a,title:H.getLabel.call(this,r),badge:r.language&&w.createBadge.call(this,r.language.toUpperCase()),list:i,type:"language"}));n.unshift({value:-1,checked:!this.captions.toggled,title:Y.get("disabled",this.config),list:i,type:"language"}),n.forEach(w.createMenuItem.bind(this)),w.updateSetting.call(this,e,i)},setSpeedMenu(){if(!l.element(this.elements.settings.panels.speed))return;const e="speed",i=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(s=>s>=this.minimumSpeed&&s<=this.maximumSpeed);const t=!l.empty(this.options.speed)&&this.options.speed.length>1;w.toggleMenuButton.call(this,e,t),Re(i),w.checkMenu.call(this),t&&(this.options.speed.forEach(s=>{w.createMenuItem.call(this,{value:s,list:i,type:e,title:w.getLabel.call(this,"speed",s)})}),w.updateSetting.call(this,e,i))},checkMenu(){const{buttons:e}=this.elements.settings,i=!l.empty(e)&&Object.values(e).some(t=>!t.hidden);de(this.elements.settings.menu,!i)},focusFirstMenuItem(e,i=!1){if(this.elements.settings.popup.hidden)return;let t=e;l.element(t)||(t=Object.values(this.elements.settings.panels).find(n=>!n.hidden));const s=t.querySelector('[role^="menuitem"]');Je.call(this,s,i)},toggleMenu(e){const{popup:i}=this.elements.settings,t=this.elements.buttons.settings;if(!l.element(i)||!l.element(t))return;const{hidden:s}=i;let n=s;if(l.boolean(e))n=e;else if(l.keyboardEvent(e)&&e.key==="Escape")n=!1;else if(l.event(e)){const r=l.function(e.composedPath)?e.composedPath()[0]:e.target,a=i.contains(r);if(a||!a&&e.target!==t&&n)return}t.setAttribute("aria-expanded",n),de(i,!n),D(this.elements.container,this.config.classNames.menu.open,n),n&&l.keyboardEvent(e)?w.focusFirstMenuItem.call(this,null,!0):n||s||Je.call(this,t,l.keyboardEvent(e))},getMenuSize(e){const i=e.cloneNode(!0);i.style.position="absolute",i.style.opacity=0,i.removeAttribute("hidden"),e.parentNode.appendChild(i);const t=i.scrollWidth,s=i.scrollHeight;return re(i),{width:t,height:s}},showMenuPanel(e="",i=!1){const t=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!l.element(t))return;const s=t.parentNode,n=Array.from(s.children).find(r=>!r.hidden);if(z.transitions&&!z.reducedMotion){s.style.width=`${n.scrollWidth}px`,s.style.height=`${n.scrollHeight}px`;const r=w.getMenuSize.call(this,t),a=o=>{o.target===s&&["width","height"].includes(o.propertyName)&&(s.style.width="",s.style.height="",Ke.call(this,s,yt,a))};q.call(this,s,yt,a),s.style.width=`${r.width}px`,s.style.height=`${r.height}px`}de(n,!0),de(t,!1),w.focusFirstMenuItem.call(this,t,i)},setDownloadUrl(){const e=this.elements.buttons.download;l.element(e)&&e.setAttribute("href",this.download)},create(e){const{bindMenuItemShortcuts:i,createButton:t,createProgress:s,createRange:n,createTime:r,setQualityMenu:a,setSpeedMenu:o,showMenuPanel:c}=w;this.elements.controls=null,l.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(t.call(this,"play-large"));const u=S("div",te(this.config.selectors.controls.wrapper));this.elements.controls=u;const d={class:"plyr__controls__item"};return vt(l.array(this.config.controls)?this.config.controls:[]).forEach(p=>{if(p==="restart"&&u.appendChild(t.call(this,"restart",d)),p==="rewind"&&u.appendChild(t.call(this,"rewind",d)),p==="play"&&u.appendChild(t.call(this,"play",d)),p==="fast-forward"&&u.appendChild(t.call(this,"fast-forward",d)),p==="progress"){const h=S("div",{class:`${d.class} plyr__progress__container`}),g=S("div",te(this.config.selectors.progress));if(g.appendChild(n.call(this,"seek",{id:`plyr-seek-${e.id}`})),g.appendChild(s.call(this,"buffer")),this.config.tooltips.seek){const k=S("span",{class:this.config.classNames.tooltip},"00:00");g.appendChild(k),this.elements.display.seekTooltip=k}this.elements.progress=g,h.appendChild(this.elements.progress),u.appendChild(h)}if(p==="current-time"&&u.appendChild(r.call(this,"currentTime",d)),p==="duration"&&u.appendChild(r.call(this,"duration",d)),p==="mute"||p==="volume"){let{volume:h}=this.elements;if(l.element(h)&&u.contains(h)||(h=S("div",U({},d,{class:`${d.class} plyr__volume`.trim()})),this.elements.volume=h,u.appendChild(h)),p==="mute"&&h.appendChild(t.call(this,"mute")),p==="volume"&&!G.isIos&&!G.isIPadOS){const g={max:1,step:.05,value:this.config.volume};h.appendChild(n.call(this,"volume",U(g,{id:`plyr-volume-${e.id}`})))}}if(p==="captions"&&u.appendChild(t.call(this,"captions",d)),p==="settings"&&!l.empty(this.config.settings)){const h=S("div",U({},d,{class:`${d.class} plyr__menu`.trim(),hidden:""}));h.appendChild(t.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${e.id}`,"aria-expanded":!1}));const g=S("div",{class:"plyr__menu__container",id:`plyr-settings-${e.id}`,hidden:""}),k=S("div"),A=S("div",{id:`plyr-settings-${e.id}-home`}),T=S("div",{role:"menu"});A.appendChild(T),k.appendChild(A),this.elements.settings.panels.home=A,this.config.settings.forEach(b=>{const y=S("button",U(te(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));i.call(this,y,b),q.call(this,y,"click",()=>{c.call(this,b,!1)});const $=S("span",null,Y.get(b,this.config)),j=S("span",{class:this.config.classNames.menu.value});j.innerHTML=e[b],$.appendChild(j),y.appendChild($),T.appendChild(y);const B=S("div",{id:`plyr-settings-${e.id}-${b}`,hidden:""}),M=S("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});M.appendChild(S("span",{"aria-hidden":!0},Y.get(b,this.config))),M.appendChild(S("span",{class:this.config.classNames.hidden},Y.get("menuBack",this.config))),q.call(this,B,"keydown",m=>{m.key==="ArrowLeft"&&(m.preventDefault(),m.stopPropagation(),c.call(this,"home",!0))},!1),q.call(this,M,"click",()=>{c.call(this,"home",!1)}),B.appendChild(M),B.appendChild(S("div",{role:"menu"})),k.appendChild(B),this.elements.settings.buttons[b]=y,this.elements.settings.panels[b]=B}),g.appendChild(k),h.appendChild(g),u.appendChild(h),this.elements.settings.popup=g,this.elements.settings.menu=h}if(p==="pip"&&z.pip&&u.appendChild(t.call(this,"pip",d)),p==="airplay"&&z.airplay&&u.appendChild(t.call(this,"airplay",d)),p==="download"){const h=U({},d,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(h.download="");const{download:g}=this.config.urls;!l.url(g)&&this.isEmbed&&U(h,{icon:`logo-${this.provider}`,label:this.provider}),u.appendChild(t.call(this,"download",h))}p==="fullscreen"&&u.appendChild(t.call(this,"fullscreen",d))}),this.isHTML5&&a.call(this,le.getQualityOptions.call(this)),o.call(this),u},inject(){if(this.config.loadSprite){const n=w.getIconUrl.call(this);n.cors&&yi(n.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let e=null;this.elements.controls=null;const i={id:this.id,seektime:this.config.seekTime,title:this.config.title};let t=!0;l.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,i)),this.config.controls||(this.config.controls=[]),l.element(this.config.controls)||l.string(this.config.controls)?e=this.config.controls:(e=w.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:H.getLabel.call(this)}),t=!1);let s;if(t&&l.string(this.config.controls)&&(e=(n=>{let r=n;return Object.entries(i).forEach(([a,o])=>{r=Ae(r,`{${a}}`,o)}),r})(e)),l.string(this.config.selectors.controls.container)&&(s=document.querySelector(this.config.selectors.controls.container)),l.element(s)||(s=this.elements.container),s[l.element(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),l.element(this.elements.controls)||w.findElements.call(this),!l.empty(this.elements.buttons)){const n=r=>{const a=this.config.classNames.controlPressed;r.setAttribute("aria-pressed","false"),Object.defineProperty(r,"pressed",{configurable:!0,enumerable:!0,get:()=>Fe(r,a),set(o=!1){D(r,a,o),r.setAttribute("aria-pressed",o?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach(r=>{l.array(r)||l.nodeList(r)?Array.from(r).filter(Boolean).forEach(n):n(r)})}if(G.isEdge&&ui(s),this.config.tooltips.controls){const{classNames:n,selectors:r}=this.config,a=`${r.controls.wrapper} ${r.labels} .${n.hidden}`,o=Ce.call(this,a);Array.from(o).forEach(c=>{D(c,this.config.classNames.hidden,!1),D(c,this.config.classNames.tooltip,!0)})}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch{}},setMarkers(){var e,i;if(!this.duration||this.elements.markers)return;const t=(e=this.config.markers)===null||e===void 0||(i=e.points)===null||i===void 0?void 0:i.filter(({time:c})=>c>0&&cD(r,a,c);t.forEach(c=>{const u=S("span",{class:this.config.classNames.marker},""),d=c.time/this.duration*100+"%";r&&(u.addEventListener("mouseenter",()=>{c.label||(r.style.left=d,r.innerHTML=c.label,o(!0))}),u.addEventListener("mouseleave",()=>{o(!1)})),u.addEventListener("click",()=>{this.currentTime=c.time}),u.style.left=d,n.appendChild(u)}),s.appendChild(n),this.config.tooltips.seek||(r=S("span",{class:this.config.classNames.tooltip},""),s.appendChild(r)),this.elements.markers={points:n,tip:r},this.elements.progress.appendChild(s)}};function vi(e,i=!0){let t=e;if(i){const s=document.createElement("a");s.href=t,t=s.href}try{return new URL(t)}catch{return null}}function ki(e){const i=new URLSearchParams;return l.object(e)&&Object.entries(e).forEach(([t,s])=>{i.set(t,s)}),i}const H={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!z.textTracks)return void(l.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&w.setCaptionsMenu.call(this));if(l.element(this.elements.captions)||(this.elements.captions=S("div",te(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),xs(this.elements.captions,this.elements.wrapper)),G.isIE&&window.URL){const s=this.media.querySelectorAll("track");Array.from(s).forEach(n=>{const r=n.getAttribute("src"),a=vi(r);a!==null&&a.hostname!==window.location.href.hostname&&["http:","https:"].includes(a.protocol)&&$e(r,"blob").then(o=>{n.setAttribute("src",window.URL.createObjectURL(o))}).catch(()=>{re(n)})})}const e=vt((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(s=>s.split("-")[0]));let i=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();i==="auto"&&([i]=e);let t=this.storage.get("captions");if(l.boolean(t)||({active:t}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:t,language:i,languages:e}),this.isHTML5){const s=this.config.captions.update?"addtrack removetrack":"removetrack";q.call(this,this.media.textTracks,s,H.update.bind(this))}setTimeout(H.update.bind(this),0)},update(){const e=H.getTracks.call(this,!0),{active:i,language:t,meta:s,currentTrackNode:n}=this.captions,r=!!e.find(a=>a.language===t);this.isHTML5&&this.isVideo&&e.filter(a=>!s.get(a)).forEach(a=>{this.debug.log("Track added",a),s.set(a,{default:a.mode==="showing"}),a.mode==="showing"&&(a.mode="hidden"),q.call(this,a,"cuechange",()=>H.updateCues.call(this))}),(r&&this.language!==t||!e.includes(n))&&(H.setLanguage.call(this,t),H.toggle.call(this,i&&r)),this.elements&&D(this.elements.container,this.config.classNames.captions.enabled,!l.empty(e)),l.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&w.setCaptionsMenu.call(this)},toggle(e,i=!0){if(!this.supported.ui)return;const{toggled:t}=this.captions,s=this.config.classNames.captions.active,n=l.nullOrUndefined(e)?!t:e;if(n!==t){if(i||(this.captions.active=n,this.storage.set({captions:n})),!this.language&&n&&!i){const r=H.getTracks.call(this),a=H.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=a.language,void H.set.call(this,r.indexOf(a))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=n),D(this.elements.container,s,n),this.captions.toggled=n,w.updateSetting.call(this,"captions"),P.call(this,this.media,n?"captionsenabled":"captionsdisabled")}setTimeout(()=>{n&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(e,i=!0){const t=H.getTracks.call(this);if(e!==-1)if(l.number(e))if(e in t){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const s=t[e],{language:n}=s||{};this.captions.currentTrackNode=s,w.updateSetting.call(this,"captions"),i||(this.captions.language=n,this.storage.set({language:n})),this.isVimeo&&this.embed.enableTextTrack(n),P.call(this,this.media,"languagechange")}H.toggle.call(this,!0,i),this.isHTML5&&this.isVideo&&H.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else H.toggle.call(this,!1,i)},setLanguage(e,i=!0){if(!l.string(e))return void this.debug.warn("Invalid language argument",e);const t=e.toLowerCase();this.captions.language=t;const s=H.getTracks.call(this),n=H.findTrack.call(this,[t]);H.set.call(this,s.indexOf(n),i)},getTracks(e=!1){return Array.from((this.media||{}).textTracks||[]).filter(i=>!this.isHTML5||e||this.captions.meta.has(i)).filter(i=>["captions","subtitles"].includes(i.kind))},findTrack(e,i=!1){const t=H.getTracks.call(this),s=a=>Number((this.captions.meta.get(a)||{}).default),n=Array.from(t).sort((a,o)=>s(o)-s(a));let r;return e.every(a=>(r=n.find(o=>o.language===a),!r)),r||(i?n[0]:void 0)},getCurrentTrack(){return H.getTracks.call(this)[this.currentTrack]},getLabel(e){let i=e;return!l.track(i)&&z.textTracks&&this.captions.toggled&&(i=H.getCurrentTrack.call(this)),l.track(i)?l.empty(i.label)?l.empty(i.language)?Y.get("enabled",this.config):e.language.toUpperCase():i.label:Y.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!l.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!l.nullOrUndefined(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let i=e;if(!i){const s=H.getCurrentTrack.call(this);i=Array.from((s||{}).activeCues||[]).map(n=>n.getCueAsHTML()).map(Fs)}const t=i.map(s=>s.trim()).join(`
+`);if(t!==this.elements.captions.innerHTML){Re(this.elements.captions);const s=S("span",te(this.config.selectors.caption));s.innerHTML=t,this.elements.captions.appendChild(s),P.call(this,this.media,"cuechange")}}},Ti={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.7.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},Ze={active:"picture-in-picture",inactive:"inline"},oe={html5:"html5",youtube:"youtube",vimeo:"vimeo"},et={audio:"audio",video:"video"};function Ws(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?oe.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?oe.vimeo:null}const tt=()=>{};class Ks{constructor(i=!1){this.enabled=window.console&&i,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):tt}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):tt}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):tt}}class Z{constructor(i){v(this,"onChange",()=>{if(!this.supported)return;const t=this.player.elements.buttons.fullscreen;l.element(t)&&(t.pressed=this.active);const s=this.target===this.player.media?this.target:this.player.elements.container;P.call(this.player,s,this.active?"enterfullscreen":"exitfullscreen",!0)}),v(this,"toggleFallback",(t=!1)=>{if(t?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",D(this.target,this.player.config.classNames.fullscreen.fallback,t),G.isIos){let s=document.head.querySelector('meta[name="viewport"]');const n="viewport-fit=cover";s||(s=document.createElement("meta"),s.setAttribute("name","viewport"));const r=l.string(s.content)&&s.content.includes(n);t?(this.cleanupViewport=!r,r||(s.content+=`,${n}`)):this.cleanupViewport&&(s.content=s.content.split(",").filter(a=>a.trim()!==n).join(","))}this.onChange()}),v(this,"trapFocus",t=>{if(G.isIos||G.isIPadOS||!this.active||t.key!=="Tab")return;const s=document.activeElement,n=Ce.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[r]=n,a=n[n.length-1];s!==a||t.shiftKey?s===r&&t.shiftKey&&(a.focus(),t.preventDefault()):(r.focus(),t.preventDefault())}),v(this,"update",()=>{if(this.supported){let t;t=this.forceFallback?"Fallback (forced)":Z.nativeSupported?"Native":"Fallback",this.player.debug.log(`${t} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");D(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),v(this,"enter",()=>{this.supported&&(G.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Z.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?l.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),v(this,"exit",()=>{if(this.supported)if(G.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),ie(this.player.play());else if(!Z.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!l.empty(this.prefix)){const t=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${t}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),v(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=i,this.prefix=Z.prefix,this.property=Z.property,this.scrollPosition={x:0,y:0},this.forceFallback=i.config.fullscreen.fallback==="force",this.player.elements.fullscreen=i.config.fullscreen.container&&Ls(this.player.elements.container,i.config.fullscreen.container),q.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),q.call(this.player,this.player.elements.container,"dblclick",t=>{l.element(this.player.elements.controls)&&this.player.elements.controls.contains(t.target)||this.player.listeners.proxy(t,this.toggle,"fullscreen")}),q.call(this,this.player.elements.container,"keydown",t=>this.trapFocus(t)),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return Z.nativeSupported&&!this.forceFallback}static get prefix(){if(l.function(document.exitFullscreen))return"";let i="";return["webkit","moz","ms"].some(t=>!(!l.function(document[`${t}ExitFullscreen`])&&!l.function(document[`${t}CancelFullScreen`]))&&(i=t,!0)),i}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,Z.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Z.nativeSupported||!G.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Z.nativeSupported||this.forceFallback)return Fe(this.target,this.player.config.classNames.fullscreen.fallback);const i=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return i&&i.shadowRoot?i===this.target.getRootNode().host:i===this.target}get target(){return G.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function qe(e,i=1){return new Promise((t,s)=>{const n=new Image,r=()=>{delete n.onload,delete n.onerror,(n.naturalWidth>=i?t:s)(n)};Object.assign(n,{onload:r,onerror:r,src:e})})}const V={addStyleHook(){D(this.elements.container,this.config.selectors.container.replace(".",""),!0),D(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(e=!1){e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void V.toggleNativeControls.call(this,!0);l.element(this.elements.controls)||(w.inject.call(this),this.listeners.controls()),V.toggleNativeControls.call(this),this.isHTML5&&H.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,w.updateVolume.call(this),w.timeUpdate.call(this),w.durationUpdate.call(this),V.checkPlaying.call(this),D(this.elements.container,this.config.classNames.pip.supported,z.pip&&this.isHTML5&&this.isVideo),D(this.elements.container,this.config.classNames.airplay.supported,z.airplay&&this.isHTML5),D(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{P.call(this,this.media,"ready")},0),V.setTitle.call(this),this.poster&&V.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&w.durationUpdate.call(this),this.config.mediaMetadata&&w.setMediaMetadata.call(this)},setTitle(){let e=Y.get("play",this.config);if(l.string(this.config.title)&&!l.empty(this.config.title)&&(e+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(i=>{i.setAttribute("aria-label",e)}),this.isEmbed){const i=K.call(this,"iframe");if(!l.element(i))return;const t=l.empty(this.config.title)?"video":this.config.title,s=Y.get("frameTitle",this.config);i.setAttribute("title",s.replace("{title}",t))}},togglePoster(e){D(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e,i=!0){return i&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),js.call(this).then(()=>qe(e)).catch(t=>{throw e===this.poster&&V.togglePoster.call(this,!1),t}).then(()=>{if(e!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${e}')`,backgroundSize:""}),V.togglePoster.call(this,!0),e)))},checkPlaying(e){D(this.elements.container,this.config.classNames.playing,this.playing),D(this.elements.container,this.config.classNames.paused,this.paused),D(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(i=>{Object.assign(i,{pressed:this.playing}),i.setAttribute("aria-label",Y.get(this.playing?"pause":"play",this.config))}),l.event(e)&&e.type==="timeupdate"||V.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{D(this.elements.container,this.config.classNames.loading,this.loading),V.toggleControls.call(this)},this.loading?250:0)},toggleControls(e){const{controls:i}=this.elements;if(i&&this.config.hideControls){const t=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(e||this.loading||this.paused||i.pressed||i.hover||t))}},migrateStyles(){Object.values({...this.media.style}).filter(e=>!l.empty(e)&&l.string(e)&&e.startsWith("--plyr")).forEach(e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)}),l.empty(this.media.style)&&this.media.removeAttribute("style")}};class Ys{constructor(i){v(this,"firstTouch",()=>{const{player:t}=this,{elements:s}=t;t.touch=!0,D(s.container,t.config.classNames.isTouch,!0)}),v(this,"global",(t=!0)=>{const{player:s}=this;s.config.keyboard.global&&Ee.call(s,window,"keydown keyup",this.handleKey,t,!1),Ee.call(s,document.body,"click",this.toggleMenu,t),Mt.call(s,document.body,"touchstart",this.firstTouch)}),v(this,"container",()=>{const{player:t}=this,{config:s,elements:n,timers:r}=t;!s.keyboard.global&&s.keyboard.focused&&q.call(t,n.container,"keydown keyup",this.handleKey,!1),q.call(t,n.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",c=>{const{controls:u}=n;u&&c.type==="enterfullscreen"&&(u.pressed=!1,u.hover=!1);let d=0;["touchstart","touchmove","mousemove"].includes(c.type)&&(V.toggleControls.call(t,!0),d=t.touch?3e3:2e3),clearTimeout(r.controls),r.controls=setTimeout(()=>V.toggleControls.call(t,!1),d)});const a=()=>{if(!t.isVimeo||t.config.vimeo.premium)return;const c=n.wrapper,{active:u}=t.fullscreen,[d,p]=Nt.call(t),h=mi(`aspect-ratio: ${d} / ${p}`);if(!u)return void(h?(c.style.width=null,c.style.height=null):(c.style.maxWidth=null,c.style.margin=null));const[g,k]=Rs(),A=g/k>d/p;h?(c.style.width=A?"auto":"100%",c.style.height=A?"100%":"auto"):(c.style.maxWidth=A?k/p*d+"px":null,c.style.margin=A?"0 auto":null)},o=()=>{clearTimeout(r.resized),r.resized=setTimeout(a,50)};q.call(t,n.container,"enterfullscreen exitfullscreen",c=>{const{target:u}=t.fullscreen;u===n.container&&(!t.isEmbed&&l.empty(t.config.ratio)||(a(),(c.type==="enterfullscreen"?q:Ke).call(t,window,"resize",o)))})}),v(this,"media",()=>{const{player:t}=this,{elements:s}=t;if(q.call(t,t.media,"timeupdate seeking seeked",r=>w.timeUpdate.call(t,r)),q.call(t,t.media,"durationchange loadeddata loadedmetadata",r=>w.durationUpdate.call(t,r)),q.call(t,t.media,"ended",()=>{t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())}),q.call(t,t.media,"progress playing seeking seeked",r=>w.updateProgress.call(t,r)),q.call(t,t.media,"volumechange",r=>w.updateVolume.call(t,r)),q.call(t,t.media,"playing play pause ended emptied timeupdate",r=>V.checkPlaying.call(t,r)),q.call(t,t.media,"waiting canplay seeked playing",r=>V.checkLoading.call(t,r)),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){const r=K.call(t,`.${t.config.classNames.video}`);if(!l.element(r))return;q.call(t,s.container,"click",a=>{([s.container,r].includes(a.target)||r.contains(a.target))&&(t.touch&&t.config.hideControls||(t.ended?(this.proxy(a,t.restart,"restart"),this.proxy(a,()=>{ie(t.play())},"play")):this.proxy(a,()=>{ie(t.togglePlay())},"play")))})}t.supported.ui&&t.config.disableContextMenu&&q.call(t,s.wrapper,"contextmenu",r=>{r.preventDefault()},!1),q.call(t,t.media,"volumechange",()=>{t.storage.set({volume:t.volume,muted:t.muted})}),q.call(t,t.media,"ratechange",()=>{w.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),q.call(t,t.media,"qualitychange",r=>{w.updateSetting.call(t,"quality",null,r.detail.quality)}),q.call(t,t.media,"ready qualitychange",()=>{w.setDownloadUrl.call(t)});const n=t.config.events.concat(["keyup","keydown"]).join(" ");q.call(t,t.media,n,r=>{let{detail:a={}}=r;r.type==="error"&&(a=t.media.error),P.call(t,s.container,r.type,!0,a)})}),v(this,"proxy",(t,s,n)=>{const{player:r}=this,a=r.config.listeners[n];let o=!0;l.function(a)&&(o=a.call(r,t)),o!==!1&&l.function(s)&&s.call(r,t)}),v(this,"bind",(t,s,n,r,a=!0)=>{const{player:o}=this,c=o.config.listeners[r],u=l.function(c);q.call(o,t,s,d=>this.proxy(d,n,r),a&&!u)}),v(this,"controls",()=>{const{player:t}=this,{elements:s}=t,n=G.isIE?"change":"input";if(s.buttons.play&&Array.from(s.buttons.play).forEach(r=>{this.bind(r,"click",()=>{ie(t.togglePlay())},"play")}),this.bind(s.buttons.restart,"click",t.restart,"restart"),this.bind(s.buttons.rewind,"click",()=>{t.lastSeekTime=Date.now(),t.rewind()},"rewind"),this.bind(s.buttons.fastForward,"click",()=>{t.lastSeekTime=Date.now(),t.forward()},"fastForward"),this.bind(s.buttons.mute,"click",()=>{t.muted=!t.muted},"mute"),this.bind(s.buttons.captions,"click",()=>t.toggleCaptions()),this.bind(s.buttons.download,"click",()=>{P.call(t,t.media,"download")},"download"),this.bind(s.buttons.fullscreen,"click",()=>{t.fullscreen.toggle()},"fullscreen"),this.bind(s.buttons.pip,"click",()=>{t.pip="toggle"},"pip"),this.bind(s.buttons.airplay,"click",t.airplay,"airplay"),this.bind(s.buttons.settings,"click",r=>{r.stopPropagation(),r.preventDefault(),w.toggleMenu.call(t,r)},null,!1),this.bind(s.buttons.settings,"keyup",r=>{[" ","Enter"].includes(r.key)&&(r.key!=="Enter"?(r.preventDefault(),r.stopPropagation(),w.toggleMenu.call(t,r)):w.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(s.settings.menu,"keydown",r=>{r.key==="Escape"&&w.toggleMenu.call(t,r)}),this.bind(s.inputs.seek,"mousedown mousemove",r=>{const a=s.progress.getBoundingClientRect(),o=100/a.width*(r.pageX-a.left);r.currentTarget.setAttribute("seek-value",o)}),this.bind(s.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",r=>{const a=r.currentTarget,o="play-on-seeked";if(l.keyboardEvent(r)&&!["ArrowLeft","ArrowRight"].includes(r.key))return;t.lastSeekTime=Date.now();const c=a.hasAttribute(o),u=["mouseup","touchend","keyup"].includes(r.type);c&&u?(a.removeAttribute(o),ie(t.play())):!u&&t.playing&&(a.setAttribute(o,""),t.pause())}),G.isIos){const r=Ce.call(t,'input[type="range"]');Array.from(r).forEach(a=>this.bind(a,n,o=>ui(o.target)))}this.bind(s.inputs.seek,n,r=>{const a=r.currentTarget;let o=a.getAttribute("seek-value");l.empty(o)&&(o=a.value),a.removeAttribute("seek-value"),t.currentTime=o/a.max*t.duration},"seek"),this.bind(s.progress,"mouseenter mouseleave mousemove",r=>w.updateSeekTooltip.call(t,r)),this.bind(s.progress,"mousemove touchmove",r=>{const{previewThumbnails:a}=t;a&&a.loaded&&a.startMove(r)}),this.bind(s.progress,"mouseleave touchend click",()=>{const{previewThumbnails:r}=t;r&&r.loaded&&r.endMove(!1,!0)}),this.bind(s.progress,"mousedown touchstart",r=>{const{previewThumbnails:a}=t;a&&a.loaded&&a.startScrubbing(r)}),this.bind(s.progress,"mouseup touchend",r=>{const{previewThumbnails:a}=t;a&&a.loaded&&a.endScrubbing(r)}),G.isWebKit&&Array.from(Ce.call(t,'input[type="range"]')).forEach(r=>{this.bind(r,"input",a=>w.updateRangeFill.call(t,a.target))}),t.config.toggleInvert&&!l.element(s.display.duration)&&this.bind(s.display.currentTime,"click",()=>{t.currentTime!==0&&(t.config.invertTime=!t.config.invertTime,w.timeUpdate.call(t))}),this.bind(s.inputs.volume,n,r=>{t.volume=r.target.value},"volume"),this.bind(s.controls,"mouseenter mouseleave",r=>{s.controls.hover=!t.touch&&r.type==="mouseenter"}),s.fullscreen&&Array.from(s.fullscreen.children).filter(r=>!r.contains(s.container)).forEach(r=>{this.bind(r,"mouseenter mouseleave",a=>{s.controls&&(s.controls.hover=!t.touch&&a.type==="mouseenter")})}),this.bind(s.controls,"mousedown mouseup touchstart touchend touchcancel",r=>{s.controls.pressed=["mousedown","touchstart"].includes(r.type)}),this.bind(s.controls,"focusin",()=>{const{config:r,timers:a}=t;D(s.controls,r.classNames.noTransition,!0),V.toggleControls.call(t,!0),setTimeout(()=>{D(s.controls,r.classNames.noTransition,!1)},0);const o=this.touch?3e3:4e3;clearTimeout(a.controls),a.controls=setTimeout(()=>V.toggleControls.call(t,!1),o)}),this.bind(s.inputs.volume,"wheel",r=>{const a=r.webkitDirectionInvertedFromDevice,[o,c]=[r.deltaX,-r.deltaY].map(p=>a?-p:p),u=Math.sign(Math.abs(o)>Math.abs(c)?o:c);t.increaseVolume(u/50);const{volume:d}=t.media;(u===1&&d<1||u===-1&&d>0)&&r.preventDefault()},"volume",!1)}),this.player=i,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(i){const{player:t}=this,{elements:s}=t,{key:n,type:r,altKey:a,ctrlKey:o,metaKey:c,shiftKey:u}=i,d=r==="keydown",p=d&&n===this.lastKey;if(!(a||o||c||u)&&n){if(d){const g=document.activeElement;if(l.element(g)){const{editable:k}=t.config.selectors,{seek:A}=s.inputs;if(g!==A&&pe(g,k)||i.key===" "&&pe(g,'button, [role^="menuitem"]'))return}switch([" ","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(n)&&(i.preventDefault(),i.stopPropagation()),n){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":p||(h=parseInt(n,10),t.currentTime=t.duration/10*h);break;case" ":case"k":p||ie(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":t.decreaseVolume(.1);break;case"m":p||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":p||t.toggleCaptions();break;case"l":t.loop=!t.loop}n==="Escape"&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=n}else this.lastKey=null;var h}}toggleMenu(i){w.toggleMenu.call(this.player,i)}}function Gs(e,i){return e(i={exports:{}},i.exports),i.exports}var Xs=Gs(function(e,i){e.exports=function(){var t=function(){},s={},n={},r={};function a(h,g){h=h.push?h:[h];var k,A,T,b=[],y=h.length,$=y;for(k=function(j,B){B.length&&b.push(j),--$||g(b)};y--;)A=h[y],(T=n[A])?k(A,T):(r[A]=r[A]||[]).push(k)}function o(h,g){if(h){var k=r[h];if(n[h]=g,k)for(;k.length;)k[0](h,g),k.splice(0,1)}}function c(h,g){h.call&&(h={success:h}),g.length?(h.error||t)(g):(h.success||t)(h)}function u(h,g,k,A){var T,b,y=document,$=k.async,j=(k.numRetries||0)+1,B=k.before||t,M=h.replace(/[\?|#].*$/,""),m=h.replace(/^(css|img)!/,"");A=A||0,/(^css!|\.css$)/.test(M)?((b=y.createElement("link")).rel="stylesheet",b.href=m,(T="hideFocus"in b)&&b.relList&&(T=0,b.rel="preload",b.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(M)?(b=y.createElement("img")).src=m:((b=y.createElement("script")).src=h,b.async=$===void 0||$),b.onload=b.onerror=b.onbeforeload=function(C){var N=C.type[0];if(T)try{b.sheet.cssText.length||(N="e")}catch(E){E.code!=18&&(N="e")}if(N=="e"){if((A+=1){Xs(e,{success:i,error:t})})}function Qs(e){return l.empty(e)?null:l.number(Number(e))?e:e.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:e}function Js(e){const i=e.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return i&&i.length===5?i[4]:null}function ke(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,P.call(this,this.media,e?"play":"pause"))}const Tt={setup(){const e=this;D(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,be.call(e),l.object(window.Vimeo)?Tt.ready.call(e):_t(e.config.urls.vimeo.sdk).then(()=>{Tt.ready.call(e)}).catch(i=>{e.debug.warn("Vimeo SDK (player.js) failed to load",i)})},ready(){const e=this,i=e.config.vimeo,{premium:t,referrerPolicy:s,...n}=i;let r=e.media.getAttribute("src"),a="";l.empty(r)?(r=e.media.getAttribute(e.config.attributes.embed.id),a=e.media.getAttribute(e.config.attributes.embed.hash)):a=Js(r);const o=a?{h:a}:{};t&&Object.assign(n,{controls:!1,sidedock:!1});const c=ki({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:e.config.playsinline,...o,...n}),u=Qs(r),d=S("iframe"),p=kt(e.config.urls.vimeo.iframe,u,c);if(d.setAttribute("src",p),d.setAttribute("allowfullscreen",""),d.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),l.empty(s)||d.setAttribute("referrerPolicy",s),t||!i.customControls)d.setAttribute("data-poster",e.poster),e.media=Be(d,e.media);else{const y=S("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});y.appendChild(d),e.media=Be(y,e.media)}i.customControls||$e(kt(e.config.urls.vimeo.api,p)).then(y=>{!l.empty(y)&&y.thumbnail_url&&V.setPoster.call(e,y.thumbnail_url).catch(()=>{})}),e.embed=new window.Vimeo.Player(d,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(ke.call(e,!0),e.embed.play()),e.media.pause=()=>(ke.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:h}=e.media;Object.defineProperty(e.media,"currentTime",{get:()=>h,set(y){const{embed:$,media:j,paused:B,volume:M}=e,m=B&&!$.hasPlayed;j.seeking=!0,P.call(e,j,"seeking"),Promise.resolve(m&&$.setVolume(0)).then(()=>$.setCurrentTime(y)).then(()=>m&&$.pause()).then(()=>m&&$.setVolume(M)).catch(()=>{})}});let g=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:()=>g,set(y){e.embed.setPlaybackRate(y).then(()=>{g=y,P.call(e,e.media,"ratechange")}).catch(()=>{e.options.speed=[1]})}});let{volume:k}=e.config;Object.defineProperty(e.media,"volume",{get:()=>k,set(y){e.embed.setVolume(y).then(()=>{k=y,P.call(e,e.media,"volumechange")})}});let{muted:A}=e.config;Object.defineProperty(e.media,"muted",{get:()=>A,set(y){const $=!!l.boolean(y)&&y;e.embed.setMuted(!!$||e.config.muted).then(()=>{A=$,P.call(e,e.media,"volumechange")})}});let T,{loop:b}=e.config;Object.defineProperty(e.media,"loop",{get:()=>b,set(y){const $=l.boolean(y)?y:e.config.loop.active;e.embed.setLoop($).then(()=>{b=$})}}),e.embed.getVideoUrl().then(y=>{T=y,w.setDownloadUrl.call(e)}).catch(y=>{this.debug.warn(y)}),Object.defineProperty(e.media,"currentSrc",{get:()=>T}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then(y=>{const[$,j]=y;e.embed.ratio=gi($,j),be.call(this)}),e.embed.setAutopause(e.config.autopause).then(y=>{e.config.autopause=y}),e.embed.getVideoTitle().then(y=>{e.config.title=y,V.setTitle.call(this)}),e.embed.getCurrentTime().then(y=>{h=y,P.call(e,e.media,"timeupdate")}),e.embed.getDuration().then(y=>{e.media.duration=y,P.call(e,e.media,"durationchange")}),e.embed.getTextTracks().then(y=>{e.media.textTracks=y,H.setup.call(e)}),e.embed.on("cuechange",({cues:y=[]})=>{const $=y.map(j=>Bs(j.text));H.updateCues.call(e,$)}),e.embed.on("loaded",()=>{e.embed.getPaused().then(y=>{ke.call(e,!y),y||P.call(e,e.media,"playing")}),l.element(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)}),e.embed.on("bufferstart",()=>{P.call(e,e.media,"waiting")}),e.embed.on("bufferend",()=>{P.call(e,e.media,"playing")}),e.embed.on("play",()=>{ke.call(e,!0),P.call(e,e.media,"playing")}),e.embed.on("pause",()=>{ke.call(e,!1)}),e.embed.on("timeupdate",y=>{e.media.seeking=!1,h=y.seconds,P.call(e,e.media,"timeupdate")}),e.embed.on("progress",y=>{e.media.buffered=y.percent,P.call(e,e.media,"progress"),parseInt(y.percent,10)===1&&P.call(e,e.media,"canplaythrough"),e.embed.getDuration().then($=>{$!==e.media.duration&&(e.media.duration=$,P.call(e,e.media,"durationchange"))})}),e.embed.on("seeked",()=>{e.media.seeking=!1,P.call(e,e.media,"seeked")}),e.embed.on("ended",()=>{e.media.paused=!0,P.call(e,e.media,"ended")}),e.embed.on("error",y=>{e.media.error=y,P.call(e,e.media,"error")}),i.customControls&&setTimeout(()=>V.build.call(e),0)}};function Zs(e){return l.empty(e)?null:e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:e}function Te(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,P.call(this,this.media,e?"play":"pause"))}function en(e){return e.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const He={setup(){if(D(this.elements.wrapper,this.config.classNames.embed,!0),l.object(window.YT)&&l.function(window.YT.Player))He.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{l.function(e)&&e(),He.ready.call(this)},_t(this.config.urls.youtube.sdk).catch(i=>{this.debug.warn("YouTube API failed to load",i)})}},getTitle(e){$e(kt(this.config.urls.youtube.api,e)).then(i=>{if(l.object(i)){const{title:t,height:s,width:n}=i;this.config.title=t,V.setTitle.call(this),this.embed.ratio=gi(n,s)}be.call(this)}).catch(()=>{be.call(this)})},ready(){const e=this,i=e.config.youtube,t=e.media&&e.media.getAttribute("id");if(!l.empty(t)&&t.startsWith("youtube-"))return;let s=e.media.getAttribute("src");l.empty(s)&&(s=e.media.getAttribute(this.config.attributes.embed.id));const n=Zs(s),r=S("div",{id:qs(e.provider),"data-poster":i.customControls?e.poster:void 0});if(e.media=Be(r,e.media),i.customControls){const a=o=>`https://i.ytimg.com/vi/${n}/${o}default.jpg`;qe(a("maxres"),121).catch(()=>qe(a("sd"),121)).catch(()=>qe(a("hq"))).then(o=>V.setPoster.call(e,o.src)).then(o=>{o.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}e.embed=new window.YT.Player(e.media,{videoId:n,host:en(i),playerVars:U({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&i.customControls?0:1,disablekb:1,playsinline:e.config.playsinline&&!e.config.fullscreen.iosNative?1:0,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},i),events:{onError(a){if(!e.media.error){const o=a.data,c={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[o]||"An unknown error occurred";e.media.error={code:o,message:c},P.call(e,e.media,"error")}},onPlaybackRateChange(a){const o=a.target;e.media.playbackRate=o.getPlaybackRate(),P.call(e,e.media,"ratechange")},onReady(a){if(l.function(e.media.play))return;const o=a.target;He.getTitle.call(e,n),e.media.play=()=>{Te.call(e,!0),o.playVideo()},e.media.pause=()=>{Te.call(e,!1),o.pauseVideo()},e.media.stop=()=>{o.stopVideo()},e.media.duration=o.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:()=>Number(o.getCurrentTime()),set(p){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,P.call(e,e.media,"seeking"),o.seekTo(p)}}),Object.defineProperty(e.media,"playbackRate",{get:()=>o.getPlaybackRate(),set(p){o.setPlaybackRate(p)}});let{volume:c}=e.config;Object.defineProperty(e.media,"volume",{get:()=>c,set(p){c=p,o.setVolume(100*c),P.call(e,e.media,"volumechange")}});let{muted:u}=e.config;Object.defineProperty(e.media,"muted",{get:()=>u,set(p){const h=l.boolean(p)?p:u;u=h,o[h?"mute":"unMute"](),o.setVolume(100*c),P.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:()=>o.getVideoUrl()}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration});const d=o.getAvailablePlaybackRates();e.options.speed=d.filter(p=>e.config.speed.options.includes(p)),e.supported.ui&&i.customControls&&e.media.setAttribute("tabindex",-1),P.call(e,e.media,"timeupdate"),P.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval(()=>{e.media.buffered=o.getVideoLoadedFraction(),(e.media.lastBuffered===null||e.media.lastBufferedV.build.call(e),50)},onStateChange(a){const o=a.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(a.data)&&(e.media.seeking=!1,P.call(e,e.media,"seeked")),a.data){case-1:P.call(e,e.media,"timeupdate"),e.media.buffered=o.getVideoLoadedFraction(),P.call(e,e.media,"progress");break;case 0:Te.call(e,!1),e.media.loop?(o.stopVideo(),o.playVideo()):P.call(e,e.media,"ended");break;case 1:i.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(Te.call(e,!0),P.call(e,e.media,"playing"),e.timers.playing=setInterval(()=>{P.call(e,e.media,"timeupdate")},50),e.media.duration!==o.getDuration()&&(e.media.duration=o.getDuration(),P.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),Te.call(e,!1);break;case 3:P.call(e,e.media,"waiting")}P.call(e,e.elements.container,"statechange",!1,{code:a.data})}}})}},Ai={setup(){this.media?(D(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),D(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&D(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=S("div",{class:this.config.classNames.video}),di(this.media,this.elements.wrapper),this.elements.poster=S("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?le.setup.call(this):this.isYouTube?He.setup.call(this):this.isVimeo&&Tt.setup.call(this)):this.debug.warn("No media element found!")}};class tn{constructor(i){v(this,"load",()=>{this.enabled&&(l.object(window.google)&&l.object(window.google.ima)?this.ready():_t(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),v(this,"ready",()=>{var t;this.enabled||((t=this).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),v(this,"setupIMA",()=>{this.elements.container=S("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,t=>this.onAdsManagerLoaded(t),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,t=>this.onAdError(t),!1),this.requestAds()}),v(this,"requestAds",()=>{const{container:t}=this.player.elements;try{const s=new google.ima.AdsRequest;s.adTagUrl=this.tagUrl,s.linearAdSlotWidth=t.offsetWidth,s.linearAdSlotHeight=t.offsetHeight,s.nonLinearAdSlotWidth=t.offsetWidth,s.nonLinearAdSlotHeight=t.offsetHeight,s.forceNonLinearFullSlot=!1,s.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(s)}catch(s){this.onAdError(s)}}),v(this,"pollCountdown",(t=!1)=>{if(!t)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const s=Ye(Math.max(this.manager.getRemainingTime(),0)),n=`${Y.get("advertisement",this.player.config)} - ${s}`;this.elements.container.setAttribute("data-badge-text",n)},100)}),v(this,"onAdsManagerLoaded",t=>{if(!this.enabled)return;const s=new google.ima.AdsRenderingSettings;s.restoreCustomPlaybackStateOnAdBreakComplete=!0,s.enablePreloading=!0,this.manager=t.getAdsManager(this.player,s),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,n=>this.onAdError(n)),Object.keys(google.ima.AdEvent.Type).forEach(n=>{this.manager.addEventListener(google.ima.AdEvent.Type[n],r=>this.onAdEvent(r))}),this.trigger("loaded")}),v(this,"addCuePoints",()=>{l.empty(this.cuePoints)||this.cuePoints.forEach(t=>{if(t!==0&&t!==-1&&t{const{container:s}=this.player.elements,n=t.getAd(),r=t.getAdData();switch((a=>{P.call(this.player,this.player.media,`ads${a.replace(/_/g,"").toLowerCase()}`)})(t.type),t.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),n.isLinear()||(n.width=s.offsetWidth,n.height=s.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:r.adError&&this.player.debug.warn(`Non-fatal ad error: ${r.adError.getMessage()}`)}}),v(this,"onAdError",t=>{this.cancel(),this.player.debug.warn("Ads error",t)}),v(this,"listeners",()=>{const{container:t}=this.player.elements;let s;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{s=this.player.currentTime}),this.player.on("seeked",()=>{const n=this.player.currentTime;l.empty(this.cuePoints)||this.cuePoints.forEach((r,a)=>{s{this.manager&&this.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)})}),v(this,"play",()=>{const{container:t}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(s){this.onAdError(s)}}).catch(()=>{})}),v(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,ie(this.player.media.play())}),v(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),v(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),v(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(t=>{this.on("loaded",t),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),v(this,"trigger",(t,...s)=>{const n=this.events[t];l.array(n)&&n.forEach(r=>{l.function(r)&&r.apply(this,s)})}),v(this,"on",(t,s)=>(l.array(this.events[t])||(this.events[t]=[]),this.events[t].push(s),this)),v(this,"startSafetyTimer",(t,s)=>{this.player.debug.log(`Safety timer invoked from: ${s}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},t)}),v(this,"clearSafetyTimer",t=>{l.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${t}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=i,this.config=i.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((t,s)=>{this.on("loaded",t),this.on("error",s)}),this.load()}get enabled(){const{config:i}=this;return this.player.isHTML5&&this.player.isVideo&&i.enabled&&(!l.empty(i.publisherId)||l.url(i.tagUrl))}get tagUrl(){const{config:i}=this;return l.url(i.tagUrl)?i.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${ki({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:i.publisherId})}`}}function Ci(e=0,i=0,t=255){return Math.min(Math.max(e,i),t)}const sn=e=>{const i=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach(t=>{const s={};t.split(/\r\n|\n|\r/).forEach(n=>{if(l.number(s.startTime)){if(!l.empty(n.trim())&&l.empty(s.text)){const r=n.trim().split("#xywh=");[s.text]=r,r[1]&&([s.x,s.y,s.w,s.h]=r[1].split(","))}}else{const r=n.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);r&&(s.startTime=60*Number(r[1]||0)*60+60*Number(r[2])+Number(r[3])+ +`0.${r[4]}`,s.endTime=60*Number(r[6]||0)*60+60*Number(r[7])+Number(r[8])+ +`0.${r[9]}`)}}),s.text&&i.push(s)}),i},Ut=(e,i)=>{const t={};return e>i.width/i.height?(t.width=i.width,t.height=1/e*i.width):(t.height=i.height,t.width=e*i.height),t};class At{constructor(i){v(this,"load",()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.listeners(),this.loaded=!0)})}),v(this,"getThumbnails",()=>new Promise(t=>{const{src:s}=this.player.config.previewThumbnails;if(l.empty(s))throw new Error("Missing previewThumbnails.src config attribute");const n=()=>{this.thumbnails.sort((r,a)=>r.height-a.height),this.player.debug.log("Preview thumbnails",this.thumbnails),t()};if(l.function(s))s(r=>{this.thumbnails=r,n()});else{const r=(l.string(s)?[s]:s).map(a=>this.getThumbnail(a));Promise.all(r).then(n)}})),v(this,"getThumbnail",t=>new Promise(s=>{$e(t).then(n=>{const r={frames:sn(n),height:null,urlPrefix:""};r.frames[0].text.startsWith("/")||r.frames[0].text.startsWith("http://")||r.frames[0].text.startsWith("https://")||(r.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));const a=new Image;a.onload=()=>{r.height=a.naturalHeight,r.width=a.naturalWidth,this.thumbnails.push(r),s()},a.src=r.urlPrefix+r.frames[0].text})})),v(this,"startMove",t=>{if(this.loaded&&l.event(t)&&["touchmove","mousemove"].includes(t.type)&&this.player.media.duration){if(t.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var s,n;const r=this.player.elements.progress.getBoundingClientRect(),a=100/r.width*(t.pageX-r.left);this.seekTime=this.player.media.duration*(a/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=t.pageX,this.elements.thumb.time.innerText=Ye(this.seekTime);const o=(s=this.player.config.markers)===null||s===void 0||(n=s.points)===null||n===void 0?void 0:n.find(({time:c})=>c===Math.round(this.seekTime));o&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${o.label}
`)}this.showImageAtCurrentTime()}}),v(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),v(this,"startScrubbing",t=>{(l.nullOrUndefined(t.button)||t.button===!1||t.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),v(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):Mt.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),v(this,"listeners",()=>{this.player.on("play",()=>{this.toggleThumbContainer(!1,!0)}),this.player.on("seeked",()=>{this.toggleThumbContainer(!1)}),this.player.on("timeupdate",()=>{this.lastTime=this.player.media.currentTime})}),v(this,"render",()=>{this.elements.thumb.container=S("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=S("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const t=S("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=S("span",{},"00:00"),t.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(t),l.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=S("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),v(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),v(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const t=this.thumbnails[0].frames.findIndex(r=>this.seekTime>=r.startTime&&this.seekTime<=r.endTime),s=t>=0;let n=0;this.mouseDown||this.toggleThumbContainer(s),s&&(this.thumbnails.forEach((r,a)=>{this.loadedImages.includes(r.frames[t].text)&&(n=a)}),t!==this.showingThumb&&(this.showingThumb=t,this.loadImage(n)))}),v(this,"loadImage",(t=0)=>{const s=this.showingThumb,n=this.thumbnails[t],{urlPrefix:r}=n,a=n.frames[s],o=n.frames[s].text,c=r+o;if(this.currentImageElement&&this.currentImageElement.dataset.filename===o)this.showImage(this.currentImageElement,a,t,s,o,!1),this.currentImageElement.dataset.index=s,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const u=new Image;u.src=c,u.dataset.index=s,u.dataset.filename=o,this.showingThumbFilename=o,this.player.debug.log(`Loading image: ${c}`),u.onload=()=>this.showImage(u,a,t,s,o,!0),this.loadingImage=u,this.removeOldImages(u)}}),v(this,"showImage",(t,s,n,r,a,o=!0)=>{this.player.debug.log(`Showing thumb: ${a}. num: ${r}. qual: ${n}. newimg: ${o}`),this.setImageSizeAndOffset(t,s),o&&(this.currentImageContainer.appendChild(t),this.currentImageElement=t,this.loadedImages.includes(a)||this.loadedImages.push(a)),this.preloadNearby(r,!0).then(this.preloadNearby(r,!1)).then(this.getHigherQuality(n,t,s,a))}),v(this,"removeOldImages",t=>{Array.from(this.currentImageContainer.children).forEach(s=>{if(s.tagName.toLowerCase()!=="img")return;const n=this.usingSprites?500:1e3;if(s.dataset.index!==t.dataset.index&&!s.dataset.deleting){s.dataset.deleting=!0;const{currentImageContainer:r}=this;setTimeout(()=>{r.removeChild(s),this.player.debug.log(`Removing thumb: ${s.dataset.filename}`)},n)}})}),v(this,"preloadNearby",(t,s=!0)=>new Promise(n=>{setTimeout(()=>{const r=this.thumbnails[0].frames[t].text;if(this.showingThumbFilename===r){let a;a=s?this.thumbnails[0].frames.slice(t):this.thumbnails[0].frames.slice(0,t).reverse();let o=!1;a.forEach(c=>{const u=c.text;if(u!==r&&!this.loadedImages.includes(u)){o=!0,this.player.debug.log(`Preloading thumb filename: ${u}`);const{urlPrefix:d}=this.thumbnails[0],p=d+u,h=new Image;h.src=p,h.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${u}`),this.loadedImages.includes(u)||this.loadedImages.push(u),n()}}}),o||n()}},300)})),v(this,"getHigherQuality",(t,s,n,r)=>{if(t{this.showingThumbFilename===r&&(this.player.debug.log(`Showing higher quality thumb for: ${r}`),this.loadImage(t+1))},300)}}),v(this,"toggleThumbContainer",(t=!1,s=!1)=>{const n=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(n,t),!t&&s&&(this.showingThumb=null,this.showingThumbFilename=null)}),v(this,"toggleScrubbingContainer",(t=!1)=>{const s=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(s,t),t||(this.showingThumb=null,this.showingThumbFilename=null)}),v(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),v(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:t}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(t.clientHeight>20&&t.clientWidth<20){const s=Math.floor(t.clientHeight*this.thumbAspectRatio);t.style.width=`${s}px`}else if(t.clientHeight<20&&t.clientWidth>20){const s=Math.floor(t.clientWidth/this.thumbAspectRatio);t.style.height=`${s}px`}}else{const s=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);t.style.height=`${this.thumbContainerHeight}px`,t.style.width=`${s}px`}this.setThumbContainerPos()}),v(this,"setThumbContainerPos",()=>{const t=this.player.elements.progress.getBoundingClientRect(),s=this.player.elements.container.getBoundingClientRect(),{container:n}=this.elements.thumb,r=s.left-t.left+10,a=s.right-t.left-n.clientWidth-10,o=this.mousePosX-t.left-n.clientWidth/2,c=Ci(o,r,a);n.style.left=`${c}px`,n.style.setProperty("--preview-arrow-offset",o-c+"px")}),v(this,"setScrubbingContainerSize",()=>{const{width:t,height:s}=Ut(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${t}px`,this.elements.scrubbing.container.style.height=`${s}px`}),v(this,"setImageSizeAndOffset",(t,s)=>{if(!this.usingSprites)return;const n=this.thumbContainerHeight/s.h;t.style.height=t.naturalHeight*n+"px",t.style.width=t.naturalWidth*n+"px",t.style.left=`-${s.x*n}px`,t.style.top=`-${s.y*n}px`}),this.player=i,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:i}=Ut(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return i}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(i){this.mouseDown?this.currentScrubbingImageElement=i:this.currentThumbnailImageElement=i}}const Ct={insertElements(e,i){l.string(i)?Dt(e,this.media,{src:i}):l.array(i)&&i.forEach(t=>{Dt(e,this.media,t)})},change(e){hi(e,"sources.length")?(le.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],re(this.media),this.media=null,l.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:i,type:t}=e,[{provider:s=oe.html5,src:n}]=i,r=s==="html5"?t:"div",a=s==="html5"?{}:{src:n};Object.assign(this,{provider:s,type:t,supported:z.check(t,s,this.config.playsinline),media:S(r,a)}),this.elements.container.appendChild(this.media),l.boolean(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),l.empty(e.poster)||(this.poster=e.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),V.addStyleHook.call(this),this.isHTML5&&Ct.insertElements.call(this,"source",i),this.config.title=e.title,Ai.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&Ct.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&V.build.call(this),this.isHTML5&&this.media.load(),l.empty(e.previewThumbnails)||(Object.assign(this.config.previewThumbnails,e.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new At(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class Pe{constructor(i,t){if(v(this,"play",()=>l.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>ie(this.media.play())),this.media.play()):null),v(this,"pause",()=>this.playing&&l.function(this.media.pause)?this.media.pause():null),v(this,"togglePlay",o=>(l.boolean(o)?o:!this.playing)?this.play():this.pause()),v(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):l.function(this.media.stop)&&this.media.stop()}),v(this,"restart",()=>{this.currentTime=0}),v(this,"rewind",o=>{this.currentTime-=l.number(o)?o:this.config.seekTime}),v(this,"forward",o=>{this.currentTime+=l.number(o)?o:this.config.seekTime}),v(this,"increaseVolume",o=>{const c=this.media.muted?0:this.volume;this.volume=c+(l.number(o)?o:0)}),v(this,"decreaseVolume",o=>{this.increaseVolume(-o)}),v(this,"airplay",()=>{z.airplay&&this.media.webkitShowPlaybackTargetPicker()}),v(this,"toggleControls",o=>{if(this.supported.ui&&!this.isAudio){const c=Fe(this.elements.container,this.config.classNames.hideControls),u=o===void 0?void 0:!o,d=D(this.elements.container,this.config.classNames.hideControls,u);if(d&&l.array(this.config.controls)&&this.config.controls.includes("settings")&&!l.empty(this.config.settings)&&w.toggleMenu.call(this,!1),d!==c){const p=d?"controlshidden":"controlsshown";P.call(this,this.media,p)}return!d}return!1}),v(this,"on",(o,c)=>{q.call(this,this.elements.container,o,c)}),v(this,"once",(o,c)=>{Mt.call(this,this.elements.container,o,c)}),v(this,"off",(o,c)=>{Ke(this.elements.container,o,c)}),v(this,"destroy",(o,c=!1)=>{if(!this.ready)return;const u=()=>{document.body.style.overflow="",this.embed=null,c?(Object.keys(this.elements).length&&(re(this.elements.buttons.play),re(this.elements.captions),re(this.elements.controls),re(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),l.function(o)&&o()):(Os.call(this),le.cancelRequests.call(this),Be(this.elements.original,this.elements.container),P.call(this,this.elements.original,"destroyed",!0),l.function(o)&&o.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(V.toggleNativeControls.call(this,!0),u()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&l.function(this.embed.destroy)&&this.embed.destroy(),u()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(u),setTimeout(u,200))}),v(this,"supports",o=>z.mime.call(this,o)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=z.touch,this.media=i,l.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||l.nodeList(this.media)||l.array(this.media))&&(this.media=this.media[0]),this.config=U({},Ti,Pe.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new Ks(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",z),l.nullOrUndefined(this.media)||!l.element(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!z.check().api)return void this.debug.error("Setup failed: no support");const s=this.media.cloneNode(!0);s.autoplay=!1,this.elements.original=s;const n=this.media.tagName.toLowerCase();let r=null,a=null;switch(n){case"div":if(r=this.media.querySelector("iframe"),l.element(r)){if(a=vi(r.getAttribute("src")),this.provider=Ws(a.toString()),this.elements.container=this.media,this.media=r,this.elements.container.className="",a.search.length){const o=["1","true"];o.includes(a.searchParams.get("autoplay"))&&(this.config.autoplay=!0),o.includes(a.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=o.includes(a.searchParams.get("playsinline")),this.config.youtube.hl=a.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(l.empty(this.provider)||!Object.values(oe).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=et.video;break;case"video":case"audio":this.type=n,this.provider=oe.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=z.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new Ys(this),this.storage=new Se(this),this.media.plyr=this,l.element(this.elements.container)||(this.elements.container=S("div"),di(this.media,this.elements.container)),V.migrateStyles.call(this),V.addStyleHook.call(this),Ai.setup.call(this),this.config.debug&&q.call(this,this.elements.container,this.config.events.join(" "),o=>{this.debug.log(`event: ${o.type}`)}),this.fullscreen=new Z(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&V.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new tn(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>ie(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new At(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===oe.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===oe.youtube}get isVimeo(){return this.provider===oe.vimeo}get isVideo(){return this.type===et.video}get isAudio(){return this.type===et.audio}get playing(){return!!(this.ready&&!this.paused&&!this.ended)}get paused(){return!!this.media.paused}get stopped(){return!!(this.paused&&this.currentTime===0)}get ended(){return!!this.media.ended}set currentTime(i){if(!this.duration)return;const t=l.number(i)&&i>0;this.media.currentTime=t?Math.min(i,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:i}=this.media;return l.number(i)?i:i&&i.length&&this.duration>0?i.end(0)/this.duration:0}get seeking(){return!!this.media.seeking}get duration(){const i=parseFloat(this.config.duration),t=(this.media||{}).duration,s=l.number(t)&&t!==1/0?t:0;return i||s}set volume(i){let t=i;l.string(t)&&(t=Number(t)),l.number(t)||(t=this.storage.get("volume")),l.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!l.empty(i)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(i){let t=i;l.boolean(t)||(t=this.storage.get("muted")),l.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return!!this.media.muted}get hasAudio(){return!this.isHTML5||!!this.isAudio||!!this.media.mozHasAudio||!!this.media.webkitAudioDecodedByteCount||!!(this.media.audioTracks&&this.media.audioTracks.length)}set speed(i){let t=null;l.number(i)&&(t=i),l.number(t)||(t=this.storage.get("speed")),l.number(t)||(t=this.config.speed.selected);const{minimumSpeed:s,maximumSpeed:n}=this;t=Ci(t,s,n),this.config.speed.selected=t,setTimeout(()=>{this.media&&(this.media.playbackRate=t)},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(i){const t=this.config.quality,s=this.options.quality;if(!s.length)return;let n=[!l.empty(i)&&Number(i),this.storage.get("quality"),t.selected,t.default].find(l.number),r=!0;if(!s.includes(n)){const a=pi(s,n);this.debug.warn(`Unsupported quality option: ${n}, using ${a} instead`),n=a,r=!1}t.selected=n,this.media.quality=n,r&&this.storage.set({quality:n})}get quality(){return this.media.quality}set loop(i){const t=l.boolean(i)?i:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return!!this.media.loop}set source(i){Ct.change.call(this,i)}get source(){return this.media.currentSrc}get download(){const{download:i}=this.config.urls;return l.url(i)?i:this.source}set download(i){l.url(i)&&(this.config.urls.download=i,w.setDownloadUrl.call(this))}set poster(i){this.isVideo?V.setPoster.call(this,i,!1).catch(()=>{}):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const i=Ue(Nt.call(this));return l.array(i)?i.join(":"):i}set ratio(i){this.isVideo?l.string(i)&&fi(i)?(this.config.ratio=Ue(i),be.call(this)):this.debug.error(`Invalid aspect ratio specified (${i})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(i){this.config.autoplay=l.boolean(i)?i:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(i){H.toggle.call(this,i,!1)}set currentTrack(i){H.set.call(this,i,!1),H.setup.call(this)}get currentTrack(){const{toggled:i,currentTrack:t}=this.captions;return i?t:-1}set language(i){H.setLanguage.call(this,i,!1)}get language(){return(H.getCurrentTrack.call(this)||{}).language}set pip(i){if(!z.pip)return;const t=l.boolean(i)?i:!this.pip;l.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?Ze.active:Ze.inactive),l.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return z.pip?l.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Ze.active:null}setPreviewThumbnails(i){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,i),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new At(this))}static supported(i,t){return z.check(i,t)}static loadSprite(i,t){return yi(i,t)}static setup(i,t={}){let s=null;return l.string(i)?s=Array.from(document.querySelectorAll(i)):l.nodeList(i)?s=Array.from(i):l.array(i)&&(s=i.filter(l.element)),l.empty(s)?null:s.map(n=>new Pe(n,t))}}Pe.defaults=$s(Ti);const ge=(e,i=0,t=1)=>xt(Lt(i,e),t),$t=e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let i=0;i<=3;i++)i<3?((e[i]<0||e[i]>255)&&(e._clipped=!0),e[i]=ge(e[i],0,255)):i===3&&(e[i]=ge(e[i],0,1));return e},Ei={};for(let e of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])Ei[`[object ${e}]`]=e.toLowerCase();function L(e){return Ei[Object.prototype.toString.call(e)]||"object"}const I=(e,i=null)=>e.length>=3?Array.prototype.slice.call(e):L(e[0])=="object"&&i?i.split("").filter(t=>e[0][t]!==void 0).map(t=>e[0][t]):e[0],Ge=e=>{if(e.length<2)return null;const i=e.length-1;return L(e[i])=="string"?e[i].toLowerCase():null},{PI:Xe,min:xt,max:Lt}=Math,ne=Xe*2,it=Xe/3,nn=Xe/180,rn=180/Xe,_={format:{},autodetect:[]};class f{constructor(...i){const t=this;if(L(i[0])==="object"&&i[0].constructor&&i[0].constructor===this.constructor)return i[0];let s=Ge(i),n=!1;if(!s){n=!0,_.sorted||(_.autodetect=_.autodetect.sort((r,a)=>a.p-r.p),_.sorted=!0);for(let r of _.autodetect)if(s=r.test(...i),s)break}if(_.format[s]){const r=_.format[s].apply(null,n?i:i.slice(0,-1));t._rgb=$t(r)}else throw new Error("unknown format: "+i);t._rgb.length===3&&t._rgb.push(1)}toString(){return L(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const an="2.6.0",x=(...e)=>new x.Color(...e);x.Color=f;x.version=an;const on=(...e)=>{e=I(e,"cmyk");const[i,t,s,n]=e,r=e.length>4?e[4]:1;return n===1?[0,0,0,r]:[i>=1?0:255*(1-i)*(1-n),t>=1?0:255*(1-t)*(1-n),s>=1?0:255*(1-s)*(1-n),r]},{max:zt}=Math,ln=(...e)=>{let[i,t,s]=I(e,"rgb");i=i/255,t=t/255,s=s/255;const n=1-zt(i,zt(t,s)),r=n<1?1/(1-n):0,a=(1-i-n)*r,o=(1-t-n)*r,c=(1-s-n)*r;return[a,o,c,n]};f.prototype.cmyk=function(){return ln(this._rgb)};x.cmyk=(...e)=>new f(...e,"cmyk");_.format.cmyk=on;_.autodetect.push({p:2,test:(...e)=>{if(e=I(e,"cmyk"),L(e)==="array"&&e.length===4)return"cmyk"}});const st=e=>Math.round(e*100)/100,cn=(...e)=>{const i=I(e,"hsla");let t=Ge(e)||"lsa";return i[0]=st(i[0]||0),i[1]=st(i[1]*100)+"%",i[2]=st(i[2]*100)+"%",t==="hsla"||i.length>3&&i[3]<1?(i[3]=i.length>3?i[3]:1,t="hsla"):i.length=3,`${t}(${i.join(",")})`},Si=(...e)=>{e=I(e,"rgba");let[i,t,s]=e;i/=255,t/=255,s/=255;const n=xt(i,t,s),r=Lt(i,t,s),a=(r+n)/2;let o,c;return r===n?(o=0,c=Number.NaN):o=a<.5?(r-n)/(r+n):(r-n)/(2-r-n),i==r?c=(t-s)/(r-n):t==r?c=2+(s-i)/(r-n):s==r&&(c=4+(i-t)/(r-n)),c*=60,c<0&&(c+=360),e.length>3&&e[3]!==void 0?[c,o,a,e[3]]:[c,o,a]},{round:nt}=Math,un=(...e)=>{const i=I(e,"rgba");let t=Ge(e)||"rgb";return t.substr(0,3)=="hsl"?cn(Si(i),t):(i[0]=nt(i[0]),i[1]=nt(i[1]),i[2]=nt(i[2]),(t==="rgba"||i.length>3&&i[3]<1)&&(i[3]=i.length>3?i[3]:1,t="rgba"),`${t}(${i.slice(0,t==="rgb"?3:4).join(",")})`)},{round:rt}=Math,Et=(...e)=>{e=I(e,"hsl");const[i,t,s]=e;let n,r,a;if(t===0)n=r=a=s*255;else{const o=[0,0,0],c=[0,0,0],u=s<.5?s*(1+t):s+t-s*t,d=2*s-u,p=i/360;o[0]=p+1/3,o[1]=p,o[2]=p-1/3;for(let h=0;h<3;h++)o[h]<0&&(o[h]+=1),o[h]>1&&(o[h]-=1),6*o[h]<1?c[h]=d+(u-d)*6*o[h]:2*o[h]<1?c[h]=u:3*o[h]<2?c[h]=d+(u-d)*(2/3-o[h])*6:c[h]=d;[n,r,a]=[rt(c[0]*255),rt(c[1]*255),rt(c[2]*255)]}return e.length>3?[n,r,a,e[3]]:[n,r,a,1]},Pi=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,Mi=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Ni=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,_i=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,$i=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,xi=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,{round:Wt}=Math,It=e=>{e=e.toLowerCase().trim();let i;if(_.format.named)try{return _.format.named(e)}catch{}if(i=e.match(Pi)){const t=i.slice(1,4);for(let s=0;s<3;s++)t[s]=+t[s];return t[3]=1,t}if(i=e.match(Mi)){const t=i.slice(1,5);for(let s=0;s<4;s++)t[s]=+t[s];return t}if(i=e.match(Ni)){const t=i.slice(1,4);for(let s=0;s<3;s++)t[s]=Wt(t[s]*2.55);return t[3]=1,t}if(i=e.match(_i)){const t=i.slice(1,5);for(let s=0;s<3;s++)t[s]=Wt(t[s]*2.55);return t[3]=+t[3],t}if(i=e.match($i)){const t=i.slice(1,4);t[1]*=.01,t[2]*=.01;const s=Et(t);return s[3]=1,s}if(i=e.match(xi)){const t=i.slice(1,4);t[1]*=.01,t[2]*=.01;const s=Et(t);return s[3]=+i[4],s}};It.test=e=>Pi.test(e)||Mi.test(e)||Ni.test(e)||_i.test(e)||$i.test(e)||xi.test(e);f.prototype.css=function(e){return un(this._rgb,e)};x.css=(...e)=>new f(...e,"css");_.format.css=It;_.autodetect.push({p:5,test:(e,...i)=>{if(!i.length&&L(e)==="string"&&It.test(e))return"css"}});_.format.gl=(...e)=>{const i=I(e,"rgba");return i[0]*=255,i[1]*=255,i[2]*=255,i};x.gl=(...e)=>new f(...e,"gl");f.prototype.gl=function(){const e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};const{floor:hn}=Math,dn=(...e)=>{e=I(e,"hcg");let[i,t,s]=e,n,r,a;s=s*255;const o=t*255;if(t===0)n=r=a=s;else{i===360&&(i=0),i>360&&(i-=360),i<0&&(i+=360),i/=60;const c=hn(i),u=i-c,d=s*(1-t),p=d+o*(1-u),h=d+o*u,g=d+o;switch(c){case 0:[n,r,a]=[g,h,d];break;case 1:[n,r,a]=[p,g,d];break;case 2:[n,r,a]=[d,g,h];break;case 3:[n,r,a]=[d,p,g];break;case 4:[n,r,a]=[h,d,g];break;case 5:[n,r,a]=[g,d,p];break}}return[n,r,a,e.length>3?e[3]:1]},pn=(...e)=>{const[i,t,s]=I(e,"rgb"),n=xt(i,t,s),r=Lt(i,t,s),a=r-n,o=a*100/255,c=n/(255-a)*100;let u;return a===0?u=Number.NaN:(i===r&&(u=(t-s)/a),t===r&&(u=2+(s-i)/a),s===r&&(u=4+(i-t)/a),u*=60,u<0&&(u+=360)),[u,o,c]};f.prototype.hcg=function(){return pn(this._rgb)};x.hcg=(...e)=>new f(...e,"hcg");_.format.hcg=dn;_.autodetect.push({p:1,test:(...e)=>{if(e=I(e,"hcg"),L(e)==="array"&&e.length===3)return"hcg"}});const mn=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,fn=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Li=e=>{if(e.match(mn)){(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const i=parseInt(e,16),t=i>>16,s=i>>8&255,n=i&255;return[t,s,n,1]}if(e.match(fn)){(e.length===5||e.length===9)&&(e=e.substr(1)),e.length===4&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const i=parseInt(e,16),t=i>>24&255,s=i>>16&255,n=i>>8&255,r=Math.round((i&255)/255*100)/100;return[t,s,n,r]}throw new Error(`unknown hex color: ${e}`)},{round:Ie}=Math,Ii=(...e)=>{let[i,t,s,n]=I(e,"rgba"),r=Ge(e)||"auto";n===void 0&&(n=1),r==="auto"&&(r=n<1?"rgba":"rgb"),i=Ie(i),t=Ie(t),s=Ie(s);let o="000000"+(i<<16|t<<8|s).toString(16);o=o.substr(o.length-6);let c="0"+Ie(n*255).toString(16);switch(c=c.substr(c.length-2),r.toLowerCase()){case"rgba":return`#${o}${c}`;case"argb":return`#${c}${o}`;default:return`#${o}`}};f.prototype.hex=function(e){return Ii(this._rgb,e)};x.hex=(...e)=>new f(...e,"hex");_.format.hex=Li;_.autodetect.push({p:4,test:(e,...i)=>{if(!i.length&&L(e)==="string"&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});const{cos:me}=Math,gn=(...e)=>{e=I(e,"hsi");let[i,t,s]=e,n,r,a;return isNaN(i)&&(i=0),isNaN(t)&&(t=0),i>360&&(i-=360),i<0&&(i+=360),i/=360,i<1/3?(a=(1-t)/3,n=(1+t*me(ne*i)/me(it-ne*i))/3,r=1-(a+n)):i<2/3?(i-=1/3,n=(1-t)/3,r=(1+t*me(ne*i)/me(it-ne*i))/3,a=1-(n+r)):(i-=2/3,r=(1-t)/3,a=(1+t*me(ne*i)/me(it-ne*i))/3,n=1-(r+a)),n=ge(s*n*3),r=ge(s*r*3),a=ge(s*a*3),[n*255,r*255,a*255,e.length>3?e[3]:1]},{min:bn,sqrt:yn,acos:wn}=Math,vn=(...e)=>{let[i,t,s]=I(e,"rgb");i/=255,t/=255,s/=255;let n;const r=bn(i,t,s),a=(i+t+s)/3,o=a>0?1-r/a:0;return o===0?n=NaN:(n=(i-t+(i-s))/2,n/=yn((i-t)*(i-t)+(i-s)*(t-s)),n=wn(n),s>t&&(n=ne-n),n/=ne),[n*360,o,a]};f.prototype.hsi=function(){return vn(this._rgb)};x.hsi=(...e)=>new f(...e,"hsi");_.format.hsi=gn;_.autodetect.push({p:2,test:(...e)=>{if(e=I(e,"hsi"),L(e)==="array"&&e.length===3)return"hsi"}});f.prototype.hsl=function(){return Si(this._rgb)};x.hsl=(...e)=>new f(...e,"hsl");_.format.hsl=Et;_.autodetect.push({p:2,test:(...e)=>{if(e=I(e,"hsl"),L(e)==="array"&&e.length===3)return"hsl"}});const{floor:kn}=Math,Tn=(...e)=>{e=I(e,"hsv");let[i,t,s]=e,n,r,a;if(s*=255,t===0)n=r=a=s;else{i===360&&(i=0),i>360&&(i-=360),i<0&&(i+=360),i/=60;const o=kn(i),c=i-o,u=s*(1-t),d=s*(1-t*c),p=s*(1-t*(1-c));switch(o){case 0:[n,r,a]=[s,p,u];break;case 1:[n,r,a]=[d,s,u];break;case 2:[n,r,a]=[u,s,p];break;case 3:[n,r,a]=[u,d,s];break;case 4:[n,r,a]=[p,u,s];break;case 5:[n,r,a]=[s,u,d];break}}return[n,r,a,e.length>3?e[3]:1]},{min:An,max:Cn}=Math,En=(...e)=>{e=I(e,"rgb");let[i,t,s]=e;const n=An(i,t,s),r=Cn(i,t,s),a=r-n;let o,c,u;return u=r/255,r===0?(o=Number.NaN,c=0):(c=a/r,i===r&&(o=(t-s)/a),t===r&&(o=2+(s-i)/a),s===r&&(o=4+(i-t)/a),o*=60,o<0&&(o+=360)),[o,c,u]};f.prototype.hsv=function(){return En(this._rgb)};x.hsv=(...e)=>new f(...e,"hsv");_.format.hsv=Tn;_.autodetect.push({p:2,test:(...e)=>{if(e=I(e,"hsv"),L(e)==="array"&&e.length===3)return"hsv"}});const J={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},{pow:Sn}=Math,Oi=(...e)=>{e=I(e,"lab");const[i,t,s]=e;let n,r,a,o,c,u;return r=(i+16)/116,n=isNaN(t)?r:r+t/500,a=isNaN(s)?r:r-s/200,r=J.Yn*ot(r),n=J.Xn*ot(n),a=J.Zn*ot(a),o=at(3.2404542*n-1.5371385*r-.4985314*a),c=at(-.969266*n+1.8760108*r+.041556*a),u=at(.0556434*n-.2040259*r+1.0572252*a),[o,c,u,e.length>3?e[3]:1]},at=e=>255*(e<=.00304?12.92*e:1.055*Sn(e,1/2.4)-.055),ot=e=>e>J.t1?e*e*e:J.t2*(e-J.t0),{pow:ji}=Math,Ri=(...e)=>{const[i,t,s]=I(e,"rgb"),[n,r,a]=Pn(i,t,s),o=116*r-16;return[o<0?0:o,500*(n-r),200*(r-a)]},lt=e=>(e/=255)<=.04045?e/12.92:ji((e+.055)/1.055,2.4),ct=e=>e>J.t3?ji(e,1/3):e/J.t2+J.t0,Pn=(e,i,t)=>{e=lt(e),i=lt(i),t=lt(t);const s=ct((.4124564*e+.3575761*i+.1804375*t)/J.Xn),n=ct((.2126729*e+.7151522*i+.072175*t)/J.Yn),r=ct((.0193339*e+.119192*i+.9503041*t)/J.Zn);return[s,n,r]};f.prototype.lab=function(){return Ri(this._rgb)};x.lab=(...e)=>new f(...e,"lab");_.format.lab=Oi;_.autodetect.push({p:2,test:(...e)=>{if(e=I(e,"lab"),L(e)==="array"&&e.length===3)return"lab"}});const{sin:Mn,cos:Nn}=Math,qi=(...e)=>{let[i,t,s]=I(e,"lch");return isNaN(s)&&(s=0),s=s*nn,[i,Nn(s)*t,Mn(s)*t]},Hi=(...e)=>{e=I(e,"lch");const[i,t,s]=e,[n,r,a]=qi(i,t,s),[o,c,u]=Oi(n,r,a);return[o,c,u,e.length>3?e[3]:1]},_n=(...e)=>{const i=I(e,"hcl").reverse();return Hi(...i)},{sqrt:$n,atan2:xn,round:Ln}=Math,Di=(...e)=>{const[i,t,s]=I(e,"lab"),n=$n(t*t+s*s);let r=(xn(s,t)*rn+360)%360;return Ln(n*1e4)===0&&(r=Number.NaN),[i,n,r]},Vi=(...e)=>{const[i,t,s]=I(e,"rgb"),[n,r,a]=Ri(i,t,s);return Di(n,r,a)};f.prototype.lch=function(){return Vi(this._rgb)};f.prototype.hcl=function(){return Vi(this._rgb).reverse()};x.lch=(...e)=>new f(...e,"lch");x.hcl=(...e)=>new f(...e,"hcl");_.format.lch=Hi;_.format.hcl=_n;["lch","hcl"].forEach(e=>_.autodetect.push({p:2,test:(...i)=>{if(i=I(i,e),L(i)==="array"&&i.length===3)return e}}));const ye={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};f.prototype.name=function(){const e=Ii(this._rgb,"rgb");for(let i of Object.keys(ye))if(ye[i]===e)return i.toLowerCase();return e};_.format.named=e=>{if(e=e.toLowerCase(),ye[e])return Li(ye[e]);throw new Error("unknown color name: "+e)};_.autodetect.push({p:5,test:(e,...i)=>{if(!i.length&&L(e)==="string"&&ye[e.toLowerCase()])return"named"}});const In=e=>{if(L(e)=="number"&&e>=0&&e<=16777215){const i=e>>16,t=e>>8&255,s=e&255;return[i,t,s,1]}throw new Error("unknown num color: "+e)},On=(...e)=>{const[i,t,s]=I(e,"rgb");return(i<<16)+(t<<8)+s};f.prototype.num=function(){return On(this._rgb)};x.num=(...e)=>new f(...e,"num");_.format.num=In;_.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&L(e[0])==="number"&&e[0]>=0&&e[0]<=16777215)return"num"}});const{round:Bi}=Math;f.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Bi)};f.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((i,t)=>t<3?e===!1?i:Bi(i):i)};x.rgb=(...e)=>new f(...e,"rgb");_.format.rgb=(...e)=>{const i=I(e,"rgba");return i[3]===void 0&&(i[3]=1),i};_.autodetect.push({p:3,test:(...e)=>{if(e=I(e,"rgba"),L(e)==="array"&&(e.length===3||e.length===4&&L(e[3])=="number"&&e[3]>=0&&e[3]<=1))return"rgb"}});const{log:Oe}=Math,Fi=e=>{const i=e/100;let t,s,n;return i<66?(t=255,s=i<6?0:-155.25485562709179-.44596950469579133*(s=i-2)+104.49216199393888*Oe(s),n=i<20?0:-254.76935184120902+.8274096064007395*(n=i-10)+115.67994401066147*Oe(n)):(t=351.97690566805693+.114206453784165*(t=i-55)-40.25366309332127*Oe(t),s=325.4494125711974+.07943456536662342*(s=i-50)-28.0852963507957*Oe(s),n=255),[t,s,n,1]},{round:jn}=Math,Rn=(...e)=>{const i=I(e,"rgb"),t=i[0],s=i[2];let n=1e3,r=4e4;const a=.4;let o;for(;r-n>a;){o=(r+n)*.5;const c=Fi(o);c[2]/c[0]>=s/t?r=o:n=o}return jn(o)};f.prototype.temp=f.prototype.kelvin=f.prototype.temperature=function(){return Rn(this._rgb)};x.temp=x.kelvin=x.temperature=(...e)=>new f(...e,"temp");_.format.temp=_.format.kelvin=_.format.temperature=Fi;const{pow:De,sign:qn}=Math,Ui=(...e)=>{e=I(e,"lab");const[i,t,s]=e,n=De(i+.3963377774*t+.2158037573*s,3),r=De(i-.1055613458*t-.0638541728*s,3),a=De(i-.0894841775*t-1.291485548*s,3);return[255*ut(4.0767416621*n-3.3077115913*r+.2309699292*a),255*ut(-1.2684380046*n+2.6097574011*r-.3413193965*a),255*ut(-.0041960863*n-.7034186147*r+1.707614701*a),e.length>3?e[3]:1]};function ut(e){const i=Math.abs(e);return i>.0031308?(qn(e)||1)*(1.055*De(i,1/2.4)-.055):e*12.92}const{cbrt:ht,pow:Hn,sign:Dn}=Math,zi=(...e)=>{const[i,t,s]=I(e,"rgb"),[n,r,a]=[dt(i/255),dt(t/255),dt(s/255)],o=ht(.4122214708*n+.5363325363*r+.0514459929*a),c=ht(.2119034982*n+.6806995451*r+.1073969566*a),u=ht(.0883024619*n+.2817188376*r+.6299787005*a);return[.2104542553*o+.793617785*c-.0040720468*u,1.9779984951*o-2.428592205*c+.4505937099*u,.0259040371*o+.7827717662*c-.808675766*u]};function dt(e){const i=Math.abs(e);return i<.04045?e/12.92:(Dn(e)||1)*Hn((i+.055)/1.055,2.4)}f.prototype.oklab=function(){return zi(this._rgb)};x.oklab=(...e)=>new f(...e,"oklab");_.format.oklab=Ui;_.autodetect.push({p:3,test:(...e)=>{if(e=I(e,"oklab"),L(e)==="array"&&e.length===3)return"oklab"}});const Vn=(...e)=>{e=I(e,"lch");const[i,t,s]=e,[n,r,a]=qi(i,t,s),[o,c,u]=Ui(n,r,a);return[o,c,u,e.length>3?e[3]:1]},Bn=(...e)=>{const[i,t,s]=I(e,"rgb"),[n,r,a]=zi(i,t,s);return Di(n,r,a)};f.prototype.oklch=function(){return Bn(this._rgb)};x.oklch=(...e)=>new f(...e,"oklch");_.format.oklch=Vn;_.autodetect.push({p:3,test:(...e)=>{if(e=I(e,"oklch"),L(e)==="array"&&e.length===3)return"oklch"}});f.prototype.alpha=function(e,i=!1){return e!==void 0&&L(e)==="number"?i?(this._rgb[3]=e,this):new f([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]};f.prototype.clipped=function(){return this._rgb._clipped||!1};f.prototype.darken=function(e=1){const i=this,t=i.lab();return t[0]-=J.Kn*e,new f(t,"lab").alpha(i.alpha(),!0)};f.prototype.brighten=function(e=1){return this.darken(-e)};f.prototype.darker=f.prototype.darken;f.prototype.brighter=f.prototype.brighten;f.prototype.get=function(e){const[i,t]=e.split("."),s=this[i]();if(t){const n=i.indexOf(t)-(i.substr(0,2)==="ok"?2:0);if(n>-1)return s[n];throw new Error(`unknown channel ${t} in mode ${i}`)}else return s};const{pow:Fn}=Math,Un=1e-7,zn=20;f.prototype.luminance=function(e,i="rgb"){if(e!==void 0&&L(e)==="number"){if(e===0)return new f([0,0,0,this._rgb[3]],"rgb");if(e===1)return new f([255,255,255,this._rgb[3]],"rgb");let t=this.luminance(),s=zn;const n=(a,o)=>{const c=a.interpolate(o,.5,i),u=c.luminance();return Math.abs(e-u)e?n(a,c):n(c,o)},r=(t>e?n(new f([0,0,0]),this):n(this,new f([255,255,255]))).rgb();return new f([...r,this._rgb[3]])}return Wn(...this._rgb.slice(0,3))};const Wn=(e,i,t)=>(e=pt(e),i=pt(i),t=pt(t),.2126*e+.7152*i+.0722*t),pt=e=>(e/=255,e<=.03928?e/12.92:Fn((e+.055)/1.055,2.4)),Q={},Me=(e,i,t=.5,...s)=>{let n=s[0]||"lrgb";if(!Q[n]&&!s.length&&(n=Object.keys(Q)[0]),!Q[n])throw new Error(`interpolation mode ${n} is not defined`);return L(e)!=="object"&&(e=new f(e)),L(i)!=="object"&&(i=new f(i)),Q[n](e,i,t).alpha(e.alpha()+t*(i.alpha()-e.alpha()))};f.prototype.mix=f.prototype.interpolate=function(e,i=.5,...t){return Me(this,e,i,...t)};f.prototype.premultiply=function(e=!1){const i=this._rgb,t=i[3];return e?(this._rgb=[i[0]*t,i[1]*t,i[2]*t,t],this):new f([i[0]*t,i[1]*t,i[2]*t,t],"rgb")};f.prototype.saturate=function(e=1){const i=this,t=i.lch();return t[1]+=J.Kn*e,t[1]<0&&(t[1]=0),new f(t,"lch").alpha(i.alpha(),!0)};f.prototype.desaturate=function(e=1){return this.saturate(-e)};f.prototype.set=function(e,i,t=!1){const[s,n]=e.split("."),r=this[s]();if(n){const a=s.indexOf(n)-(s.substr(0,2)==="ok"?2:0);if(a>-1){if(L(i)=="string")switch(i.charAt(0)){case"+":r[a]+=+i;break;case"-":r[a]+=+i;break;case"*":r[a]*=+i.substr(1);break;case"/":r[a]/=+i.substr(1);break;default:r[a]=+i}else if(L(i)==="number")r[a]=i;else throw new Error("unsupported value for Color.set");const o=new f(r,s);return t?(this._rgb=o._rgb,this):o}throw new Error(`unknown channel ${n} in mode ${s}`)}else return r};f.prototype.tint=function(e=.5,...i){return Me(this,"white",e,...i)};f.prototype.shade=function(e=.5,...i){return Me(this,"black",e,...i)};const Kn=(e,i,t)=>{const s=e._rgb,n=i._rgb;return new f(s[0]+t*(n[0]-s[0]),s[1]+t*(n[1]-s[1]),s[2]+t*(n[2]-s[2]),"rgb")};Q.rgb=Kn;const{sqrt:mt,pow:fe}=Math,Yn=(e,i,t)=>{const[s,n,r]=e._rgb,[a,o,c]=i._rgb;return new f(mt(fe(s,2)*(1-t)+fe(a,2)*t),mt(fe(n,2)*(1-t)+fe(o,2)*t),mt(fe(r,2)*(1-t)+fe(c,2)*t),"rgb")};Q.lrgb=Yn;const Gn=(e,i,t)=>{const s=e.lab(),n=i.lab();return new f(s[0]+t*(n[0]-s[0]),s[1]+t*(n[1]-s[1]),s[2]+t*(n[2]-s[2]),"lab")};Q.lab=Gn;const we=(e,i,t,s)=>{let n,r;s==="hsl"?(n=e.hsl(),r=i.hsl()):s==="hsv"?(n=e.hsv(),r=i.hsv()):s==="hcg"?(n=e.hcg(),r=i.hcg()):s==="hsi"?(n=e.hsi(),r=i.hsi()):s==="lch"||s==="hcl"?(s="hcl",n=e.hcl(),r=i.hcl()):s==="oklch"&&(n=e.oklch().reverse(),r=i.oklch().reverse());let a,o,c,u,d,p;(s.substr(0,1)==="h"||s==="oklch")&&([a,c,d]=n,[o,u,p]=r);let h,g,k,A;return!isNaN(a)&&!isNaN(o)?(o>a&&o-a>180?A=o-(a+360):o180?A=o+360-a:A=o-a,g=a+t*A):isNaN(a)?isNaN(o)?g=Number.NaN:(g=o,(d==1||d==0)&&s!="hsv"&&(h=u)):(g=a,(p==1||p==0)&&s!="hsv"&&(h=c)),h===void 0&&(h=c+t*(u-c)),k=d+t*(p-d),s==="oklch"?new f([k,h,g],s):new f([g,h,k],s)},Wi=(e,i,t)=>we(e,i,t,"lch");Q.lch=Wi;Q.hcl=Wi;const Xn=(e,i,t)=>{const s=e.num(),n=i.num();return new f(s+t*(n-s),"num")};Q.num=Xn;const Qn=(e,i,t)=>we(e,i,t,"hcg");Q.hcg=Qn;const Jn=(e,i,t)=>we(e,i,t,"hsi");Q.hsi=Jn;const Zn=(e,i,t)=>we(e,i,t,"hsl");Q.hsl=Zn;const er=(e,i,t)=>we(e,i,t,"hsv");Q.hsv=er;const tr=(e,i,t)=>{const s=e.oklab(),n=i.oklab();return new f(s[0]+t*(n[0]-s[0]),s[1]+t*(n[1]-s[1]),s[2]+t*(n[2]-s[2]),"oklab")};Q.oklab=tr;const ir=(e,i,t)=>we(e,i,t,"oklch");Q.oklch=ir;const{pow:ft,sqrt:gt,PI:bt,cos:Kt,sin:Yt,atan2:sr}=Math,nr=(e,i="lrgb",t=null)=>{const s=e.length;t||(t=Array.from(new Array(s)).map(()=>1));const n=s/t.reduce(function(p,h){return p+h});if(t.forEach((p,h)=>{t[h]*=n}),e=e.map(p=>new f(p)),i==="lrgb")return rr(e,t);const r=e.shift(),a=r.get(i),o=[];let c=0,u=0;for(let p=0;p{const g=p.get(i);d+=p.alpha()*t[h+1];for(let k=0;k=360;)h-=360;a[p]=h}else a[p]=a[p]/o[p];return d/=s,new f(a,i).alpha(d>.99999?1:d,!0)},rr=(e,i)=>{const t=e.length,s=[0,0,0,0];for(let n=0;n.9999999&&(s[3]=1),new f($t(s))},{pow:ar}=Math;function ze(e){let i="rgb",t=x("#ccc"),s=0,n=[0,1],r=[],a=[0,0],o=!1,c=[],u=!1,d=0,p=1,h=!1,g={},k=!0,A=1;const T=function(m){if(m=m||["#fff","#000"],m&&L(m)==="string"&&x.brewer&&x.brewer[m.toLowerCase()]&&(m=x.brewer[m.toLowerCase()]),L(m)==="array"){m.length===1&&(m=[m[0],m[0]]),m=m.slice(0);for(let C=0;C=o[N];)N++;return N-1}return 0};let y=m=>m,$=m=>m;const j=function(m,C){let N,E;if(C==null&&(C=!1),isNaN(m)||m===null)return t;C?E=m:o&&o.length>2?E=b(m)/(o.length-2):p!==d?E=(m-d)/(p-d):E=1,E=$(E),C||(E=y(E)),A!==1&&(E=ar(E,A)),E=a[0]+E*(1-a[0]-a[1]),E=ge(E,0,1);const R=Math.floor(E*1e4);if(k&&g[R])N=g[R];else{if(L(c)==="array")for(let O=0;O=F&&O===r.length-1){N=c[O];break}if(E>F&&Eg={};T(e);const M=function(m){const C=x(j(m));return u&&C[u]?C[u]():C};return M.classes=function(m){if(m!=null){if(L(m)==="array")o=m,n=[m[0],m[m.length-1]];else{const C=x.analyze(n);m===0?o=[C.min,C.max]:o=x.limits(C,"e",m)}return M}return o},M.domain=function(m){if(!arguments.length)return n;d=m[0],p=m[m.length-1],r=[];const C=c.length;if(m.length===C&&d!==p)for(let N of Array.from(m))r.push((N-d)/(p-d));else{for(let N=0;N2){const N=m.map((R,O)=>O/(m.length-1)),E=m.map(R=>(R-d)/(p-d));E.every((R,O)=>N[O]===R)||($=R=>{if(R<=0||R>=1)return R;let O=0;for(;R>=E[O+1];)O++;const F=(R-E[O])/(E[O+1]-E[O]);return N[O]+F*(N[O+1]-N[O])})}}return n=[d,p],M},M.mode=function(m){return arguments.length?(i=m,B(),M):i},M.range=function(m,C){return T(m),M},M.out=function(m){return u=m,M},M.spread=function(m){return arguments.length?(s=m,M):s},M.correctLightness=function(m){return m==null&&(m=!0),h=m,B(),h?y=function(C){const N=j(0,!0).lab()[0],E=j(1,!0).lab()[0],R=N>E;let O=j(C,!0).lab()[0];const F=N+(E-N)*C;let he=O-F,ve=0,xe=1,Le=20;for(;Math.abs(he)>.01&&Le-- >0;)(function(){return R&&(he*=-1),he<0?(ve=C,C+=(xe-C)*.5):(xe=C,C+=(ve-C)*.5),O=j(C,!0).lab()[0],he=O-F})();return C}:y=C=>C,M},M.padding=function(m){return m!=null?(L(m)==="number"&&(m=[m,m]),a=m,M):a},M.colors=function(m,C){arguments.length<2&&(C="hex");let N=[];if(arguments.length===0)N=c.slice(0);else if(m===1)N=[M(.5)];else if(m>1){const E=n[0],R=n[1]-E;N=or(0,m).map(O=>M(E+O/(m-1)*R))}else{e=[];let E=[];if(o&&o.length>2)for(let R=1,O=o.length,F=1<=O;F?RO;F?R++:R--)E.push((o[R-1]+o[R])*.5);else E=n;N=E.map(R=>M(R))}return x[C]&&(N=N.map(E=>E[C]())),N},M.cache=function(m){return m!=null?(k=m,M):k},M.gamma=function(m){return m!=null?(A=m,M):A},M.nodata=function(m){return m!=null?(t=x(m),M):t},M}function or(e,i,t){let s=[],n=er;n?a++:a--)s.push(a);return s}const lr=function(e){let i=[1,1];for(let t=1;tnew f(r)),e.length===2)[t,s]=e.map(r=>r.lab()),i=function(r){const a=[0,1,2].map(o=>t[o]+r*(s[o]-t[o]));return new f(a,"lab")};else if(e.length===3)[t,s,n]=e.map(r=>r.lab()),i=function(r){const a=[0,1,2].map(o=>(1-r)*(1-r)*t[o]+2*(1-r)*r*s[o]+r*r*n[o]);return new f(a,"lab")};else if(e.length===4){let r;[t,s,n,r]=e.map(a=>a.lab()),i=function(a){const o=[0,1,2].map(c=>(1-a)*(1-a)*(1-a)*t[c]+3*(1-a)*(1-a)*a*s[c]+3*(1-a)*a*a*n[c]+a*a*a*r[c]);return new f(o,"lab")}}else if(e.length>=5){let r,a,o;r=e.map(c=>c.lab()),o=e.length-1,a=lr(o),i=function(c){const u=1-c,d=[0,1,2].map(p=>r.reduce((h,g,k)=>h+a[k]*u**(o-k)*c**k*g[p],0));return new f(d,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return i},ur=e=>{const i=cr(e);return i.scale=()=>ze(i),i},ee=(e,i,t)=>{if(!ee[t])throw new Error("unknown blend mode "+t);return ee[t](e,i)},ce=e=>(i,t)=>{const s=x(t).rgb(),n=x(i).rgb();return x.rgb(e(s,n))},ue=e=>(i,t)=>{const s=[];return s[0]=e(i[0],t[0]),s[1]=e(i[1],t[1]),s[2]=e(i[2],t[2]),s},hr=e=>e,dr=(e,i)=>e*i/255,pr=(e,i)=>e>i?i:e,mr=(e,i)=>e>i?e:i,fr=(e,i)=>255*(1-(1-e/255)*(1-i/255)),gr=(e,i)=>i<128?2*e*i/255:255*(1-2*(1-e/255)*(1-i/255)),br=(e,i)=>255*(1-(1-i/255)/(e/255)),yr=(e,i)=>e===255?255:(e=255*(i/255)/(1-e/255),e>255?255:e);ee.normal=ce(ue(hr));ee.multiply=ce(ue(dr));ee.screen=ce(ue(fr));ee.overlay=ce(ue(gr));ee.darken=ce(ue(pr));ee.lighten=ce(ue(mr));ee.dodge=ce(ue(yr));ee.burn=ce(ue(br));const{pow:wr,sin:vr,cos:kr}=Math;function Tr(e=300,i=-1.5,t=1,s=1,n=[0,1]){let r=0,a;L(n)==="array"?a=n[1]-n[0]:(a=0,n=[n,n]);const o=function(c){const u=ne*((e+120)/360+i*c),d=wr(n[0]+a*c,s),h=(r!==0?t[0]+c*r:t)*d*(1-d)/2,g=kr(u),k=vr(u),A=d+h*(-.14861*g+1.78277*k),T=d+h*(-.29227*g-.90649*k),b=d+h*(1.97294*g);return x($t([A*255,T*255,b*255,1]))};return o.start=function(c){return c==null?e:(e=c,o)},o.rotations=function(c){return c==null?i:(i=c,o)},o.gamma=function(c){return c==null?s:(s=c,o)},o.hue=function(c){return c==null?t:(t=c,L(t)==="array"?(r=t[1]-t[0],r===0&&(t=t[1])):r=0,o)},o.lightness=function(c){return c==null?n:(L(c)==="array"?(n=c,a=c[1]-c[0]):(n=[c,c],a=0),o)},o.scale=()=>x.scale(o),o.hue(t),o}const Ar="0123456789abcdef",{floor:Cr,random:Er}=Math,Sr=()=>{let e="#";for(let i=0;i<6;i++)e+=Ar.charAt(Cr(Er()*16));return new f(e,"hex")},{log:Gt,pow:Pr,floor:Mr,abs:Nr}=Math;function Ki(e,i=null){const t={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return L(e)==="object"&&(e=Object.values(e)),e.forEach(s=>{i&&L(s)==="object"&&(s=s[i]),s!=null&&!isNaN(s)&&(t.values.push(s),t.sum+=s,st.max&&(t.max=s),t.count+=1)}),t.domain=[t.min,t.max],t.limits=(s,n)=>Yi(t,s,n),t}function Yi(e,i="equal",t=7){L(e)=="array"&&(e=Ki(e));const{min:s,max:n}=e,r=e.values.sort((o,c)=>o-c);if(t===1)return[s,n];const a=[];if(i.substr(0,1)==="c"&&(a.push(s),a.push(n)),i.substr(0,1)==="e"){a.push(s);for(let o=1;o 0");const o=Math.LOG10E*Gt(s),c=Math.LOG10E*Gt(n);a.push(s);for(let u=1;u200&&(p=!1)}const k={};for(let T=0;TT-b),a.push(A[0]);for(let T=1;T{e=new f(e),i=new f(i);const t=e.luminance(),s=i.luminance();return t>s?(t+.05)/(s+.05):(s+.05)/(t+.05)},{sqrt:se,pow:W,min:$r,max:xr,atan2:Xt,abs:Qt,cos:je,sin:Jt,exp:Lr,PI:Zt}=Math;function Ir(e,i,t=1,s=1,n=1){var r=function(Qe){return 360*Qe/(2*Zt)},a=function(Qe){return 2*Zt*Qe/360};e=new f(e),i=new f(i);const[o,c,u]=Array.from(e.lab()),[d,p,h]=Array.from(i.lab()),g=(o+d)/2,k=se(W(c,2)+W(u,2)),A=se(W(p,2)+W(h,2)),T=(k+A)/2,b=.5*(1-se(W(T,7)/(W(T,7)+W(25,7)))),y=c*(1+b),$=p*(1+b),j=se(W(y,2)+W(u,2)),B=se(W($,2)+W(h,2)),M=(j+B)/2,m=r(Xt(u,y)),C=r(Xt(h,$)),N=m>=0?m:m+360,E=C>=0?C:C+360,R=Qt(N-E)>180?(N+E+360)/2:(N+E)/2,O=1-.17*je(a(R-30))+.24*je(a(2*R))+.32*je(a(3*R+6))-.2*je(a(4*R-63));let F=E-N;F=Qt(F)<=180?F:E<=N?F+360:F-360,F=2*se(j*B)*Jt(a(F)/2);const he=d-o,ve=B-j,xe=1+.015*W(g-50,2)/se(20+W(g-50,2)),Le=1+.045*M,Ot=1+.015*M*O,Gi=30*Lr(-W((R-275)/25,2)),Xi=-(2*se(W(M,7)/(W(M,7)+W(25,7))))*Jt(2*a(Gi)),Qi=se(W(he/(t*xe),2)+W(ve/(s*Le),2)+W(F/(n*Ot),2)+Xi*(ve/(s*Le))*(F/(n*Ot)));return xr(0,$r(100,Qi))}function Or(e,i,t="lab"){e=new f(e),i=new f(i);const s=e.get(t),n=i.get(t);let r=0;for(let a in s){const o=(s[a]||0)-(n[a]||0);r+=o*o}return Math.sqrt(r)}const jr=(...e)=>{try{return new f(...e),!0}catch{return!1}},Rr={cool(){return ze([x.hsl(180,1,.9),x.hsl(250,.7,.4)])},hot(){return ze(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Ve={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]};for(let e of Object.keys(Ve))Ve[e.toLowerCase()]=Ve[e];Object.assign(x,{average:nr,bezier:ur,blend:ee,cubehelix:Tr,mix:Me,interpolate:Me,random:Sr,scale:ze,analyze:Ki,contrast:_r,deltaE:Ir,distance:Or,limits:Yi,valid:jr,scales:Rr,input:_,colors:ye,brewer:Ve});class qr{static start(){Alpine.store("ui",{colors:x.scale([window.primaryColor,window.secondaryColor]).colors(5)});let i=new Pe("audio",{controls:["play","rewind","progress","fast-forward","current-time","settings"],iconUrl:"/vendor/starter-kit-podcaster/img/plyr-sprite.svg",seekTime:15});Alpine.store("player",{plyr:null,playing:!1,audio_file:null,episode_url:null,title:null,show:!1,init(){i.on("playing",t=>{Alpine.store("player").playing=!0}),i.on("pause",t=>{Alpine.store("player").playing=!1}),i.on("ended",t=>{Alpine.store("player").playing=!1})},playEpisode(t,s,n,r){this.audio_file!==s&&(i.source={type:"audio",title:t,audio_file:s,sources:[{src:s,type:n}]}),this.toggle(s),this.title=t,this.audio_file=s,this.episode_url=r,this.show=!0},toggle(t){if(this.playing&&t===this.audio_file){i.pause(),Alpine.store("player").playing=!1;return}i.togglePlay()}})}}qr.start();
diff --git a/export/public/build/manifest.json b/export/public/build/manifest.json
new file mode 100644
index 0000000..1e21e68
--- /dev/null
+++ b/export/public/build/manifest.json
@@ -0,0 +1,13 @@
+{
+ "resources/css/site.css": {
+ "file": "assets/site-DV-45XBv.css",
+ "src": "resources/css/site.css",
+ "isEntry": true
+ },
+ "resources/js/site.js": {
+ "file": "assets/site-Dg49c9BR.js",
+ "name": "site",
+ "src": "resources/js/site.js",
+ "isEntry": true
+ }
+}
\ No newline at end of file
diff --git a/resources/blueprints/.gitkeep b/export/resources/blueprints/.gitkeep
similarity index 100%
rename from resources/blueprints/.gitkeep
rename to export/resources/blueprints/.gitkeep
diff --git a/resources/blueprints/assets/assets.yaml b/export/resources/blueprints/assets/assets.yaml
similarity index 100%
rename from resources/blueprints/assets/assets.yaml
rename to export/resources/blueprints/assets/assets.yaml
diff --git a/resources/blueprints/collections/episodes/episodes.yaml b/export/resources/blueprints/collections/episodes/episodes.yaml
similarity index 100%
rename from resources/blueprints/collections/episodes/episodes.yaml
rename to export/resources/blueprints/collections/episodes/episodes.yaml
diff --git a/resources/blueprints/collections/links/links.yaml b/export/resources/blueprints/collections/links/links.yaml
similarity index 100%
rename from resources/blueprints/collections/links/links.yaml
rename to export/resources/blueprints/collections/links/links.yaml
diff --git a/resources/blueprints/collections/pages/pages.yaml b/export/resources/blueprints/collections/pages/pages.yaml
similarity index 100%
rename from resources/blueprints/collections/pages/pages.yaml
rename to export/resources/blueprints/collections/pages/pages.yaml
diff --git a/resources/blueprints/globals/design.yaml b/export/resources/blueprints/globals/design.yaml
similarity index 100%
rename from resources/blueprints/globals/design.yaml
rename to export/resources/blueprints/globals/design.yaml
diff --git a/resources/blueprints/globals/podcast.yaml b/export/resources/blueprints/globals/podcast.yaml
similarity index 100%
rename from resources/blueprints/globals/podcast.yaml
rename to export/resources/blueprints/globals/podcast.yaml
diff --git a/resources/blueprints/globals/theme.yaml b/export/resources/blueprints/globals/theme.yaml
similarity index 100%
rename from resources/blueprints/globals/theme.yaml
rename to export/resources/blueprints/globals/theme.yaml
diff --git a/resources/blueprints/user.yaml b/export/resources/blueprints/user.yaml
similarity index 100%
rename from resources/blueprints/user.yaml
rename to export/resources/blueprints/user.yaml
diff --git a/resources/css/cp.css b/export/resources/css/cp.css
similarity index 100%
rename from resources/css/cp.css
rename to export/resources/css/cp.css
diff --git a/export/resources/css/site.css b/export/resources/css/site.css
new file mode 100644
index 0000000..d49d3d1
--- /dev/null
+++ b/export/resources/css/site.css
@@ -0,0 +1 @@
+@import "/vendor/statamic/starter-kit-podcaster/resources/css/podcaster.css";
diff --git a/resources/js/cp.js b/export/resources/js/cp.js
similarity index 100%
rename from resources/js/cp.js
rename to export/resources/js/cp.js
diff --git a/export/resources/js/site.js b/export/resources/js/site.js
new file mode 100644
index 0000000..9a8e244
--- /dev/null
+++ b/export/resources/js/site.js
@@ -0,0 +1,3 @@
+import Podcaster from '/vendor/statamic/starter-kit-podcaster/resources/js/podcaster';
+
+Podcaster.start();
diff --git a/export/resources/views/errors/404.antlers.html b/export/resources/views/errors/404.antlers.html
new file mode 100644
index 0000000..ed5c041
--- /dev/null
+++ b/export/resources/views/errors/404.antlers.html
@@ -0,0 +1,22 @@
+
+
+
+
This is a 404
+
Either we lost this page or you lost your way. Which is it?
+
+ {{ links }}
+
+
+
+ {{ /links }}
+
+
+
+
+
diff --git a/tailwind.config.js b/export/tailwind.config.js
similarity index 81%
rename from tailwind.config.js
rename to export/tailwind.config.js
index 76b7275..0097f2d 100644
--- a/tailwind.config.js
+++ b/export/tailwind.config.js
@@ -2,6 +2,8 @@ export default {
content: [
'./resources/**/*.antlers.html',
'./resources/**/*.blade.php',
+ './vendor/statamic/starter-kit-podcaster/resources/**/*.blade.php',
+ './vendor/statamic/starter-kit-podcaster/resources/**/*.antlers.html',
'./content/**/*.md'
],
important: true,
diff --git a/vite.config.js b/export/vite.config.js
similarity index 85%
rename from vite.config.js
rename to export/vite.config.js
index 7385cdc..67d8f0d 100644
--- a/vite.config.js
+++ b/export/vite.config.js
@@ -5,7 +5,7 @@ export default defineConfig({
plugins: [
laravel({
input: [
- 'resources/css/tailwind.css',
+ 'resources/css/site.css',
'resources/js/site.js',
],
refresh: true,
diff --git a/public/assets/.meta/doing-it-anyway-cover.png.yaml b/public/assets/.meta/doing-it-anyway-cover.png.yaml
deleted file mode 100644
index 69ec59f..0000000
--- a/public/assets/.meta/doing-it-anyway-cover.png.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 50414
-last_modified: 1623599926
-width: 1144
-height: 1144
-mime_type: image/png
diff --git a/public/assets/artwork/.meta/bb-8-pong.jpg.yaml b/public/assets/artwork/.meta/bb-8-pong.jpg.yaml
deleted file mode 100644
index 9b61471..0000000
--- a/public/assets/artwork/.meta/bb-8-pong.jpg.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 101984
-last_modified: 1623691216
-width: 1152
-height: 742
-mime_type: image/jpeg
diff --git a/public/assets/audio/.meta/01---Sergei-Rachmaninoff-Prelude-in-C-Sharp-Minor-Op.-3-No.2.mp3.yaml b/public/assets/audio/.meta/01---Sergei-Rachmaninoff-Prelude-in-C-Sharp-Minor-Op.-3-No.2.mp3.yaml
deleted file mode 100644
index 68194df..0000000
--- a/public/assets/audio/.meta/01---Sergei-Rachmaninoff-Prelude-in-C-Sharp-Minor-Op.-3-No.2.mp3.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 7381372
-last_modified: 1623684017
-width: null
-height: null
-mime_type: audio/mpeg
diff --git a/public/assets/audio/.meta/Funkadunk.mp3.yaml b/public/assets/audio/.meta/Funkadunk.mp3.yaml
deleted file mode 100644
index ec27286..0000000
--- a/public/assets/audio/.meta/Funkadunk.mp3.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 865088
-last_modified: 1623868341
-width: null
-height: null
-mime_type: audio/mpeg
diff --git a/public/assets/audio/.meta/Johnny-Firmament-LoFi.mp3.yaml b/public/assets/audio/.meta/Johnny-Firmament-LoFi.mp3.yaml
deleted file mode 100644
index 9b49167..0000000
--- a/public/assets/audio/.meta/Johnny-Firmament-LoFi.mp3.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 5050470
-last_modified: 1623867767
-width: null
-height: null
-mime_type: audio/mpeg
diff --git a/public/assets/audio/.meta/On-This-Hip-Hop-(97-BPM)-(01-27-SEC)-MP3.mp3.yaml b/public/assets/audio/.meta/On-This-Hip-Hop-(97-BPM)-(01-27-SEC)-MP3.mp3.yaml
deleted file mode 100644
index ce1d674..0000000
--- a/public/assets/audio/.meta/On-This-Hip-Hop-(97-BPM)-(01-27-SEC)-MP3.mp3.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 3516080
-last_modified: 1623867600
-width: null
-height: null
-mime_type: audio/mpeg
diff --git a/public/assets/audio/.meta/atp434.mp3.yaml b/public/assets/audio/.meta/atp434.mp3.yaml
deleted file mode 100644
index 78f9120..0000000
--- a/public/assets/audio/.meta/atp434.mp3.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 176747375
-last_modified: 1623705754
-width: null
-height: null
-mime_type: audio/mpeg
diff --git a/public/assets/audio/.meta/breakfast-cereal-202.m4a.yaml b/public/assets/audio/.meta/breakfast-cereal-202.m4a.yaml
deleted file mode 100644
index eefe3e1..0000000
--- a/public/assets/audio/.meta/breakfast-cereal-202.m4a.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 1906922
-last_modified: 1624459559
-width: null
-height: null
-mime_type: audio/x-m4a
diff --git a/public/assets/audio/.meta/goodnight-chrome-01.mp3.yaml b/public/assets/audio/.meta/goodnight-chrome-01.mp3.yaml
deleted file mode 100644
index cd232b5..0000000
--- a/public/assets/audio/.meta/goodnight-chrome-01.mp3.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 25988992
-last_modified: 1623446392
-width: null
-height: null
-mime_type: audio/mpeg
diff --git a/public/assets/audio/.meta/goodnight-chrome-04.mp3.yaml b/public/assets/audio/.meta/goodnight-chrome-04.mp3.yaml
deleted file mode 100644
index 01474f7..0000000
--- a/public/assets/audio/.meta/goodnight-chrome-04.mp3.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 14113216
-last_modified: 1623676857
-width: null
-height: null
-mime_type: audio/mpeg
diff --git a/public/assets/theme/badges/.meta/google.svg.yaml b/public/assets/theme/badges/.meta/google.svg.yaml
deleted file mode 100644
index bee4572..0000000
--- a/public/assets/theme/badges/.meta/google.svg.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 24222
-last_modified: 1623874922
-width: '135'
-height: '34'
-mime_type: image/svg
diff --git a/public/assets/theme/badges/.meta/spotify.svg.yaml b/public/assets/theme/badges/.meta/spotify.svg.yaml
deleted file mode 100644
index cd386d1..0000000
--- a/public/assets/theme/badges/.meta/spotify.svg.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 8404
-last_modified: 1623615860
-width: 132
-height: 32
-mime_type: image/svg+xml
diff --git a/public/assets/theme/social/.meta/behance.svg.yaml b/public/assets/theme/social/.meta/behance.svg.yaml
deleted file mode 100644
index 6788f78..0000000
--- a/public/assets/theme/social/.meta/behance.svg.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 1436
-last_modified: 1623942026
-width: 32
-height: 32
-mime_type: image/svg
diff --git a/public/assets/theme/social/.meta/dribbble.svg.yaml b/public/assets/theme/social/.meta/dribbble.svg.yaml
deleted file mode 100644
index 12a57dc..0000000
--- a/public/assets/theme/social/.meta/dribbble.svg.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 1056
-last_modified: 1623942010
-width: 32
-height: 32
-mime_type: image/svg
diff --git a/public/assets/theme/social/.meta/email.svg.yaml b/public/assets/theme/social/.meta/email.svg.yaml
deleted file mode 100644
index 3b665c2..0000000
--- a/public/assets/theme/social/.meta/email.svg.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 985
-last_modified: 1623942344
-width: 32
-height: 32
-mime_type: image/svg
diff --git a/public/assets/theme/social/.meta/facebook.svg.yaml b/public/assets/theme/social/.meta/facebook.svg.yaml
deleted file mode 100644
index 7db1aff..0000000
--- a/public/assets/theme/social/.meta/facebook.svg.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 814
-last_modified: 1623941000
-width: 32
-height: 32
-mime_type: image/svg
diff --git a/public/assets/theme/social/.meta/github.svg.yaml b/public/assets/theme/social/.meta/github.svg.yaml
deleted file mode 100644
index 05b6fee..0000000
--- a/public/assets/theme/social/.meta/github.svg.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 1017
-last_modified: 1623941772
-width: 32
-height: 32
-mime_type: image/svg
diff --git a/public/assets/theme/social/.meta/instagram.svg.yaml b/public/assets/theme/social/.meta/instagram.svg.yaml
deleted file mode 100644
index 961cf99..0000000
--- a/public/assets/theme/social/.meta/instagram.svg.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 495
-last_modified: 1623941132
-width: 32
-height: 32
-mime_type: image/svg
diff --git a/public/assets/theme/social/.meta/podcast.svg.yaml b/public/assets/theme/social/.meta/podcast.svg.yaml
deleted file mode 100644
index de5651d..0000000
--- a/public/assets/theme/social/.meta/podcast.svg.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 1043
-last_modified: 1623941067
-width: 32
-height: 32
-mime_type: image/svg
diff --git a/public/assets/theme/social/.meta/snapchat.svg.yaml b/public/assets/theme/social/.meta/snapchat.svg.yaml
deleted file mode 100644
index 7347ace..0000000
--- a/public/assets/theme/social/.meta/snapchat.svg.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 807
-last_modified: 1623941076
-width: 32
-height: 32
-mime_type: image/svg
diff --git a/public/assets/theme/social/.meta/soundcloud.svg.yaml b/public/assets/theme/social/.meta/soundcloud.svg.yaml
deleted file mode 100644
index 1fd24a6..0000000
--- a/public/assets/theme/social/.meta/soundcloud.svg.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 1216
-last_modified: 1623941054
-width: 32
-height: 32
-mime_type: image/svg
diff --git a/public/assets/theme/social/.meta/spotify.svg.yaml b/public/assets/theme/social/.meta/spotify.svg.yaml
deleted file mode 100644
index ab7572f..0000000
--- a/public/assets/theme/social/.meta/spotify.svg.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 838
-last_modified: 1623941181
-width: 32
-height: 32
-mime_type: image/svg
diff --git a/public/assets/theme/social/.meta/tiktok.svg.yaml b/public/assets/theme/social/.meta/tiktok.svg.yaml
deleted file mode 100644
index 162b6aa..0000000
--- a/public/assets/theme/social/.meta/tiktok.svg.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 495
-last_modified: 1623941486
-width: 32
-height: 32
-mime_type: image/svg
diff --git a/public/assets/theme/social/.meta/twitter.svg.yaml b/public/assets/theme/social/.meta/twitter.svg.yaml
deleted file mode 100644
index d0565f1..0000000
--- a/public/assets/theme/social/.meta/twitter.svg.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 828
-last_modified: 1623940976
-width: 32
-height: 32
-mime_type: image/svg
diff --git a/public/assets/theme/social/.meta/youtube.svg.yaml b/public/assets/theme/social/.meta/youtube.svg.yaml
deleted file mode 100644
index 5054318..0000000
--- a/public/assets/theme/social/.meta/youtube.svg.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-data: { }
-size: 2012
-last_modified: 1623941036
-width: 32
-height: 32
-mime_type: image/svg
diff --git a/public/build/assets/site-CCv8Ghrc.js b/public/build/assets/site-CCv8Ghrc.js
deleted file mode 100644
index 603171f..0000000
--- a/public/build/assets/site-CCv8Ghrc.js
+++ /dev/null
@@ -1,57 +0,0 @@
-function _(e,r,t){return(r=cc(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function oc(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var a=t.call(e,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function cc(e){var r=oc(e,"string");return typeof r=="symbol"?r:String(r)}function uc(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function rn(e,r){for(var t=0;tr){var t=kc(r);return parseFloat(e.toFixed(t))}return Math.round(e/r)*r}var Cc=function(){function e(r,t){uc(this,e),ve.element(r)?this.element=r:ve.string(r)&&(this.element=document.querySelector(r)),ve.element(this.element)&&ve.empty(this.element.rangeTouch)&&(this.config=an({},sn,{},t),this.init())}return hc(e,[{key:"init",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(r){var t=this,a=r?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(l){t.element[a](l,function(o){return t.set(o)},!1)})}},{key:"get",value:function(r){if(!e.enabled||!ve.event(r))return null;var t,a=r.target,l=r.changedTouches[0],o=parseFloat(a.getAttribute("min"))||0,h=parseFloat(a.getAttribute("max"))||100,f=parseFloat(a.getAttribute("step"))||1,w=a.getBoundingClientRect(),k=100/w.width*(this.config.thumbWidth/2)/100;return 0>(t=100/w.width*(l.clientX-w.left))?t=0:100t?t-=(100-2*t)*k:50e!=null?e.constructor:null,Ne=(e,r)=>!!(e&&r&&e instanceof r),Ti=e=>e==null,bn=e=>pt(e)===Object,$c=e=>pt(e)===Number&&!Number.isNaN(e),Nt=e=>pt(e)===String,Ac=e=>pt(e)===Boolean,vn=e=>typeof e=="function",yn=e=>Array.isArray(e),Ec=e=>Ne(e,WeakMap),wn=e=>Ne(e,NodeList),_c=e=>pt(e)===Text,Pc=e=>Ne(e,Event),Mc=e=>Ne(e,KeyboardEvent),Sc=e=>Ne(e,window.TextTrackCue)||Ne(e,window.VTTCue),Nc=e=>Ne(e,TextTrack)||!Ti(e)&&Nt(e.kind),xc=e=>Ne(e,Promise)&&vn(e.then),Lc=e=>e!==null&&typeof e=="object"&&e.nodeType===1&&typeof e.style=="object"&&typeof e.ownerDocument=="object",kn=e=>Ti(e)||(Nt(e)||yn(e)||wn(e))&&!e.length||bn(e)&&!Object.keys(e).length,Ic=e=>{if(Ne(e,window.URL))return!0;if(!Nt(e))return!1;let r=e;e.startsWith("http://")&&e.startsWith("https://")||(r=`http://${e}`);try{return!kn(new URL(r).hostname)}catch{return!1}};var u={nullOrUndefined:Ti,object:bn,number:$c,string:Nt,boolean:Ac,function:vn,array:yn,weakMap:Ec,nodeList:wn,element:Lc,textNode:_c,event:Pc,keyboardEvent:Mc,cue:Sc,track:Nc,promise:xc,url:Ic,empty:kn};const mi=(()=>{const e=document.createElement("span"),r={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},t=Object.keys(r).find(a=>e.style[a]!==void 0);return!!u.string(t)&&r[t]})();function Tn(e,r){setTimeout(()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch{}},r)}const Oc=!!window.document.documentMode,Rc=/Edge/g.test(navigator.userAgent),Fc="WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),Dc=/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,qc=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,jc=/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1;var me={isIE:Oc,isEdge:Rc,isWebKit:Fc,isIPhone:Dc,isIPadOS:qc,isIos:jc};function Hc(e){return JSON.parse(JSON.stringify(e))}function Cn(e,r){return r.split(".").reduce((t,a)=>t&&t[a],e)}function le(e={},...r){if(!r.length)return e;const t=r.shift();return u.object(t)?(Object.keys(t).forEach(a=>{u.object(t[a])?(Object.keys(e).includes(a)||Object.assign(e,{[a]:{}}),le(e[a],t[a])):Object.assign(e,{[a]:t[a]})}),le(e,...r)):e}function $n(e,r){const t=e.length?e:[e];Array.from(t).reverse().forEach((a,l)=>{const o=l>0?r.cloneNode(!0):r,h=a.parentNode,f=a.nextSibling;o.appendChild(a),f?h.insertBefore(o,f):h.appendChild(o)})}function fi(e,r){u.element(e)&&!u.empty(r)&&Object.entries(r).filter(([,t])=>!u.nullOrUndefined(t)).forEach(([t,a])=>e.setAttribute(t,a))}function R(e,r,t){const a=document.createElement(e);return u.object(r)&&fi(a,r),u.string(t)&&(a.innerText=t),a}function Vc(e,r){u.element(e)&&u.element(r)&&r.parentNode.insertBefore(e,r.nextSibling)}function ln(e,r,t,a){u.element(r)&&r.appendChild(R(e,t,a))}function Se(e){u.nodeList(e)||u.array(e)?Array.from(e).forEach(Se):u.element(e)&&u.element(e.parentNode)&&e.parentNode.removeChild(e)}function At(e){if(!u.element(e))return;let{length:r}=e.childNodes;for(;r>0;)e.removeChild(e.lastChild),r-=1}function Pt(e,r){return u.element(r)&&u.element(r.parentNode)&&u.element(e)?(r.parentNode.replaceChild(e,r),e):null}function Ee(e,r){if(!u.string(e)||u.empty(e))return{};const t={},a=le({},r);return e.split(",").forEach(l=>{const o=l.trim(),h=o.replace(".",""),f=o.replace(/[[\]]/g,"").split("="),[w]=f,k=f.length>1?f[1].replace(/["']/g,""):"";switch(o.charAt(0)){case".":u.string(a.class)?t.class=`${a.class} ${h}`:t.class=h;break;case"#":t.id=o.replace("#","");break;case"[":t[w]=k}}),le(a,t)}function He(e,r){if(!u.element(e))return;let t=r;u.boolean(t)||(t=!e.hidden),e.hidden=t}function te(e,r,t){if(u.nodeList(e))return Array.from(e).map(a=>te(a,r,t));if(u.element(e)){let a="toggle";return t!==void 0&&(a=t?"add":"remove"),e.classList[a](r),e.classList.contains(r)}return!1}function Mt(e,r){return u.element(e)&&e.classList.contains(r)}function Ve(e,r){const{prototype:t}=Element;return(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||function(){return Array.from(document.querySelectorAll(r)).includes(this)}).call(e,r)}function Bc(e,r){const{prototype:t}=Element;return(t.closest||function(){let a=this;do{if(Ve.matches(a,r))return a;a=a.parentElement||a.parentNode}while(a!==null&&a.nodeType===1);return null}).call(e,r)}function ot(e){return this.elements.container.querySelectorAll(e)}function ue(e){return this.elements.container.querySelector(e)}function ui(e=null,r=!1){u.element(e)&&e.focus({preventScroll:!0,focusVisible:r})}const on={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},oe={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,r){const t=oe[e]||r!=="html5";return{api:t,ui:t&&oe.rangeInput}},pip:!(me.isIPhone||!u.function(R("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||R("video").disablePictureInPicture)),airplay:u.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(u.empty(e))return!1;const[r]=e.split("/");let t=e;if(!this.isHTML5||r!==this.type)return!1;Object.keys(on).includes(t)&&(t+=`; codecs="${on[e]}"`);try{return!!(t&&this.media.canPlayType(t).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const e=document.createElement("input");return e.type="range",e.type==="range"})(),touch:"ontouchstart"in document.documentElement,transitions:mi!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},zc=(()=>{let e=!1;try{const r=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,r),window.removeEventListener("test",null,r)}catch{}return e})();function ct(e,r,t,a=!1,l=!0,o=!1){if(!e||!("addEventListener"in e)||u.empty(r)||!u.function(t))return;const h=r.split(" ");let f=o;zc&&(f={passive:l,capture:o}),h.forEach(w=>{this&&this.eventListeners&&a&&this.eventListeners.push({element:e,type:w,callback:t,options:f}),e[a?"addEventListener":"removeEventListener"](w,t,f)})}function X(e,r="",t,a=!0,l=!1){ct.call(this,e,r,t,!0,a,l)}function xt(e,r="",t,a=!0,l=!1){ct.call(this,e,r,t,!1,a,l)}function Ci(e,r="",t,a=!0,l=!1){const o=(...h)=>{xt(e,r,o,a,l),t.apply(this,h)};ct.call(this,e,r,o,!0,a,l)}function F(e,r="",t=!1,a={}){if(!u.element(e)||u.empty(r))return;const l=new CustomEvent(r,{bubbles:t,detail:{...a,plyr:this}});e.dispatchEvent(l)}function Uc(){this&&this.eventListeners&&(this.eventListeners.forEach(e=>{const{element:r,type:t,callback:a,options:l}=e;r.removeEventListener(t,a,l)}),this.eventListeners=[])}function Wc(){return new Promise(e=>this.ready?setTimeout(e,0):X.call(this,this.elements.container,"ready",e)).then(()=>{})}function _e(e){u.promise(e)&&e.then(null,()=>{})}function gi(e){return u.array(e)?e.filter((r,t)=>e.indexOf(r)===t):e}function An(e,r){return u.array(e)&&e.length?e.reduce((t,a)=>Math.abs(a-r)({...e,[r/t]:[r,t]}),{});function _n(e){return u.array(e)||u.string(e)&&e.includes(":")?(u.array(e)?e:e.split(":")).map(Number).every(u.number):!1}function St(e){if(!u.array(e)||!e.every(u.number))return null;const[r,t]=e,a=(o,h)=>h===0?o:a(h,o%h),l=a(r,t);return[r/l,t/l]}function $i(e){const r=a=>_n(a)?a.split(":").map(Number):null;let t=r(e);if(t===null&&(t=r(this.config.ratio)),t===null&&!u.empty(this.embed)&&u.array(this.embed.ratio)&&({ratio:t}=this.embed),t===null&&this.isHTML5){const{videoWidth:a,videoHeight:l}=this.media;t=[a,l]}return St(t)}function tt(e){if(!this.isVideo)return{};const{wrapper:r}=this.elements,t=$i.call(this,e);if(!u.array(t))return{};const[a,l]=St(t),o=100/a*l;if(En(`aspect-ratio: ${a}/${l}`)?r.style.aspectRatio=`${a}/${l}`:r.style.paddingBottom=`${o}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const h=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),f=(h-o)/(h/50);this.fullscreen.active?r.style.paddingBottom=null:this.media.style.transform=`translateY(-${f}%)`}else this.isHTML5&&r.classList.add(this.config.classNames.videoFixedRatio);return{padding:o,ratio:t}}function Pn(e,r,t=.05){const a=e/r,l=An(Object.keys(cn),a);return Math.abs(l-a)<=t?cn[l]:[e,r]}function Gc(){return[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)]}const Fe={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(e=>{const r=e.getAttribute("type");return!!u.empty(r)||oe.mime.call(this,r)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:Fe.getSources.call(this).map(e=>Number(e.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const e=this;e.options.speed=e.config.speed.options,u.empty(this.config.ratio)||tt.call(e),Object.defineProperty(e.media,"quality",{get(){const r=Fe.getSources.call(e).find(t=>t.getAttribute("src")===e.source);return r&&Number(r.getAttribute("size"))},set(r){if(e.quality!==r){if(e.config.quality.forced&&u.function(e.config.quality.onChange))e.config.quality.onChange(r);else{const t=Fe.getSources.call(e).find(w=>Number(w.getAttribute("size"))===r);if(!t)return;const{currentTime:a,paused:l,preload:o,readyState:h,playbackRate:f}=e.media;e.media.src=t.getAttribute("src"),(o!=="none"||h)&&(e.once("loadedmetadata",()=>{e.speed=f,e.currentTime=a,l||_e(e.play())}),e.media.load())}F.call(e,e.media,"qualitychange",!1,{quality:r})}}})},cancelRequests(){this.isHTML5&&(Se(Fe.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function Yc(e){return`${e}-${Math.floor(1e4*Math.random())}`}function bi(e,...r){return u.empty(e)?e:e.toString().replace(/{(\d+)}/g,(t,a)=>r[a].toString())}function Kc(e,r){return e===0||r===0||Number.isNaN(e)||Number.isNaN(r)?0:(e/r*100).toFixed(2)}const lt=(e="",r="",t="")=>e.replace(new RegExp(r.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),t.toString()),Mn=(e="")=>e.toString().replace(/\w\S*/g,r=>r.charAt(0).toUpperCase()+r.slice(1).toLowerCase());function Xc(e=""){let r=e.toString();return r=lt(r,"-"," "),r=lt(r,"_"," "),r=Mn(r),lt(r," ","")}function Qc(e=""){let r=e.toString();return r=Xc(r),r.charAt(0).toLowerCase()+r.slice(1)}function Jc(e){const r=document.createDocumentFragment(),t=document.createElement("div");return r.appendChild(t),t.innerHTML=e,r.firstChild.innerText}function Zc(e){const r=document.createElement("div");return r.appendChild(e),r.innerHTML}const un={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},pe={get(e="",r={}){if(u.empty(e)||u.empty(r))return"";let t=Cn(r.i18n,e);if(u.empty(t))return Object.keys(un).includes(e)?un[e]:"";const a={"{seektime}":r.seekTime,"{title}":r.title};return Object.entries(a).forEach(([l,o])=>{t=lt(t,l,o)}),t}};class ut{constructor(r){_(this,"get",t=>{if(!ut.supported||!this.enabled)return null;const a=window.localStorage.getItem(this.key);if(u.empty(a))return null;const l=JSON.parse(a);return u.string(t)&&t.length?l[t]:l}),_(this,"set",t=>{if(!ut.supported||!this.enabled||!u.object(t))return;let a=this.get();u.empty(a)&&(a={}),le(a,t);try{window.localStorage.setItem(this.key,JSON.stringify(a))}catch{}}),this.enabled=r.config.storage.enabled,this.key=r.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const r="___test";return window.localStorage.setItem(r,r),window.localStorage.removeItem(r),!0}catch{return!1}}}function mt(e,r="text"){return new Promise((t,a)=>{try{const l=new XMLHttpRequest;if(!("withCredentials"in l))return;l.addEventListener("load",()=>{if(r==="text")try{t(JSON.parse(l.responseText))}catch{t(l.responseText)}else t(l.response)}),l.addEventListener("error",()=>{throw new Error(l.status)}),l.open("GET",e,!0),l.responseType=r,l.send()}catch(l){a(l)}})}function Sn(e,r){if(!u.string(e))return;const t="cache",a=u.string(r);let l=!1;const o=()=>document.getElementById(r)!==null,h=(f,w)=>{f.innerHTML=w,a&&o()||document.body.insertAdjacentElement("afterbegin",f)};if(!a||!o()){const f=ut.supported,w=document.createElement("div");if(w.setAttribute("hidden",""),a&&w.setAttribute("id",r),f){const k=window.localStorage.getItem(`${t}-${r}`);if(l=k!==null,l){const S=JSON.parse(k);h(w,S.content)}}mt(e).then(k=>{if(!u.empty(k)){if(f)try{window.localStorage.setItem(`${t}-${r}`,JSON.stringify({content:k}))}catch{}h(w,k)}}).catch(()=>{})}}const Nn=e=>Math.trunc(e/60/60%60,10),eu=e=>Math.trunc(e/60%60,10),tu=e=>Math.trunc(e%60,10);function Lt(e=0,r=!1,t=!1){if(!u.number(e))return Lt(void 0,r,t);const a=f=>`0${f}`.slice(-2);let l=Nn(e);const o=eu(e),h=tu(e);return l=r||l>0?`${l}:`:"",`${t&&e>0?"-":""}${l}${a(o)}:${a(h)}`}const E={getIconUrl(){const e=new URL(this.config.iconUrl,window.location),r=window.location.host?window.location.host:window.top.location.host,t=e.host!==r||me.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:t}},findElements(){try{return this.elements.controls=ue.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:ot.call(this,this.config.selectors.buttons.play),pause:ue.call(this,this.config.selectors.buttons.pause),restart:ue.call(this,this.config.selectors.buttons.restart),rewind:ue.call(this,this.config.selectors.buttons.rewind),fastForward:ue.call(this,this.config.selectors.buttons.fastForward),mute:ue.call(this,this.config.selectors.buttons.mute),pip:ue.call(this,this.config.selectors.buttons.pip),airplay:ue.call(this,this.config.selectors.buttons.airplay),settings:ue.call(this,this.config.selectors.buttons.settings),captions:ue.call(this,this.config.selectors.buttons.captions),fullscreen:ue.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=ue.call(this,this.config.selectors.progress),this.elements.inputs={seek:ue.call(this,this.config.selectors.inputs.seek),volume:ue.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:ue.call(this,this.config.selectors.display.buffer),currentTime:ue.call(this,this.config.selectors.display.currentTime),duration:ue.call(this,this.config.selectors.display.duration)},u.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon(e,r){const t="http://www.w3.org/2000/svg",a=E.getIconUrl.call(this),l=`${a.cors?"":a.url}#${this.config.iconPrefix}`,o=document.createElementNS(t,"svg");fi(o,le(r,{"aria-hidden":"true",focusable:"false"}));const h=document.createElementNS(t,"use"),f=`${l}-${e}`;return"href"in h&&h.setAttributeNS("http://www.w3.org/1999/xlink","href",f),h.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f),o.appendChild(h),o},createLabel(e,r={}){const t=pe.get(e,this.config);return R("span",{...r,class:[r.class,this.config.classNames.hidden].filter(Boolean).join(" ")},t)},createBadge(e){if(u.empty(e))return null;const r=R("span",{class:this.config.classNames.menu.value});return r.appendChild(R("span",{class:this.config.classNames.menu.badge},e)),r},createButton(e,r){const t=le({},r);let a=Qc(e);const l={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(h=>{Object.keys(t).includes(h)&&(l[h]=t[h],delete t[h])}),l.element!=="button"||Object.keys(t).includes("type")||(t.type="button"),Object.keys(t).includes("class")?t.class.split(" ").some(h=>h===this.config.classNames.control)||le(t,{class:`${t.class} ${this.config.classNames.control}`}):t.class=this.config.classNames.control,e){case"play":l.toggle=!0,l.label="play",l.labelPressed="pause",l.icon="play",l.iconPressed="pause";break;case"mute":l.toggle=!0,l.label="mute",l.labelPressed="unmute",l.icon="volume",l.iconPressed="muted";break;case"captions":l.toggle=!0,l.label="enableCaptions",l.labelPressed="disableCaptions",l.icon="captions-off",l.iconPressed="captions-on";break;case"fullscreen":l.toggle=!0,l.label="enterFullscreen",l.labelPressed="exitFullscreen",l.icon="enter-fullscreen",l.iconPressed="exit-fullscreen";break;case"play-large":t.class+=` ${this.config.classNames.control}--overlaid`,a="play",l.label="play",l.icon="play";break;default:u.empty(l.label)&&(l.label=a),u.empty(l.icon)&&(l.icon=e)}const o=R(l.element);return l.toggle?(o.appendChild(E.createIcon.call(this,l.iconPressed,{class:"icon--pressed"})),o.appendChild(E.createIcon.call(this,l.icon,{class:"icon--not-pressed"})),o.appendChild(E.createLabel.call(this,l.labelPressed,{class:"label--pressed"})),o.appendChild(E.createLabel.call(this,l.label,{class:"label--not-pressed"}))):(o.appendChild(E.createIcon.call(this,l.icon)),o.appendChild(E.createLabel.call(this,l.label))),le(t,Ee(this.config.selectors.buttons[a],t)),fi(o,t),a==="play"?(u.array(this.elements.buttons[a])||(this.elements.buttons[a]=[]),this.elements.buttons[a].push(o)):this.elements.buttons[a]=o,o},createRange(e,r){const t=R("input",le(Ee(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":pe.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},r));return this.elements.inputs[e]=t,E.updateRangeFill.call(this,t),Cc.setup(t),t},createProgress(e,r){const t=R("progress",le(Ee(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},r));if(e!=="volume"){t.appendChild(R("span",null,"0"));const a={played:"played",buffer:"buffered"}[e],l=a?pe.get(a,this.config):"";t.innerText=`% ${l.toLowerCase()}`}return this.elements.display[e]=t,t},createTime(e,r){const t=Ee(this.config.selectors.display[e],r),a=R("div",le(t,{class:`${t.class?t.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":pe.get(e,this.config),role:"timer"}),"00:00");return this.elements.display[e]=a,a},bindMenuItemShortcuts(e,r){X.call(this,e,"keydown keyup",t=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(t.key)||(t.preventDefault(),t.stopPropagation(),t.type==="keydown"))return;const a=Ve(e,'[role="menuitemradio"]');if(!a&&[" ","ArrowRight"].includes(t.key))E.showMenuPanel.call(this,r,!0);else{let l;t.key!==" "&&(t.key==="ArrowDown"||a&&t.key==="ArrowRight"?(l=e.nextElementSibling,u.element(l)||(l=e.parentNode.firstElementChild)):(l=e.previousElementSibling,u.element(l)||(l=e.parentNode.lastElementChild)),ui.call(this,l,!0))}},!1),X.call(this,e,"keyup",t=>{t.key==="Return"&&E.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:e,list:r,type:t,title:a,badge:l=null,checked:o=!1}){const h=Ee(this.config.selectors.inputs[t]),f=R("button",le(h,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${h.class?h.class:""}`.trim(),"aria-checked":o,value:e})),w=R("span");w.innerHTML=a,u.element(l)&&w.appendChild(l),f.appendChild(w),Object.defineProperty(f,"checked",{enumerable:!0,get:()=>f.getAttribute("aria-checked")==="true",set(k){k&&Array.from(f.parentNode.children).filter(S=>Ve(S,'[role="menuitemradio"]')).forEach(S=>S.setAttribute("aria-checked","false")),f.setAttribute("aria-checked",k?"true":"false")}}),this.listeners.bind(f,"click keyup",k=>{if(!u.keyboardEvent(k)||k.key===" "){switch(k.preventDefault(),k.stopPropagation(),f.checked=!0,t){case"language":this.currentTrack=Number(e);break;case"quality":this.quality=e;break;case"speed":this.speed=parseFloat(e)}E.showMenuPanel.call(this,"home",u.keyboardEvent(k))}},t,!1),E.bindMenuItemShortcuts.call(this,f,t),r.appendChild(f)},formatTime(e=0,r=!1){return u.number(e)?Lt(e,Nn(this.duration)>0,r):e},updateTimeDisplay(e=null,r=0,t=!1){u.element(e)&&u.number(r)&&(e.innerText=E.formatTime(r,t))},updateVolume(){this.supported.ui&&(u.element(this.elements.inputs.volume)&&E.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),u.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(e,r=0){u.element(e)&&(e.value=r,E.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!u.event(e))return;let r=0;const t=(a,l)=>{const o=u.number(l)?l:0,h=u.element(a)?a:this.elements.display.buffer;if(u.element(h)){h.value=o;const f=h.getElementsByTagName("span")[0];u.element(f)&&(f.childNodes[0].nodeValue=o)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":r=Kc(this.currentTime,this.duration),e.type==="timeupdate"&&E.setRange.call(this,this.elements.inputs.seek,r);break;case"playing":case"progress":t(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(e){const r=u.event(e)?e.target:e;if(u.element(r)&&r.getAttribute("type")==="range"){if(Ve(r,this.config.selectors.inputs.seek)){r.setAttribute("aria-valuenow",this.currentTime);const t=E.formatTime(this.currentTime),a=E.formatTime(this.duration),l=pe.get("seekLabel",this.config);r.setAttribute("aria-valuetext",l.replace("{currentTime}",t).replace("{duration}",a))}else if(Ve(r,this.config.selectors.inputs.volume)){const t=100*r.value;r.setAttribute("aria-valuenow",t),r.setAttribute("aria-valuetext",`${t.toFixed(1)}%`)}else r.setAttribute("aria-valuenow",r.value);(me.isWebKit||me.isIPadOS)&&r.style.setProperty("--value",r.value/r.max*100+"%")}},updateSeekTooltip(e){var r,t;if(!this.config.tooltips.seek||!u.element(this.elements.inputs.seek)||!u.element(this.elements.display.seekTooltip)||this.duration===0)return;const a=this.elements.display.seekTooltip,l=`${this.config.classNames.tooltip}--visible`,o=S=>te(a,l,S);if(this.touch)return void o(!1);let h=0;const f=this.elements.progress.getBoundingClientRect();if(u.event(e))h=100/f.width*(e.pageX-f.left);else{if(!Mt(a,l))return;h=parseFloat(a.style.left,10)}h<0?h=0:h>100&&(h=100);const w=this.duration/100*h;a.innerText=E.formatTime(w);const k=(r=this.config.markers)===null||r===void 0||(t=r.points)===null||t===void 0?void 0:t.find(({time:S})=>S===Math.round(w));k&&a.insertAdjacentHTML("afterbegin",`${k.label}
`),a.style.left=`${h}%`,u.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&o(e.type==="mouseenter")},timeUpdate(e){const r=!u.element(this.elements.display.duration)&&this.config.invertTime;E.updateTimeDisplay.call(this,this.elements.display.currentTime,r?this.duration-this.currentTime:this.currentTime,r),e&&e.type==="timeupdate"&&this.media.seeking||E.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return He(this.elements.display.currentTime,!0),void He(this.elements.progress,!0);u.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=u.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&E.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&E.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&E.setMarkers.call(this),E.updateSeekTooltip.call(this)},toggleMenuButton(e,r){He(this.elements.settings.buttons[e],!r)},updateSetting(e,r,t){const a=this.elements.settings.panels[e];let l=null,o=r;if(e==="captions")l=this.currentTrack;else{if(l=u.empty(t)?this[e]:t,u.empty(l)&&(l=this.config[e].default),!u.empty(this.options[e])&&!this.options[e].includes(l))return void this.debug.warn(`Unsupported value of '${l}' for ${e}`);if(!this.config[e].options.includes(l))return void this.debug.warn(`Disabled value of '${l}' for ${e}`)}if(u.element(o)||(o=a&&a.querySelector('[role="menu"]')),!u.element(o))return;this.elements.settings.buttons[e].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=E.getLabel.call(this,e,l);const h=o&&o.querySelector(`[value="${l}"]`);u.element(h)&&(h.checked=!0)},getLabel(e,r){switch(e){case"speed":return r===1?pe.get("normal",this.config):`${r}×`;case"quality":if(u.number(r)){const t=pe.get(`qualityLabel.${r}`,this.config);return t.length?t:`${r}p`}return Mn(r);case"captions":return Q.getLabel.call(this);default:return null}},setQualityMenu(e){if(!u.element(this.elements.settings.panels.quality))return;const r="quality",t=this.elements.settings.panels.quality.querySelector('[role="menu"]');u.array(e)&&(this.options.quality=gi(e).filter(o=>this.config.quality.options.includes(o)));const a=!u.empty(this.options.quality)&&this.options.quality.length>1;if(E.toggleMenuButton.call(this,r,a),At(t),E.checkMenu.call(this),!a)return;const l=o=>{const h=pe.get(`qualityBadge.${o}`,this.config);return h.length?E.createBadge.call(this,h):null};this.options.quality.sort((o,h)=>{const f=this.config.quality.options;return f.indexOf(o)>f.indexOf(h)?1:-1}).forEach(o=>{E.createMenuItem.call(this,{value:o,list:t,type:r,title:E.getLabel.call(this,"quality",o),badge:l(o)})}),E.updateSetting.call(this,r,t)},setCaptionsMenu(){if(!u.element(this.elements.settings.panels.captions))return;const e="captions",r=this.elements.settings.panels.captions.querySelector('[role="menu"]'),t=Q.getTracks.call(this),a=!!t.length;if(E.toggleMenuButton.call(this,e,a),At(r),E.checkMenu.call(this),!a)return;const l=t.map((o,h)=>({value:h,checked:this.captions.toggled&&this.currentTrack===h,title:Q.getLabel.call(this,o),badge:o.language&&E.createBadge.call(this,o.language.toUpperCase()),list:r,type:"language"}));l.unshift({value:-1,checked:!this.captions.toggled,title:pe.get("disabled",this.config),list:r,type:"language"}),l.forEach(E.createMenuItem.bind(this)),E.updateSetting.call(this,e,r)},setSpeedMenu(){if(!u.element(this.elements.settings.panels.speed))return;const e="speed",r=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(a=>a>=this.minimumSpeed&&a<=this.maximumSpeed);const t=!u.empty(this.options.speed)&&this.options.speed.length>1;E.toggleMenuButton.call(this,e,t),At(r),E.checkMenu.call(this),t&&(this.options.speed.forEach(a=>{E.createMenuItem.call(this,{value:a,list:r,type:e,title:E.getLabel.call(this,"speed",a)})}),E.updateSetting.call(this,e,r))},checkMenu(){const{buttons:e}=this.elements.settings,r=!u.empty(e)&&Object.values(e).some(t=>!t.hidden);He(this.elements.settings.menu,!r)},focusFirstMenuItem(e,r=!1){if(this.elements.settings.popup.hidden)return;let t=e;u.element(t)||(t=Object.values(this.elements.settings.panels).find(l=>!l.hidden));const a=t.querySelector('[role^="menuitem"]');ui.call(this,a,r)},toggleMenu(e){const{popup:r}=this.elements.settings,t=this.elements.buttons.settings;if(!u.element(r)||!u.element(t))return;const{hidden:a}=r;let l=a;if(u.boolean(e))l=e;else if(u.keyboardEvent(e)&&e.key==="Escape")l=!1;else if(u.event(e)){const o=u.function(e.composedPath)?e.composedPath()[0]:e.target,h=r.contains(o);if(h||!h&&e.target!==t&&l)return}t.setAttribute("aria-expanded",l),He(r,!l),te(this.elements.container,this.config.classNames.menu.open,l),l&&u.keyboardEvent(e)?E.focusFirstMenuItem.call(this,null,!0):l||a||ui.call(this,t,u.keyboardEvent(e))},getMenuSize(e){const r=e.cloneNode(!0);r.style.position="absolute",r.style.opacity=0,r.removeAttribute("hidden"),e.parentNode.appendChild(r);const t=r.scrollWidth,a=r.scrollHeight;return Se(r),{width:t,height:a}},showMenuPanel(e="",r=!1){const t=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!u.element(t))return;const a=t.parentNode,l=Array.from(a.children).find(o=>!o.hidden);if(oe.transitions&&!oe.reducedMotion){a.style.width=`${l.scrollWidth}px`,a.style.height=`${l.scrollHeight}px`;const o=E.getMenuSize.call(this,t),h=f=>{f.target===a&&["width","height"].includes(f.propertyName)&&(a.style.width="",a.style.height="",xt.call(this,a,mi,h))};X.call(this,a,mi,h),a.style.width=`${o.width}px`,a.style.height=`${o.height}px`}He(l,!0),He(t,!1),E.focusFirstMenuItem.call(this,t,r)},setDownloadUrl(){const e=this.elements.buttons.download;u.element(e)&&e.setAttribute("href",this.download)},create(e){const{bindMenuItemShortcuts:r,createButton:t,createProgress:a,createRange:l,createTime:o,setQualityMenu:h,setSpeedMenu:f,showMenuPanel:w}=E;this.elements.controls=null,u.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(t.call(this,"play-large"));const k=R("div",Ee(this.config.selectors.controls.wrapper));this.elements.controls=k;const S={class:"plyr__controls__item"};return gi(u.array(this.config.controls)?this.config.controls:[]).forEach(L=>{if(L==="restart"&&k.appendChild(t.call(this,"restart",S)),L==="rewind"&&k.appendChild(t.call(this,"rewind",S)),L==="play"&&k.appendChild(t.call(this,"play",S)),L==="fast-forward"&&k.appendChild(t.call(this,"fast-forward",S)),L==="progress"){const A=R("div",{class:`${S.class} plyr__progress__container`}),D=R("div",Ee(this.config.selectors.progress));if(D.appendChild(l.call(this,"seek",{id:`plyr-seek-${e.id}`})),D.appendChild(a.call(this,"buffer")),this.config.tooltips.seek){const H=R("span",{class:this.config.classNames.tooltip},"00:00");D.appendChild(H),this.elements.display.seekTooltip=H}this.elements.progress=D,A.appendChild(this.elements.progress),k.appendChild(A)}if(L==="current-time"&&k.appendChild(o.call(this,"currentTime",S)),L==="duration"&&k.appendChild(o.call(this,"duration",S)),L==="mute"||L==="volume"){let{volume:A}=this.elements;if(u.element(A)&&k.contains(A)||(A=R("div",le({},S,{class:`${S.class} plyr__volume`.trim()})),this.elements.volume=A,k.appendChild(A)),L==="mute"&&A.appendChild(t.call(this,"mute")),L==="volume"&&!me.isIos&&!me.isIPadOS){const D={max:1,step:.05,value:this.config.volume};A.appendChild(l.call(this,"volume",le(D,{id:`plyr-volume-${e.id}`})))}}if(L==="captions"&&k.appendChild(t.call(this,"captions",S)),L==="settings"&&!u.empty(this.config.settings)){const A=R("div",le({},S,{class:`${S.class} plyr__menu`.trim(),hidden:""}));A.appendChild(t.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${e.id}`,"aria-expanded":!1}));const D=R("div",{class:"plyr__menu__container",id:`plyr-settings-${e.id}`,hidden:""}),H=R("div"),y=R("div",{id:`plyr-settings-${e.id}-home`}),q=R("div",{role:"menu"});y.appendChild(q),H.appendChild(y),this.elements.settings.panels.home=y,this.config.settings.forEach(j=>{const M=R("button",le(Ee(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));r.call(this,M,j),X.call(this,M,"click",()=>{w.call(this,j,!1)});const W=R("span",null,pe.get(j,this.config)),re=R("span",{class:this.config.classNames.menu.value});re.innerHTML=e[j],W.appendChild(re),M.appendChild(W),q.appendChild(M);const fe=R("div",{id:`plyr-settings-${e.id}-${j}`,hidden:""}),I=R("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});I.appendChild(R("span",{"aria-hidden":!0},pe.get(j,this.config))),I.appendChild(R("span",{class:this.config.classNames.hidden},pe.get("menuBack",this.config))),X.call(this,fe,"keydown",ye=>{ye.key==="ArrowLeft"&&(ye.preventDefault(),ye.stopPropagation(),w.call(this,"home",!0))},!1),X.call(this,I,"click",()=>{w.call(this,"home",!1)}),fe.appendChild(I),fe.appendChild(R("div",{role:"menu"})),H.appendChild(fe),this.elements.settings.buttons[j]=M,this.elements.settings.panels[j]=fe}),D.appendChild(H),A.appendChild(D),k.appendChild(A),this.elements.settings.popup=D,this.elements.settings.menu=A}if(L==="pip"&&oe.pip&&k.appendChild(t.call(this,"pip",S)),L==="airplay"&&oe.airplay&&k.appendChild(t.call(this,"airplay",S)),L==="download"){const A=le({},S,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(A.download="");const{download:D}=this.config.urls;!u.url(D)&&this.isEmbed&&le(A,{icon:`logo-${this.provider}`,label:this.provider}),k.appendChild(t.call(this,"download",A))}L==="fullscreen"&&k.appendChild(t.call(this,"fullscreen",S))}),this.isHTML5&&h.call(this,Fe.getQualityOptions.call(this)),f.call(this),k},inject(){if(this.config.loadSprite){const l=E.getIconUrl.call(this);l.cors&&Sn(l.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let e=null;this.elements.controls=null;const r={id:this.id,seektime:this.config.seekTime,title:this.config.title};let t=!0;u.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,r)),this.config.controls||(this.config.controls=[]),u.element(this.config.controls)||u.string(this.config.controls)?e=this.config.controls:(e=E.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Q.getLabel.call(this)}),t=!1);let a;if(t&&u.string(this.config.controls)&&(e=(l=>{let o=l;return Object.entries(r).forEach(([h,f])=>{o=lt(o,`{${h}}`,f)}),o})(e)),u.string(this.config.selectors.controls.container)&&(a=document.querySelector(this.config.selectors.controls.container)),u.element(a)||(a=this.elements.container),a[u.element(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),u.element(this.elements.controls)||E.findElements.call(this),!u.empty(this.elements.buttons)){const l=o=>{const h=this.config.classNames.controlPressed;o.setAttribute("aria-pressed","false"),Object.defineProperty(o,"pressed",{configurable:!0,enumerable:!0,get:()=>Mt(o,h),set(f=!1){te(o,h,f),o.setAttribute("aria-pressed",f?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach(o=>{u.array(o)||u.nodeList(o)?Array.from(o).filter(Boolean).forEach(l):l(o)})}if(me.isEdge&&Tn(a),this.config.tooltips.controls){const{classNames:l,selectors:o}=this.config,h=`${o.controls.wrapper} ${o.labels} .${l.hidden}`,f=ot.call(this,h);Array.from(f).forEach(w=>{te(w,this.config.classNames.hidden,!1),te(w,this.config.classNames.tooltip,!0)})}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch{}},setMarkers(){var e,r;if(!this.duration||this.elements.markers)return;const t=(e=this.config.markers)===null||e===void 0||(r=e.points)===null||r===void 0?void 0:r.filter(({time:w})=>w>0&&wte(o,h,w);t.forEach(w=>{const k=R("span",{class:this.config.classNames.marker},""),S=w.time/this.duration*100+"%";o&&(k.addEventListener("mouseenter",()=>{w.label||(o.style.left=S,o.innerHTML=w.label,f(!0))}),k.addEventListener("mouseleave",()=>{f(!1)})),k.addEventListener("click",()=>{this.currentTime=w.time}),k.style.left=S,l.appendChild(k)}),a.appendChild(l),this.config.tooltips.seek||(o=R("span",{class:this.config.classNames.tooltip},""),a.appendChild(o)),this.elements.markers={points:l,tip:o},this.elements.progress.appendChild(a)}};function xn(e,r=!0){let t=e;if(r){const a=document.createElement("a");a.href=t,t=a.href}try{return new URL(t)}catch{return null}}function Ln(e){const r=new URLSearchParams;return u.object(e)&&Object.entries(e).forEach(([t,a])=>{r.set(t,a)}),r}const Q={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!oe.textTracks)return void(u.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&E.setCaptionsMenu.call(this));if(u.element(this.elements.captions)||(this.elements.captions=R("div",Ee(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),Vc(this.elements.captions,this.elements.wrapper)),me.isIE&&window.URL){const a=this.media.querySelectorAll("track");Array.from(a).forEach(l=>{const o=l.getAttribute("src"),h=xn(o);h!==null&&h.hostname!==window.location.href.hostname&&["http:","https:"].includes(h.protocol)&&mt(o,"blob").then(f=>{l.setAttribute("src",window.URL.createObjectURL(f))}).catch(()=>{Se(l)})})}const e=gi((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(a=>a.split("-")[0]));let r=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();r==="auto"&&([r]=e);let t=this.storage.get("captions");if(u.boolean(t)||({active:t}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:t,language:r,languages:e}),this.isHTML5){const a=this.config.captions.update?"addtrack removetrack":"removetrack";X.call(this,this.media.textTracks,a,Q.update.bind(this))}setTimeout(Q.update.bind(this),0)},update(){const e=Q.getTracks.call(this,!0),{active:r,language:t,meta:a,currentTrackNode:l}=this.captions,o=!!e.find(h=>h.language===t);this.isHTML5&&this.isVideo&&e.filter(h=>!a.get(h)).forEach(h=>{this.debug.log("Track added",h),a.set(h,{default:h.mode==="showing"}),h.mode==="showing"&&(h.mode="hidden"),X.call(this,h,"cuechange",()=>Q.updateCues.call(this))}),(o&&this.language!==t||!e.includes(l))&&(Q.setLanguage.call(this,t),Q.toggle.call(this,r&&o)),this.elements&&te(this.elements.container,this.config.classNames.captions.enabled,!u.empty(e)),u.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&E.setCaptionsMenu.call(this)},toggle(e,r=!0){if(!this.supported.ui)return;const{toggled:t}=this.captions,a=this.config.classNames.captions.active,l=u.nullOrUndefined(e)?!t:e;if(l!==t){if(r||(this.captions.active=l,this.storage.set({captions:l})),!this.language&&l&&!r){const o=Q.getTracks.call(this),h=Q.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=h.language,void Q.set.call(this,o.indexOf(h))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=l),te(this.elements.container,a,l),this.captions.toggled=l,E.updateSetting.call(this,"captions"),F.call(this,this.media,l?"captionsenabled":"captionsdisabled")}setTimeout(()=>{l&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(e,r=!0){const t=Q.getTracks.call(this);if(e!==-1)if(u.number(e))if(e in t){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const a=t[e],{language:l}=a||{};this.captions.currentTrackNode=a,E.updateSetting.call(this,"captions"),r||(this.captions.language=l,this.storage.set({language:l})),this.isVimeo&&this.embed.enableTextTrack(l),F.call(this,this.media,"languagechange")}Q.toggle.call(this,!0,r),this.isHTML5&&this.isVideo&&Q.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else Q.toggle.call(this,!1,r)},setLanguage(e,r=!0){if(!u.string(e))return void this.debug.warn("Invalid language argument",e);const t=e.toLowerCase();this.captions.language=t;const a=Q.getTracks.call(this),l=Q.findTrack.call(this,[t]);Q.set.call(this,a.indexOf(l),r)},getTracks(e=!1){return Array.from((this.media||{}).textTracks||[]).filter(r=>!this.isHTML5||e||this.captions.meta.has(r)).filter(r=>["captions","subtitles"].includes(r.kind))},findTrack(e,r=!1){const t=Q.getTracks.call(this),a=h=>Number((this.captions.meta.get(h)||{}).default),l=Array.from(t).sort((h,f)=>a(f)-a(h));let o;return e.every(h=>(o=l.find(f=>f.language===h),!o)),o||(r?l[0]:void 0)},getCurrentTrack(){return Q.getTracks.call(this)[this.currentTrack]},getLabel(e){let r=e;return!u.track(r)&&oe.textTracks&&this.captions.toggled&&(r=Q.getCurrentTrack.call(this)),u.track(r)?u.empty(r.label)?u.empty(r.language)?pe.get("enabled",this.config):e.language.toUpperCase():r.label:pe.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!u.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!u.nullOrUndefined(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let r=e;if(!r){const a=Q.getCurrentTrack.call(this);r=Array.from((a||{}).activeCues||[]).map(l=>l.getCueAsHTML()).map(Zc)}const t=r.map(a=>a.trim()).join(`
-`);if(t!==this.elements.captions.innerHTML){At(this.elements.captions);const a=R("span",Ee(this.config.selectors.caption));a.innerHTML=t,this.elements.captions.appendChild(a),F.call(this,this.media,"cuechange")}}},In={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.7.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},hi={active:"picture-in-picture",inactive:"inline"},Re={html5:"html5",youtube:"youtube",vimeo:"vimeo"},di={audio:"audio",video:"video"};function iu(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?Re.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?Re.vimeo:null}const pi=()=>{};class ru{constructor(r=!1){this.enabled=window.console&&r,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):pi}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):pi}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):pi}}class Ae{constructor(r){_(this,"onChange",()=>{if(!this.supported)return;const t=this.player.elements.buttons.fullscreen;u.element(t)&&(t.pressed=this.active);const a=this.target===this.player.media?this.target:this.player.elements.container;F.call(this.player,a,this.active?"enterfullscreen":"exitfullscreen",!0)}),_(this,"toggleFallback",(t=!1)=>{if(t?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",te(this.target,this.player.config.classNames.fullscreen.fallback,t),me.isIos){let a=document.head.querySelector('meta[name="viewport"]');const l="viewport-fit=cover";a||(a=document.createElement("meta"),a.setAttribute("name","viewport"));const o=u.string(a.content)&&a.content.includes(l);t?(this.cleanupViewport=!o,o||(a.content+=`,${l}`)):this.cleanupViewport&&(a.content=a.content.split(",").filter(h=>h.trim()!==l).join(","))}this.onChange()}),_(this,"trapFocus",t=>{if(me.isIos||me.isIPadOS||!this.active||t.key!=="Tab")return;const a=document.activeElement,l=ot.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[o]=l,h=l[l.length-1];a!==h||t.shiftKey?a===o&&t.shiftKey&&(h.focus(),t.preventDefault()):(o.focus(),t.preventDefault())}),_(this,"update",()=>{if(this.supported){let t;t=this.forceFallback?"Fallback (forced)":Ae.nativeSupported?"Native":"Fallback",this.player.debug.log(`${t} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");te(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),_(this,"enter",()=>{this.supported&&(me.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Ae.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?u.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),_(this,"exit",()=>{if(this.supported)if(me.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),_e(this.player.play());else if(!Ae.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!u.empty(this.prefix)){const t=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${t}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),_(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=r,this.prefix=Ae.prefix,this.property=Ae.property,this.scrollPosition={x:0,y:0},this.forceFallback=r.config.fullscreen.fallback==="force",this.player.elements.fullscreen=r.config.fullscreen.container&&Bc(this.player.elements.container,r.config.fullscreen.container),X.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),X.call(this.player,this.player.elements.container,"dblclick",t=>{u.element(this.player.elements.controls)&&this.player.elements.controls.contains(t.target)||this.player.listeners.proxy(t,this.toggle,"fullscreen")}),X.call(this,this.player.elements.container,"keydown",t=>this.trapFocus(t)),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return Ae.nativeSupported&&!this.forceFallback}static get prefix(){if(u.function(document.exitFullscreen))return"";let r="";return["webkit","moz","ms"].some(t=>!(!u.function(document[`${t}ExitFullscreen`])&&!u.function(document[`${t}CancelFullScreen`]))&&(r=t,!0)),r}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,Ae.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Ae.nativeSupported||!me.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Ae.nativeSupported||this.forceFallback)return Mt(this.target,this.player.config.classNames.fullscreen.fallback);const r=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return r&&r.shadowRoot?r===this.target.getRootNode().host:r===this.target}get target(){return me.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function Et(e,r=1){return new Promise((t,a)=>{const l=new Image,o=()=>{delete l.onload,delete l.onerror,(l.naturalWidth>=r?t:a)(l)};Object.assign(l,{onload:o,onerror:o,src:e})})}const ne={addStyleHook(){te(this.elements.container,this.config.selectors.container.replace(".",""),!0),te(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(e=!1){e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void ne.toggleNativeControls.call(this,!0);u.element(this.elements.controls)||(E.inject.call(this),this.listeners.controls()),ne.toggleNativeControls.call(this),this.isHTML5&&Q.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,E.updateVolume.call(this),E.timeUpdate.call(this),E.durationUpdate.call(this),ne.checkPlaying.call(this),te(this.elements.container,this.config.classNames.pip.supported,oe.pip&&this.isHTML5&&this.isVideo),te(this.elements.container,this.config.classNames.airplay.supported,oe.airplay&&this.isHTML5),te(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{F.call(this,this.media,"ready")},0),ne.setTitle.call(this),this.poster&&ne.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&E.durationUpdate.call(this),this.config.mediaMetadata&&E.setMediaMetadata.call(this)},setTitle(){let e=pe.get("play",this.config);if(u.string(this.config.title)&&!u.empty(this.config.title)&&(e+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(r=>{r.setAttribute("aria-label",e)}),this.isEmbed){const r=ue.call(this,"iframe");if(!u.element(r))return;const t=u.empty(this.config.title)?"video":this.config.title,a=pe.get("frameTitle",this.config);r.setAttribute("title",a.replace("{title}",t))}},togglePoster(e){te(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e,r=!0){return r&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),Wc.call(this).then(()=>Et(e)).catch(t=>{throw e===this.poster&&ne.togglePoster.call(this,!1),t}).then(()=>{if(e!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${e}')`,backgroundSize:""}),ne.togglePoster.call(this,!0),e)))},checkPlaying(e){te(this.elements.container,this.config.classNames.playing,this.playing),te(this.elements.container,this.config.classNames.paused,this.paused),te(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(r=>{Object.assign(r,{pressed:this.playing}),r.setAttribute("aria-label",pe.get(this.playing?"pause":"play",this.config))}),u.event(e)&&e.type==="timeupdate"||ne.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{te(this.elements.container,this.config.classNames.loading,this.loading),ne.toggleControls.call(this)},this.loading?250:0)},toggleControls(e){const{controls:r}=this.elements;if(r&&this.config.hideControls){const t=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(e||this.loading||this.paused||r.pressed||r.hover||t))}},migrateStyles(){Object.values({...this.media.style}).filter(e=>!u.empty(e)&&u.string(e)&&e.startsWith("--plyr")).forEach(e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)}),u.empty(this.media.style)&&this.media.removeAttribute("style")}};class nu{constructor(r){_(this,"firstTouch",()=>{const{player:t}=this,{elements:a}=t;t.touch=!0,te(a.container,t.config.classNames.isTouch,!0)}),_(this,"global",(t=!0)=>{const{player:a}=this;a.config.keyboard.global&&ct.call(a,window,"keydown keyup",this.handleKey,t,!1),ct.call(a,document.body,"click",this.toggleMenu,t),Ci.call(a,document.body,"touchstart",this.firstTouch)}),_(this,"container",()=>{const{player:t}=this,{config:a,elements:l,timers:o}=t;!a.keyboard.global&&a.keyboard.focused&&X.call(t,l.container,"keydown keyup",this.handleKey,!1),X.call(t,l.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",w=>{const{controls:k}=l;k&&w.type==="enterfullscreen"&&(k.pressed=!1,k.hover=!1);let S=0;["touchstart","touchmove","mousemove"].includes(w.type)&&(ne.toggleControls.call(t,!0),S=t.touch?3e3:2e3),clearTimeout(o.controls),o.controls=setTimeout(()=>ne.toggleControls.call(t,!1),S)});const h=()=>{if(!t.isVimeo||t.config.vimeo.premium)return;const w=l.wrapper,{active:k}=t.fullscreen,[S,L]=$i.call(t),A=En(`aspect-ratio: ${S} / ${L}`);if(!k)return void(A?(w.style.width=null,w.style.height=null):(w.style.maxWidth=null,w.style.margin=null));const[D,H]=Gc(),y=D/H>S/L;A?(w.style.width=y?"auto":"100%",w.style.height=y?"100%":"auto"):(w.style.maxWidth=y?H/L*S+"px":null,w.style.margin=y?"0 auto":null)},f=()=>{clearTimeout(o.resized),o.resized=setTimeout(h,50)};X.call(t,l.container,"enterfullscreen exitfullscreen",w=>{const{target:k}=t.fullscreen;k===l.container&&(!t.isEmbed&&u.empty(t.config.ratio)||(h(),(w.type==="enterfullscreen"?X:xt).call(t,window,"resize",f)))})}),_(this,"media",()=>{const{player:t}=this,{elements:a}=t;if(X.call(t,t.media,"timeupdate seeking seeked",o=>E.timeUpdate.call(t,o)),X.call(t,t.media,"durationchange loadeddata loadedmetadata",o=>E.durationUpdate.call(t,o)),X.call(t,t.media,"ended",()=>{t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())}),X.call(t,t.media,"progress playing seeking seeked",o=>E.updateProgress.call(t,o)),X.call(t,t.media,"volumechange",o=>E.updateVolume.call(t,o)),X.call(t,t.media,"playing play pause ended emptied timeupdate",o=>ne.checkPlaying.call(t,o)),X.call(t,t.media,"waiting canplay seeked playing",o=>ne.checkLoading.call(t,o)),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){const o=ue.call(t,`.${t.config.classNames.video}`);if(!u.element(o))return;X.call(t,a.container,"click",h=>{([a.container,o].includes(h.target)||o.contains(h.target))&&(t.touch&&t.config.hideControls||(t.ended?(this.proxy(h,t.restart,"restart"),this.proxy(h,()=>{_e(t.play())},"play")):this.proxy(h,()=>{_e(t.togglePlay())},"play")))})}t.supported.ui&&t.config.disableContextMenu&&X.call(t,a.wrapper,"contextmenu",o=>{o.preventDefault()},!1),X.call(t,t.media,"volumechange",()=>{t.storage.set({volume:t.volume,muted:t.muted})}),X.call(t,t.media,"ratechange",()=>{E.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),X.call(t,t.media,"qualitychange",o=>{E.updateSetting.call(t,"quality",null,o.detail.quality)}),X.call(t,t.media,"ready qualitychange",()=>{E.setDownloadUrl.call(t)});const l=t.config.events.concat(["keyup","keydown"]).join(" ");X.call(t,t.media,l,o=>{let{detail:h={}}=o;o.type==="error"&&(h=t.media.error),F.call(t,a.container,o.type,!0,h)})}),_(this,"proxy",(t,a,l)=>{const{player:o}=this,h=o.config.listeners[l];let f=!0;u.function(h)&&(f=h.call(o,t)),f!==!1&&u.function(a)&&a.call(o,t)}),_(this,"bind",(t,a,l,o,h=!0)=>{const{player:f}=this,w=f.config.listeners[o],k=u.function(w);X.call(f,t,a,S=>this.proxy(S,l,o),h&&!k)}),_(this,"controls",()=>{const{player:t}=this,{elements:a}=t,l=me.isIE?"change":"input";if(a.buttons.play&&Array.from(a.buttons.play).forEach(o=>{this.bind(o,"click",()=>{_e(t.togglePlay())},"play")}),this.bind(a.buttons.restart,"click",t.restart,"restart"),this.bind(a.buttons.rewind,"click",()=>{t.lastSeekTime=Date.now(),t.rewind()},"rewind"),this.bind(a.buttons.fastForward,"click",()=>{t.lastSeekTime=Date.now(),t.forward()},"fastForward"),this.bind(a.buttons.mute,"click",()=>{t.muted=!t.muted},"mute"),this.bind(a.buttons.captions,"click",()=>t.toggleCaptions()),this.bind(a.buttons.download,"click",()=>{F.call(t,t.media,"download")},"download"),this.bind(a.buttons.fullscreen,"click",()=>{t.fullscreen.toggle()},"fullscreen"),this.bind(a.buttons.pip,"click",()=>{t.pip="toggle"},"pip"),this.bind(a.buttons.airplay,"click",t.airplay,"airplay"),this.bind(a.buttons.settings,"click",o=>{o.stopPropagation(),o.preventDefault(),E.toggleMenu.call(t,o)},null,!1),this.bind(a.buttons.settings,"keyup",o=>{[" ","Enter"].includes(o.key)&&(o.key!=="Enter"?(o.preventDefault(),o.stopPropagation(),E.toggleMenu.call(t,o)):E.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(a.settings.menu,"keydown",o=>{o.key==="Escape"&&E.toggleMenu.call(t,o)}),this.bind(a.inputs.seek,"mousedown mousemove",o=>{const h=a.progress.getBoundingClientRect(),f=100/h.width*(o.pageX-h.left);o.currentTarget.setAttribute("seek-value",f)}),this.bind(a.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",o=>{const h=o.currentTarget,f="play-on-seeked";if(u.keyboardEvent(o)&&!["ArrowLeft","ArrowRight"].includes(o.key))return;t.lastSeekTime=Date.now();const w=h.hasAttribute(f),k=["mouseup","touchend","keyup"].includes(o.type);w&&k?(h.removeAttribute(f),_e(t.play())):!k&&t.playing&&(h.setAttribute(f,""),t.pause())}),me.isIos){const o=ot.call(t,'input[type="range"]');Array.from(o).forEach(h=>this.bind(h,l,f=>Tn(f.target)))}this.bind(a.inputs.seek,l,o=>{const h=o.currentTarget;let f=h.getAttribute("seek-value");u.empty(f)&&(f=h.value),h.removeAttribute("seek-value"),t.currentTime=f/h.max*t.duration},"seek"),this.bind(a.progress,"mouseenter mouseleave mousemove",o=>E.updateSeekTooltip.call(t,o)),this.bind(a.progress,"mousemove touchmove",o=>{const{previewThumbnails:h}=t;h&&h.loaded&&h.startMove(o)}),this.bind(a.progress,"mouseleave touchend click",()=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.endMove(!1,!0)}),this.bind(a.progress,"mousedown touchstart",o=>{const{previewThumbnails:h}=t;h&&h.loaded&&h.startScrubbing(o)}),this.bind(a.progress,"mouseup touchend",o=>{const{previewThumbnails:h}=t;h&&h.loaded&&h.endScrubbing(o)}),me.isWebKit&&Array.from(ot.call(t,'input[type="range"]')).forEach(o=>{this.bind(o,"input",h=>E.updateRangeFill.call(t,h.target))}),t.config.toggleInvert&&!u.element(a.display.duration)&&this.bind(a.display.currentTime,"click",()=>{t.currentTime!==0&&(t.config.invertTime=!t.config.invertTime,E.timeUpdate.call(t))}),this.bind(a.inputs.volume,l,o=>{t.volume=o.target.value},"volume"),this.bind(a.controls,"mouseenter mouseleave",o=>{a.controls.hover=!t.touch&&o.type==="mouseenter"}),a.fullscreen&&Array.from(a.fullscreen.children).filter(o=>!o.contains(a.container)).forEach(o=>{this.bind(o,"mouseenter mouseleave",h=>{a.controls&&(a.controls.hover=!t.touch&&h.type==="mouseenter")})}),this.bind(a.controls,"mousedown mouseup touchstart touchend touchcancel",o=>{a.controls.pressed=["mousedown","touchstart"].includes(o.type)}),this.bind(a.controls,"focusin",()=>{const{config:o,timers:h}=t;te(a.controls,o.classNames.noTransition,!0),ne.toggleControls.call(t,!0),setTimeout(()=>{te(a.controls,o.classNames.noTransition,!1)},0);const f=this.touch?3e3:4e3;clearTimeout(h.controls),h.controls=setTimeout(()=>ne.toggleControls.call(t,!1),f)}),this.bind(a.inputs.volume,"wheel",o=>{const h=o.webkitDirectionInvertedFromDevice,[f,w]=[o.deltaX,-o.deltaY].map(L=>h?-L:L),k=Math.sign(Math.abs(f)>Math.abs(w)?f:w);t.increaseVolume(k/50);const{volume:S}=t.media;(k===1&&S<1||k===-1&&S>0)&&o.preventDefault()},"volume",!1)}),this.player=r,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(r){const{player:t}=this,{elements:a}=t,{key:l,type:o,altKey:h,ctrlKey:f,metaKey:w,shiftKey:k}=r,S=o==="keydown",L=S&&l===this.lastKey;if(!(h||f||w||k)&&l){if(S){const D=document.activeElement;if(u.element(D)){const{editable:H}=t.config.selectors,{seek:y}=a.inputs;if(D!==y&&Ve(D,H)||r.key===" "&&Ve(D,'button, [role^="menuitem"]'))return}switch([" ","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(l)&&(r.preventDefault(),r.stopPropagation()),l){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":L||(A=parseInt(l,10),t.currentTime=t.duration/10*A);break;case" ":case"k":L||_e(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":t.decreaseVolume(.1);break;case"m":L||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":L||t.toggleCaptions();break;case"l":t.loop=!t.loop}l==="Escape"&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=l}else this.lastKey=null;var A}}toggleMenu(r){E.toggleMenu.call(this.player,r)}}function au(e,r){return e(r={exports:{}},r.exports),r.exports}var su=au(function(e,r){e.exports=function(){var t=function(){},a={},l={},o={};function h(A,D){A=A.push?A:[A];var H,y,q,j=[],M=A.length,W=M;for(H=function(re,fe){fe.length&&j.push(re),--W||D(j)};M--;)y=A[M],(q=l[y])?H(y,q):(o[y]=o[y]||[]).push(H)}function f(A,D){if(A){var H=o[A];if(l[A]=D,H)for(;H.length;)H[0](A,D),H.splice(0,1)}}function w(A,D){A.call&&(A={success:A}),D.length?(A.error||t)(D):(A.success||t)(A)}function k(A,D,H,y){var q,j,M=document,W=H.async,re=(H.numRetries||0)+1,fe=H.before||t,I=A.replace(/[\?|#].*$/,""),ye=A.replace(/^(css|img)!/,"");y=y||0,/(^css!|\.css$)/.test(I)?((j=M.createElement("link")).rel="stylesheet",j.href=ye,(q="hideFocus"in j)&&j.relList&&(q=0,j.rel="preload",j.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(I)?(j=M.createElement("img")).src=ye:((j=M.createElement("script")).src=A,j.async=W===void 0||W),j.onload=j.onerror=j.onbeforeload=function(se){var Be=se.type[0];if(q)try{j.sheet.cssText.length||(Be="e")}catch(ft){ft.code!=18&&(Be="e")}if(Be=="e"){if((y+=1){su(e,{success:r,error:t})})}function lu(e){return u.empty(e)?null:u.number(Number(e))?e:e.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:e}function ou(e){const r=e.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return r&&r.length===5?r[4]:null}function at(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,F.call(this,this.media,e?"play":"pause"))}const vi={setup(){const e=this;te(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,tt.call(e),u.object(window.Vimeo)?vi.ready.call(e):Ai(e.config.urls.vimeo.sdk).then(()=>{vi.ready.call(e)}).catch(r=>{e.debug.warn("Vimeo SDK (player.js) failed to load",r)})},ready(){const e=this,r=e.config.vimeo,{premium:t,referrerPolicy:a,...l}=r;let o=e.media.getAttribute("src"),h="";u.empty(o)?(o=e.media.getAttribute(e.config.attributes.embed.id),h=e.media.getAttribute(e.config.attributes.embed.hash)):h=ou(o);const f=h?{h}:{};t&&Object.assign(l,{controls:!1,sidedock:!1});const w=Ln({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:e.config.playsinline,...f,...l}),k=lu(o),S=R("iframe"),L=bi(e.config.urls.vimeo.iframe,k,w);if(S.setAttribute("src",L),S.setAttribute("allowfullscreen",""),S.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),u.empty(a)||S.setAttribute("referrerPolicy",a),t||!r.customControls)S.setAttribute("data-poster",e.poster),e.media=Pt(S,e.media);else{const M=R("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});M.appendChild(S),e.media=Pt(M,e.media)}r.customControls||mt(bi(e.config.urls.vimeo.api,L)).then(M=>{!u.empty(M)&&M.thumbnail_url&&ne.setPoster.call(e,M.thumbnail_url).catch(()=>{})}),e.embed=new window.Vimeo.Player(S,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(at.call(e,!0),e.embed.play()),e.media.pause=()=>(at.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:A}=e.media;Object.defineProperty(e.media,"currentTime",{get:()=>A,set(M){const{embed:W,media:re,paused:fe,volume:I}=e,ye=fe&&!W.hasPlayed;re.seeking=!0,F.call(e,re,"seeking"),Promise.resolve(ye&&W.setVolume(0)).then(()=>W.setCurrentTime(M)).then(()=>ye&&W.pause()).then(()=>ye&&W.setVolume(I)).catch(()=>{})}});let D=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:()=>D,set(M){e.embed.setPlaybackRate(M).then(()=>{D=M,F.call(e,e.media,"ratechange")}).catch(()=>{e.options.speed=[1]})}});let{volume:H}=e.config;Object.defineProperty(e.media,"volume",{get:()=>H,set(M){e.embed.setVolume(M).then(()=>{H=M,F.call(e,e.media,"volumechange")})}});let{muted:y}=e.config;Object.defineProperty(e.media,"muted",{get:()=>y,set(M){const W=!!u.boolean(M)&&M;e.embed.setMuted(!!W||e.config.muted).then(()=>{y=W,F.call(e,e.media,"volumechange")})}});let q,{loop:j}=e.config;Object.defineProperty(e.media,"loop",{get:()=>j,set(M){const W=u.boolean(M)?M:e.config.loop.active;e.embed.setLoop(W).then(()=>{j=W})}}),e.embed.getVideoUrl().then(M=>{q=M,E.setDownloadUrl.call(e)}).catch(M=>{this.debug.warn(M)}),Object.defineProperty(e.media,"currentSrc",{get:()=>q}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then(M=>{const[W,re]=M;e.embed.ratio=Pn(W,re),tt.call(this)}),e.embed.setAutopause(e.config.autopause).then(M=>{e.config.autopause=M}),e.embed.getVideoTitle().then(M=>{e.config.title=M,ne.setTitle.call(this)}),e.embed.getCurrentTime().then(M=>{A=M,F.call(e,e.media,"timeupdate")}),e.embed.getDuration().then(M=>{e.media.duration=M,F.call(e,e.media,"durationchange")}),e.embed.getTextTracks().then(M=>{e.media.textTracks=M,Q.setup.call(e)}),e.embed.on("cuechange",({cues:M=[]})=>{const W=M.map(re=>Jc(re.text));Q.updateCues.call(e,W)}),e.embed.on("loaded",()=>{e.embed.getPaused().then(M=>{at.call(e,!M),M||F.call(e,e.media,"playing")}),u.element(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)}),e.embed.on("bufferstart",()=>{F.call(e,e.media,"waiting")}),e.embed.on("bufferend",()=>{F.call(e,e.media,"playing")}),e.embed.on("play",()=>{at.call(e,!0),F.call(e,e.media,"playing")}),e.embed.on("pause",()=>{at.call(e,!1)}),e.embed.on("timeupdate",M=>{e.media.seeking=!1,A=M.seconds,F.call(e,e.media,"timeupdate")}),e.embed.on("progress",M=>{e.media.buffered=M.percent,F.call(e,e.media,"progress"),parseInt(M.percent,10)===1&&F.call(e,e.media,"canplaythrough"),e.embed.getDuration().then(W=>{W!==e.media.duration&&(e.media.duration=W,F.call(e,e.media,"durationchange"))})}),e.embed.on("seeked",()=>{e.media.seeking=!1,F.call(e,e.media,"seeked")}),e.embed.on("ended",()=>{e.media.paused=!0,F.call(e,e.media,"ended")}),e.embed.on("error",M=>{e.media.error=M,F.call(e,e.media,"error")}),r.customControls&&setTimeout(()=>ne.build.call(e),0)}};function cu(e){return u.empty(e)?null:e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:e}function st(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,F.call(this,this.media,e?"play":"pause"))}function uu(e){return e.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const _t={setup(){if(te(this.elements.wrapper,this.config.classNames.embed,!0),u.object(window.YT)&&u.function(window.YT.Player))_t.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{u.function(e)&&e(),_t.ready.call(this)},Ai(this.config.urls.youtube.sdk).catch(r=>{this.debug.warn("YouTube API failed to load",r)})}},getTitle(e){mt(bi(this.config.urls.youtube.api,e)).then(r=>{if(u.object(r)){const{title:t,height:a,width:l}=r;this.config.title=t,ne.setTitle.call(this),this.embed.ratio=Pn(l,a)}tt.call(this)}).catch(()=>{tt.call(this)})},ready(){const e=this,r=e.config.youtube,t=e.media&&e.media.getAttribute("id");if(!u.empty(t)&&t.startsWith("youtube-"))return;let a=e.media.getAttribute("src");u.empty(a)&&(a=e.media.getAttribute(this.config.attributes.embed.id));const l=cu(a),o=R("div",{id:Yc(e.provider),"data-poster":r.customControls?e.poster:void 0});if(e.media=Pt(o,e.media),r.customControls){const h=f=>`https://i.ytimg.com/vi/${l}/${f}default.jpg`;Et(h("maxres"),121).catch(()=>Et(h("sd"),121)).catch(()=>Et(h("hq"))).then(f=>ne.setPoster.call(e,f.src)).then(f=>{f.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}e.embed=new window.YT.Player(e.media,{videoId:l,host:uu(r),playerVars:le({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&r.customControls?0:1,disablekb:1,playsinline:e.config.playsinline&&!e.config.fullscreen.iosNative?1:0,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},r),events:{onError(h){if(!e.media.error){const f=h.data,w={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[f]||"An unknown error occurred";e.media.error={code:f,message:w},F.call(e,e.media,"error")}},onPlaybackRateChange(h){const f=h.target;e.media.playbackRate=f.getPlaybackRate(),F.call(e,e.media,"ratechange")},onReady(h){if(u.function(e.media.play))return;const f=h.target;_t.getTitle.call(e,l),e.media.play=()=>{st.call(e,!0),f.playVideo()},e.media.pause=()=>{st.call(e,!1),f.pauseVideo()},e.media.stop=()=>{f.stopVideo()},e.media.duration=f.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:()=>Number(f.getCurrentTime()),set(L){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,F.call(e,e.media,"seeking"),f.seekTo(L)}}),Object.defineProperty(e.media,"playbackRate",{get:()=>f.getPlaybackRate(),set(L){f.setPlaybackRate(L)}});let{volume:w}=e.config;Object.defineProperty(e.media,"volume",{get:()=>w,set(L){w=L,f.setVolume(100*w),F.call(e,e.media,"volumechange")}});let{muted:k}=e.config;Object.defineProperty(e.media,"muted",{get:()=>k,set(L){const A=u.boolean(L)?L:k;k=A,f[A?"mute":"unMute"](),f.setVolume(100*w),F.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:()=>f.getVideoUrl()}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration});const S=f.getAvailablePlaybackRates();e.options.speed=S.filter(L=>e.config.speed.options.includes(L)),e.supported.ui&&r.customControls&&e.media.setAttribute("tabindex",-1),F.call(e,e.media,"timeupdate"),F.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval(()=>{e.media.buffered=f.getVideoLoadedFraction(),(e.media.lastBuffered===null||e.media.lastBufferedne.build.call(e),50)},onStateChange(h){const f=h.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(h.data)&&(e.media.seeking=!1,F.call(e,e.media,"seeked")),h.data){case-1:F.call(e,e.media,"timeupdate"),e.media.buffered=f.getVideoLoadedFraction(),F.call(e,e.media,"progress");break;case 0:st.call(e,!1),e.media.loop?(f.stopVideo(),f.playVideo()):F.call(e,e.media,"ended");break;case 1:r.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(st.call(e,!0),F.call(e,e.media,"playing"),e.timers.playing=setInterval(()=>{F.call(e,e.media,"timeupdate")},50),e.media.duration!==f.getDuration()&&(e.media.duration=f.getDuration(),F.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),st.call(e,!1);break;case 3:F.call(e,e.media,"waiting")}F.call(e,e.elements.container,"statechange",!1,{code:h.data})}}})}},On={setup(){this.media?(te(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),te(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&te(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=R("div",{class:this.config.classNames.video}),$n(this.media,this.elements.wrapper),this.elements.poster=R("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?Fe.setup.call(this):this.isYouTube?_t.setup.call(this):this.isVimeo&&vi.setup.call(this)):this.debug.warn("No media element found!")}};class hu{constructor(r){_(this,"load",()=>{this.enabled&&(u.object(window.google)&&u.object(window.google.ima)?this.ready():Ai(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),_(this,"ready",()=>{var t;this.enabled||((t=this).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),_(this,"setupIMA",()=>{this.elements.container=R("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,t=>this.onAdsManagerLoaded(t),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,t=>this.onAdError(t),!1),this.requestAds()}),_(this,"requestAds",()=>{const{container:t}=this.player.elements;try{const a=new google.ima.AdsRequest;a.adTagUrl=this.tagUrl,a.linearAdSlotWidth=t.offsetWidth,a.linearAdSlotHeight=t.offsetHeight,a.nonLinearAdSlotWidth=t.offsetWidth,a.nonLinearAdSlotHeight=t.offsetHeight,a.forceNonLinearFullSlot=!1,a.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(a)}catch(a){this.onAdError(a)}}),_(this,"pollCountdown",(t=!1)=>{if(!t)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const a=Lt(Math.max(this.manager.getRemainingTime(),0)),l=`${pe.get("advertisement",this.player.config)} - ${a}`;this.elements.container.setAttribute("data-badge-text",l)},100)}),_(this,"onAdsManagerLoaded",t=>{if(!this.enabled)return;const a=new google.ima.AdsRenderingSettings;a.restoreCustomPlaybackStateOnAdBreakComplete=!0,a.enablePreloading=!0,this.manager=t.getAdsManager(this.player,a),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,l=>this.onAdError(l)),Object.keys(google.ima.AdEvent.Type).forEach(l=>{this.manager.addEventListener(google.ima.AdEvent.Type[l],o=>this.onAdEvent(o))}),this.trigger("loaded")}),_(this,"addCuePoints",()=>{u.empty(this.cuePoints)||this.cuePoints.forEach(t=>{if(t!==0&&t!==-1&&t{const{container:a}=this.player.elements,l=t.getAd(),o=t.getAdData();switch((h=>{F.call(this.player,this.player.media,`ads${h.replace(/_/g,"").toLowerCase()}`)})(t.type),t.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),l.isLinear()||(l.width=a.offsetWidth,l.height=a.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:o.adError&&this.player.debug.warn(`Non-fatal ad error: ${o.adError.getMessage()}`)}}),_(this,"onAdError",t=>{this.cancel(),this.player.debug.warn("Ads error",t)}),_(this,"listeners",()=>{const{container:t}=this.player.elements;let a;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{a=this.player.currentTime}),this.player.on("seeked",()=>{const l=this.player.currentTime;u.empty(this.cuePoints)||this.cuePoints.forEach((o,h)=>{a{this.manager&&this.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)})}),_(this,"play",()=>{const{container:t}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(a){this.onAdError(a)}}).catch(()=>{})}),_(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,_e(this.player.media.play())}),_(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),_(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),_(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(t=>{this.on("loaded",t),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),_(this,"trigger",(t,...a)=>{const l=this.events[t];u.array(l)&&l.forEach(o=>{u.function(o)&&o.apply(this,a)})}),_(this,"on",(t,a)=>(u.array(this.events[t])||(this.events[t]=[]),this.events[t].push(a),this)),_(this,"startSafetyTimer",(t,a)=>{this.player.debug.log(`Safety timer invoked from: ${a}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},t)}),_(this,"clearSafetyTimer",t=>{u.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${t}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=r,this.config=r.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((t,a)=>{this.on("loaded",t),this.on("error",a)}),this.load()}get enabled(){const{config:r}=this;return this.player.isHTML5&&this.player.isVideo&&r.enabled&&(!u.empty(r.publisherId)||u.url(r.tagUrl))}get tagUrl(){const{config:r}=this;return u.url(r.tagUrl)?r.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Ln({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:r.publisherId})}`}}function Rn(e=0,r=0,t=255){return Math.min(Math.max(e,r),t)}const du=e=>{const r=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach(t=>{const a={};t.split(/\r\n|\n|\r/).forEach(l=>{if(u.number(a.startTime)){if(!u.empty(l.trim())&&u.empty(a.text)){const o=l.trim().split("#xywh=");[a.text]=o,o[1]&&([a.x,a.y,a.w,a.h]=o[1].split(","))}}else{const o=l.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);o&&(a.startTime=60*Number(o[1]||0)*60+60*Number(o[2])+Number(o[3])+ +`0.${o[4]}`,a.endTime=60*Number(o[6]||0)*60+60*Number(o[7])+Number(o[8])+ +`0.${o[9]}`)}}),a.text&&r.push(a)}),r},hn=(e,r)=>{const t={};return e>r.width/r.height?(t.width=r.width,t.height=1/e*r.width):(t.height=r.height,t.width=e*r.height),t};class yi{constructor(r){_(this,"load",()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.listeners(),this.loaded=!0)})}),_(this,"getThumbnails",()=>new Promise(t=>{const{src:a}=this.player.config.previewThumbnails;if(u.empty(a))throw new Error("Missing previewThumbnails.src config attribute");const l=()=>{this.thumbnails.sort((o,h)=>o.height-h.height),this.player.debug.log("Preview thumbnails",this.thumbnails),t()};if(u.function(a))a(o=>{this.thumbnails=o,l()});else{const o=(u.string(a)?[a]:a).map(h=>this.getThumbnail(h));Promise.all(o).then(l)}})),_(this,"getThumbnail",t=>new Promise(a=>{mt(t).then(l=>{const o={frames:du(l),height:null,urlPrefix:""};o.frames[0].text.startsWith("/")||o.frames[0].text.startsWith("http://")||o.frames[0].text.startsWith("https://")||(o.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));const h=new Image;h.onload=()=>{o.height=h.naturalHeight,o.width=h.naturalWidth,this.thumbnails.push(o),a()},h.src=o.urlPrefix+o.frames[0].text})})),_(this,"startMove",t=>{if(this.loaded&&u.event(t)&&["touchmove","mousemove"].includes(t.type)&&this.player.media.duration){if(t.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var a,l;const o=this.player.elements.progress.getBoundingClientRect(),h=100/o.width*(t.pageX-o.left);this.seekTime=this.player.media.duration*(h/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=t.pageX,this.elements.thumb.time.innerText=Lt(this.seekTime);const f=(a=this.player.config.markers)===null||a===void 0||(l=a.points)===null||l===void 0?void 0:l.find(({time:w})=>w===Math.round(this.seekTime));f&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${f.label}
`)}this.showImageAtCurrentTime()}}),_(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),_(this,"startScrubbing",t=>{(u.nullOrUndefined(t.button)||t.button===!1||t.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),_(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):Ci.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),_(this,"listeners",()=>{this.player.on("play",()=>{this.toggleThumbContainer(!1,!0)}),this.player.on("seeked",()=>{this.toggleThumbContainer(!1)}),this.player.on("timeupdate",()=>{this.lastTime=this.player.media.currentTime})}),_(this,"render",()=>{this.elements.thumb.container=R("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=R("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const t=R("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=R("span",{},"00:00"),t.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(t),u.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=R("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),_(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),_(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const t=this.thumbnails[0].frames.findIndex(o=>this.seekTime>=o.startTime&&this.seekTime<=o.endTime),a=t>=0;let l=0;this.mouseDown||this.toggleThumbContainer(a),a&&(this.thumbnails.forEach((o,h)=>{this.loadedImages.includes(o.frames[t].text)&&(l=h)}),t!==this.showingThumb&&(this.showingThumb=t,this.loadImage(l)))}),_(this,"loadImage",(t=0)=>{const a=this.showingThumb,l=this.thumbnails[t],{urlPrefix:o}=l,h=l.frames[a],f=l.frames[a].text,w=o+f;if(this.currentImageElement&&this.currentImageElement.dataset.filename===f)this.showImage(this.currentImageElement,h,t,a,f,!1),this.currentImageElement.dataset.index=a,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const k=new Image;k.src=w,k.dataset.index=a,k.dataset.filename=f,this.showingThumbFilename=f,this.player.debug.log(`Loading image: ${w}`),k.onload=()=>this.showImage(k,h,t,a,f,!0),this.loadingImage=k,this.removeOldImages(k)}}),_(this,"showImage",(t,a,l,o,h,f=!0)=>{this.player.debug.log(`Showing thumb: ${h}. num: ${o}. qual: ${l}. newimg: ${f}`),this.setImageSizeAndOffset(t,a),f&&(this.currentImageContainer.appendChild(t),this.currentImageElement=t,this.loadedImages.includes(h)||this.loadedImages.push(h)),this.preloadNearby(o,!0).then(this.preloadNearby(o,!1)).then(this.getHigherQuality(l,t,a,h))}),_(this,"removeOldImages",t=>{Array.from(this.currentImageContainer.children).forEach(a=>{if(a.tagName.toLowerCase()!=="img")return;const l=this.usingSprites?500:1e3;if(a.dataset.index!==t.dataset.index&&!a.dataset.deleting){a.dataset.deleting=!0;const{currentImageContainer:o}=this;setTimeout(()=>{o.removeChild(a),this.player.debug.log(`Removing thumb: ${a.dataset.filename}`)},l)}})}),_(this,"preloadNearby",(t,a=!0)=>new Promise(l=>{setTimeout(()=>{const o=this.thumbnails[0].frames[t].text;if(this.showingThumbFilename===o){let h;h=a?this.thumbnails[0].frames.slice(t):this.thumbnails[0].frames.slice(0,t).reverse();let f=!1;h.forEach(w=>{const k=w.text;if(k!==o&&!this.loadedImages.includes(k)){f=!0,this.player.debug.log(`Preloading thumb filename: ${k}`);const{urlPrefix:S}=this.thumbnails[0],L=S+k,A=new Image;A.src=L,A.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${k}`),this.loadedImages.includes(k)||this.loadedImages.push(k),l()}}}),f||l()}},300)})),_(this,"getHigherQuality",(t,a,l,o)=>{if(t{this.showingThumbFilename===o&&(this.player.debug.log(`Showing higher quality thumb for: ${o}`),this.loadImage(t+1))},300)}}),_(this,"toggleThumbContainer",(t=!1,a=!1)=>{const l=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(l,t),!t&&a&&(this.showingThumb=null,this.showingThumbFilename=null)}),_(this,"toggleScrubbingContainer",(t=!1)=>{const a=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(a,t),t||(this.showingThumb=null,this.showingThumbFilename=null)}),_(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),_(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:t}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(t.clientHeight>20&&t.clientWidth<20){const a=Math.floor(t.clientHeight*this.thumbAspectRatio);t.style.width=`${a}px`}else if(t.clientHeight<20&&t.clientWidth>20){const a=Math.floor(t.clientWidth/this.thumbAspectRatio);t.style.height=`${a}px`}}else{const a=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);t.style.height=`${this.thumbContainerHeight}px`,t.style.width=`${a}px`}this.setThumbContainerPos()}),_(this,"setThumbContainerPos",()=>{const t=this.player.elements.progress.getBoundingClientRect(),a=this.player.elements.container.getBoundingClientRect(),{container:l}=this.elements.thumb,o=a.left-t.left+10,h=a.right-t.left-l.clientWidth-10,f=this.mousePosX-t.left-l.clientWidth/2,w=Rn(f,o,h);l.style.left=`${w}px`,l.style.setProperty("--preview-arrow-offset",f-w+"px")}),_(this,"setScrubbingContainerSize",()=>{const{width:t,height:a}=hn(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${t}px`,this.elements.scrubbing.container.style.height=`${a}px`}),_(this,"setImageSizeAndOffset",(t,a)=>{if(!this.usingSprites)return;const l=this.thumbContainerHeight/a.h;t.style.height=t.naturalHeight*l+"px",t.style.width=t.naturalWidth*l+"px",t.style.left=`-${a.x*l}px`,t.style.top=`-${a.y*l}px`}),this.player=r,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:r}=hn(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return r}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(r){this.mouseDown?this.currentScrubbingImageElement=r:this.currentThumbnailImageElement=r}}const wi={insertElements(e,r){u.string(r)?ln(e,this.media,{src:r}):u.array(r)&&r.forEach(t=>{ln(e,this.media,t)})},change(e){Cn(e,"sources.length")?(Fe.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],Se(this.media),this.media=null,u.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:r,type:t}=e,[{provider:a=Re.html5,src:l}]=r,o=a==="html5"?t:"div",h=a==="html5"?{}:{src:l};Object.assign(this,{provider:a,type:t,supported:oe.check(t,a,this.config.playsinline),media:R(o,h)}),this.elements.container.appendChild(this.media),u.boolean(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),u.empty(e.poster)||(this.poster=e.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),ne.addStyleHook.call(this),this.isHTML5&&wi.insertElements.call(this,"source",r),this.config.title=e.title,On.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&wi.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&ne.build.call(this),this.isHTML5&&this.media.load(),u.empty(e.previewThumbnails)||(Object.assign(this.config.previewThumbnails,e.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new yi(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class ht{constructor(r,t){if(_(this,"play",()=>u.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>_e(this.media.play())),this.media.play()):null),_(this,"pause",()=>this.playing&&u.function(this.media.pause)?this.media.pause():null),_(this,"togglePlay",f=>(u.boolean(f)?f:!this.playing)?this.play():this.pause()),_(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):u.function(this.media.stop)&&this.media.stop()}),_(this,"restart",()=>{this.currentTime=0}),_(this,"rewind",f=>{this.currentTime-=u.number(f)?f:this.config.seekTime}),_(this,"forward",f=>{this.currentTime+=u.number(f)?f:this.config.seekTime}),_(this,"increaseVolume",f=>{const w=this.media.muted?0:this.volume;this.volume=w+(u.number(f)?f:0)}),_(this,"decreaseVolume",f=>{this.increaseVolume(-f)}),_(this,"airplay",()=>{oe.airplay&&this.media.webkitShowPlaybackTargetPicker()}),_(this,"toggleControls",f=>{if(this.supported.ui&&!this.isAudio){const w=Mt(this.elements.container,this.config.classNames.hideControls),k=f===void 0?void 0:!f,S=te(this.elements.container,this.config.classNames.hideControls,k);if(S&&u.array(this.config.controls)&&this.config.controls.includes("settings")&&!u.empty(this.config.settings)&&E.toggleMenu.call(this,!1),S!==w){const L=S?"controlshidden":"controlsshown";F.call(this,this.media,L)}return!S}return!1}),_(this,"on",(f,w)=>{X.call(this,this.elements.container,f,w)}),_(this,"once",(f,w)=>{Ci.call(this,this.elements.container,f,w)}),_(this,"off",(f,w)=>{xt(this.elements.container,f,w)}),_(this,"destroy",(f,w=!1)=>{if(!this.ready)return;const k=()=>{document.body.style.overflow="",this.embed=null,w?(Object.keys(this.elements).length&&(Se(this.elements.buttons.play),Se(this.elements.captions),Se(this.elements.controls),Se(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),u.function(f)&&f()):(Uc.call(this),Fe.cancelRequests.call(this),Pt(this.elements.original,this.elements.container),F.call(this,this.elements.original,"destroyed",!0),u.function(f)&&f.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(ne.toggleNativeControls.call(this,!0),k()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&u.function(this.embed.destroy)&&this.embed.destroy(),k()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(k),setTimeout(k,200))}),_(this,"supports",f=>oe.mime.call(this,f)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=oe.touch,this.media=r,u.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||u.nodeList(this.media)||u.array(this.media))&&(this.media=this.media[0]),this.config=le({},In,ht.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new ru(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",oe),u.nullOrUndefined(this.media)||!u.element(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!oe.check().api)return void this.debug.error("Setup failed: no support");const a=this.media.cloneNode(!0);a.autoplay=!1,this.elements.original=a;const l=this.media.tagName.toLowerCase();let o=null,h=null;switch(l){case"div":if(o=this.media.querySelector("iframe"),u.element(o)){if(h=xn(o.getAttribute("src")),this.provider=iu(h.toString()),this.elements.container=this.media,this.media=o,this.elements.container.className="",h.search.length){const f=["1","true"];f.includes(h.searchParams.get("autoplay"))&&(this.config.autoplay=!0),f.includes(h.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=f.includes(h.searchParams.get("playsinline")),this.config.youtube.hl=h.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(u.empty(this.provider)||!Object.values(Re).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=di.video;break;case"video":case"audio":this.type=l,this.provider=Re.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=oe.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new nu(this),this.storage=new ut(this),this.media.plyr=this,u.element(this.elements.container)||(this.elements.container=R("div"),$n(this.media,this.elements.container)),ne.migrateStyles.call(this),ne.addStyleHook.call(this),On.setup.call(this),this.config.debug&&X.call(this,this.elements.container,this.config.events.join(" "),f=>{this.debug.log(`event: ${f.type}`)}),this.fullscreen=new Ae(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&ne.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new hu(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>_e(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new yi(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===Re.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===Re.youtube}get isVimeo(){return this.provider===Re.vimeo}get isVideo(){return this.type===di.video}get isAudio(){return this.type===di.audio}get playing(){return!!(this.ready&&!this.paused&&!this.ended)}get paused(){return!!this.media.paused}get stopped(){return!!(this.paused&&this.currentTime===0)}get ended(){return!!this.media.ended}set currentTime(r){if(!this.duration)return;const t=u.number(r)&&r>0;this.media.currentTime=t?Math.min(r,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:r}=this.media;return u.number(r)?r:r&&r.length&&this.duration>0?r.end(0)/this.duration:0}get seeking(){return!!this.media.seeking}get duration(){const r=parseFloat(this.config.duration),t=(this.media||{}).duration,a=u.number(t)&&t!==1/0?t:0;return r||a}set volume(r){let t=r;u.string(t)&&(t=Number(t)),u.number(t)||(t=this.storage.get("volume")),u.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!u.empty(r)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(r){let t=r;u.boolean(t)||(t=this.storage.get("muted")),u.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return!!this.media.muted}get hasAudio(){return!this.isHTML5||!!this.isAudio||!!this.media.mozHasAudio||!!this.media.webkitAudioDecodedByteCount||!!(this.media.audioTracks&&this.media.audioTracks.length)}set speed(r){let t=null;u.number(r)&&(t=r),u.number(t)||(t=this.storage.get("speed")),u.number(t)||(t=this.config.speed.selected);const{minimumSpeed:a,maximumSpeed:l}=this;t=Rn(t,a,l),this.config.speed.selected=t,setTimeout(()=>{this.media&&(this.media.playbackRate=t)},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(r){const t=this.config.quality,a=this.options.quality;if(!a.length)return;let l=[!u.empty(r)&&Number(r),this.storage.get("quality"),t.selected,t.default].find(u.number),o=!0;if(!a.includes(l)){const h=An(a,l);this.debug.warn(`Unsupported quality option: ${l}, using ${h} instead`),l=h,o=!1}t.selected=l,this.media.quality=l,o&&this.storage.set({quality:l})}get quality(){return this.media.quality}set loop(r){const t=u.boolean(r)?r:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return!!this.media.loop}set source(r){wi.change.call(this,r)}get source(){return this.media.currentSrc}get download(){const{download:r}=this.config.urls;return u.url(r)?r:this.source}set download(r){u.url(r)&&(this.config.urls.download=r,E.setDownloadUrl.call(this))}set poster(r){this.isVideo?ne.setPoster.call(this,r,!1).catch(()=>{}):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const r=St($i.call(this));return u.array(r)?r.join(":"):r}set ratio(r){this.isVideo?u.string(r)&&_n(r)?(this.config.ratio=St(r),tt.call(this)):this.debug.error(`Invalid aspect ratio specified (${r})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(r){this.config.autoplay=u.boolean(r)?r:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(r){Q.toggle.call(this,r,!1)}set currentTrack(r){Q.set.call(this,r,!1),Q.setup.call(this)}get currentTrack(){const{toggled:r,currentTrack:t}=this.captions;return r?t:-1}set language(r){Q.setLanguage.call(this,r,!1)}get language(){return(Q.getCurrentTrack.call(this)||{}).language}set pip(r){if(!oe.pip)return;const t=u.boolean(r)?r:!this.pip;u.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?hi.active:hi.inactive),u.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return oe.pip?u.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===hi.active:null}setPreviewThumbnails(r){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,r),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new yi(this))}static supported(r,t){return oe.check(r,t)}static loadSprite(r,t){return Sn(r,t)}static setup(r,t={}){let a=null;return u.string(r)?a=Array.from(document.querySelectorAll(r)):u.nodeList(r)?a=Array.from(r):u.array(r)&&(a=r.filter(u.element)),u.empty(a)?null:a.map(l=>new ht(l,t))}}ht.defaults=Hc(In);var pu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function mu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fn={exports:{}};/**
- * chroma.js - JavaScript library for color conversions
- *
- * Copyright (c) 2011-2019, Gregor Aisch
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. The name Gregor Aisch may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * -------------------------------------------------------
- *
- * chroma.js includes colors from colorbrewer2.org, which are released under
- * the following license:
- *
- * Copyright (c) 2002 Cynthia Brewer, Mark Harrower,
- * and The Pennsylvania State University.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- * either express or implied. See the License for the specific
- * language governing permissions and limitations under the License.
- *
- * ------------------------------------------------------
- *
- * Named colors are taken from X11 Color Names.
- * http://www.w3.org/TR/css3-color/#svg-color
- *
- * @preserve
- */(function(e,r){(function(t,a){e.exports=a()})(pu,function(){for(var t=function(i,n,s){return n===void 0&&(n=0),s===void 0&&(s=1),is?s:i},a=t,l=function(i){i._clipped=!1,i._unclipped=i.slice(0);for(var n=0;n<=3;n++)n<3?((i[n]<0||i[n]>255)&&(i._clipped=!0),i[n]=a(i[n],0,255)):n===3&&(i[n]=a(i[n],0,1));return i},o={},h=0,f=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];h=3?Array.prototype.slice.call(i):S(i[0])=="object"&&n?n.split("").filter(function(s){return i[0][s]!==void 0}).map(function(s){return i[0][s]}):i[0]},A=k,D=function(i){if(i.length<2)return null;var n=i.length-1;return A(i[n])=="string"?i[n].toLowerCase():null},H=Math.PI,y={clip_rgb:l,limit:t,type:k,unpack:L,last:D,PI:H,TWOPI:H*2,PITHIRD:H/3,DEG2RAD:H/180,RAD2DEG:180/H},q={format:{},autodetect:[]},j=y.last,M=y.clip_rgb,W=y.type,re=q,fe=function(){for(var n=[],s=arguments.length;s--;)n[s]=arguments[s];var c=this;if(W(n[0])==="object"&&n[0].constructor&&n[0].constructor===this.constructor)return n[0];var p=j(n),m=!1;if(!p){m=!0,re.sorted||(re.autodetect=re.autodetect.sort(function(T,P){return P.p-T.p}),re.sorted=!0);for(var d=0,g=re.autodetect;d4?i[4]:1;return m===1?[0,0,0,d]:[s>=1?0:255*(1-s)*(1-m),c>=1?0:255*(1-c)*(1-m),p>=1?0:255*(1-p)*(1-m),d]},Vn=Hn,Bn=se,Ei=I,_i=q,zn=y.unpack,Un=y.type,Wn=qn;Ei.prototype.cmyk=function(){return Wn(this._rgb)},Bn.cmyk=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];return new(Function.prototype.bind.apply(Ei,[null].concat(i,["cmyk"])))},_i.format.cmyk=Vn,_i.autodetect.push({p:2,test:function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];if(i=zn(i,"cmyk"),Un(i)==="array"&&i.length===4)return"cmyk"}});var Gn=y.unpack,Yn=y.last,It=function(i){return Math.round(i*100)/100},Kn=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];var s=Gn(i,"hsla"),c=Yn(i)||"lsa";return s[0]=It(s[0]||0),s[1]=It(s[1]*100)+"%",s[2]=It(s[2]*100)+"%",c==="hsla"||s.length>3&&s[3]<1?(s[3]=s.length>3?s[3]:1,c="hsla"):s.length=3,c+"("+s.join(",")+")"},Xn=Kn,Qn=y.unpack,Jn=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];i=Qn(i,"rgba");var s=i[0],c=i[1],p=i[2];s/=255,c/=255,p/=255;var m=Math.min(s,c,p),d=Math.max(s,c,p),g=(d+m)/2,b,v;return d===m?(b=0,v=Number.NaN):b=g<.5?(d-m)/(d+m):(d-m)/(2-d-m),s==d?v=(c-p)/(d-m):c==d?v=2+(p-s)/(d-m):p==d&&(v=4+(s-c)/(d-m)),v*=60,v<0&&(v+=360),i.length>3&&i[3]!==void 0?[v,b,g,i[3]]:[v,b,g]},Pi=Jn,Zn=y.unpack,ea=y.last,ta=Xn,ia=Pi,Ot=Math.round,ra=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];var s=Zn(i,"rgba"),c=ea(i)||"rgb";return c.substr(0,3)=="hsl"?ta(ia(s),c):(s[0]=Ot(s[0]),s[1]=Ot(s[1]),s[2]=Ot(s[2]),(c==="rgba"||s.length>3&&s[3]<1)&&(s[3]=s.length>3?s[3]:1,c="rgba"),c+"("+s.slice(0,c==="rgb"?3:4).join(",")+")")},na=ra,aa=y.unpack,Rt=Math.round,sa=function(){for(var i,n=[],s=arguments.length;s--;)n[s]=arguments[s];n=aa(n,"hsl");var c=n[0],p=n[1],m=n[2],d,g,b;if(p===0)d=g=b=m*255;else{var v=[0,0,0],T=[0,0,0],P=m<.5?m*(1+p):m+p-m*p,C=2*m-P,x=c/360;v[0]=x+1/3,v[1]=x,v[2]=x-1/3;for(var N=0;N<3;N++)v[N]<0&&(v[N]+=1),v[N]>1&&(v[N]-=1),6*v[N]<1?T[N]=C+(P-C)*6*v[N]:2*v[N]<1?T[N]=P:3*v[N]<2?T[N]=C+(P-C)*(2/3-v[N])*6:T[N]=C;i=[Rt(T[0]*255),Rt(T[1]*255),Rt(T[2]*255)],d=i[0],g=i[1],b=i[2]}return n.length>3?[d,g,b,n[3]]:[d,g,b,1]},Mi=sa,Si=Mi,Ni=q,xi=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,Li=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Ii=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Oi=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Ri=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Fi=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Di=Math.round,qi=function(i){i=i.toLowerCase().trim();var n;if(Ni.format.named)try{return Ni.format.named(i)}catch{}if(n=i.match(xi)){for(var s=n.slice(1,4),c=0;c<3;c++)s[c]=+s[c];return s[3]=1,s}if(n=i.match(Li)){for(var p=n.slice(1,5),m=0;m<4;m++)p[m]=+p[m];return p}if(n=i.match(Ii)){for(var d=n.slice(1,4),g=0;g<3;g++)d[g]=Di(d[g]*2.55);return d[3]=1,d}if(n=i.match(Oi)){for(var b=n.slice(1,5),v=0;v<3;v++)b[v]=Di(b[v]*2.55);return b[3]=+b[3],b}if(n=i.match(Ri)){var T=n.slice(1,4);T[1]*=.01,T[2]*=.01;var P=Si(T);return P[3]=1,P}if(n=i.match(Fi)){var C=n.slice(1,4);C[1]*=.01,C[2]*=.01;var x=Si(C);return x[3]=+n[4],x}};qi.test=function(i){return xi.test(i)||Li.test(i)||Ii.test(i)||Oi.test(i)||Ri.test(i)||Fi.test(i)};var la=qi,oa=se,ji=I,Hi=q,ca=y.type,ua=na,Vi=la;ji.prototype.css=function(i){return ua(this._rgb,i)},oa.css=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];return new(Function.prototype.bind.apply(ji,[null].concat(i,["css"])))},Hi.format.css=Vi,Hi.autodetect.push({p:5,test:function(i){for(var n=[],s=arguments.length-1;s-- >0;)n[s]=arguments[s+1];if(!n.length&&ca(i)==="string"&&Vi.test(i))return"css"}});var Bi=I,ha=se,da=q,pa=y.unpack;da.format.gl=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];var s=pa(i,"rgba");return s[0]*=255,s[1]*=255,s[2]*=255,s},ha.gl=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];return new(Function.prototype.bind.apply(Bi,[null].concat(i,["gl"])))},Bi.prototype.gl=function(){var i=this._rgb;return[i[0]/255,i[1]/255,i[2]/255,i[3]]};var ma=y.unpack,fa=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];var s=ma(i,"rgb"),c=s[0],p=s[1],m=s[2],d=Math.min(c,p,m),g=Math.max(c,p,m),b=g-d,v=b*100/255,T=d/(255-b)*100,P;return b===0?P=Number.NaN:(c===g&&(P=(p-m)/b),p===g&&(P=2+(m-c)/b),m===g&&(P=4+(c-p)/b),P*=60,P<0&&(P+=360)),[P,v,T]},ga=fa,ba=y.unpack,va=Math.floor,ya=function(){for(var i,n,s,c,p,m,d=[],g=arguments.length;g--;)d[g]=arguments[g];d=ba(d,"hcg");var b=d[0],v=d[1],T=d[2],P,C,x;T=T*255;var N=v*255;if(v===0)P=C=x=T;else{b===360&&(b=0),b>360&&(b-=360),b<0&&(b+=360),b/=60;var V=va(b),U=b-V,Y=T*(1-v),J=Y+N*(1-U),ge=Y+N*U,de=Y+N;switch(V){case 0:i=[de,ge,Y],P=i[0],C=i[1],x=i[2];break;case 1:n=[J,de,Y],P=n[0],C=n[1],x=n[2];break;case 2:s=[Y,de,ge],P=s[0],C=s[1],x=s[2];break;case 3:c=[Y,J,de],P=c[0],C=c[1],x=c[2];break;case 4:p=[ge,Y,de],P=p[0],C=p[1],x=p[2];break;case 5:m=[de,Y,J],P=m[0],C=m[1],x=m[2];break}}return[P,C,x,d.length>3?d[3]:1]},wa=ya,ka=y.unpack,Ta=y.type,Ca=se,zi=I,Ui=q,$a=ga;zi.prototype.hcg=function(){return $a(this._rgb)},Ca.hcg=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];return new(Function.prototype.bind.apply(zi,[null].concat(i,["hcg"])))},Ui.format.hcg=wa,Ui.autodetect.push({p:1,test:function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];if(i=ka(i,"hcg"),Ta(i)==="array"&&i.length===3)return"hcg"}});var Aa=y.unpack,Ea=y.last,gt=Math.round,_a=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];var s=Aa(i,"rgba"),c=s[0],p=s[1],m=s[2],d=s[3],g=Ea(i)||"auto";d===void 0&&(d=1),g==="auto"&&(g=d<1?"rgba":"rgb"),c=gt(c),p=gt(p),m=gt(m);var b=c<<16|p<<8|m,v="000000"+b.toString(16);v=v.substr(v.length-6);var T="0"+gt(d*255).toString(16);switch(T=T.substr(T.length-2),g.toLowerCase()){case"rgba":return"#"+v+T;case"argb":return"#"+T+v;default:return"#"+v}},Wi=_a,Pa=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Ma=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Sa=function(i){if(i.match(Pa)){(i.length===4||i.length===7)&&(i=i.substr(1)),i.length===3&&(i=i.split(""),i=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]);var n=parseInt(i,16),s=n>>16,c=n>>8&255,p=n&255;return[s,c,p,1]}if(i.match(Ma)){(i.length===5||i.length===9)&&(i=i.substr(1)),i.length===4&&(i=i.split(""),i=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]+i[3]+i[3]);var m=parseInt(i,16),d=m>>24&255,g=m>>16&255,b=m>>8&255,v=Math.round((m&255)/255*100)/100;return[d,g,b,v]}throw new Error("unknown hex color: "+i)},Gi=Sa,Na=se,Yi=I,xa=y.type,Ki=q,La=Wi;Yi.prototype.hex=function(i){return La(this._rgb,i)},Na.hex=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];return new(Function.prototype.bind.apply(Yi,[null].concat(i,["hex"])))},Ki.format.hex=Gi,Ki.autodetect.push({p:4,test:function(i){for(var n=[],s=arguments.length-1;s-- >0;)n[s]=arguments[s+1];if(!n.length&&xa(i)==="string"&&[3,4,5,6,7,8,9].indexOf(i.length)>=0)return"hex"}});var Ia=y.unpack,Xi=y.TWOPI,Oa=Math.min,Ra=Math.sqrt,Fa=Math.acos,Da=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];var s=Ia(i,"rgb"),c=s[0],p=s[1],m=s[2];c/=255,p/=255,m/=255;var d,g=Oa(c,p,m),b=(c+p+m)/3,v=b>0?1-g/b:0;return v===0?d=NaN:(d=(c-p+(c-m))/2,d/=Ra((c-p)*(c-p)+(c-m)*(p-m)),d=Fa(d),m>p&&(d=Xi-d),d/=Xi),[d*360,v,b]},qa=Da,ja=y.unpack,Ft=y.limit,ze=y.TWOPI,Dt=y.PITHIRD,Ue=Math.cos,Ha=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];i=ja(i,"hsi");var s=i[0],c=i[1],p=i[2],m,d,g;return isNaN(s)&&(s=0),isNaN(c)&&(c=0),s>360&&(s-=360),s<0&&(s+=360),s/=360,s<1/3?(g=(1-c)/3,m=(1+c*Ue(ze*s)/Ue(Dt-ze*s))/3,d=1-(g+m)):s<2/3?(s-=1/3,m=(1-c)/3,d=(1+c*Ue(ze*s)/Ue(Dt-ze*s))/3,g=1-(m+d)):(s-=2/3,d=(1-c)/3,g=(1+c*Ue(ze*s)/Ue(Dt-ze*s))/3,m=1-(d+g)),m=Ft(p*m*3),d=Ft(p*d*3),g=Ft(p*g*3),[m*255,d*255,g*255,i.length>3?i[3]:1]},Va=Ha,Ba=y.unpack,za=y.type,Ua=se,Qi=I,Ji=q,Wa=qa;Qi.prototype.hsi=function(){return Wa(this._rgb)},Ua.hsi=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];return new(Function.prototype.bind.apply(Qi,[null].concat(i,["hsi"])))},Ji.format.hsi=Va,Ji.autodetect.push({p:2,test:function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];if(i=Ba(i,"hsi"),za(i)==="array"&&i.length===3)return"hsi"}});var Ga=y.unpack,Ya=y.type,Ka=se,Zi=I,er=q,Xa=Pi;Zi.prototype.hsl=function(){return Xa(this._rgb)},Ka.hsl=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];return new(Function.prototype.bind.apply(Zi,[null].concat(i,["hsl"])))},er.format.hsl=Mi,er.autodetect.push({p:2,test:function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];if(i=Ga(i,"hsl"),Ya(i)==="array"&&i.length===3)return"hsl"}});var Qa=y.unpack,Ja=Math.min,Za=Math.max,es=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];i=Qa(i,"rgb");var s=i[0],c=i[1],p=i[2],m=Ja(s,c,p),d=Za(s,c,p),g=d-m,b,v,T;return T=d/255,d===0?(b=Number.NaN,v=0):(v=g/d,s===d&&(b=(c-p)/g),c===d&&(b=2+(p-s)/g),p===d&&(b=4+(s-c)/g),b*=60,b<0&&(b+=360)),[b,v,T]},ts=es,is=y.unpack,rs=Math.floor,ns=function(){for(var i,n,s,c,p,m,d=[],g=arguments.length;g--;)d[g]=arguments[g];d=is(d,"hsv");var b=d[0],v=d[1],T=d[2],P,C,x;if(T*=255,v===0)P=C=x=T;else{b===360&&(b=0),b>360&&(b-=360),b<0&&(b+=360),b/=60;var N=rs(b),V=b-N,U=T*(1-v),Y=T*(1-v*V),J=T*(1-v*(1-V));switch(N){case 0:i=[T,J,U],P=i[0],C=i[1],x=i[2];break;case 1:n=[Y,T,U],P=n[0],C=n[1],x=n[2];break;case 2:s=[U,T,J],P=s[0],C=s[1],x=s[2];break;case 3:c=[U,Y,T],P=c[0],C=c[1],x=c[2];break;case 4:p=[J,U,T],P=p[0],C=p[1],x=p[2];break;case 5:m=[T,U,Y],P=m[0],C=m[1],x=m[2];break}}return[P,C,x,d.length>3?d[3]:1]},as=ns,ss=y.unpack,ls=y.type,os=se,tr=I,ir=q,cs=ts;tr.prototype.hsv=function(){return cs(this._rgb)},os.hsv=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];return new(Function.prototype.bind.apply(tr,[null].concat(i,["hsv"])))},ir.format.hsv=as,ir.autodetect.push({p:2,test:function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];if(i=ss(i,"hsv"),ls(i)==="array"&&i.length===3)return"hsv"}});var bt={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},We=bt,us=y.unpack,rr=Math.pow,hs=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];var s=us(i,"rgb"),c=s[0],p=s[1],m=s[2],d=ds(c,p,m),g=d[0],b=d[1],v=d[2],T=116*b-16;return[T<0?0:T,500*(g-b),200*(b-v)]},qt=function(i){return(i/=255)<=.04045?i/12.92:rr((i+.055)/1.055,2.4)},jt=function(i){return i>We.t3?rr(i,1/3):i/We.t2+We.t0},ds=function(i,n,s){i=qt(i),n=qt(n),s=qt(s);var c=jt((.4124564*i+.3575761*n+.1804375*s)/We.Xn),p=jt((.2126729*i+.7151522*n+.072175*s)/We.Yn),m=jt((.0193339*i+.119192*n+.9503041*s)/We.Zn);return[c,p,m]},nr=hs,Ge=bt,ps=y.unpack,ms=Math.pow,fs=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];i=ps(i,"lab");var s=i[0],c=i[1],p=i[2],m,d,g,b,v,T;return d=(s+16)/116,m=isNaN(c)?d:d+c/500,g=isNaN(p)?d:d-p/200,d=Ge.Yn*Vt(d),m=Ge.Xn*Vt(m),g=Ge.Zn*Vt(g),b=Ht(3.2404542*m-1.5371385*d-.4985314*g),v=Ht(-.969266*m+1.8760108*d+.041556*g),T=Ht(.0556434*m-.2040259*d+1.0572252*g),[b,v,T,i.length>3?i[3]:1]},Ht=function(i){return 255*(i<=.00304?12.92*i:1.055*ms(i,1/2.4)-.055)},Vt=function(i){return i>Ge.t1?i*i*i:Ge.t2*(i-Ge.t0)},ar=fs,gs=y.unpack,bs=y.type,vs=se,sr=I,lr=q,ys=nr;sr.prototype.lab=function(){return ys(this._rgb)},vs.lab=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];return new(Function.prototype.bind.apply(sr,[null].concat(i,["lab"])))},lr.format.lab=ar,lr.autodetect.push({p:2,test:function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];if(i=gs(i,"lab"),bs(i)==="array"&&i.length===3)return"lab"}});var ws=y.unpack,ks=y.RAD2DEG,Ts=Math.sqrt,Cs=Math.atan2,$s=Math.round,As=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];var s=ws(i,"lab"),c=s[0],p=s[1],m=s[2],d=Ts(p*p+m*m),g=(Cs(m,p)*ks+360)%360;return $s(d*1e4)===0&&(g=Number.NaN),[c,d,g]},or=As,Es=y.unpack,_s=nr,Ps=or,Ms=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];var s=Es(i,"rgb"),c=s[0],p=s[1],m=s[2],d=_s(c,p,m),g=d[0],b=d[1],v=d[2];return Ps(g,b,v)},Ss=Ms,Ns=y.unpack,xs=y.DEG2RAD,Ls=Math.sin,Is=Math.cos,Os=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];var s=Ns(i,"lch"),c=s[0],p=s[1],m=s[2];return isNaN(m)&&(m=0),m=m*xs,[c,Is(m)*p,Ls(m)*p]},cr=Os,Rs=y.unpack,Fs=cr,Ds=ar,qs=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];i=Rs(i,"lch");var s=i[0],c=i[1],p=i[2],m=Fs(s,c,p),d=m[0],g=m[1],b=m[2],v=Ds(d,g,b),T=v[0],P=v[1],C=v[2];return[T,P,C,i.length>3?i[3]:1]},ur=qs,js=y.unpack,Hs=ur,Vs=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];var s=js(i,"hcl").reverse();return Hs.apply(void 0,s)},Bs=Vs,zs=y.unpack,Us=y.type,hr=se,vt=I,Bt=q,dr=Ss;vt.prototype.lch=function(){return dr(this._rgb)},vt.prototype.hcl=function(){return dr(this._rgb).reverse()},hr.lch=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];return new(Function.prototype.bind.apply(vt,[null].concat(i,["lch"])))},hr.hcl=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];return new(Function.prototype.bind.apply(vt,[null].concat(i,["hcl"])))},Bt.format.lch=ur,Bt.format.hcl=Bs,["lch","hcl"].forEach(function(i){return Bt.autodetect.push({p:2,test:function(){for(var n=[],s=arguments.length;s--;)n[s]=arguments[s];if(n=zs(n,i),Us(n)==="array"&&n.length===3)return i}})});var Ws={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},pr=Ws,Gs=I,mr=q,Ys=y.type,it=pr,Ks=Gi,Xs=Wi;Gs.prototype.name=function(){for(var i=Xs(this._rgb,"rgb"),n=0,s=Object.keys(it);n0;)n[s]=arguments[s+1];if(!n.length&&Ys(i)==="string"&&it[i.toLowerCase()])return"named"}});var Qs=y.unpack,Js=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];var s=Qs(i,"rgb"),c=s[0],p=s[1],m=s[2];return(c<<16)+(p<<8)+m},Zs=Js,el=y.type,tl=function(i){if(el(i)=="number"&&i>=0&&i<=16777215){var n=i>>16,s=i>>8&255,c=i&255;return[n,s,c,1]}throw new Error("unknown num color: "+i)},il=tl,rl=se,fr=I,gr=q,nl=y.type,al=Zs;fr.prototype.num=function(){return al(this._rgb)},rl.num=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];return new(Function.prototype.bind.apply(fr,[null].concat(i,["num"])))},gr.format.num=il,gr.autodetect.push({p:5,test:function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];if(i.length===1&&nl(i[0])==="number"&&i[0]>=0&&i[0]<=16777215)return"num"}});var sl=se,zt=I,br=q,vr=y.unpack,yr=y.type,wr=Math.round;zt.prototype.rgb=function(i){return i===void 0&&(i=!0),i===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(wr)},zt.prototype.rgba=function(i){return i===void 0&&(i=!0),this._rgb.slice(0,4).map(function(n,s){return s<3?i===!1?n:wr(n):n})},sl.rgb=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];return new(Function.prototype.bind.apply(zt,[null].concat(i,["rgb"])))},br.format.rgb=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];var s=vr(i,"rgba");return s[3]===void 0&&(s[3]=1),s},br.autodetect.push({p:3,test:function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];if(i=vr(i,"rgba"),yr(i)==="array"&&(i.length===3||i.length===4&&yr(i[3])=="number"&&i[3]>=0&&i[3]<=1))return"rgb"}});var yt=Math.log,ll=function(i){var n=i/100,s,c,p;return n<66?(s=255,c=n<6?0:-155.25485562709179-.44596950469579133*(c=n-2)+104.49216199393888*yt(c),p=n<20?0:-254.76935184120902+.8274096064007395*(p=n-10)+115.67994401066147*yt(p)):(s=351.97690566805693+.114206453784165*(s=n-55)-40.25366309332127*yt(s),c=325.4494125711974+.07943456536662342*(c=n-50)-28.0852963507957*yt(c),p=255),[s,c,p,1]},kr=ll,ol=kr,cl=y.unpack,ul=Math.round,hl=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];for(var s=cl(i,"rgb"),c=s[0],p=s[2],m=1e3,d=4e4,g=.4,b;d-m>g;){b=(d+m)*.5;var v=ol(b);v[2]/v[0]>=p/c?d=b:m=b}return ul(b)},dl=hl,Ut=se,wt=I,Wt=q,pl=dl;wt.prototype.temp=wt.prototype.kelvin=wt.prototype.temperature=function(){return pl(this._rgb)},Ut.temp=Ut.kelvin=Ut.temperature=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];return new(Function.prototype.bind.apply(wt,[null].concat(i,["temp"])))},Wt.format.temp=Wt.format.kelvin=Wt.format.temperature=kr;var ml=y.unpack,Gt=Math.cbrt,fl=Math.pow,gl=Math.sign,bl=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];var s=ml(i,"rgb"),c=s[0],p=s[1],m=s[2],d=[Yt(c/255),Yt(p/255),Yt(m/255)],g=d[0],b=d[1],v=d[2],T=Gt(.4122214708*g+.5363325363*b+.0514459929*v),P=Gt(.2119034982*g+.6806995451*b+.1073969566*v),C=Gt(.0883024619*g+.2817188376*b+.6299787005*v);return[.2104542553*T+.793617785*P-.0040720468*C,1.9779984951*T-2.428592205*P+.4505937099*C,.0259040371*T+.7827717662*P-.808675766*C]},Tr=bl;function Yt(i){var n=Math.abs(i);return n<.04045?i/12.92:(gl(i)||1)*fl((n+.055)/1.055,2.4)}var vl=y.unpack,kt=Math.pow,yl=Math.sign,wl=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];i=vl(i,"lab");var s=i[0],c=i[1],p=i[2],m=kt(s+.3963377774*c+.2158037573*p,3),d=kt(s-.1055613458*c-.0638541728*p,3),g=kt(s-.0894841775*c-1.291485548*p,3);return[255*Kt(4.0767416621*m-3.3077115913*d+.2309699292*g),255*Kt(-1.2684380046*m+2.6097574011*d-.3413193965*g),255*Kt(-.0041960863*m-.7034186147*d+1.707614701*g),i.length>3?i[3]:1]},Cr=wl;function Kt(i){var n=Math.abs(i);return n>.0031308?(yl(i)||1)*(1.055*kt(n,1/2.4)-.055):i*12.92}var kl=y.unpack,Tl=y.type,Cl=se,$r=I,Ar=q,$l=Tr;$r.prototype.oklab=function(){return $l(this._rgb)},Cl.oklab=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];return new(Function.prototype.bind.apply($r,[null].concat(i,["oklab"])))},Ar.format.oklab=Cr,Ar.autodetect.push({p:3,test:function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];if(i=kl(i,"oklab"),Tl(i)==="array"&&i.length===3)return"oklab"}});var Al=y.unpack,El=Tr,_l=or,Pl=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];var s=Al(i,"rgb"),c=s[0],p=s[1],m=s[2],d=El(c,p,m),g=d[0],b=d[1],v=d[2];return _l(g,b,v)},Ml=Pl,Sl=y.unpack,Nl=cr,xl=Cr,Ll=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];i=Sl(i,"lch");var s=i[0],c=i[1],p=i[2],m=Nl(s,c,p),d=m[0],g=m[1],b=m[2],v=xl(d,g,b),T=v[0],P=v[1],C=v[2];return[T,P,C,i.length>3?i[3]:1]},Il=Ll,Ol=y.unpack,Rl=y.type,Fl=se,Er=I,_r=q,Dl=Ml;Er.prototype.oklch=function(){return Dl(this._rgb)},Fl.oklch=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];return new(Function.prototype.bind.apply(Er,[null].concat(i,["oklch"])))},_r.format.oklch=Il,_r.autodetect.push({p:3,test:function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];if(i=Ol(i,"oklch"),Rl(i)==="array"&&i.length===3)return"oklch"}});var Pr=I,ql=y.type;Pr.prototype.alpha=function(i,n){return n===void 0&&(n=!1),i!==void 0&&ql(i)==="number"?n?(this._rgb[3]=i,this):new Pr([this._rgb[0],this._rgb[1],this._rgb[2],i],"rgb"):this._rgb[3]};var jl=I;jl.prototype.clipped=function(){return this._rgb._clipped||!1};var De=I,Hl=bt;De.prototype.darken=function(i){i===void 0&&(i=1);var n=this,s=n.lab();return s[0]-=Hl.Kn*i,new De(s,"lab").alpha(n.alpha(),!0)},De.prototype.brighten=function(i){return i===void 0&&(i=1),this.darken(-i)},De.prototype.darker=De.prototype.darken,De.prototype.brighter=De.prototype.brighten;var Vl=I;Vl.prototype.get=function(i){var n=i.split("."),s=n[0],c=n[1],p=this[s]();if(c){var m=s.indexOf(c)-(s.substr(0,2)==="ok"?2:0);if(m>-1)return p[m];throw new Error("unknown channel "+c+" in mode "+s)}else return p};var Ye=I,Bl=y.type,zl=Math.pow,Ul=1e-7,Wl=20;Ye.prototype.luminance=function(i){if(i!==void 0&&Bl(i)==="number"){if(i===0)return new Ye([0,0,0,this._rgb[3]],"rgb");if(i===1)return new Ye([255,255,255,this._rgb[3]],"rgb");var n=this.luminance(),s="rgb",c=Wl,p=function(d,g){var b=d.interpolate(g,.5,s),v=b.luminance();return Math.abs(i-v)i?p(d,b):p(b,g)},m=(n>i?p(new Ye([0,0,0]),this):p(this,new Ye([255,255,255]))).rgb();return new Ye(m.concat([this._rgb[3]]))}return Gl.apply(void 0,this._rgb.slice(0,3))};var Gl=function(i,n,s){return i=Xt(i),n=Xt(n),s=Xt(s),.2126*i+.7152*n+.0722*s},Xt=function(i){return i/=255,i<=.03928?i/12.92:zl((i+.055)/1.055,2.4)},ke={},Mr=I,Sr=y.type,Tt=ke,Nr=function(i,n,s){s===void 0&&(s=.5);for(var c=[],p=arguments.length-3;p-- >0;)c[p]=arguments[p+3];var m=c[0]||"lrgb";if(!Tt[m]&&!c.length&&(m=Object.keys(Tt)[0]),!Tt[m])throw new Error("interpolation mode "+m+" is not defined");return Sr(i)!=="object"&&(i=new Mr(i)),Sr(n)!=="object"&&(n=new Mr(n)),Tt[m](i,n,s).alpha(i.alpha()+s*(n.alpha()-i.alpha()))},xr=I,Yl=Nr;xr.prototype.mix=xr.prototype.interpolate=function(i,n){n===void 0&&(n=.5);for(var s=[],c=arguments.length-2;c-- >0;)s[c]=arguments[c+2];return Yl.apply(void 0,[this,i,n].concat(s))};var Lr=I;Lr.prototype.premultiply=function(i){i===void 0&&(i=!1);var n=this._rgb,s=n[3];return i?(this._rgb=[n[0]*s,n[1]*s,n[2]*s,s],this):new Lr([n[0]*s,n[1]*s,n[2]*s,s],"rgb")};var Qt=I,Kl=bt;Qt.prototype.saturate=function(i){i===void 0&&(i=1);var n=this,s=n.lch();return s[1]+=Kl.Kn*i,s[1]<0&&(s[1]=0),new Qt(s,"lch").alpha(n.alpha(),!0)},Qt.prototype.desaturate=function(i){return i===void 0&&(i=1),this.saturate(-i)};var Ir=I,Or=y.type;Ir.prototype.set=function(i,n,s){s===void 0&&(s=!1);var c=i.split("."),p=c[0],m=c[1],d=this[p]();if(m){var g=p.indexOf(m)-(p.substr(0,2)==="ok"?2:0);if(g>-1){if(Or(n)=="string")switch(n.charAt(0)){case"+":d[g]+=+n;break;case"-":d[g]+=+n;break;case"*":d[g]*=+n.substr(1);break;case"/":d[g]/=+n.substr(1);break;default:d[g]=+n}else if(Or(n)==="number")d[g]=n;else throw new Error("unsupported value for Color.set");var b=new Ir(d,p);return s?(this._rgb=b._rgb,this):b}throw new Error("unknown channel "+m+" in mode "+p)}else return d};var Xl=I,Ql=function(i,n,s){var c=i._rgb,p=n._rgb;return new Xl(c[0]+s*(p[0]-c[0]),c[1]+s*(p[1]-c[1]),c[2]+s*(p[2]-c[2]),"rgb")};ke.rgb=Ql;var Jl=I,Jt=Math.sqrt,Ke=Math.pow,Zl=function(i,n,s){var c=i._rgb,p=c[0],m=c[1],d=c[2],g=n._rgb,b=g[0],v=g[1],T=g[2];return new Jl(Jt(Ke(p,2)*(1-s)+Ke(b,2)*s),Jt(Ke(m,2)*(1-s)+Ke(v,2)*s),Jt(Ke(d,2)*(1-s)+Ke(T,2)*s),"rgb")};ke.lrgb=Zl;var eo=I,to=function(i,n,s){var c=i.lab(),p=n.lab();return new eo(c[0]+s*(p[0]-c[0]),c[1]+s*(p[1]-c[1]),c[2]+s*(p[2]-c[2]),"lab")};ke.lab=to;var Rr=I,Xe=function(i,n,s,c){var p,m,d,g;c==="hsl"?(d=i.hsl(),g=n.hsl()):c==="hsv"?(d=i.hsv(),g=n.hsv()):c==="hcg"?(d=i.hcg(),g=n.hcg()):c==="hsi"?(d=i.hsi(),g=n.hsi()):c==="lch"||c==="hcl"?(c="hcl",d=i.hcl(),g=n.hcl()):c==="oklch"&&(d=i.oklch().reverse(),g=n.oklch().reverse());var b,v,T,P,C,x;(c.substr(0,1)==="h"||c==="oklch")&&(p=d,b=p[0],T=p[1],C=p[2],m=g,v=m[0],P=m[1],x=m[2]);var N,V,U,Y;return!isNaN(b)&&!isNaN(v)?(v>b&&v-b>180?Y=v-(b+360):v180?Y=v+360-b:Y=v-b,V=b+s*Y):isNaN(b)?isNaN(v)?V=Number.NaN:(V=v,(C==1||C==0)&&c!="hsv"&&(N=P)):(V=b,(x==1||x==0)&&c!="hsv"&&(N=T)),N===void 0&&(N=T+s*(P-T)),U=C+s*(x-C),c==="oklch"?new Rr([U,N,V],c):new Rr([V,N,U],c)},io=Xe,Fr=function(i,n,s){return io(i,n,s,"lch")};ke.lch=Fr,ke.hcl=Fr;var ro=I,no=function(i,n,s){var c=i.num(),p=n.num();return new ro(c+s*(p-c),"num")};ke.num=no;var ao=Xe,so=function(i,n,s){return ao(i,n,s,"hcg")};ke.hcg=so;var lo=Xe,oo=function(i,n,s){return lo(i,n,s,"hsi")};ke.hsi=oo;var co=Xe,uo=function(i,n,s){return co(i,n,s,"hsl")};ke.hsl=uo;var ho=Xe,po=function(i,n,s){return ho(i,n,s,"hsv")};ke.hsv=po;var mo=I,fo=function(i,n,s){var c=i.oklab(),p=n.oklab();return new mo(c[0]+s*(p[0]-c[0]),c[1]+s*(p[1]-c[1]),c[2]+s*(p[2]-c[2]),"oklab")};ke.oklab=fo;var go=Xe,bo=function(i,n,s){return go(i,n,s,"oklch")};ke.oklch=bo;var Zt=I,vo=y.clip_rgb,ei=Math.pow,ti=Math.sqrt,ii=Math.PI,Dr=Math.cos,qr=Math.sin,yo=Math.atan2,wo=function(i,n,s){n===void 0&&(n="lrgb"),s===void 0&&(s=null);var c=i.length;s||(s=Array.from(new Array(c)).map(function(){return 1}));var p=c/s.reduce(function(V,U){return V+U});if(s.forEach(function(V,U){s[U]*=p}),i=i.map(function(V){return new Zt(V)}),n==="lrgb")return ko(i,s);for(var m=i.shift(),d=m.get(n),g=[],b=0,v=0,T=0;T=360;)N-=360;d[x]=N}else d[x]=d[x]/g[x];return C/=c,new Zt(d,n).alpha(C>.99999?1:C,!0)},ko=function(i,n){for(var s=i.length,c=[0,0,0,0],p=0;p.9999999&&(c[3]=1),new Zt(vo(c))},Te=se,Qe=y.type,To=Math.pow,ri=function(i){var n="rgb",s=Te("#ccc"),c=0,p=[0,1],m=[],d=[0,0],g=!1,b=[],v=!1,T=0,P=1,C=!1,x={},N=!0,V=1,U=function($){if($=$||["#fff","#000"],$&&Qe($)==="string"&&Te.brewer&&Te.brewer[$.toLowerCase()]&&($=Te.brewer[$.toLowerCase()]),Qe($)==="array"){$.length===1&&($=[$[0],$[0]]),$=$.slice(0);for(var O=0;O<$.length;O++)$[O]=Te($[O]);m.length=0;for(var z=0;z<$.length;z++)m.push(z/($.length-1))}return we(),b=$},Y=function($){if(g!=null){for(var O=g.length-1,z=0;z=g[z];)z++;return z-1}return 0},J=function($){return $},ge=function($){return $},de=function($,O){var z,B;if(O==null&&(O=!1),isNaN($)||$===null)return s;if(O)B=$;else if(g&&g.length>2){var be=Y($);B=be/(g.length-2)}else P!==T?B=($-T)/(P-T):B=1;B=ge(B),O||(B=J(B)),V!==1&&(B=To(B,V)),B=d[0]+B*(1-d[0]-d[1]),B=Math.min(1,Math.max(0,B));var ae=Math.floor(B*1e4);if(N&&x[ae])z=x[ae];else{if(Qe(b)==="array")for(var K=0;K=Z&&K===m.length-1){z=b[K];break}if(B>Z&&B2){var K=$.map(function(ee,ie){return ie/($.length-1)}),Z=$.map(function(ee){return(ee-T)/(P-T)});Z.every(function(ee,ie){return K[ie]===ee})||(ge=function(ee){if(ee<=0||ee>=1)return ee;for(var ie=0;ee>=Z[ie+1];)ie++;var $e=(ee-Z[ie])/(Z[ie+1]-Z[ie]),Ie=K[ie]+$e*(K[ie+1]-K[ie]);return Ie})}}return p=[T,P],G},G.mode=function($){return arguments.length?(n=$,we(),G):n},G.range=function($,O){return U($),G},G.out=function($){return v=$,G},G.spread=function($){return arguments.length?(c=$,G):c},G.correctLightness=function($){return $==null&&($=!0),C=$,we(),C?J=function(O){for(var z=de(0,!0).lab()[0],B=de(1,!0).lab()[0],be=z>B,ae=de(O,!0).lab()[0],K=z+(B-z)*O,Z=ae-K,ee=0,ie=1,$e=20;Math.abs(Z)>.01&&$e-- >0;)(function(){return be&&(Z*=-1),Z<0?(ee=O,O+=(ie-O)*.5):(ie=O,O+=(ee-O)*.5),ae=de(O,!0).lab()[0],Z=ae-K})();return O}:J=function(O){return O},G},G.padding=function($){return $!=null?(Qe($)==="number"&&($=[$,$]),d=$,G):d},G.colors=function($,O){arguments.length<2&&(O="hex");var z=[];if(arguments.length===0)z=b.slice(0);else if($===1)z=[G(.5)];else if($>1){var B=p[0],be=p[1]-B;z=Co(0,$).map(function(ie){return G(B+ie/($-1)*be)})}else{i=[];var ae=[];if(g&&g.length>2)for(var K=1,Z=g.length,ee=1<=Z;ee?KZ;ee?K++:K--)ae.push((g[K-1]+g[K])*.5);else ae=p;z=ae.map(function(ie){return G(ie)})}return Te[O]&&(z=z.map(function(ie){return ie[O]()})),z},G.cache=function($){return $!=null?(N=$,G):N},G.gamma=function($){return $!=null?(V=$,G):V},G.nodata=function($){return $!=null?(s=Te($),G):s},G};function Co(i,n,s){for(var c=[],p=im;p?d++:d--)c.push(d);return c}var rt=I,$o=ri,Ao=function(i){for(var n=[1,1],s=1;s=5){var v,T,P;v=i.map(function(C){return C.lab()}),P=i.length-1,T=Ao(P),p=function(C){var x=1-C,N=[0,1,2].map(function(V){return v.reduce(function(U,Y,J){return U+T[J]*Math.pow(x,P-J)*Math.pow(C,J)*Y[V]},0)});return new rt(N,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return p},_o=function(i){var n=Eo(i);return n.scale=function(){return $o(n)},n},ni=se,Ce=function(i,n,s){if(!Ce[s])throw new Error("unknown blend mode "+s);return Ce[s](i,n)},xe=function(i){return function(n,s){var c=ni(s).rgb(),p=ni(n).rgb();return ni.rgb(i(c,p))}},Le=function(i){return function(n,s){var c=[];return c[0]=i(n[0],s[0]),c[1]=i(n[1],s[1]),c[2]=i(n[2],s[2]),c}},Po=function(i){return i},Mo=function(i,n){return i*n/255},So=function(i,n){return i>n?n:i},No=function(i,n){return i>n?i:n},xo=function(i,n){return 255*(1-(1-i/255)*(1-n/255))},Lo=function(i,n){return n<128?2*i*n/255:255*(1-2*(1-i/255)*(1-n/255))},Io=function(i,n){return 255*(1-(1-n/255)/(i/255))},Oo=function(i,n){return i===255?255:(i=255*(n/255)/(1-i/255),i>255?255:i)};Ce.normal=xe(Le(Po)),Ce.multiply=xe(Le(Mo)),Ce.screen=xe(Le(xo)),Ce.overlay=xe(Le(Lo)),Ce.darken=xe(Le(So)),Ce.lighten=xe(Le(No)),Ce.dodge=xe(Le(Oo)),Ce.burn=xe(Le(Io));for(var Ro=Ce,ai=y.type,Fo=y.clip_rgb,Do=y.TWOPI,qo=Math.pow,jo=Math.sin,Ho=Math.cos,jr=se,Vo=function(i,n,s,c,p){i===void 0&&(i=300),n===void 0&&(n=-1.5),s===void 0&&(s=1),c===void 0&&(c=1),p===void 0&&(p=[0,1]);var m=0,d;ai(p)==="array"?d=p[1]-p[0]:(d=0,p=[p,p]);var g=function(b){var v=Do*((i+120)/360+n*b),T=qo(p[0]+d*b,c),P=m!==0?s[0]+b*m:s,C=P*T*(1-T)/2,x=Ho(v),N=jo(v),V=T+C*(-.14861*x+1.78277*N),U=T+C*(-.29227*x-.90649*N),Y=T+C*(1.97294*x);return jr(Fo([V*255,U*255,Y*255,1]))};return g.start=function(b){return b==null?i:(i=b,g)},g.rotations=function(b){return b==null?n:(n=b,g)},g.gamma=function(b){return b==null?c:(c=b,g)},g.hue=function(b){return b==null?s:(s=b,ai(s)==="array"?(m=s[1]-s[0],m===0&&(s=s[1])):m=0,g)},g.lightness=function(b){return b==null?p:(ai(b)==="array"?(p=b,d=b[1]-b[0]):(p=[b,b],d=0),g)},g.scale=function(){return jr.scale(g)},g.hue(s),g},Bo=I,zo="0123456789abcdef",Uo=Math.floor,Wo=Math.random,Go=function(){for(var i="#",n=0;n<6;n++)i+=zo.charAt(Uo(Wo()*16));return new Bo(i,"hex")},si=k,Hr=Math.log,Yo=Math.pow,Ko=Math.floor,Xo=Math.abs,Vr=function(i,n){n===void 0&&(n=null);var s={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return si(i)==="object"&&(i=Object.values(i)),i.forEach(function(c){n&&si(c)==="object"&&(c=c[n]),c!=null&&!isNaN(c)&&(s.values.push(c),s.sum+=c,cs.max&&(s.max=c),s.count+=1)}),s.domain=[s.min,s.max],s.limits=function(c,p){return Br(s,c,p)},s},Br=function(i,n,s){n===void 0&&(n="equal"),s===void 0&&(s=7),si(i)=="array"&&(i=Vr(i));var c=i.min,p=i.max,m=i.values.sort(function(oi,ci){return oi-ci});if(s===1)return[c,p];var d=[];if(n.substr(0,1)==="c"&&(d.push(c),d.push(p)),n.substr(0,1)==="e"){d.push(c);for(var g=1;g 0");var b=Math.LOG10E*Hr(c),v=Math.LOG10E*Hr(p);d.push(c);for(var T=1;T200&&(ge=!1)}for(var Oe={},Je=0;Jec?(s+.05)/(c+.05):(c+.05)/(s+.05)},Wr=I,Pe=Math.sqrt,ce=Math.pow,Jo=Math.min,Zo=Math.max,Gr=Math.atan2,Yr=Math.abs,Ct=Math.cos,Kr=Math.sin,ec=Math.exp,Xr=Math.PI,tc=function(i,n,s,c,p){s===void 0&&(s=1),c===void 0&&(c=1),p===void 0&&(p=1);var m=function(je){return 360*je/(2*Xr)},d=function(je){return 2*Xr*je/360};i=new Wr(i),n=new Wr(n);var g=Array.from(i.lab()),b=g[0],v=g[1],T=g[2],P=Array.from(n.lab()),C=P[0],x=P[1],N=P[2],V=(b+C)/2,U=Pe(ce(v,2)+ce(T,2)),Y=Pe(ce(x,2)+ce(N,2)),J=(U+Y)/2,ge=.5*(1-Pe(ce(J,7)/(ce(J,7)+ce(25,7)))),de=v*(1+ge),we=x*(1+ge),G=Pe(ce(de,2)+ce(T,2)),$=Pe(ce(we,2)+ce(N,2)),O=(G+$)/2,z=m(Gr(T,de)),B=m(Gr(N,we)),be=z>=0?z:z+360,ae=B>=0?B:B+360,K=Yr(be-ae)>180?(be+ae+360)/2:(be+ae)/2,Z=1-.17*Ct(d(K-30))+.24*Ct(d(2*K))+.32*Ct(d(3*K+6))-.2*Ct(d(4*K-63)),ee=ae-be;ee=Yr(ee)<=180?ee:ae<=be?ee+360:ee-360,ee=2*Pe(G*$)*Kr(d(ee)/2);var ie=C-b,$e=$-G,Ie=1+.015*ce(V-50,2)/Pe(20+ce(V-50,2)),Oe=1+.045*O,Je=1+.015*O*Z,Ze=30*ec(-ce((K-275)/25,2)),Me=2*Pe(ce(O,7)/(ce(O,7)+ce(25,7))),qe=-Me*Kr(2*d(Ze)),nt=Pe(ce(ie/(s*Ie),2)+ce($e/(c*Oe),2)+ce(ee/(p*Je),2)+qe*($e/(c*Oe))*(ee/(p*Je)));return Zo(0,Jo(100,nt))},Qr=I,ic=function(i,n,s){s===void 0&&(s="lab"),i=new Qr(i),n=new Qr(n);var c=i.get(s),p=n.get(s),m=0;for(var d in c){var g=(c[d]||0)-(p[d]||0);m+=g*g}return Math.sqrt(m)},rc=I,nc=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];try{return new(Function.prototype.bind.apply(rc,[null].concat(i))),!0}catch{return!1}},Jr=se,Zr=ri,ac={cool:function(){return Zr([Jr.hsl(180,1,.9),Jr.hsl(250,.7,.4)])},hot:function(){return Zr(["#000","#f00","#ff0","#fff"]).mode("rgb")}},$t={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},li=0,en=Object.keys($t);li{Alpine.store("player").playing=!0}),et.on("pause",e=>{Alpine.store("player").playing=!1}),et.on("ended",e=>{Alpine.store("player").playing=!1})},playEpisode(e,r,t,a){this.audio_file!==r&&(et.source={type:"audio",title:e,audio_file:r,sources:[{src:r,type:t}]}),this.toggle(r),this.title=e,this.audio_file=r,this.episode_url=a,this.show=!0},toggle(e){if(this.playing&&e===this.audio_file){et.pause(),Alpine.store("player").playing=!1;return}et.togglePlay()}});
diff --git a/public/build/assets/tailwind-DpkkGfgb.css b/public/build/assets/tailwind-DpkkGfgb.css
deleted file mode 100644
index ac83ff0..0000000
--- a/public/build/assets/tailwind-DpkkGfgb.css
+++ /dev/null
@@ -1 +0,0 @@
-@import"https://rsms.me/inter/inter.css";@import"https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;700&display=swap";*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter var,Inter,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:IBM Plex Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }html{font-family:Inter,sans-serif}@supports (font-variation-settings: normal){html{font-family:Inter var,sans-serif}}:root{--plyr-audio-controls-background: transparent}.player{position:fixed;left:0;right:0;bottom:0;display:flex;align-items:center;border-top-width:1px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background-color:#fffc;height:60px;z-index:100}.player .plyr{width:100%}@media (min-width: 768px){.player{height:80px}}h1{font-family:Inter var,Inter,sans-serif;font-size:3rem;line-height:1;font-weight:900}.content{font-family:Inter var,Inter,sans-serif}.content h2{margin-bottom:2rem;font-size:1.5rem;line-height:2rem;font-weight:700}.content h3{margin-bottom:1rem;font-size:1.125rem;line-height:1.75rem;font-weight:700}.content>p{margin-bottom:2em}.content a{text-decoration-line:underline}.content a:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.content ul:not(.list-none){margin-left:2rem;margin-bottom:2rem;list-style-type:disc;padding-left:0}.content ul:not(.list-none) li{margin-bottom:.25rem}.content ul:not(.list-none) li ul{margin-bottom:0}.content ol{margin-left:2rem;margin-bottom:2rem;list-style-type:decimal;padding-left:0}.content ol li{margin-bottom:.25rem}.turbo-progress-bar{background-color:var(--primary-color);height:5px}[x-cloak]{display:none}.absolute{position:absolute!important}.relative{position:relative!important}.inset-0{top:0!important;right:0!important;bottom:0!important;left:0!important}.bottom-0{bottom:0!important}.right-0{right:0!important}.top-0{top:0!important}.z-10{z-index:10!important}.order-1{order:1!important}.order-2{order:2!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.my-8{margin-top:2rem!important;margin-bottom:2rem!important}.mb-0{margin-bottom:0!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:.75rem!important}.mb-6{margin-bottom:1.5rem!important}.mb-8{margin-bottom:2rem!important}.ml-4{margin-left:1rem!important}.mr-2{margin-right:.5rem!important}.mr-3{margin-right:.75rem!important}.mr-4{margin-right:1rem!important}.mt-1{margin-top:.25rem!important}.mt-16{margin-top:4rem!important}.mt-4{margin-top:1rem!important}.mt-6{margin-top:1.5rem!important}.mt-8{margin-top:2rem!important}.mt-px{margin-top:1px!important}.inline-block{display:inline-block!important}.flex{display:flex!important}.hidden{display:none!important}.h-10{height:2.5rem!important}.h-12{height:3rem!important}.h-5{height:1.25rem!important}.h-8{height:2rem!important}.h-full{height:100%!important}.min-h-full{min-height:100%!important}.min-h-screen{min-height:100vh!important}.w-12{width:3rem!important}.w-16{width:4rem!important}.w-5{width:1.25rem!important}.w-8{width:2rem!important}.w-\[300px\]{width:300px!important}.w-\[350px\]{width:350px!important}.w-full{width:100%!important}.max-w-6xl{max-width:72rem!important}.max-w-md{max-width:28rem!important}.flex-1{flex:1 1 0%!important}.origin-bottom-left{transform-origin:bottom left!important}.translate-y-0{--tw-translate-y: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-y-24{--tw-translate-y: 6rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.flex-col{flex-direction:column!important}.flex-wrap{flex-wrap:wrap!important}.items-start{align-items:flex-start!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.space-x-10>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(2.5rem * var(--tw-space-x-reverse))!important;margin-left:calc(2.5rem * calc(1 - var(--tw-space-x-reverse)))!important}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(.5rem * var(--tw-space-x-reverse))!important;margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))!important}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(.75rem * var(--tw-space-x-reverse))!important;margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))!important}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(1rem * var(--tw-space-x-reverse))!important;margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))!important}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(1.25rem * var(--tw-space-x-reverse))!important;margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))!important}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(1.5rem * var(--tw-space-x-reverse))!important;margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))!important}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(.5rem * var(--tw-space-y-reverse))!important}.overflow-visible{overflow:visible!important}.whitespace-nowrap{white-space:nowrap!important}.rounded{border-radius:.25rem!important}.rounded-full{border-radius:9999px!important}.rounded-md{border-radius:.375rem!important}.border{border-width:1px!important}.border-b{border-bottom-width:1px!important}.border-b-3{border-bottom-width:3px!important}.border-r{border-right-width:1px!important}.border-t{border-top-width:1px!important}.border-black{--tw-border-opacity: 1 !important;border-color:rgb(0 0 0 / var(--tw-border-opacity))!important}.border-gray-300{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important}.bg-blue-100{--tw-bg-opacity: 1 !important;background-color:rgb(219 234 254 / var(--tw-bg-opacity))!important}.bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.p-0{padding:0!important}.p-2{padding:.5rem!important}.p-6{padding:1.5rem!important}.px-3{padding-left:.75rem!important;padding-right:.75rem!important}.px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:.75rem!important;padding-bottom:.75rem!important}.py-4{padding-top:1rem!important;padding-bottom:1rem!important}.py-6{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-8{padding-top:2rem!important;padding-bottom:2rem!important}.py-px{padding-top:1px!important;padding-bottom:1px!important}.pb-24{padding-bottom:6rem!important}.pb-8{padding-bottom:2rem!important}.pl-3{padding-left:.75rem!important}.pr-24{padding-right:6rem!important}.pr-32{padding-right:8rem!important}.pr-6{padding-right:1.5rem!important}.pt-16{padding-top:4rem!important}.pt-4{padding-top:1rem!important}.pt-8{padding-top:2rem!important}.pt-\[2px\]{padding-top:2px!important}.text-left{text-align:left!important}.text-center{text-align:center!important}.font-mono{font-family:IBM Plex Mono,monospace!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-bold{font-weight:700!important}.font-semibold{font-weight:600!important}.uppercase{text-transform:uppercase!important}.leading-snug{line-height:1.375!important}.tracking-widest{letter-spacing:.1em!important}.text-blue-800{--tw-text-opacity: 1 !important;color:rgb(30 64 175 / var(--tw-text-opacity))!important}.text-blue-900{--tw-text-opacity: 1 !important;color:rgb(30 58 138 / var(--tw-text-opacity))!important}.text-gray-300{--tw-text-opacity: 1 !important;color:rgb(209 213 219 / var(--tw-text-opacity))!important}.text-gray-400{--tw-text-opacity: 1 !important;color:rgb(156 163 175 / var(--tw-text-opacity))!important}.text-gray-500{--tw-text-opacity: 1 !important;color:rgb(107 114 128 / var(--tw-text-opacity))!important}.text-gray-700{--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.text-gray-800{--tw-text-opacity: 1 !important;color:rgb(31 41 55 / var(--tw-text-opacity))!important}.underline{text-decoration-line:underline!important}.antialiased{-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25) !important;--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.duration-200{transition-duration:.2s!important}.duration-300{transition-duration:.3s!important}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)!important}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)!important}.hover\:-translate-y-1:hover{--tw-translate-y: -.25rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1 !important;background-color:rgb(219 234 254 / var(--tw-bg-opacity))!important}.hover\:text-black:hover{--tw-text-opacity: 1 !important;color:rgb(0 0 0 / var(--tw-text-opacity))!important}.hover\:text-gray-700:hover{--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.hover\:drop-shadow-lg:hover{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1)) !important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.group:hover .group-hover\:-translate-y-16{--tw-translate-y: -4rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.group:hover .group-hover\:-rotate-12{--tw-rotate: -12deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.group:hover .group-hover\:rotate-12{--tw-rotate: 12deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.group:hover .group-hover\:bg-blue-200{--tw-bg-opacity: 1 !important;background-color:rgb(191 219 254 / var(--tw-bg-opacity))!important}.group:hover .group-hover\:text-gray-700{--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}@media (min-width: 768px){.md\:order-first{order:-9999!important}.md\:mb-8{margin-bottom:2rem!important}.md\:mt-24{margin-top:6rem!important}.md\:block{display:block!important}.md\:flex{display:flex!important}.md\:hidden{display:none!important}.md\:w-1\/2{width:50%!important}.md\:w-\[1000px\]{width:1000px!important}.md\:w-\[350px\]{width:350px!important}.md\:w-\[500px\]{width:500px!important}.md\:w-auto{width:auto!important}.md\:flex-row{flex-direction:row!important}.md\:flex-col{flex-direction:column!important}.md\:justify-start{justify-content:flex-start!important}.md\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(1rem * var(--tw-space-x-reverse))!important;margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))!important}.md\:border-0{border-width:0px!important}.md\:border-none{border-style:none!important}.md\:py-16{padding-top:4rem!important;padding-bottom:4rem!important}.md\:py-20{padding-top:5rem!important;padding-bottom:5rem!important}.md\:pr-32{padding-right:8rem!important}.md\:shadow-3xl{--tw-shadow: 40px 60px 90px -15px rgba(0, 0, 0, .3) !important;--tw-shadow-colored: 40px 60px 90px -15px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}}
diff --git a/public/build/manifest.json b/public/build/manifest.json
deleted file mode 100644
index 2f3c90f..0000000
--- a/public/build/manifest.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "resources/css/tailwind.css": {
- "file": "assets/tailwind-DpkkGfgb.css",
- "src": "resources/css/tailwind.css",
- "isEntry": true
- },
- "resources/js/site.js": {
- "file": "assets/site-CCv8Ghrc.js",
- "name": "site",
- "src": "resources/js/site.js",
- "isEntry": true
- }
-}
\ No newline at end of file
diff --git a/public/css/tailwind.css b/public/css/tailwind.css
deleted file mode 100644
index 303d385..0000000
--- a/public/css/tailwind.css
+++ /dev/null
@@ -1,801 +0,0 @@
-/*! tailwindcss v2.2.19 | MIT License | https://tailwindcss.com *//*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize *//*
-Document
-========
-*//**
-Use a better box model (opinionated).
-*/*,
-::before,
-::after {
- box-sizing: border-box;
-}/**
-Use a more readable tab size (opinionated).
-*/html {
- -moz-tab-size: 4;
- -o-tab-size: 4;
- tab-size: 4;
-}/**
-1. Correct the line height in all browsers.
-2. Prevent adjustments of font size after orientation changes in iOS.
-*/html {
- line-height: 1.15; /* 1 */
- -webkit-text-size-adjust: 100%; /* 2 */
-}/*
-Sections
-========
-*//**
-Remove the margin in all browsers.
-*/body {
- margin: 0;
-}/**
-Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
-*/body {
- font-family:
- system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif,
- 'Segoe UI',
- Roboto,
- Helvetica,
- Arial,
- sans-serif,
- 'Apple Color Emoji',
- 'Segoe UI Emoji';
-}/*
-Grouping content
-================
-*//**
-1. Add the correct height in Firefox.
-2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
-*/hr {
- height: 0; /* 1 */
- color: inherit; /* 2 */
-}/*
-Text-level semantics
-====================
-*//**
-Add the correct text decoration in Chrome, Edge, and Safari.
-*/abbr[title] {
- -webkit-text-decoration: underline dotted;
- text-decoration: underline dotted;
-}/**
-Add the correct font weight in Edge and Safari.
-*/b,
-strong {
- font-weight: bolder;
-}/**
-1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
-2. Correct the odd 'em' font sizing in all browsers.
-*/code,
-kbd,
-samp,
-pre {
- font-family:
- ui-monospace,
- SFMono-Regular,
- Consolas,
- 'Liberation Mono',
- Menlo,
- monospace; /* 1 */
- font-size: 1em; /* 2 */
-}/**
-Add the correct font size in all browsers.
-*/small {
- font-size: 80%;
-}/**
-Prevent 'sub' and 'sup' elements from affecting the line height in all browsers.
-*/sub,
-sup {
- font-size: 75%;
- line-height: 0;
- position: relative;
- vertical-align: baseline;
-}sub {
- bottom: -0.25em;
-}sup {
- top: -0.5em;
-}/*
-Tabular data
-============
-*//**
-1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
-2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
-*/table {
- text-indent: 0; /* 1 */
- border-color: inherit; /* 2 */
-}/*
-Forms
-=====
-*//**
-1. Change the font styles in all browsers.
-2. Remove the margin in Firefox and Safari.
-*/button,
-input,
-optgroup,
-select,
-textarea {
- font-family: inherit; /* 1 */
- font-size: 100%; /* 1 */
- line-height: 1.15; /* 1 */
- margin: 0; /* 2 */
-}/**
-Remove the inheritance of text transform in Edge and Firefox.
-1. Remove the inheritance of text transform in Firefox.
-*/button,
-select { /* 1 */
- text-transform: none;
-}/**
-Correct the inability to style clickable types in iOS and Safari.
-*/button,
-[type='button'],
-[type='reset'],
-[type='submit'] {
- -webkit-appearance: button;
-}/**
-Remove the inner border and padding in Firefox.
-*/::-moz-focus-inner {
- border-style: none;
- padding: 0;
-}/**
-Restore the focus styles unset by the previous rule.
-*/:-moz-focusring {
- outline: 1px dotted ButtonText;
-}/**
-Remove the additional ':invalid' styles in Firefox.
-See: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737
-*/:-moz-ui-invalid {
- box-shadow: none;
-}/**
-Remove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.
-*/legend {
- padding: 0;
-}/**
-Add the correct vertical alignment in Chrome and Firefox.
-*/progress {
- vertical-align: baseline;
-}/**
-Correct the cursor style of increment and decrement buttons in Safari.
-*/::-webkit-inner-spin-button,
-::-webkit-outer-spin-button {
- height: auto;
-}/**
-1. Correct the odd appearance in Chrome and Safari.
-2. Correct the outline style in Safari.
-*/[type='search'] {
- -webkit-appearance: textfield; /* 1 */
- outline-offset: -2px; /* 2 */
-}/**
-Remove the inner padding in Chrome and Safari on macOS.
-*/::-webkit-search-decoration {
- -webkit-appearance: none;
-}/**
-1. Correct the inability to style clickable types in iOS and Safari.
-2. Change font properties to 'inherit' in Safari.
-*/::-webkit-file-upload-button {
- -webkit-appearance: button; /* 1 */
- font: inherit; /* 2 */
-}/*
-Interactive
-===========
-*//*
-Add the correct display in Chrome and Safari.
-*/summary {
- display: list-item;
-}/**
- * Manually forked from SUIT CSS Base: https://github.com/suitcss/base
- * A thin layer on top of normalize.css that provides a starting point more
- * suitable for web applications.
- *//**
- * Removes the default spacing and border for appropriate elements.
- */blockquote,
-dl,
-dd,
-h1,
-h2,
-h3,
-h4,
-h5,
-h6,
-hr,
-figure,
-p,
-pre {
- margin: 0;
-}button {
- background-color: transparent;
- background-image: none;
-}fieldset {
- margin: 0;
- padding: 0;
-}ol,
-ul {
- list-style: none;
- margin: 0;
- padding: 0;
-}/**
- * Tailwind custom reset styles
- *//**
- * 1. Use the user's configured `sans` font-family (with Tailwind's default
- * sans-serif font stack as a fallback) as a sane default.
- * 2. Use Tailwind's default "normal" line-height so the user isn't forced
- * to override it to ensure consistency even when using the default theme.
- */html {
- font-family: Inter var, Inter, sans-serif; /* 1 */
- line-height: 1.5; /* 2 */
-}/**
- * Inherit font-family and line-height from `html` so users can set them as
- * a class directly on the `html` element.
- */body {
- font-family: inherit;
- line-height: inherit;
-}/**
- * 1. Prevent padding and border from affecting element width.
- *
- * We used to set this in the html element and inherit from
- * the parent element for everything else. This caused issues
- * in shadow-dom-enhanced elements like where the content
- * is wrapped by a div with box-sizing set to `content-box`.
- *
- * https://github.com/mozdevs/cssremedy/issues/4
- *
- *
- * 2. Allow adding a border to an element by just adding a border-width.
- *
- * By default, the way the browser specifies that an element should have no
- * border is by setting it's border-style to `none` in the user-agent
- * stylesheet.
- *
- * In order to easily add borders to elements by just setting the `border-width`
- * property, we change the default border-style for all elements to `solid`, and
- * use border-width to hide them instead. This way our `border` utilities only
- * need to set the `border-width` property instead of the entire `border`
- * shorthand, making our border utilities much more straightforward to compose.
- *
- * https://github.com/tailwindcss/tailwindcss/pull/116
- */*,
-::before,
-::after {
- box-sizing: border-box; /* 1 */
- border-width: 0; /* 2 */
- border-style: solid; /* 2 */
- border-color: currentColor; /* 2 */
-}/*
- * Ensure horizontal rules are visible by default
- */hr {
- border-top-width: 1px;
-}/**
- * Undo the `border-style: none` reset that Normalize applies to images so that
- * our `border-{width}` utilities have the expected effect.
- *
- * The Normalize reset is unnecessary for us since we default the border-width
- * to 0 on all elements.
- *
- * https://github.com/tailwindcss/tailwindcss/issues/362
- */img {
- border-style: solid;
-}textarea {
- resize: vertical;
-}input::-moz-placeholder, textarea::-moz-placeholder {
- opacity: 1;
- color: #9ca3af;
-}input::placeholder,
-textarea::placeholder {
- opacity: 1;
- color: #9ca3af;
-}button,
-[role="button"] {
- cursor: pointer;
-}/**
- * Override legacy focus reset from Normalize with modern Firefox focus styles.
- *
- * This is actually an improvement over the new defaults in Firefox in our testing,
- * as it triggers the better focus styles even for links, which still use a dotted
- * outline in Firefox by default.
- */:-moz-focusring {
- outline: auto;
-}table {
- border-collapse: collapse;
-}h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- font-size: inherit;
- font-weight: inherit;
-}/**
- * Reset links to optimize for opt-in styling instead of
- * opt-out.
- */a {
- color: inherit;
- text-decoration: inherit;
-}/**
- * Reset form element properties that are easy to forget to
- * style explicitly so you don't inadvertently introduce
- * styles that deviate from your design system. These styles
- * supplement a partial reset that is already applied by
- * normalize.css.
- */button,
-input,
-optgroup,
-select,
-textarea {
- padding: 0;
- line-height: inherit;
- color: inherit;
-}/**
- * Use the configured 'mono' font family for elements that
- * are expected to be rendered with a monospace font, falling
- * back to the system monospace stack if there is no configured
- * 'mono' font family.
- */pre,
-code,
-kbd,
-samp {
- font-family: IBM Plex Mono, monospace;
-}/**
- * 1. Make replaced elements `display: block` by default as that's
- * the behavior you want almost all of the time. Inspired by
- * CSS Remedy, with `svg` added as well.
- *
- * https://github.com/mozdevs/cssremedy/issues/14
- *
- * 2. Add `vertical-align: middle` to align replaced elements more
- * sensibly by default when overriding `display` by adding a
- * utility like `inline`.
- *
- * This can trigger a poorly considered linting error in some
- * tools but is included by design.
- *
- * https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210
- */img,
-svg,
-video,
-canvas,
-audio,
-iframe,
-embed,
-object {
- display: block; /* 1 */
- vertical-align: middle; /* 2 */
-}/**
- * Constrain images and videos to the parent width and preserve
- * their intrinsic aspect ratio.
- *
- * https://github.com/mozdevs/cssremedy/issues/14
- */img,
-video {
- max-width: 100%;
- height: auto;
-}/**
- * Ensure the default browser behavior of the `hidden` attribute.
- */[hidden] {
- display: none;
-}*, ::before, ::after {
- --tw-translate-x: 0;
- --tw-translate-y: 0;
- --tw-rotate: 0;
- --tw-skew-x: 0;
- --tw-skew-y: 0;
- --tw-scale-x: 1;
- --tw-scale-y: 1;
- --tw-transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
- --tw-border-opacity: 1;
- border-color: rgba(229, 231, 235, var(--tw-border-opacity));
- --tw-ring-offset-shadow: 0 0 rgba(0,0,0,0);
- --tw-ring-shadow: 0 0 rgba(0,0,0,0);
- --tw-shadow: 0 0 rgba(0,0,0,0);
- --tw-blur: var(--tw-empty,/*!*/ /*!*/);
- --tw-brightness: var(--tw-empty,/*!*/ /*!*/);
- --tw-contrast: var(--tw-empty,/*!*/ /*!*/);
- --tw-grayscale: var(--tw-empty,/*!*/ /*!*/);
- --tw-hue-rotate: var(--tw-empty,/*!*/ /*!*/);
- --tw-invert: var(--tw-empty,/*!*/ /*!*/);
- --tw-saturate: var(--tw-empty,/*!*/ /*!*/);
- --tw-sepia: var(--tw-empty,/*!*/ /*!*/);
- --tw-drop-shadow: var(--tw-empty,/*!*/ /*!*/);
- --tw-filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
-}.absolute {
- position: absolute !important;
-}.relative {
- position: relative !important;
-}.inset-0 {
- top: 0px !important;
- right: 0px !important;
- bottom: 0px !important;
- left: 0px !important;
-}.top-0 {
- top: 0px !important;
-}.right-0 {
- right: 0px !important;
-}.bottom-0 {
- bottom: 0px !important;
-}.z-10 {
- z-index: 10 !important;
-}.order-2 {
- order: 2 !important;
-}.order-1 {
- order: 1 !important;
-}.mx-auto {
- margin-left: auto !important;
- margin-right: auto !important;
-}.mb-6 {
- margin-bottom: 1.5rem !important;
-}.mt-8 {
- margin-top: 2rem !important;
-}.mb-2 {
- margin-bottom: 0.5rem !important;
-}.mt-16 {
- margin-top: 4rem !important;
-}.mt-6 {
- margin-top: 1.5rem !important;
-}.mt-4 {
- margin-top: 1rem !important;
-}.mb-8 {
- margin-bottom: 2rem !important;
-}.mb-3 {
- margin-bottom: 0.75rem !important;
-}.ml-4 {
- margin-left: 1rem !important;
-}.mr-2 {
- margin-right: 0.5rem !important;
-}.mr-4 {
- margin-right: 1rem !important;
-}.mt-px {
- margin-top: 1px !important;
-}.mr-3 {
- margin-right: 0.75rem !important;
-}.mt-1 {
- margin-top: 0.25rem !important;
-}.inline-block {
- display: inline-block !important;
-}.flex {
- display: flex !important;
-}.hidden {
- display: none !important;
-}.h-10 {
- height: 2.5rem !important;
-}.h-full {
- height: 100% !important;
-}.h-5 {
- height: 1.25rem !important;
-}.h-8 {
- height: 2rem !important;
-}.h-12 {
- height: 3rem !important;
-}.min-h-screen {
- min-height: 100vh !important;
-}.min-h-full {
- min-height: 100% !important;
-}.w-full {
- width: 100% !important;
-}.w-5 {
- width: 1.25rem !important;
-}.w-\[350px\] {
- width: 350px !important;
-}.w-16 {
- width: 4rem !important;
-}.w-\[300px\] {
- width: 300px !important;
-}.w-8 {
- width: 2rem !important;
-}.w-12 {
- width: 3rem !important;
-}.max-w-6xl {
- max-width: 72rem !important;
-}.max-w-md {
- max-width: 28rem !important;
-}.flex-1 {
- flex: 1 1 0% !important;
-}.origin-bottom-left {
- transform-origin: bottom left !important;
-}.translate-y-24 {
- --tw-translate-y: 6rem !important;
- transform: var(--tw-transform) !important;
-}.translate-y-0 {
- --tw-translate-y: 0px !important;
- transform: var(--tw-transform) !important;
-}.transform {
- transform: var(--tw-transform) !important;
-}.transform-gpu {
- --tw-transform: translate3d(var(--tw-translate-x), var(--tw-translate-y), 0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important;
-}.flex-col {
- flex-direction: column !important;
-}.flex-wrap {
- flex-wrap: wrap !important;
-}.items-start {
- align-items: flex-start !important;
-}.items-center {
- align-items: center !important;
-}.justify-center {
- justify-content: center !important;
-}.space-x-4 > :not([hidden]) ~ :not([hidden]) {
- --tw-space-x-reverse: 0 !important;
- margin-right: calc(1rem * var(--tw-space-x-reverse)) !important;
- margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))) !important;
-}.space-x-10 > :not([hidden]) ~ :not([hidden]) {
- --tw-space-x-reverse: 0 !important;
- margin-right: calc(2.5rem * var(--tw-space-x-reverse)) !important;
- margin-left: calc(2.5rem * calc(1 - var(--tw-space-x-reverse))) !important;
-}.space-x-5 > :not([hidden]) ~ :not([hidden]) {
- --tw-space-x-reverse: 0 !important;
- margin-right: calc(1.25rem * var(--tw-space-x-reverse)) !important;
- margin-left: calc(1.25rem * calc(1 - var(--tw-space-x-reverse))) !important;
-}.space-x-6 > :not([hidden]) ~ :not([hidden]) {
- --tw-space-x-reverse: 0 !important;
- margin-right: calc(1.5rem * var(--tw-space-x-reverse)) !important;
- margin-left: calc(1.5rem * calc(1 - var(--tw-space-x-reverse))) !important;
-}.space-x-2 > :not([hidden]) ~ :not([hidden]) {
- --tw-space-x-reverse: 0 !important;
- margin-right: calc(0.5rem * var(--tw-space-x-reverse)) !important;
- margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))) !important;
-}.space-x-3 > :not([hidden]) ~ :not([hidden]) {
- --tw-space-x-reverse: 0 !important;
- margin-right: calc(0.75rem * var(--tw-space-x-reverse)) !important;
- margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))) !important;
-}.space-y-3 > :not([hidden]) ~ :not([hidden]) {
- --tw-space-y-reverse: 0 !important;
- margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse))) !important;
- margin-bottom: calc(0.75rem * var(--tw-space-y-reverse)) !important;
-}.space-y-2 > :not([hidden]) ~ :not([hidden]) {
- --tw-space-y-reverse: 0 !important;
- margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))) !important;
- margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)) !important;
-}.overflow-visible {
- overflow: visible !important;
-}.whitespace-nowrap {
- white-space: nowrap !important;
-}.rounded {
- border-radius: 0.25rem !important;
-}.rounded-md {
- border-radius: 0.375rem !important;
-}.rounded-full {
- border-radius: 9999px !important;
-}.border {
- border-width: 1px !important;
-}.border-b {
- border-bottom-width: 1px !important;
-}.border-b-3 {
- border-bottom-width: 3px !important;
-}.border-t {
- border-top-width: 1px !important;
-}.border-r {
- border-right-width: 1px !important;
-}.border-gray-300 {
- --tw-border-opacity: 1 !important;
- border-color: rgba(209, 213, 219, var(--tw-border-opacity)) !important;
-}.border-black {
- --tw-border-opacity: 1 !important;
- border-color: rgba(0, 0, 0, var(--tw-border-opacity)) !important;
-}.bg-white {
- --tw-bg-opacity: 1 !important;
- background-color: rgba(255, 255, 255, var(--tw-bg-opacity)) !important;
-}.bg-blue-100 {
- --tw-bg-opacity: 1 !important;
- background-color: rgba(219, 234, 254, var(--tw-bg-opacity)) !important;
-}.p-2 {
- padding: 0.5rem !important;
-}.p-0 {
- padding: 0px !important;
-}.p-1 {
- padding: 0.25rem !important;
-}.px-6 {
- padding-left: 1.5rem !important;
- padding-right: 1.5rem !important;
-}.py-4 {
- padding-top: 1rem !important;
- padding-bottom: 1rem !important;
-}.py-8 {
- padding-top: 2rem !important;
- padding-bottom: 2rem !important;
-}.px-3 {
- padding-left: 0.75rem !important;
- padding-right: 0.75rem !important;
-}.py-2 {
- padding-top: 0.5rem !important;
- padding-bottom: 0.5rem !important;
-}.py-6 {
- padding-top: 1.5rem !important;
- padding-bottom: 1.5rem !important;
-}.py-px {
- padding-top: 1px !important;
- padding-bottom: 1px !important;
-}.py-3 {
- padding-top: 0.75rem !important;
- padding-bottom: 0.75rem !important;
-}.px-4 {
- padding-left: 1rem !important;
- padding-right: 1rem !important;
-}.pb-24 {
- padding-bottom: 6rem !important;
-}.pr-32 {
- padding-right: 8rem !important;
-}.pt-16 {
- padding-top: 4rem !important;
-}.pb-8 {
- padding-bottom: 2rem !important;
-}.pt-\[2px\] {
- padding-top: 2px !important;
-}.pr-24 {
- padding-right: 6rem !important;
-}.pt-8 {
- padding-top: 2rem !important;
-}.pl-3 {
- padding-left: 0.75rem !important;
-}.pr-6 {
- padding-right: 1.5rem !important;
-}.pt-4 {
- padding-top: 1rem !important;
-}.text-left {
- text-align: left !important;
-}.text-center {
- text-align: center !important;
-}.font-mono {
- font-family: IBM Plex Mono, monospace !important;
-}.text-lg {
- font-size: 1.125rem !important;
- line-height: 1.75rem !important;
-}.text-2xl {
- font-size: 1.5rem !important;
- line-height: 2rem !important;
-}.text-xs {
- font-size: 0.75rem !important;
- line-height: 1rem !important;
-}.text-sm {
- font-size: 0.875rem !important;
- line-height: 1.25rem !important;
-}.text-base {
- font-size: 1rem !important;
- line-height: 1.5rem !important;
-}.font-bold {
- font-weight: 700 !important;
-}.font-semibold {
- font-weight: 600 !important;
-}.uppercase {
- text-transform: uppercase !important;
-}.leading-snug {
- line-height: 1.375 !important;
-}.tracking-widest {
- letter-spacing: 0.1em !important;
-}.text-gray-500 {
- --tw-text-opacity: 1 !important;
- color: rgba(107, 114, 128, var(--tw-text-opacity)) !important;
-}.text-gray-700 {
- --tw-text-opacity: 1 !important;
- color: rgba(55, 65, 81, var(--tw-text-opacity)) !important;
-}.text-gray-400 {
- --tw-text-opacity: 1 !important;
- color: rgba(156, 163, 175, var(--tw-text-opacity)) !important;
-}.text-gray-300 {
- --tw-text-opacity: 1 !important;
- color: rgba(209, 213, 219, var(--tw-text-opacity)) !important;
-}.text-gray-800 {
- --tw-text-opacity: 1 !important;
- color: rgba(31, 41, 55, var(--tw-text-opacity)) !important;
-}.text-blue-900 {
- --tw-text-opacity: 1 !important;
- color: rgba(30, 58, 138, var(--tw-text-opacity)) !important;
-}.underline {
- text-decoration: underline !important;
-}.antialiased {
- -webkit-font-smoothing: antialiased !important;
- -moz-osx-font-smoothing: grayscale !important;
-}.shadow-xl {
- --tw-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
- box-shadow: 0 0 rgba(0,0,0,0), 0 0 rgba(0,0,0,0), var(--tw-shadow) !important;
- box-shadow: var(--tw-ring-offset-shadow, 0 0 rgba(0,0,0,0)), var(--tw-ring-shadow, 0 0 rgba(0,0,0,0)), var(--tw-shadow) !important;
-}.shadow-2xl {
- --tw-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
- box-shadow: 0 0 rgba(0,0,0,0), 0 0 rgba(0,0,0,0), var(--tw-shadow) !important;
- box-shadow: var(--tw-ring-offset-shadow, 0 0 rgba(0,0,0,0)), var(--tw-ring-shadow, 0 0 rgba(0,0,0,0)), var(--tw-shadow) !important;
-}.shadow {
- --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
- box-shadow: 0 0 rgba(0,0,0,0), 0 0 rgba(0,0,0,0), var(--tw-shadow) !important;
- box-shadow: var(--tw-ring-offset-shadow, 0 0 rgba(0,0,0,0)), var(--tw-ring-shadow, 0 0 rgba(0,0,0,0)), var(--tw-shadow) !important;
-}.shadow-lg {
- --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
- box-shadow: 0 0 rgba(0,0,0,0), 0 0 rgba(0,0,0,0), var(--tw-shadow) !important;
- box-shadow: var(--tw-ring-offset-shadow, 0 0 rgba(0,0,0,0)), var(--tw-ring-shadow, 0 0 rgba(0,0,0,0)), var(--tw-shadow) !important;
-}.outline-none {
- outline: 2px solid transparent !important;
- outline-offset: 2px !important;
-}.filter {
- filter: var(--tw-filter) !important;
-}.transition {
- transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter !important;
- transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter !important;
- transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter !important;
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
- transition-duration: 150ms !important;
-}.duration-200 {
- transition-duration: 200ms !important;
-}.duration-300 {
- transition-duration: 300ms !important;
-}.ease-in-out {
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
-}.ease-out {
- transition-timing-function: cubic-bezier(0, 0, 0.2, 1) !important;
-}.ease-in {
- transition-timing-function: cubic-bezier(0.4, 0, 1, 1) !important;
-}.hover\:-translate-y-1:hover {
- --tw-translate-y: -0.25rem !important;
- transform: var(--tw-transform) !important;
-}.hover\:bg-blue-100:hover {
- --tw-bg-opacity: 1 !important;
- background-color: rgba(219, 234, 254, var(--tw-bg-opacity)) !important;
-}.hover\:text-gray-700:hover {
- --tw-text-opacity: 1 !important;
- color: rgba(55, 65, 81, var(--tw-text-opacity)) !important;
-}.hover\:text-black:hover {
- --tw-text-opacity: 1 !important;
- color: rgba(0, 0, 0, var(--tw-text-opacity)) !important;
-}.hover\:shadow-lg:hover {
- --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
- box-shadow: 0 0 rgba(0,0,0,0), 0 0 rgba(0,0,0,0), var(--tw-shadow) !important;
- box-shadow: var(--tw-ring-offset-shadow, 0 0 rgba(0,0,0,0)), var(--tw-ring-shadow, 0 0 rgba(0,0,0,0)), var(--tw-shadow) !important;
-}.hover\:drop-shadow-lg:hover {
- --tw-drop-shadow: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.04)) drop-shadow(0 4px 3px rgba(0, 0, 0, 0.1)) !important;
- filter: var(--tw-filter) !important;
-}.group:hover .group-hover\:-translate-y-16 {
- --tw-translate-y: -4rem !important;
- transform: var(--tw-transform) !important;
-}.group:hover .group-hover\:rotate-12 {
- --tw-rotate: 12deg !important;
- transform: var(--tw-transform) !important;
-}.group:hover .group-hover\:-rotate-12 {
- --tw-rotate: -12deg !important;
- transform: var(--tw-transform) !important;
-}.group:hover .group-hover\:bg-blue-200 {
- --tw-bg-opacity: 1 !important;
- background-color: rgba(191, 219, 254, var(--tw-bg-opacity)) !important;
-}.group:hover .group-hover\:text-gray-700 {
- --tw-text-opacity: 1 !important;
- color: rgba(55, 65, 81, var(--tw-text-opacity)) !important;
-}@media (min-width: 768px) {.md\:order-first {
- order: -9999 !important;
- }.md\:mt-24 {
- margin-top: 6rem !important;
- }.md\:mb-8 {
- margin-bottom: 2rem !important;
- }.md\:block {
- display: block !important;
- }.md\:flex {
- display: flex !important;
- }.md\:hidden {
- display: none !important;
- }.md\:w-\[500px\] {
- width: 500px !important;
- }.md\:w-1\/2 {
- width: 50% !important;
- }.md\:w-auto {
- width: auto !important;
- }.md\:w-\[1000px\] {
- width: 1000px !important;
- }.md\:w-\[350px\] {
- width: 350px !important;
- }.md\:flex-row {
- flex-direction: row !important;
- }.md\:flex-col {
- flex-direction: column !important;
- }.md\:justify-start {
- justify-content: flex-start !important;
- }.md\:space-x-4 > :not([hidden]) ~ :not([hidden]) {
- --tw-space-x-reverse: 0 !important;
- margin-right: calc(1rem * var(--tw-space-x-reverse)) !important;
- margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))) !important;
- }.md\:border-0 {
- border-width: 0px !important;
- }.md\:border-none {
- border-style: none !important;
- }.md\:py-16 {
- padding-top: 4rem !important;
- padding-bottom: 4rem !important;
- }.md\:py-20 {
- padding-top: 5rem !important;
- padding-bottom: 5rem !important;
- }.md\:pr-32 {
- padding-right: 8rem !important;
- }.md\:shadow-3xl {
- --tw-shadow: 40px 60px 90px -15px rgba(0, 0, 0, 0.3) !important;
- box-shadow: 0 0 rgba(0,0,0,0), 0 0 rgba(0,0,0,0), var(--tw-shadow) !important;
- box-shadow: var(--tw-ring-offset-shadow, 0 0 rgba(0,0,0,0)), var(--tw-ring-shadow, 0 0 rgba(0,0,0,0)), var(--tw-shadow) !important;
- }
-}
-
diff --git a/public/js/site.js b/public/js/site.js
deleted file mode 100644
index 61cbca5..0000000
--- a/public/js/site.js
+++ /dev/null
@@ -1,11049 +0,0 @@
-/******/ (() => { // webpackBootstrap
-/******/ var __webpack_modules__ = ({
-
-/***/ "./node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js":
-/*!***************************************************************!*\
- !*** ./node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js ***!
- \***************************************************************/
-/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ FrameElement: () => (/* binding */ FrameElement),
-/* harmony export */ FrameLoadingStyle: () => (/* binding */ FrameLoadingStyle),
-/* harmony export */ FrameRenderer: () => (/* binding */ FrameRenderer),
-/* harmony export */ PageRenderer: () => (/* binding */ PageRenderer),
-/* harmony export */ PageSnapshot: () => (/* binding */ PageSnapshot),
-/* harmony export */ StreamActions: () => (/* binding */ StreamActions),
-/* harmony export */ StreamElement: () => (/* binding */ StreamElement),
-/* harmony export */ StreamSourceElement: () => (/* binding */ StreamSourceElement),
-/* harmony export */ cache: () => (/* binding */ cache),
-/* harmony export */ clearCache: () => (/* binding */ clearCache),
-/* harmony export */ connectStreamSource: () => (/* binding */ connectStreamSource),
-/* harmony export */ disconnectStreamSource: () => (/* binding */ disconnectStreamSource),
-/* harmony export */ navigator: () => (/* binding */ navigator$1),
-/* harmony export */ registerAdapter: () => (/* binding */ registerAdapter),
-/* harmony export */ renderStreamMessage: () => (/* binding */ renderStreamMessage),
-/* harmony export */ session: () => (/* binding */ session),
-/* harmony export */ setConfirmMethod: () => (/* binding */ setConfirmMethod),
-/* harmony export */ setFormMode: () => (/* binding */ setFormMode),
-/* harmony export */ setProgressBarDelay: () => (/* binding */ setProgressBarDelay),
-/* harmony export */ start: () => (/* binding */ start),
-/* harmony export */ visit: () => (/* binding */ visit)
-/* harmony export */ });
-/*
-Turbo 7.3.0
-Copyright © 2023 37signals LLC
- */
-(function () {
- if (window.Reflect === undefined ||
- window.customElements === undefined ||
- window.customElements.polyfillWrapFlushCallback) {
- return;
- }
- const BuiltInHTMLElement = HTMLElement;
- const wrapperForTheName = {
- HTMLElement: function HTMLElement() {
- return Reflect.construct(BuiltInHTMLElement, [], this.constructor);
- },
- };
- window.HTMLElement = wrapperForTheName["HTMLElement"];
- HTMLElement.prototype = BuiltInHTMLElement.prototype;
- HTMLElement.prototype.constructor = HTMLElement;
- Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement);
-})();
-
-/**
- * The MIT License (MIT)
- *
- * Copyright (c) 2019 Javan Makhmali
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-(function(prototype) {
- if (typeof prototype.requestSubmit == "function") return
-
- prototype.requestSubmit = function(submitter) {
- if (submitter) {
- validateSubmitter(submitter, this);
- submitter.click();
- } else {
- submitter = document.createElement("input");
- submitter.type = "submit";
- submitter.hidden = true;
- this.appendChild(submitter);
- submitter.click();
- this.removeChild(submitter);
- }
- };
-
- function validateSubmitter(submitter, form) {
- submitter instanceof HTMLElement || raise(TypeError, "parameter 1 is not of type 'HTMLElement'");
- submitter.type == "submit" || raise(TypeError, "The specified element is not a submit button");
- submitter.form == form || raise(DOMException, "The specified element is not owned by this form element", "NotFoundError");
- }
-
- function raise(errorConstructor, message, name) {
- throw new errorConstructor("Failed to execute 'requestSubmit' on 'HTMLFormElement': " + message + ".", name)
- }
-})(HTMLFormElement.prototype);
-
-const submittersByForm = new WeakMap();
-function findSubmitterFromClickTarget(target) {
- const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;
- const candidate = element ? element.closest("input, button") : null;
- return (candidate === null || candidate === void 0 ? void 0 : candidate.type) == "submit" ? candidate : null;
-}
-function clickCaptured(event) {
- const submitter = findSubmitterFromClickTarget(event.target);
- if (submitter && submitter.form) {
- submittersByForm.set(submitter.form, submitter);
- }
-}
-(function () {
- if ("submitter" in Event.prototype)
- return;
- let prototype = window.Event.prototype;
- if ("SubmitEvent" in window && /Apple Computer/.test(navigator.vendor)) {
- prototype = window.SubmitEvent.prototype;
- }
- else if ("SubmitEvent" in window) {
- return;
- }
- addEventListener("click", clickCaptured, true);
- Object.defineProperty(prototype, "submitter", {
- get() {
- if (this.type == "submit" && this.target instanceof HTMLFormElement) {
- return submittersByForm.get(this.target);
- }
- },
- });
-})();
-
-var FrameLoadingStyle;
-(function (FrameLoadingStyle) {
- FrameLoadingStyle["eager"] = "eager";
- FrameLoadingStyle["lazy"] = "lazy";
-})(FrameLoadingStyle || (FrameLoadingStyle = {}));
-class FrameElement extends HTMLElement {
- static get observedAttributes() {
- return ["disabled", "complete", "loading", "src"];
- }
- constructor() {
- super();
- this.loaded = Promise.resolve();
- this.delegate = new FrameElement.delegateConstructor(this);
- }
- connectedCallback() {
- this.delegate.connect();
- }
- disconnectedCallback() {
- this.delegate.disconnect();
- }
- reload() {
- return this.delegate.sourceURLReloaded();
- }
- attributeChangedCallback(name) {
- if (name == "loading") {
- this.delegate.loadingStyleChanged();
- }
- else if (name == "complete") {
- this.delegate.completeChanged();
- }
- else if (name == "src") {
- this.delegate.sourceURLChanged();
- }
- else {
- this.delegate.disabledChanged();
- }
- }
- get src() {
- return this.getAttribute("src");
- }
- set src(value) {
- if (value) {
- this.setAttribute("src", value);
- }
- else {
- this.removeAttribute("src");
- }
- }
- get loading() {
- return frameLoadingStyleFromString(this.getAttribute("loading") || "");
- }
- set loading(value) {
- if (value) {
- this.setAttribute("loading", value);
- }
- else {
- this.removeAttribute("loading");
- }
- }
- get disabled() {
- return this.hasAttribute("disabled");
- }
- set disabled(value) {
- if (value) {
- this.setAttribute("disabled", "");
- }
- else {
- this.removeAttribute("disabled");
- }
- }
- get autoscroll() {
- return this.hasAttribute("autoscroll");
- }
- set autoscroll(value) {
- if (value) {
- this.setAttribute("autoscroll", "");
- }
- else {
- this.removeAttribute("autoscroll");
- }
- }
- get complete() {
- return !this.delegate.isLoading;
- }
- get isActive() {
- return this.ownerDocument === document && !this.isPreview;
- }
- get isPreview() {
- var _a, _b;
- return (_b = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.documentElement) === null || _b === void 0 ? void 0 : _b.hasAttribute("data-turbo-preview");
- }
-}
-function frameLoadingStyleFromString(style) {
- switch (style.toLowerCase()) {
- case "lazy":
- return FrameLoadingStyle.lazy;
- default:
- return FrameLoadingStyle.eager;
- }
-}
-
-function expandURL(locatable) {
- return new URL(locatable.toString(), document.baseURI);
-}
-function getAnchor(url) {
- let anchorMatch;
- if (url.hash) {
- return url.hash.slice(1);
- }
- else if ((anchorMatch = url.href.match(/#(.*)$/))) {
- return anchorMatch[1];
- }
-}
-function getAction(form, submitter) {
- const action = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute("formaction")) || form.getAttribute("action") || form.action;
- return expandURL(action);
-}
-function getExtension(url) {
- return (getLastPathComponent(url).match(/\.[^.]*$/) || [])[0] || "";
-}
-function isHTML(url) {
- return !!getExtension(url).match(/^(?:|\.(?:htm|html|xhtml|php))$/);
-}
-function isPrefixedBy(baseURL, url) {
- const prefix = getPrefix(url);
- return baseURL.href === expandURL(prefix).href || baseURL.href.startsWith(prefix);
-}
-function locationIsVisitable(location, rootLocation) {
- return isPrefixedBy(location, rootLocation) && isHTML(location);
-}
-function getRequestURL(url) {
- const anchor = getAnchor(url);
- return anchor != null ? url.href.slice(0, -(anchor.length + 1)) : url.href;
-}
-function toCacheKey(url) {
- return getRequestURL(url);
-}
-function urlsAreEqual(left, right) {
- return expandURL(left).href == expandURL(right).href;
-}
-function getPathComponents(url) {
- return url.pathname.split("/").slice(1);
-}
-function getLastPathComponent(url) {
- return getPathComponents(url).slice(-1)[0];
-}
-function getPrefix(url) {
- return addTrailingSlash(url.origin + url.pathname);
-}
-function addTrailingSlash(value) {
- return value.endsWith("/") ? value : value + "/";
-}
-
-class FetchResponse {
- constructor(response) {
- this.response = response;
- }
- get succeeded() {
- return this.response.ok;
- }
- get failed() {
- return !this.succeeded;
- }
- get clientError() {
- return this.statusCode >= 400 && this.statusCode <= 499;
- }
- get serverError() {
- return this.statusCode >= 500 && this.statusCode <= 599;
- }
- get redirected() {
- return this.response.redirected;
- }
- get location() {
- return expandURL(this.response.url);
- }
- get isHTML() {
- return this.contentType && this.contentType.match(/^(?:text\/([^\s;,]+\b)?html|application\/xhtml\+xml)\b/);
- }
- get statusCode() {
- return this.response.status;
- }
- get contentType() {
- return this.header("Content-Type");
- }
- get responseText() {
- return this.response.clone().text();
- }
- get responseHTML() {
- if (this.isHTML) {
- return this.response.clone().text();
- }
- else {
- return Promise.resolve(undefined);
- }
- }
- header(name) {
- return this.response.headers.get(name);
- }
-}
-
-function activateScriptElement(element) {
- if (element.getAttribute("data-turbo-eval") == "false") {
- return element;
- }
- else {
- const createdScriptElement = document.createElement("script");
- const cspNonce = getMetaContent("csp-nonce");
- if (cspNonce) {
- createdScriptElement.nonce = cspNonce;
- }
- createdScriptElement.textContent = element.textContent;
- createdScriptElement.async = false;
- copyElementAttributes(createdScriptElement, element);
- return createdScriptElement;
- }
-}
-function copyElementAttributes(destinationElement, sourceElement) {
- for (const { name, value } of sourceElement.attributes) {
- destinationElement.setAttribute(name, value);
- }
-}
-function createDocumentFragment(html) {
- const template = document.createElement("template");
- template.innerHTML = html;
- return template.content;
-}
-function dispatch(eventName, { target, cancelable, detail } = {}) {
- const event = new CustomEvent(eventName, {
- cancelable,
- bubbles: true,
- composed: true,
- detail,
- });
- if (target && target.isConnected) {
- target.dispatchEvent(event);
- }
- else {
- document.documentElement.dispatchEvent(event);
- }
- return event;
-}
-function nextAnimationFrame() {
- return new Promise((resolve) => requestAnimationFrame(() => resolve()));
-}
-function nextEventLoopTick() {
- return new Promise((resolve) => setTimeout(() => resolve(), 0));
-}
-function nextMicrotask() {
- return Promise.resolve();
-}
-function parseHTMLDocument(html = "") {
- return new DOMParser().parseFromString(html, "text/html");
-}
-function unindent(strings, ...values) {
- const lines = interpolate(strings, values).replace(/^\n/, "").split("\n");
- const match = lines[0].match(/^\s+/);
- const indent = match ? match[0].length : 0;
- return lines.map((line) => line.slice(indent)).join("\n");
-}
-function interpolate(strings, values) {
- return strings.reduce((result, string, i) => {
- const value = values[i] == undefined ? "" : values[i];
- return result + string + value;
- }, "");
-}
-function uuid() {
- return Array.from({ length: 36 })
- .map((_, i) => {
- if (i == 8 || i == 13 || i == 18 || i == 23) {
- return "-";
- }
- else if (i == 14) {
- return "4";
- }
- else if (i == 19) {
- return (Math.floor(Math.random() * 4) + 8).toString(16);
- }
- else {
- return Math.floor(Math.random() * 15).toString(16);
- }
- })
- .join("");
-}
-function getAttribute(attributeName, ...elements) {
- for (const value of elements.map((element) => element === null || element === void 0 ? void 0 : element.getAttribute(attributeName))) {
- if (typeof value == "string")
- return value;
- }
- return null;
-}
-function hasAttribute(attributeName, ...elements) {
- return elements.some((element) => element && element.hasAttribute(attributeName));
-}
-function markAsBusy(...elements) {
- for (const element of elements) {
- if (element.localName == "turbo-frame") {
- element.setAttribute("busy", "");
- }
- element.setAttribute("aria-busy", "true");
- }
-}
-function clearBusyState(...elements) {
- for (const element of elements) {
- if (element.localName == "turbo-frame") {
- element.removeAttribute("busy");
- }
- element.removeAttribute("aria-busy");
- }
-}
-function waitForLoad(element, timeoutInMilliseconds = 2000) {
- return new Promise((resolve) => {
- const onComplete = () => {
- element.removeEventListener("error", onComplete);
- element.removeEventListener("load", onComplete);
- resolve();
- };
- element.addEventListener("load", onComplete, { once: true });
- element.addEventListener("error", onComplete, { once: true });
- setTimeout(resolve, timeoutInMilliseconds);
- });
-}
-function getHistoryMethodForAction(action) {
- switch (action) {
- case "replace":
- return history.replaceState;
- case "advance":
- case "restore":
- return history.pushState;
- }
-}
-function isAction(action) {
- return action == "advance" || action == "replace" || action == "restore";
-}
-function getVisitAction(...elements) {
- const action = getAttribute("data-turbo-action", ...elements);
- return isAction(action) ? action : null;
-}
-function getMetaElement(name) {
- return document.querySelector(`meta[name="${name}"]`);
-}
-function getMetaContent(name) {
- const element = getMetaElement(name);
- return element && element.content;
-}
-function setMetaContent(name, content) {
- let element = getMetaElement(name);
- if (!element) {
- element = document.createElement("meta");
- element.setAttribute("name", name);
- document.head.appendChild(element);
- }
- element.setAttribute("content", content);
- return element;
-}
-function findClosestRecursively(element, selector) {
- var _a;
- if (element instanceof Element) {
- return (element.closest(selector) ||
- findClosestRecursively(element.assignedSlot || ((_a = element.getRootNode()) === null || _a === void 0 ? void 0 : _a.host), selector));
- }
-}
-
-var FetchMethod;
-(function (FetchMethod) {
- FetchMethod[FetchMethod["get"] = 0] = "get";
- FetchMethod[FetchMethod["post"] = 1] = "post";
- FetchMethod[FetchMethod["put"] = 2] = "put";
- FetchMethod[FetchMethod["patch"] = 3] = "patch";
- FetchMethod[FetchMethod["delete"] = 4] = "delete";
-})(FetchMethod || (FetchMethod = {}));
-function fetchMethodFromString(method) {
- switch (method.toLowerCase()) {
- case "get":
- return FetchMethod.get;
- case "post":
- return FetchMethod.post;
- case "put":
- return FetchMethod.put;
- case "patch":
- return FetchMethod.patch;
- case "delete":
- return FetchMethod.delete;
- }
-}
-class FetchRequest {
- constructor(delegate, method, location, body = new URLSearchParams(), target = null) {
- this.abortController = new AbortController();
- this.resolveRequestPromise = (_value) => { };
- this.delegate = delegate;
- this.method = method;
- this.headers = this.defaultHeaders;
- this.body = body;
- this.url = location;
- this.target = target;
- }
- get location() {
- return this.url;
- }
- get params() {
- return this.url.searchParams;
- }
- get entries() {
- return this.body ? Array.from(this.body.entries()) : [];
- }
- cancel() {
- this.abortController.abort();
- }
- async perform() {
- const { fetchOptions } = this;
- this.delegate.prepareRequest(this);
- await this.allowRequestToBeIntercepted(fetchOptions);
- try {
- this.delegate.requestStarted(this);
- const response = await fetch(this.url.href, fetchOptions);
- return await this.receive(response);
- }
- catch (error) {
- if (error.name !== "AbortError") {
- if (this.willDelegateErrorHandling(error)) {
- this.delegate.requestErrored(this, error);
- }
- throw error;
- }
- }
- finally {
- this.delegate.requestFinished(this);
- }
- }
- async receive(response) {
- const fetchResponse = new FetchResponse(response);
- const event = dispatch("turbo:before-fetch-response", {
- cancelable: true,
- detail: { fetchResponse },
- target: this.target,
- });
- if (event.defaultPrevented) {
- this.delegate.requestPreventedHandlingResponse(this, fetchResponse);
- }
- else if (fetchResponse.succeeded) {
- this.delegate.requestSucceededWithResponse(this, fetchResponse);
- }
- else {
- this.delegate.requestFailedWithResponse(this, fetchResponse);
- }
- return fetchResponse;
- }
- get fetchOptions() {
- var _a;
- return {
- method: FetchMethod[this.method].toUpperCase(),
- credentials: "same-origin",
- headers: this.headers,
- redirect: "follow",
- body: this.isSafe ? null : this.body,
- signal: this.abortSignal,
- referrer: (_a = this.delegate.referrer) === null || _a === void 0 ? void 0 : _a.href,
- };
- }
- get defaultHeaders() {
- return {
- Accept: "text/html, application/xhtml+xml",
- };
- }
- get isSafe() {
- return this.method === FetchMethod.get;
- }
- get abortSignal() {
- return this.abortController.signal;
- }
- acceptResponseType(mimeType) {
- this.headers["Accept"] = [mimeType, this.headers["Accept"]].join(", ");
- }
- async allowRequestToBeIntercepted(fetchOptions) {
- const requestInterception = new Promise((resolve) => (this.resolveRequestPromise = resolve));
- const event = dispatch("turbo:before-fetch-request", {
- cancelable: true,
- detail: {
- fetchOptions,
- url: this.url,
- resume: this.resolveRequestPromise,
- },
- target: this.target,
- });
- if (event.defaultPrevented)
- await requestInterception;
- }
- willDelegateErrorHandling(error) {
- const event = dispatch("turbo:fetch-request-error", {
- target: this.target,
- cancelable: true,
- detail: { request: this, error: error },
- });
- return !event.defaultPrevented;
- }
-}
-
-class AppearanceObserver {
- constructor(delegate, element) {
- this.started = false;
- this.intersect = (entries) => {
- const lastEntry = entries.slice(-1)[0];
- if (lastEntry === null || lastEntry === void 0 ? void 0 : lastEntry.isIntersecting) {
- this.delegate.elementAppearedInViewport(this.element);
- }
- };
- this.delegate = delegate;
- this.element = element;
- this.intersectionObserver = new IntersectionObserver(this.intersect);
- }
- start() {
- if (!this.started) {
- this.started = true;
- this.intersectionObserver.observe(this.element);
- }
- }
- stop() {
- if (this.started) {
- this.started = false;
- this.intersectionObserver.unobserve(this.element);
- }
- }
-}
-
-class StreamMessage {
- static wrap(message) {
- if (typeof message == "string") {
- return new this(createDocumentFragment(message));
- }
- else {
- return message;
- }
- }
- constructor(fragment) {
- this.fragment = importStreamElements(fragment);
- }
-}
-StreamMessage.contentType = "text/vnd.turbo-stream.html";
-function importStreamElements(fragment) {
- for (const element of fragment.querySelectorAll("turbo-stream")) {
- const streamElement = document.importNode(element, true);
- for (const inertScriptElement of streamElement.templateElement.content.querySelectorAll("script")) {
- inertScriptElement.replaceWith(activateScriptElement(inertScriptElement));
- }
- element.replaceWith(streamElement);
- }
- return fragment;
-}
-
-var FormSubmissionState;
-(function (FormSubmissionState) {
- FormSubmissionState[FormSubmissionState["initialized"] = 0] = "initialized";
- FormSubmissionState[FormSubmissionState["requesting"] = 1] = "requesting";
- FormSubmissionState[FormSubmissionState["waiting"] = 2] = "waiting";
- FormSubmissionState[FormSubmissionState["receiving"] = 3] = "receiving";
- FormSubmissionState[FormSubmissionState["stopping"] = 4] = "stopping";
- FormSubmissionState[FormSubmissionState["stopped"] = 5] = "stopped";
-})(FormSubmissionState || (FormSubmissionState = {}));
-var FormEnctype;
-(function (FormEnctype) {
- FormEnctype["urlEncoded"] = "application/x-www-form-urlencoded";
- FormEnctype["multipart"] = "multipart/form-data";
- FormEnctype["plain"] = "text/plain";
-})(FormEnctype || (FormEnctype = {}));
-function formEnctypeFromString(encoding) {
- switch (encoding.toLowerCase()) {
- case FormEnctype.multipart:
- return FormEnctype.multipart;
- case FormEnctype.plain:
- return FormEnctype.plain;
- default:
- return FormEnctype.urlEncoded;
- }
-}
-class FormSubmission {
- static confirmMethod(message, _element, _submitter) {
- return Promise.resolve(confirm(message));
- }
- constructor(delegate, formElement, submitter, mustRedirect = false) {
- this.state = FormSubmissionState.initialized;
- this.delegate = delegate;
- this.formElement = formElement;
- this.submitter = submitter;
- this.formData = buildFormData(formElement, submitter);
- this.location = expandURL(this.action);
- if (this.method == FetchMethod.get) {
- mergeFormDataEntries(this.location, [...this.body.entries()]);
- }
- this.fetchRequest = new FetchRequest(this, this.method, this.location, this.body, this.formElement);
- this.mustRedirect = mustRedirect;
- }
- get method() {
- var _a;
- const method = ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute("formmethod")) || this.formElement.getAttribute("method") || "";
- return fetchMethodFromString(method.toLowerCase()) || FetchMethod.get;
- }
- get action() {
- var _a;
- const formElementAction = typeof this.formElement.action === "string" ? this.formElement.action : null;
- if ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.hasAttribute("formaction")) {
- return this.submitter.getAttribute("formaction") || "";
- }
- else {
- return this.formElement.getAttribute("action") || formElementAction || "";
- }
- }
- get body() {
- if (this.enctype == FormEnctype.urlEncoded || this.method == FetchMethod.get) {
- return new URLSearchParams(this.stringFormData);
- }
- else {
- return this.formData;
- }
- }
- get enctype() {
- var _a;
- return formEnctypeFromString(((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute("formenctype")) || this.formElement.enctype);
- }
- get isSafe() {
- return this.fetchRequest.isSafe;
- }
- get stringFormData() {
- return [...this.formData].reduce((entries, [name, value]) => {
- return entries.concat(typeof value == "string" ? [[name, value]] : []);
- }, []);
- }
- async start() {
- const { initialized, requesting } = FormSubmissionState;
- const confirmationMessage = getAttribute("data-turbo-confirm", this.submitter, this.formElement);
- if (typeof confirmationMessage === "string") {
- const answer = await FormSubmission.confirmMethod(confirmationMessage, this.formElement, this.submitter);
- if (!answer) {
- return;
- }
- }
- if (this.state == initialized) {
- this.state = requesting;
- return this.fetchRequest.perform();
- }
- }
- stop() {
- const { stopping, stopped } = FormSubmissionState;
- if (this.state != stopping && this.state != stopped) {
- this.state = stopping;
- this.fetchRequest.cancel();
- return true;
- }
- }
- prepareRequest(request) {
- if (!request.isSafe) {
- const token = getCookieValue(getMetaContent("csrf-param")) || getMetaContent("csrf-token");
- if (token) {
- request.headers["X-CSRF-Token"] = token;
- }
- }
- if (this.requestAcceptsTurboStreamResponse(request)) {
- request.acceptResponseType(StreamMessage.contentType);
- }
- }
- requestStarted(_request) {
- var _a;
- this.state = FormSubmissionState.waiting;
- (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.setAttribute("disabled", "");
- this.setSubmitsWith();
- dispatch("turbo:submit-start", {
- target: this.formElement,
- detail: { formSubmission: this },
- });
- this.delegate.formSubmissionStarted(this);
- }
- requestPreventedHandlingResponse(request, response) {
- this.result = { success: response.succeeded, fetchResponse: response };
- }
- requestSucceededWithResponse(request, response) {
- if (response.clientError || response.serverError) {
- this.delegate.formSubmissionFailedWithResponse(this, response);
- }
- else if (this.requestMustRedirect(request) && responseSucceededWithoutRedirect(response)) {
- const error = new Error("Form responses must redirect to another location");
- this.delegate.formSubmissionErrored(this, error);
- }
- else {
- this.state = FormSubmissionState.receiving;
- this.result = { success: true, fetchResponse: response };
- this.delegate.formSubmissionSucceededWithResponse(this, response);
- }
- }
- requestFailedWithResponse(request, response) {
- this.result = { success: false, fetchResponse: response };
- this.delegate.formSubmissionFailedWithResponse(this, response);
- }
- requestErrored(request, error) {
- this.result = { success: false, error };
- this.delegate.formSubmissionErrored(this, error);
- }
- requestFinished(_request) {
- var _a;
- this.state = FormSubmissionState.stopped;
- (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.removeAttribute("disabled");
- this.resetSubmitterText();
- dispatch("turbo:submit-end", {
- target: this.formElement,
- detail: Object.assign({ formSubmission: this }, this.result),
- });
- this.delegate.formSubmissionFinished(this);
- }
- setSubmitsWith() {
- if (!this.submitter || !this.submitsWith)
- return;
- if (this.submitter.matches("button")) {
- this.originalSubmitText = this.submitter.innerHTML;
- this.submitter.innerHTML = this.submitsWith;
- }
- else if (this.submitter.matches("input")) {
- const input = this.submitter;
- this.originalSubmitText = input.value;
- input.value = this.submitsWith;
- }
- }
- resetSubmitterText() {
- if (!this.submitter || !this.originalSubmitText)
- return;
- if (this.submitter.matches("button")) {
- this.submitter.innerHTML = this.originalSubmitText;
- }
- else if (this.submitter.matches("input")) {
- const input = this.submitter;
- input.value = this.originalSubmitText;
- }
- }
- requestMustRedirect(request) {
- return !request.isSafe && this.mustRedirect;
- }
- requestAcceptsTurboStreamResponse(request) {
- return !request.isSafe || hasAttribute("data-turbo-stream", this.submitter, this.formElement);
- }
- get submitsWith() {
- var _a;
- return (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute("data-turbo-submits-with");
- }
-}
-function buildFormData(formElement, submitter) {
- const formData = new FormData(formElement);
- const name = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute("name");
- const value = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute("value");
- if (name) {
- formData.append(name, value || "");
- }
- return formData;
-}
-function getCookieValue(cookieName) {
- if (cookieName != null) {
- const cookies = document.cookie ? document.cookie.split("; ") : [];
- const cookie = cookies.find((cookie) => cookie.startsWith(cookieName));
- if (cookie) {
- const value = cookie.split("=").slice(1).join("=");
- return value ? decodeURIComponent(value) : undefined;
- }
- }
-}
-function responseSucceededWithoutRedirect(response) {
- return response.statusCode == 200 && !response.redirected;
-}
-function mergeFormDataEntries(url, entries) {
- const searchParams = new URLSearchParams();
- for (const [name, value] of entries) {
- if (value instanceof File)
- continue;
- searchParams.append(name, value);
- }
- url.search = searchParams.toString();
- return url;
-}
-
-class Snapshot {
- constructor(element) {
- this.element = element;
- }
- get activeElement() {
- return this.element.ownerDocument.activeElement;
- }
- get children() {
- return [...this.element.children];
- }
- hasAnchor(anchor) {
- return this.getElementForAnchor(anchor) != null;
- }
- getElementForAnchor(anchor) {
- return anchor ? this.element.querySelector(`[id='${anchor}'], a[name='${anchor}']`) : null;
- }
- get isConnected() {
- return this.element.isConnected;
- }
- get firstAutofocusableElement() {
- const inertDisabledOrHidden = "[inert], :disabled, [hidden], details:not([open]), dialog:not([open])";
- for (const element of this.element.querySelectorAll("[autofocus]")) {
- if (element.closest(inertDisabledOrHidden) == null)
- return element;
- else
- continue;
- }
- return null;
- }
- get permanentElements() {
- return queryPermanentElementsAll(this.element);
- }
- getPermanentElementById(id) {
- return getPermanentElementById(this.element, id);
- }
- getPermanentElementMapForSnapshot(snapshot) {
- const permanentElementMap = {};
- for (const currentPermanentElement of this.permanentElements) {
- const { id } = currentPermanentElement;
- const newPermanentElement = snapshot.getPermanentElementById(id);
- if (newPermanentElement) {
- permanentElementMap[id] = [currentPermanentElement, newPermanentElement];
- }
- }
- return permanentElementMap;
- }
-}
-function getPermanentElementById(node, id) {
- return node.querySelector(`#${id}[data-turbo-permanent]`);
-}
-function queryPermanentElementsAll(node) {
- return node.querySelectorAll("[id][data-turbo-permanent]");
-}
-
-class FormSubmitObserver {
- constructor(delegate, eventTarget) {
- this.started = false;
- this.submitCaptured = () => {
- this.eventTarget.removeEventListener("submit", this.submitBubbled, false);
- this.eventTarget.addEventListener("submit", this.submitBubbled, false);
- };
- this.submitBubbled = ((event) => {
- if (!event.defaultPrevented) {
- const form = event.target instanceof HTMLFormElement ? event.target : undefined;
- const submitter = event.submitter || undefined;
- if (form &&
- submissionDoesNotDismissDialog(form, submitter) &&
- submissionDoesNotTargetIFrame(form, submitter) &&
- this.delegate.willSubmitForm(form, submitter)) {
- event.preventDefault();
- event.stopImmediatePropagation();
- this.delegate.formSubmitted(form, submitter);
- }
- }
- });
- this.delegate = delegate;
- this.eventTarget = eventTarget;
- }
- start() {
- if (!this.started) {
- this.eventTarget.addEventListener("submit", this.submitCaptured, true);
- this.started = true;
- }
- }
- stop() {
- if (this.started) {
- this.eventTarget.removeEventListener("submit", this.submitCaptured, true);
- this.started = false;
- }
- }
-}
-function submissionDoesNotDismissDialog(form, submitter) {
- const method = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute("formmethod")) || form.getAttribute("method");
- return method != "dialog";
-}
-function submissionDoesNotTargetIFrame(form, submitter) {
- if ((submitter === null || submitter === void 0 ? void 0 : submitter.hasAttribute("formtarget")) || form.hasAttribute("target")) {
- const target = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute("formtarget")) || form.target;
- for (const element of document.getElementsByName(target)) {
- if (element instanceof HTMLIFrameElement)
- return false;
- }
- return true;
- }
- else {
- return true;
- }
-}
-
-class View {
- constructor(delegate, element) {
- this.resolveRenderPromise = (_value) => { };
- this.resolveInterceptionPromise = (_value) => { };
- this.delegate = delegate;
- this.element = element;
- }
- scrollToAnchor(anchor) {
- const element = this.snapshot.getElementForAnchor(anchor);
- if (element) {
- this.scrollToElement(element);
- this.focusElement(element);
- }
- else {
- this.scrollToPosition({ x: 0, y: 0 });
- }
- }
- scrollToAnchorFromLocation(location) {
- this.scrollToAnchor(getAnchor(location));
- }
- scrollToElement(element) {
- element.scrollIntoView();
- }
- focusElement(element) {
- if (element instanceof HTMLElement) {
- if (element.hasAttribute("tabindex")) {
- element.focus();
- }
- else {
- element.setAttribute("tabindex", "-1");
- element.focus();
- element.removeAttribute("tabindex");
- }
- }
- }
- scrollToPosition({ x, y }) {
- this.scrollRoot.scrollTo(x, y);
- }
- scrollToTop() {
- this.scrollToPosition({ x: 0, y: 0 });
- }
- get scrollRoot() {
- return window;
- }
- async render(renderer) {
- const { isPreview, shouldRender, newSnapshot: snapshot } = renderer;
- if (shouldRender) {
- try {
- this.renderPromise = new Promise((resolve) => (this.resolveRenderPromise = resolve));
- this.renderer = renderer;
- await this.prepareToRenderSnapshot(renderer);
- const renderInterception = new Promise((resolve) => (this.resolveInterceptionPromise = resolve));
- const options = { resume: this.resolveInterceptionPromise, render: this.renderer.renderElement };
- const immediateRender = this.delegate.allowsImmediateRender(snapshot, options);
- if (!immediateRender)
- await renderInterception;
- await this.renderSnapshot(renderer);
- this.delegate.viewRenderedSnapshot(snapshot, isPreview);
- this.delegate.preloadOnLoadLinksForView(this.element);
- this.finishRenderingSnapshot(renderer);
- }
- finally {
- delete this.renderer;
- this.resolveRenderPromise(undefined);
- delete this.renderPromise;
- }
- }
- else {
- this.invalidate(renderer.reloadReason);
- }
- }
- invalidate(reason) {
- this.delegate.viewInvalidated(reason);
- }
- async prepareToRenderSnapshot(renderer) {
- this.markAsPreview(renderer.isPreview);
- await renderer.prepareToRender();
- }
- markAsPreview(isPreview) {
- if (isPreview) {
- this.element.setAttribute("data-turbo-preview", "");
- }
- else {
- this.element.removeAttribute("data-turbo-preview");
- }
- }
- async renderSnapshot(renderer) {
- await renderer.render();
- }
- finishRenderingSnapshot(renderer) {
- renderer.finishRendering();
- }
-}
-
-class FrameView extends View {
- missing() {
- this.element.innerHTML = `Content missing`;
- }
- get snapshot() {
- return new Snapshot(this.element);
- }
-}
-
-class LinkInterceptor {
- constructor(delegate, element) {
- this.clickBubbled = (event) => {
- if (this.respondsToEventTarget(event.target)) {
- this.clickEvent = event;
- }
- else {
- delete this.clickEvent;
- }
- };
- this.linkClicked = ((event) => {
- if (this.clickEvent && this.respondsToEventTarget(event.target) && event.target instanceof Element) {
- if (this.delegate.shouldInterceptLinkClick(event.target, event.detail.url, event.detail.originalEvent)) {
- this.clickEvent.preventDefault();
- event.preventDefault();
- this.delegate.linkClickIntercepted(event.target, event.detail.url, event.detail.originalEvent);
- }
- }
- delete this.clickEvent;
- });
- this.willVisit = ((_event) => {
- delete this.clickEvent;
- });
- this.delegate = delegate;
- this.element = element;
- }
- start() {
- this.element.addEventListener("click", this.clickBubbled);
- document.addEventListener("turbo:click", this.linkClicked);
- document.addEventListener("turbo:before-visit", this.willVisit);
- }
- stop() {
- this.element.removeEventListener("click", this.clickBubbled);
- document.removeEventListener("turbo:click", this.linkClicked);
- document.removeEventListener("turbo:before-visit", this.willVisit);
- }
- respondsToEventTarget(target) {
- const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;
- return element && element.closest("turbo-frame, html") == this.element;
- }
-}
-
-class LinkClickObserver {
- constructor(delegate, eventTarget) {
- this.started = false;
- this.clickCaptured = () => {
- this.eventTarget.removeEventListener("click", this.clickBubbled, false);
- this.eventTarget.addEventListener("click", this.clickBubbled, false);
- };
- this.clickBubbled = (event) => {
- if (event instanceof MouseEvent && this.clickEventIsSignificant(event)) {
- const target = (event.composedPath && event.composedPath()[0]) || event.target;
- const link = this.findLinkFromClickTarget(target);
- if (link && doesNotTargetIFrame(link)) {
- const location = this.getLocationForLink(link);
- if (this.delegate.willFollowLinkToLocation(link, location, event)) {
- event.preventDefault();
- this.delegate.followedLinkToLocation(link, location);
- }
- }
- }
- };
- this.delegate = delegate;
- this.eventTarget = eventTarget;
- }
- start() {
- if (!this.started) {
- this.eventTarget.addEventListener("click", this.clickCaptured, true);
- this.started = true;
- }
- }
- stop() {
- if (this.started) {
- this.eventTarget.removeEventListener("click", this.clickCaptured, true);
- this.started = false;
- }
- }
- clickEventIsSignificant(event) {
- return !((event.target && event.target.isContentEditable) ||
- event.defaultPrevented ||
- event.which > 1 ||
- event.altKey ||
- event.ctrlKey ||
- event.metaKey ||
- event.shiftKey);
- }
- findLinkFromClickTarget(target) {
- return findClosestRecursively(target, "a[href]:not([target^=_]):not([download])");
- }
- getLocationForLink(link) {
- return expandURL(link.getAttribute("href") || "");
- }
-}
-function doesNotTargetIFrame(anchor) {
- if (anchor.hasAttribute("target")) {
- for (const element of document.getElementsByName(anchor.target)) {
- if (element instanceof HTMLIFrameElement)
- return false;
- }
- return true;
- }
- else {
- return true;
- }
-}
-
-class FormLinkClickObserver {
- constructor(delegate, element) {
- this.delegate = delegate;
- this.linkInterceptor = new LinkClickObserver(this, element);
- }
- start() {
- this.linkInterceptor.start();
- }
- stop() {
- this.linkInterceptor.stop();
- }
- willFollowLinkToLocation(link, location, originalEvent) {
- return (this.delegate.willSubmitFormLinkToLocation(link, location, originalEvent) &&
- link.hasAttribute("data-turbo-method"));
- }
- followedLinkToLocation(link, location) {
- const form = document.createElement("form");
- const type = "hidden";
- for (const [name, value] of location.searchParams) {
- form.append(Object.assign(document.createElement("input"), { type, name, value }));
- }
- const action = Object.assign(location, { search: "" });
- form.setAttribute("data-turbo", "true");
- form.setAttribute("action", action.href);
- form.setAttribute("hidden", "");
- const method = link.getAttribute("data-turbo-method");
- if (method)
- form.setAttribute("method", method);
- const turboFrame = link.getAttribute("data-turbo-frame");
- if (turboFrame)
- form.setAttribute("data-turbo-frame", turboFrame);
- const turboAction = getVisitAction(link);
- if (turboAction)
- form.setAttribute("data-turbo-action", turboAction);
- const turboConfirm = link.getAttribute("data-turbo-confirm");
- if (turboConfirm)
- form.setAttribute("data-turbo-confirm", turboConfirm);
- const turboStream = link.hasAttribute("data-turbo-stream");
- if (turboStream)
- form.setAttribute("data-turbo-stream", "");
- this.delegate.submittedFormLinkToLocation(link, location, form);
- document.body.appendChild(form);
- form.addEventListener("turbo:submit-end", () => form.remove(), { once: true });
- requestAnimationFrame(() => form.requestSubmit());
- }
-}
-
-class Bardo {
- static async preservingPermanentElements(delegate, permanentElementMap, callback) {
- const bardo = new this(delegate, permanentElementMap);
- bardo.enter();
- await callback();
- bardo.leave();
- }
- constructor(delegate, permanentElementMap) {
- this.delegate = delegate;
- this.permanentElementMap = permanentElementMap;
- }
- enter() {
- for (const id in this.permanentElementMap) {
- const [currentPermanentElement, newPermanentElement] = this.permanentElementMap[id];
- this.delegate.enteringBardo(currentPermanentElement, newPermanentElement);
- this.replaceNewPermanentElementWithPlaceholder(newPermanentElement);
- }
- }
- leave() {
- for (const id in this.permanentElementMap) {
- const [currentPermanentElement] = this.permanentElementMap[id];
- this.replaceCurrentPermanentElementWithClone(currentPermanentElement);
- this.replacePlaceholderWithPermanentElement(currentPermanentElement);
- this.delegate.leavingBardo(currentPermanentElement);
- }
- }
- replaceNewPermanentElementWithPlaceholder(permanentElement) {
- const placeholder = createPlaceholderForPermanentElement(permanentElement);
- permanentElement.replaceWith(placeholder);
- }
- replaceCurrentPermanentElementWithClone(permanentElement) {
- const clone = permanentElement.cloneNode(true);
- permanentElement.replaceWith(clone);
- }
- replacePlaceholderWithPermanentElement(permanentElement) {
- const placeholder = this.getPlaceholderById(permanentElement.id);
- placeholder === null || placeholder === void 0 ? void 0 : placeholder.replaceWith(permanentElement);
- }
- getPlaceholderById(id) {
- return this.placeholders.find((element) => element.content == id);
- }
- get placeholders() {
- return [...document.querySelectorAll("meta[name=turbo-permanent-placeholder][content]")];
- }
-}
-function createPlaceholderForPermanentElement(permanentElement) {
- const element = document.createElement("meta");
- element.setAttribute("name", "turbo-permanent-placeholder");
- element.setAttribute("content", permanentElement.id);
- return element;
-}
-
-class Renderer {
- constructor(currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) {
- this.activeElement = null;
- this.currentSnapshot = currentSnapshot;
- this.newSnapshot = newSnapshot;
- this.isPreview = isPreview;
- this.willRender = willRender;
- this.renderElement = renderElement;
- this.promise = new Promise((resolve, reject) => (this.resolvingFunctions = { resolve, reject }));
- }
- get shouldRender() {
- return true;
- }
- get reloadReason() {
- return;
- }
- prepareToRender() {
- return;
- }
- finishRendering() {
- if (this.resolvingFunctions) {
- this.resolvingFunctions.resolve();
- delete this.resolvingFunctions;
- }
- }
- async preservingPermanentElements(callback) {
- await Bardo.preservingPermanentElements(this, this.permanentElementMap, callback);
- }
- focusFirstAutofocusableElement() {
- const element = this.connectedSnapshot.firstAutofocusableElement;
- if (elementIsFocusable(element)) {
- element.focus();
- }
- }
- enteringBardo(currentPermanentElement) {
- if (this.activeElement)
- return;
- if (currentPermanentElement.contains(this.currentSnapshot.activeElement)) {
- this.activeElement = this.currentSnapshot.activeElement;
- }
- }
- leavingBardo(currentPermanentElement) {
- if (currentPermanentElement.contains(this.activeElement) && this.activeElement instanceof HTMLElement) {
- this.activeElement.focus();
- this.activeElement = null;
- }
- }
- get connectedSnapshot() {
- return this.newSnapshot.isConnected ? this.newSnapshot : this.currentSnapshot;
- }
- get currentElement() {
- return this.currentSnapshot.element;
- }
- get newElement() {
- return this.newSnapshot.element;
- }
- get permanentElementMap() {
- return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot);
- }
-}
-function elementIsFocusable(element) {
- return element && typeof element.focus == "function";
-}
-
-class FrameRenderer extends Renderer {
- static renderElement(currentElement, newElement) {
- var _a;
- const destinationRange = document.createRange();
- destinationRange.selectNodeContents(currentElement);
- destinationRange.deleteContents();
- const frameElement = newElement;
- const sourceRange = (_a = frameElement.ownerDocument) === null || _a === void 0 ? void 0 : _a.createRange();
- if (sourceRange) {
- sourceRange.selectNodeContents(frameElement);
- currentElement.appendChild(sourceRange.extractContents());
- }
- }
- constructor(delegate, currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) {
- super(currentSnapshot, newSnapshot, renderElement, isPreview, willRender);
- this.delegate = delegate;
- }
- get shouldRender() {
- return true;
- }
- async render() {
- await nextAnimationFrame();
- this.preservingPermanentElements(() => {
- this.loadFrameElement();
- });
- this.scrollFrameIntoView();
- await nextAnimationFrame();
- this.focusFirstAutofocusableElement();
- await nextAnimationFrame();
- this.activateScriptElements();
- }
- loadFrameElement() {
- this.delegate.willRenderFrame(this.currentElement, this.newElement);
- this.renderElement(this.currentElement, this.newElement);
- }
- scrollFrameIntoView() {
- if (this.currentElement.autoscroll || this.newElement.autoscroll) {
- const element = this.currentElement.firstElementChild;
- const block = readScrollLogicalPosition(this.currentElement.getAttribute("data-autoscroll-block"), "end");
- const behavior = readScrollBehavior(this.currentElement.getAttribute("data-autoscroll-behavior"), "auto");
- if (element) {
- element.scrollIntoView({ block, behavior });
- return true;
- }
- }
- return false;
- }
- activateScriptElements() {
- for (const inertScriptElement of this.newScriptElements) {
- const activatedScriptElement = activateScriptElement(inertScriptElement);
- inertScriptElement.replaceWith(activatedScriptElement);
- }
- }
- get newScriptElements() {
- return this.currentElement.querySelectorAll("script");
- }
-}
-function readScrollLogicalPosition(value, defaultValue) {
- if (value == "end" || value == "start" || value == "center" || value == "nearest") {
- return value;
- }
- else {
- return defaultValue;
- }
-}
-function readScrollBehavior(value, defaultValue) {
- if (value == "auto" || value == "smooth") {
- return value;
- }
- else {
- return defaultValue;
- }
-}
-
-class ProgressBar {
- static get defaultCSS() {
- return unindent `
- .turbo-progress-bar {
- position: fixed;
- display: block;
- top: 0;
- left: 0;
- height: 3px;
- background: #0076ff;
- z-index: 2147483647;
- transition:
- width ${ProgressBar.animationDuration}ms ease-out,
- opacity ${ProgressBar.animationDuration / 2}ms ${ProgressBar.animationDuration / 2}ms ease-in;
- transform: translate3d(0, 0, 0);
- }
- `;
- }
- constructor() {
- this.hiding = false;
- this.value = 0;
- this.visible = false;
- this.trickle = () => {
- this.setValue(this.value + Math.random() / 100);
- };
- this.stylesheetElement = this.createStylesheetElement();
- this.progressElement = this.createProgressElement();
- this.installStylesheetElement();
- this.setValue(0);
- }
- show() {
- if (!this.visible) {
- this.visible = true;
- this.installProgressElement();
- this.startTrickling();
- }
- }
- hide() {
- if (this.visible && !this.hiding) {
- this.hiding = true;
- this.fadeProgressElement(() => {
- this.uninstallProgressElement();
- this.stopTrickling();
- this.visible = false;
- this.hiding = false;
- });
- }
- }
- setValue(value) {
- this.value = value;
- this.refresh();
- }
- installStylesheetElement() {
- document.head.insertBefore(this.stylesheetElement, document.head.firstChild);
- }
- installProgressElement() {
- this.progressElement.style.width = "0";
- this.progressElement.style.opacity = "1";
- document.documentElement.insertBefore(this.progressElement, document.body);
- this.refresh();
- }
- fadeProgressElement(callback) {
- this.progressElement.style.opacity = "0";
- setTimeout(callback, ProgressBar.animationDuration * 1.5);
- }
- uninstallProgressElement() {
- if (this.progressElement.parentNode) {
- document.documentElement.removeChild(this.progressElement);
- }
- }
- startTrickling() {
- if (!this.trickleInterval) {
- this.trickleInterval = window.setInterval(this.trickle, ProgressBar.animationDuration);
- }
- }
- stopTrickling() {
- window.clearInterval(this.trickleInterval);
- delete this.trickleInterval;
- }
- refresh() {
- requestAnimationFrame(() => {
- this.progressElement.style.width = `${10 + this.value * 90}%`;
- });
- }
- createStylesheetElement() {
- const element = document.createElement("style");
- element.type = "text/css";
- element.textContent = ProgressBar.defaultCSS;
- if (this.cspNonce) {
- element.nonce = this.cspNonce;
- }
- return element;
- }
- createProgressElement() {
- const element = document.createElement("div");
- element.className = "turbo-progress-bar";
- return element;
- }
- get cspNonce() {
- return getMetaContent("csp-nonce");
- }
-}
-ProgressBar.animationDuration = 300;
-
-class HeadSnapshot extends Snapshot {
- constructor() {
- super(...arguments);
- this.detailsByOuterHTML = this.children
- .filter((element) => !elementIsNoscript(element))
- .map((element) => elementWithoutNonce(element))
- .reduce((result, element) => {
- const { outerHTML } = element;
- const details = outerHTML in result
- ? result[outerHTML]
- : {
- type: elementType(element),
- tracked: elementIsTracked(element),
- elements: [],
- };
- return Object.assign(Object.assign({}, result), { [outerHTML]: Object.assign(Object.assign({}, details), { elements: [...details.elements, element] }) });
- }, {});
- }
- get trackedElementSignature() {
- return Object.keys(this.detailsByOuterHTML)
- .filter((outerHTML) => this.detailsByOuterHTML[outerHTML].tracked)
- .join("");
- }
- getScriptElementsNotInSnapshot(snapshot) {
- return this.getElementsMatchingTypeNotInSnapshot("script", snapshot);
- }
- getStylesheetElementsNotInSnapshot(snapshot) {
- return this.getElementsMatchingTypeNotInSnapshot("stylesheet", snapshot);
- }
- getElementsMatchingTypeNotInSnapshot(matchedType, snapshot) {
- return Object.keys(this.detailsByOuterHTML)
- .filter((outerHTML) => !(outerHTML in snapshot.detailsByOuterHTML))
- .map((outerHTML) => this.detailsByOuterHTML[outerHTML])
- .filter(({ type }) => type == matchedType)
- .map(({ elements: [element] }) => element);
- }
- get provisionalElements() {
- return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {
- const { type, tracked, elements } = this.detailsByOuterHTML[outerHTML];
- if (type == null && !tracked) {
- return [...result, ...elements];
- }
- else if (elements.length > 1) {
- return [...result, ...elements.slice(1)];
- }
- else {
- return result;
- }
- }, []);
- }
- getMetaValue(name) {
- const element = this.findMetaElementByName(name);
- return element ? element.getAttribute("content") : null;
- }
- findMetaElementByName(name) {
- return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {
- const { elements: [element], } = this.detailsByOuterHTML[outerHTML];
- return elementIsMetaElementWithName(element, name) ? element : result;
- }, undefined);
- }
-}
-function elementType(element) {
- if (elementIsScript(element)) {
- return "script";
- }
- else if (elementIsStylesheet(element)) {
- return "stylesheet";
- }
-}
-function elementIsTracked(element) {
- return element.getAttribute("data-turbo-track") == "reload";
-}
-function elementIsScript(element) {
- const tagName = element.localName;
- return tagName == "script";
-}
-function elementIsNoscript(element) {
- const tagName = element.localName;
- return tagName == "noscript";
-}
-function elementIsStylesheet(element) {
- const tagName = element.localName;
- return tagName == "style" || (tagName == "link" && element.getAttribute("rel") == "stylesheet");
-}
-function elementIsMetaElementWithName(element, name) {
- const tagName = element.localName;
- return tagName == "meta" && element.getAttribute("name") == name;
-}
-function elementWithoutNonce(element) {
- if (element.hasAttribute("nonce")) {
- element.setAttribute("nonce", "");
- }
- return element;
-}
-
-class PageSnapshot extends Snapshot {
- static fromHTMLString(html = "") {
- return this.fromDocument(parseHTMLDocument(html));
- }
- static fromElement(element) {
- return this.fromDocument(element.ownerDocument);
- }
- static fromDocument({ head, body }) {
- return new this(body, new HeadSnapshot(head));
- }
- constructor(element, headSnapshot) {
- super(element);
- this.headSnapshot = headSnapshot;
- }
- clone() {
- const clonedElement = this.element.cloneNode(true);
- const selectElements = this.element.querySelectorAll("select");
- const clonedSelectElements = clonedElement.querySelectorAll("select");
- for (const [index, source] of selectElements.entries()) {
- const clone = clonedSelectElements[index];
- for (const option of clone.selectedOptions)
- option.selected = false;
- for (const option of source.selectedOptions)
- clone.options[option.index].selected = true;
- }
- for (const clonedPasswordInput of clonedElement.querySelectorAll('input[type="password"]')) {
- clonedPasswordInput.value = "";
- }
- return new PageSnapshot(clonedElement, this.headSnapshot);
- }
- get headElement() {
- return this.headSnapshot.element;
- }
- get rootLocation() {
- var _a;
- const root = (_a = this.getSetting("root")) !== null && _a !== void 0 ? _a : "/";
- return expandURL(root);
- }
- get cacheControlValue() {
- return this.getSetting("cache-control");
- }
- get isPreviewable() {
- return this.cacheControlValue != "no-preview";
- }
- get isCacheable() {
- return this.cacheControlValue != "no-cache";
- }
- get isVisitable() {
- return this.getSetting("visit-control") != "reload";
- }
- getSetting(name) {
- return this.headSnapshot.getMetaValue(`turbo-${name}`);
- }
-}
-
-var TimingMetric;
-(function (TimingMetric) {
- TimingMetric["visitStart"] = "visitStart";
- TimingMetric["requestStart"] = "requestStart";
- TimingMetric["requestEnd"] = "requestEnd";
- TimingMetric["visitEnd"] = "visitEnd";
-})(TimingMetric || (TimingMetric = {}));
-var VisitState;
-(function (VisitState) {
- VisitState["initialized"] = "initialized";
- VisitState["started"] = "started";
- VisitState["canceled"] = "canceled";
- VisitState["failed"] = "failed";
- VisitState["completed"] = "completed";
-})(VisitState || (VisitState = {}));
-const defaultOptions = {
- action: "advance",
- historyChanged: false,
- visitCachedSnapshot: () => { },
- willRender: true,
- updateHistory: true,
- shouldCacheSnapshot: true,
- acceptsStreamResponse: false,
-};
-var SystemStatusCode;
-(function (SystemStatusCode) {
- SystemStatusCode[SystemStatusCode["networkFailure"] = 0] = "networkFailure";
- SystemStatusCode[SystemStatusCode["timeoutFailure"] = -1] = "timeoutFailure";
- SystemStatusCode[SystemStatusCode["contentTypeMismatch"] = -2] = "contentTypeMismatch";
-})(SystemStatusCode || (SystemStatusCode = {}));
-class Visit {
- constructor(delegate, location, restorationIdentifier, options = {}) {
- this.identifier = uuid();
- this.timingMetrics = {};
- this.followedRedirect = false;
- this.historyChanged = false;
- this.scrolled = false;
- this.shouldCacheSnapshot = true;
- this.acceptsStreamResponse = false;
- this.snapshotCached = false;
- this.state = VisitState.initialized;
- this.delegate = delegate;
- this.location = location;
- this.restorationIdentifier = restorationIdentifier || uuid();
- const { action, historyChanged, referrer, snapshot, snapshotHTML, response, visitCachedSnapshot, willRender, updateHistory, shouldCacheSnapshot, acceptsStreamResponse, } = Object.assign(Object.assign({}, defaultOptions), options);
- this.action = action;
- this.historyChanged = historyChanged;
- this.referrer = referrer;
- this.snapshot = snapshot;
- this.snapshotHTML = snapshotHTML;
- this.response = response;
- this.isSamePage = this.delegate.locationWithActionIsSamePage(this.location, this.action);
- this.visitCachedSnapshot = visitCachedSnapshot;
- this.willRender = willRender;
- this.updateHistory = updateHistory;
- this.scrolled = !willRender;
- this.shouldCacheSnapshot = shouldCacheSnapshot;
- this.acceptsStreamResponse = acceptsStreamResponse;
- }
- get adapter() {
- return this.delegate.adapter;
- }
- get view() {
- return this.delegate.view;
- }
- get history() {
- return this.delegate.history;
- }
- get restorationData() {
- return this.history.getRestorationDataForIdentifier(this.restorationIdentifier);
- }
- get silent() {
- return this.isSamePage;
- }
- start() {
- if (this.state == VisitState.initialized) {
- this.recordTimingMetric(TimingMetric.visitStart);
- this.state = VisitState.started;
- this.adapter.visitStarted(this);
- this.delegate.visitStarted(this);
- }
- }
- cancel() {
- if (this.state == VisitState.started) {
- if (this.request) {
- this.request.cancel();
- }
- this.cancelRender();
- this.state = VisitState.canceled;
- }
- }
- complete() {
- if (this.state == VisitState.started) {
- this.recordTimingMetric(TimingMetric.visitEnd);
- this.state = VisitState.completed;
- this.followRedirect();
- if (!this.followedRedirect) {
- this.adapter.visitCompleted(this);
- this.delegate.visitCompleted(this);
- }
- }
- }
- fail() {
- if (this.state == VisitState.started) {
- this.state = VisitState.failed;
- this.adapter.visitFailed(this);
- }
- }
- changeHistory() {
- var _a;
- if (!this.historyChanged && this.updateHistory) {
- const actionForHistory = this.location.href === ((_a = this.referrer) === null || _a === void 0 ? void 0 : _a.href) ? "replace" : this.action;
- const method = getHistoryMethodForAction(actionForHistory);
- this.history.update(method, this.location, this.restorationIdentifier);
- this.historyChanged = true;
- }
- }
- issueRequest() {
- if (this.hasPreloadedResponse()) {
- this.simulateRequest();
- }
- else if (this.shouldIssueRequest() && !this.request) {
- this.request = new FetchRequest(this, FetchMethod.get, this.location);
- this.request.perform();
- }
- }
- simulateRequest() {
- if (this.response) {
- this.startRequest();
- this.recordResponse();
- this.finishRequest();
- }
- }
- startRequest() {
- this.recordTimingMetric(TimingMetric.requestStart);
- this.adapter.visitRequestStarted(this);
- }
- recordResponse(response = this.response) {
- this.response = response;
- if (response) {
- const { statusCode } = response;
- if (isSuccessful(statusCode)) {
- this.adapter.visitRequestCompleted(this);
- }
- else {
- this.adapter.visitRequestFailedWithStatusCode(this, statusCode);
- }
- }
- }
- finishRequest() {
- this.recordTimingMetric(TimingMetric.requestEnd);
- this.adapter.visitRequestFinished(this);
- }
- loadResponse() {
- if (this.response) {
- const { statusCode, responseHTML } = this.response;
- this.render(async () => {
- if (this.shouldCacheSnapshot)
- this.cacheSnapshot();
- if (this.view.renderPromise)
- await this.view.renderPromise;
- if (isSuccessful(statusCode) && responseHTML != null) {
- await this.view.renderPage(PageSnapshot.fromHTMLString(responseHTML), false, this.willRender, this);
- this.performScroll();
- this.adapter.visitRendered(this);
- this.complete();
- }
- else {
- await this.view.renderError(PageSnapshot.fromHTMLString(responseHTML), this);
- this.adapter.visitRendered(this);
- this.fail();
- }
- });
- }
- }
- getCachedSnapshot() {
- const snapshot = this.view.getCachedSnapshotForLocation(this.location) || this.getPreloadedSnapshot();
- if (snapshot && (!getAnchor(this.location) || snapshot.hasAnchor(getAnchor(this.location)))) {
- if (this.action == "restore" || snapshot.isPreviewable) {
- return snapshot;
- }
- }
- }
- getPreloadedSnapshot() {
- if (this.snapshotHTML) {
- return PageSnapshot.fromHTMLString(this.snapshotHTML);
- }
- }
- hasCachedSnapshot() {
- return this.getCachedSnapshot() != null;
- }
- loadCachedSnapshot() {
- const snapshot = this.getCachedSnapshot();
- if (snapshot) {
- const isPreview = this.shouldIssueRequest();
- this.render(async () => {
- this.cacheSnapshot();
- if (this.isSamePage) {
- this.adapter.visitRendered(this);
- }
- else {
- if (this.view.renderPromise)
- await this.view.renderPromise;
- await this.view.renderPage(snapshot, isPreview, this.willRender, this);
- this.performScroll();
- this.adapter.visitRendered(this);
- if (!isPreview) {
- this.complete();
- }
- }
- });
- }
- }
- followRedirect() {
- var _a;
- if (this.redirectedToLocation && !this.followedRedirect && ((_a = this.response) === null || _a === void 0 ? void 0 : _a.redirected)) {
- this.adapter.visitProposedToLocation(this.redirectedToLocation, {
- action: "replace",
- response: this.response,
- shouldCacheSnapshot: false,
- willRender: false,
- });
- this.followedRedirect = true;
- }
- }
- goToSamePageAnchor() {
- if (this.isSamePage) {
- this.render(async () => {
- this.cacheSnapshot();
- this.performScroll();
- this.changeHistory();
- this.adapter.visitRendered(this);
- });
- }
- }
- prepareRequest(request) {
- if (this.acceptsStreamResponse) {
- request.acceptResponseType(StreamMessage.contentType);
- }
- }
- requestStarted() {
- this.startRequest();
- }
- requestPreventedHandlingResponse(_request, _response) { }
- async requestSucceededWithResponse(request, response) {
- const responseHTML = await response.responseHTML;
- const { redirected, statusCode } = response;
- if (responseHTML == undefined) {
- this.recordResponse({
- statusCode: SystemStatusCode.contentTypeMismatch,
- redirected,
- });
- }
- else {
- this.redirectedToLocation = response.redirected ? response.location : undefined;
- this.recordResponse({ statusCode: statusCode, responseHTML, redirected });
- }
- }
- async requestFailedWithResponse(request, response) {
- const responseHTML = await response.responseHTML;
- const { redirected, statusCode } = response;
- if (responseHTML == undefined) {
- this.recordResponse({
- statusCode: SystemStatusCode.contentTypeMismatch,
- redirected,
- });
- }
- else {
- this.recordResponse({ statusCode: statusCode, responseHTML, redirected });
- }
- }
- requestErrored(_request, _error) {
- this.recordResponse({
- statusCode: SystemStatusCode.networkFailure,
- redirected: false,
- });
- }
- requestFinished() {
- this.finishRequest();
- }
- performScroll() {
- if (!this.scrolled && !this.view.forceReloaded) {
- if (this.action == "restore") {
- this.scrollToRestoredPosition() || this.scrollToAnchor() || this.view.scrollToTop();
- }
- else {
- this.scrollToAnchor() || this.view.scrollToTop();
- }
- if (this.isSamePage) {
- this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation, this.location);
- }
- this.scrolled = true;
- }
- }
- scrollToRestoredPosition() {
- const { scrollPosition } = this.restorationData;
- if (scrollPosition) {
- this.view.scrollToPosition(scrollPosition);
- return true;
- }
- }
- scrollToAnchor() {
- const anchor = getAnchor(this.location);
- if (anchor != null) {
- this.view.scrollToAnchor(anchor);
- return true;
- }
- }
- recordTimingMetric(metric) {
- this.timingMetrics[metric] = new Date().getTime();
- }
- getTimingMetrics() {
- return Object.assign({}, this.timingMetrics);
- }
- getHistoryMethodForAction(action) {
- switch (action) {
- case "replace":
- return history.replaceState;
- case "advance":
- case "restore":
- return history.pushState;
- }
- }
- hasPreloadedResponse() {
- return typeof this.response == "object";
- }
- shouldIssueRequest() {
- if (this.isSamePage) {
- return false;
- }
- else if (this.action == "restore") {
- return !this.hasCachedSnapshot();
- }
- else {
- return this.willRender;
- }
- }
- cacheSnapshot() {
- if (!this.snapshotCached) {
- this.view.cacheSnapshot(this.snapshot).then((snapshot) => snapshot && this.visitCachedSnapshot(snapshot));
- this.snapshotCached = true;
- }
- }
- async render(callback) {
- this.cancelRender();
- await new Promise((resolve) => {
- this.frame = requestAnimationFrame(() => resolve());
- });
- await callback();
- delete this.frame;
- }
- cancelRender() {
- if (this.frame) {
- cancelAnimationFrame(this.frame);
- delete this.frame;
- }
- }
-}
-function isSuccessful(statusCode) {
- return statusCode >= 200 && statusCode < 300;
-}
-
-class BrowserAdapter {
- constructor(session) {
- this.progressBar = new ProgressBar();
- this.showProgressBar = () => {
- this.progressBar.show();
- };
- this.session = session;
- }
- visitProposedToLocation(location, options) {
- this.navigator.startVisit(location, (options === null || options === void 0 ? void 0 : options.restorationIdentifier) || uuid(), options);
- }
- visitStarted(visit) {
- this.location = visit.location;
- visit.loadCachedSnapshot();
- visit.issueRequest();
- visit.goToSamePageAnchor();
- }
- visitRequestStarted(visit) {
- this.progressBar.setValue(0);
- if (visit.hasCachedSnapshot() || visit.action != "restore") {
- this.showVisitProgressBarAfterDelay();
- }
- else {
- this.showProgressBar();
- }
- }
- visitRequestCompleted(visit) {
- visit.loadResponse();
- }
- visitRequestFailedWithStatusCode(visit, statusCode) {
- switch (statusCode) {
- case SystemStatusCode.networkFailure:
- case SystemStatusCode.timeoutFailure:
- case SystemStatusCode.contentTypeMismatch:
- return this.reload({
- reason: "request_failed",
- context: {
- statusCode,
- },
- });
- default:
- return visit.loadResponse();
- }
- }
- visitRequestFinished(_visit) {
- this.progressBar.setValue(1);
- this.hideVisitProgressBar();
- }
- visitCompleted(_visit) { }
- pageInvalidated(reason) {
- this.reload(reason);
- }
- visitFailed(_visit) { }
- visitRendered(_visit) { }
- formSubmissionStarted(_formSubmission) {
- this.progressBar.setValue(0);
- this.showFormProgressBarAfterDelay();
- }
- formSubmissionFinished(_formSubmission) {
- this.progressBar.setValue(1);
- this.hideFormProgressBar();
- }
- showVisitProgressBarAfterDelay() {
- this.visitProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);
- }
- hideVisitProgressBar() {
- this.progressBar.hide();
- if (this.visitProgressBarTimeout != null) {
- window.clearTimeout(this.visitProgressBarTimeout);
- delete this.visitProgressBarTimeout;
- }
- }
- showFormProgressBarAfterDelay() {
- if (this.formProgressBarTimeout == null) {
- this.formProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);
- }
- }
- hideFormProgressBar() {
- this.progressBar.hide();
- if (this.formProgressBarTimeout != null) {
- window.clearTimeout(this.formProgressBarTimeout);
- delete this.formProgressBarTimeout;
- }
- }
- reload(reason) {
- var _a;
- dispatch("turbo:reload", { detail: reason });
- window.location.href = ((_a = this.location) === null || _a === void 0 ? void 0 : _a.toString()) || window.location.href;
- }
- get navigator() {
- return this.session.navigator;
- }
-}
-
-class CacheObserver {
- constructor() {
- this.selector = "[data-turbo-temporary]";
- this.deprecatedSelector = "[data-turbo-cache=false]";
- this.started = false;
- this.removeTemporaryElements = ((_event) => {
- for (const element of this.temporaryElements) {
- element.remove();
- }
- });
- }
- start() {
- if (!this.started) {
- this.started = true;
- addEventListener("turbo:before-cache", this.removeTemporaryElements, false);
- }
- }
- stop() {
- if (this.started) {
- this.started = false;
- removeEventListener("turbo:before-cache", this.removeTemporaryElements, false);
- }
- }
- get temporaryElements() {
- return [...document.querySelectorAll(this.selector), ...this.temporaryElementsWithDeprecation];
- }
- get temporaryElementsWithDeprecation() {
- const elements = document.querySelectorAll(this.deprecatedSelector);
- if (elements.length) {
- console.warn(`The ${this.deprecatedSelector} selector is deprecated and will be removed in a future version. Use ${this.selector} instead.`);
- }
- return [...elements];
- }
-}
-
-class FrameRedirector {
- constructor(session, element) {
- this.session = session;
- this.element = element;
- this.linkInterceptor = new LinkInterceptor(this, element);
- this.formSubmitObserver = new FormSubmitObserver(this, element);
- }
- start() {
- this.linkInterceptor.start();
- this.formSubmitObserver.start();
- }
- stop() {
- this.linkInterceptor.stop();
- this.formSubmitObserver.stop();
- }
- shouldInterceptLinkClick(element, _location, _event) {
- return this.shouldRedirect(element);
- }
- linkClickIntercepted(element, url, event) {
- const frame = this.findFrameElement(element);
- if (frame) {
- frame.delegate.linkClickIntercepted(element, url, event);
- }
- }
- willSubmitForm(element, submitter) {
- return (element.closest("turbo-frame") == null &&
- this.shouldSubmit(element, submitter) &&
- this.shouldRedirect(element, submitter));
- }
- formSubmitted(element, submitter) {
- const frame = this.findFrameElement(element, submitter);
- if (frame) {
- frame.delegate.formSubmitted(element, submitter);
- }
- }
- shouldSubmit(form, submitter) {
- var _a;
- const action = getAction(form, submitter);
- const meta = this.element.ownerDocument.querySelector(`meta[name="turbo-root"]`);
- const rootLocation = expandURL((_a = meta === null || meta === void 0 ? void 0 : meta.content) !== null && _a !== void 0 ? _a : "/");
- return this.shouldRedirect(form, submitter) && locationIsVisitable(action, rootLocation);
- }
- shouldRedirect(element, submitter) {
- const isNavigatable = element instanceof HTMLFormElement
- ? this.session.submissionIsNavigatable(element, submitter)
- : this.session.elementIsNavigatable(element);
- if (isNavigatable) {
- const frame = this.findFrameElement(element, submitter);
- return frame ? frame != element.closest("turbo-frame") : false;
- }
- else {
- return false;
- }
- }
- findFrameElement(element, submitter) {
- const id = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute("data-turbo-frame")) || element.getAttribute("data-turbo-frame");
- if (id && id != "_top") {
- const frame = this.element.querySelector(`#${id}:not([disabled])`);
- if (frame instanceof FrameElement) {
- return frame;
- }
- }
- }
-}
-
-class History {
- constructor(delegate) {
- this.restorationIdentifier = uuid();
- this.restorationData = {};
- this.started = false;
- this.pageLoaded = false;
- this.onPopState = (event) => {
- if (this.shouldHandlePopState()) {
- const { turbo } = event.state || {};
- if (turbo) {
- this.location = new URL(window.location.href);
- const { restorationIdentifier } = turbo;
- this.restorationIdentifier = restorationIdentifier;
- this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.location, restorationIdentifier);
- }
- }
- };
- this.onPageLoad = async (_event) => {
- await nextMicrotask();
- this.pageLoaded = true;
- };
- this.delegate = delegate;
- }
- start() {
- if (!this.started) {
- addEventListener("popstate", this.onPopState, false);
- addEventListener("load", this.onPageLoad, false);
- this.started = true;
- this.replace(new URL(window.location.href));
- }
- }
- stop() {
- if (this.started) {
- removeEventListener("popstate", this.onPopState, false);
- removeEventListener("load", this.onPageLoad, false);
- this.started = false;
- }
- }
- push(location, restorationIdentifier) {
- this.update(history.pushState, location, restorationIdentifier);
- }
- replace(location, restorationIdentifier) {
- this.update(history.replaceState, location, restorationIdentifier);
- }
- update(method, location, restorationIdentifier = uuid()) {
- const state = { turbo: { restorationIdentifier } };
- method.call(history, state, "", location.href);
- this.location = location;
- this.restorationIdentifier = restorationIdentifier;
- }
- getRestorationDataForIdentifier(restorationIdentifier) {
- return this.restorationData[restorationIdentifier] || {};
- }
- updateRestorationData(additionalData) {
- const { restorationIdentifier } = this;
- const restorationData = this.restorationData[restorationIdentifier];
- this.restorationData[restorationIdentifier] = Object.assign(Object.assign({}, restorationData), additionalData);
- }
- assumeControlOfScrollRestoration() {
- var _a;
- if (!this.previousScrollRestoration) {
- this.previousScrollRestoration = (_a = history.scrollRestoration) !== null && _a !== void 0 ? _a : "auto";
- history.scrollRestoration = "manual";
- }
- }
- relinquishControlOfScrollRestoration() {
- if (this.previousScrollRestoration) {
- history.scrollRestoration = this.previousScrollRestoration;
- delete this.previousScrollRestoration;
- }
- }
- shouldHandlePopState() {
- return this.pageIsLoaded();
- }
- pageIsLoaded() {
- return this.pageLoaded || document.readyState == "complete";
- }
-}
-
-class Navigator {
- constructor(delegate) {
- this.delegate = delegate;
- }
- proposeVisit(location, options = {}) {
- if (this.delegate.allowsVisitingLocationWithAction(location, options.action)) {
- if (locationIsVisitable(location, this.view.snapshot.rootLocation)) {
- this.delegate.visitProposedToLocation(location, options);
- }
- else {
- window.location.href = location.toString();
- }
- }
- }
- startVisit(locatable, restorationIdentifier, options = {}) {
- this.stop();
- this.currentVisit = new Visit(this, expandURL(locatable), restorationIdentifier, Object.assign({ referrer: this.location }, options));
- this.currentVisit.start();
- }
- submitForm(form, submitter) {
- this.stop();
- this.formSubmission = new FormSubmission(this, form, submitter, true);
- this.formSubmission.start();
- }
- stop() {
- if (this.formSubmission) {
- this.formSubmission.stop();
- delete this.formSubmission;
- }
- if (this.currentVisit) {
- this.currentVisit.cancel();
- delete this.currentVisit;
- }
- }
- get adapter() {
- return this.delegate.adapter;
- }
- get view() {
- return this.delegate.view;
- }
- get history() {
- return this.delegate.history;
- }
- formSubmissionStarted(formSubmission) {
- if (typeof this.adapter.formSubmissionStarted === "function") {
- this.adapter.formSubmissionStarted(formSubmission);
- }
- }
- async formSubmissionSucceededWithResponse(formSubmission, fetchResponse) {
- if (formSubmission == this.formSubmission) {
- const responseHTML = await fetchResponse.responseHTML;
- if (responseHTML) {
- const shouldCacheSnapshot = formSubmission.isSafe;
- if (!shouldCacheSnapshot) {
- this.view.clearSnapshotCache();
- }
- const { statusCode, redirected } = fetchResponse;
- const action = this.getActionForFormSubmission(formSubmission);
- const visitOptions = {
- action,
- shouldCacheSnapshot,
- response: { statusCode, responseHTML, redirected },
- };
- this.proposeVisit(fetchResponse.location, visitOptions);
- }
- }
- }
- async formSubmissionFailedWithResponse(formSubmission, fetchResponse) {
- const responseHTML = await fetchResponse.responseHTML;
- if (responseHTML) {
- const snapshot = PageSnapshot.fromHTMLString(responseHTML);
- if (fetchResponse.serverError) {
- await this.view.renderError(snapshot, this.currentVisit);
- }
- else {
- await this.view.renderPage(snapshot, false, true, this.currentVisit);
- }
- this.view.scrollToTop();
- this.view.clearSnapshotCache();
- }
- }
- formSubmissionErrored(formSubmission, error) {
- console.error(error);
- }
- formSubmissionFinished(formSubmission) {
- if (typeof this.adapter.formSubmissionFinished === "function") {
- this.adapter.formSubmissionFinished(formSubmission);
- }
- }
- visitStarted(visit) {
- this.delegate.visitStarted(visit);
- }
- visitCompleted(visit) {
- this.delegate.visitCompleted(visit);
- }
- locationWithActionIsSamePage(location, action) {
- const anchor = getAnchor(location);
- const currentAnchor = getAnchor(this.view.lastRenderedLocation);
- const isRestorationToTop = action === "restore" && typeof anchor === "undefined";
- return (action !== "replace" &&
- getRequestURL(location) === getRequestURL(this.view.lastRenderedLocation) &&
- (isRestorationToTop || (anchor != null && anchor !== currentAnchor)));
- }
- visitScrolledToSamePageLocation(oldURL, newURL) {
- this.delegate.visitScrolledToSamePageLocation(oldURL, newURL);
- }
- get location() {
- return this.history.location;
- }
- get restorationIdentifier() {
- return this.history.restorationIdentifier;
- }
- getActionForFormSubmission({ submitter, formElement }) {
- return getVisitAction(submitter, formElement) || "advance";
- }
-}
-
-var PageStage;
-(function (PageStage) {
- PageStage[PageStage["initial"] = 0] = "initial";
- PageStage[PageStage["loading"] = 1] = "loading";
- PageStage[PageStage["interactive"] = 2] = "interactive";
- PageStage[PageStage["complete"] = 3] = "complete";
-})(PageStage || (PageStage = {}));
-class PageObserver {
- constructor(delegate) {
- this.stage = PageStage.initial;
- this.started = false;
- this.interpretReadyState = () => {
- const { readyState } = this;
- if (readyState == "interactive") {
- this.pageIsInteractive();
- }
- else if (readyState == "complete") {
- this.pageIsComplete();
- }
- };
- this.pageWillUnload = () => {
- this.delegate.pageWillUnload();
- };
- this.delegate = delegate;
- }
- start() {
- if (!this.started) {
- if (this.stage == PageStage.initial) {
- this.stage = PageStage.loading;
- }
- document.addEventListener("readystatechange", this.interpretReadyState, false);
- addEventListener("pagehide", this.pageWillUnload, false);
- this.started = true;
- }
- }
- stop() {
- if (this.started) {
- document.removeEventListener("readystatechange", this.interpretReadyState, false);
- removeEventListener("pagehide", this.pageWillUnload, false);
- this.started = false;
- }
- }
- pageIsInteractive() {
- if (this.stage == PageStage.loading) {
- this.stage = PageStage.interactive;
- this.delegate.pageBecameInteractive();
- }
- }
- pageIsComplete() {
- this.pageIsInteractive();
- if (this.stage == PageStage.interactive) {
- this.stage = PageStage.complete;
- this.delegate.pageLoaded();
- }
- }
- get readyState() {
- return document.readyState;
- }
-}
-
-class ScrollObserver {
- constructor(delegate) {
- this.started = false;
- this.onScroll = () => {
- this.updatePosition({ x: window.pageXOffset, y: window.pageYOffset });
- };
- this.delegate = delegate;
- }
- start() {
- if (!this.started) {
- addEventListener("scroll", this.onScroll, false);
- this.onScroll();
- this.started = true;
- }
- }
- stop() {
- if (this.started) {
- removeEventListener("scroll", this.onScroll, false);
- this.started = false;
- }
- }
- updatePosition(position) {
- this.delegate.scrollPositionChanged(position);
- }
-}
-
-class StreamMessageRenderer {
- render({ fragment }) {
- Bardo.preservingPermanentElements(this, getPermanentElementMapForFragment(fragment), () => document.documentElement.appendChild(fragment));
- }
- enteringBardo(currentPermanentElement, newPermanentElement) {
- newPermanentElement.replaceWith(currentPermanentElement.cloneNode(true));
- }
- leavingBardo() { }
-}
-function getPermanentElementMapForFragment(fragment) {
- const permanentElementsInDocument = queryPermanentElementsAll(document.documentElement);
- const permanentElementMap = {};
- for (const permanentElementInDocument of permanentElementsInDocument) {
- const { id } = permanentElementInDocument;
- for (const streamElement of fragment.querySelectorAll("turbo-stream")) {
- const elementInStream = getPermanentElementById(streamElement.templateElement.content, id);
- if (elementInStream) {
- permanentElementMap[id] = [permanentElementInDocument, elementInStream];
- }
- }
- }
- return permanentElementMap;
-}
-
-class StreamObserver {
- constructor(delegate) {
- this.sources = new Set();
- this.started = false;
- this.inspectFetchResponse = ((event) => {
- const response = fetchResponseFromEvent(event);
- if (response && fetchResponseIsStream(response)) {
- event.preventDefault();
- this.receiveMessageResponse(response);
- }
- });
- this.receiveMessageEvent = (event) => {
- if (this.started && typeof event.data == "string") {
- this.receiveMessageHTML(event.data);
- }
- };
- this.delegate = delegate;
- }
- start() {
- if (!this.started) {
- this.started = true;
- addEventListener("turbo:before-fetch-response", this.inspectFetchResponse, false);
- }
- }
- stop() {
- if (this.started) {
- this.started = false;
- removeEventListener("turbo:before-fetch-response", this.inspectFetchResponse, false);
- }
- }
- connectStreamSource(source) {
- if (!this.streamSourceIsConnected(source)) {
- this.sources.add(source);
- source.addEventListener("message", this.receiveMessageEvent, false);
- }
- }
- disconnectStreamSource(source) {
- if (this.streamSourceIsConnected(source)) {
- this.sources.delete(source);
- source.removeEventListener("message", this.receiveMessageEvent, false);
- }
- }
- streamSourceIsConnected(source) {
- return this.sources.has(source);
- }
- async receiveMessageResponse(response) {
- const html = await response.responseHTML;
- if (html) {
- this.receiveMessageHTML(html);
- }
- }
- receiveMessageHTML(html) {
- this.delegate.receivedMessageFromStream(StreamMessage.wrap(html));
- }
-}
-function fetchResponseFromEvent(event) {
- var _a;
- const fetchResponse = (_a = event.detail) === null || _a === void 0 ? void 0 : _a.fetchResponse;
- if (fetchResponse instanceof FetchResponse) {
- return fetchResponse;
- }
-}
-function fetchResponseIsStream(response) {
- var _a;
- const contentType = (_a = response.contentType) !== null && _a !== void 0 ? _a : "";
- return contentType.startsWith(StreamMessage.contentType);
-}
-
-class ErrorRenderer extends Renderer {
- static renderElement(currentElement, newElement) {
- const { documentElement, body } = document;
- documentElement.replaceChild(newElement, body);
- }
- async render() {
- this.replaceHeadAndBody();
- this.activateScriptElements();
- }
- replaceHeadAndBody() {
- const { documentElement, head } = document;
- documentElement.replaceChild(this.newHead, head);
- this.renderElement(this.currentElement, this.newElement);
- }
- activateScriptElements() {
- for (const replaceableElement of this.scriptElements) {
- const parentNode = replaceableElement.parentNode;
- if (parentNode) {
- const element = activateScriptElement(replaceableElement);
- parentNode.replaceChild(element, replaceableElement);
- }
- }
- }
- get newHead() {
- return this.newSnapshot.headSnapshot.element;
- }
- get scriptElements() {
- return document.documentElement.querySelectorAll("script");
- }
-}
-
-class PageRenderer extends Renderer {
- static renderElement(currentElement, newElement) {
- if (document.body && newElement instanceof HTMLBodyElement) {
- document.body.replaceWith(newElement);
- }
- else {
- document.documentElement.appendChild(newElement);
- }
- }
- get shouldRender() {
- return this.newSnapshot.isVisitable && this.trackedElementsAreIdentical;
- }
- get reloadReason() {
- if (!this.newSnapshot.isVisitable) {
- return {
- reason: "turbo_visit_control_is_reload",
- };
- }
- if (!this.trackedElementsAreIdentical) {
- return {
- reason: "tracked_element_mismatch",
- };
- }
- }
- async prepareToRender() {
- await this.mergeHead();
- }
- async render() {
- if (this.willRender) {
- await this.replaceBody();
- }
- }
- finishRendering() {
- super.finishRendering();
- if (!this.isPreview) {
- this.focusFirstAutofocusableElement();
- }
- }
- get currentHeadSnapshot() {
- return this.currentSnapshot.headSnapshot;
- }
- get newHeadSnapshot() {
- return this.newSnapshot.headSnapshot;
- }
- get newElement() {
- return this.newSnapshot.element;
- }
- async mergeHead() {
- const mergedHeadElements = this.mergeProvisionalElements();
- const newStylesheetElements = this.copyNewHeadStylesheetElements();
- this.copyNewHeadScriptElements();
- await mergedHeadElements;
- await newStylesheetElements;
- }
- async replaceBody() {
- await this.preservingPermanentElements(async () => {
- this.activateNewBody();
- await this.assignNewBody();
- });
- }
- get trackedElementsAreIdentical() {
- return this.currentHeadSnapshot.trackedElementSignature == this.newHeadSnapshot.trackedElementSignature;
- }
- async copyNewHeadStylesheetElements() {
- const loadingElements = [];
- for (const element of this.newHeadStylesheetElements) {
- loadingElements.push(waitForLoad(element));
- document.head.appendChild(element);
- }
- await Promise.all(loadingElements);
- }
- copyNewHeadScriptElements() {
- for (const element of this.newHeadScriptElements) {
- document.head.appendChild(activateScriptElement(element));
- }
- }
- async mergeProvisionalElements() {
- const newHeadElements = [...this.newHeadProvisionalElements];
- for (const element of this.currentHeadProvisionalElements) {
- if (!this.isCurrentElementInElementList(element, newHeadElements)) {
- document.head.removeChild(element);
- }
- }
- for (const element of newHeadElements) {
- document.head.appendChild(element);
- }
- }
- isCurrentElementInElementList(element, elementList) {
- for (const [index, newElement] of elementList.entries()) {
- if (element.tagName == "TITLE") {
- if (newElement.tagName != "TITLE") {
- continue;
- }
- if (element.innerHTML == newElement.innerHTML) {
- elementList.splice(index, 1);
- return true;
- }
- }
- if (newElement.isEqualNode(element)) {
- elementList.splice(index, 1);
- return true;
- }
- }
- return false;
- }
- removeCurrentHeadProvisionalElements() {
- for (const element of this.currentHeadProvisionalElements) {
- document.head.removeChild(element);
- }
- }
- copyNewHeadProvisionalElements() {
- for (const element of this.newHeadProvisionalElements) {
- document.head.appendChild(element);
- }
- }
- activateNewBody() {
- document.adoptNode(this.newElement);
- this.activateNewBodyScriptElements();
- }
- activateNewBodyScriptElements() {
- for (const inertScriptElement of this.newBodyScriptElements) {
- const activatedScriptElement = activateScriptElement(inertScriptElement);
- inertScriptElement.replaceWith(activatedScriptElement);
- }
- }
- async assignNewBody() {
- await this.renderElement(this.currentElement, this.newElement);
- }
- get newHeadStylesheetElements() {
- return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot);
- }
- get newHeadScriptElements() {
- return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot);
- }
- get currentHeadProvisionalElements() {
- return this.currentHeadSnapshot.provisionalElements;
- }
- get newHeadProvisionalElements() {
- return this.newHeadSnapshot.provisionalElements;
- }
- get newBodyScriptElements() {
- return this.newElement.querySelectorAll("script");
- }
-}
-
-class SnapshotCache {
- constructor(size) {
- this.keys = [];
- this.snapshots = {};
- this.size = size;
- }
- has(location) {
- return toCacheKey(location) in this.snapshots;
- }
- get(location) {
- if (this.has(location)) {
- const snapshot = this.read(location);
- this.touch(location);
- return snapshot;
- }
- }
- put(location, snapshot) {
- this.write(location, snapshot);
- this.touch(location);
- return snapshot;
- }
- clear() {
- this.snapshots = {};
- }
- read(location) {
- return this.snapshots[toCacheKey(location)];
- }
- write(location, snapshot) {
- this.snapshots[toCacheKey(location)] = snapshot;
- }
- touch(location) {
- const key = toCacheKey(location);
- const index = this.keys.indexOf(key);
- if (index > -1)
- this.keys.splice(index, 1);
- this.keys.unshift(key);
- this.trim();
- }
- trim() {
- for (const key of this.keys.splice(this.size)) {
- delete this.snapshots[key];
- }
- }
-}
-
-class PageView extends View {
- constructor() {
- super(...arguments);
- this.snapshotCache = new SnapshotCache(10);
- this.lastRenderedLocation = new URL(location.href);
- this.forceReloaded = false;
- }
- renderPage(snapshot, isPreview = false, willRender = true, visit) {
- const renderer = new PageRenderer(this.snapshot, snapshot, PageRenderer.renderElement, isPreview, willRender);
- if (!renderer.shouldRender) {
- this.forceReloaded = true;
- }
- else {
- visit === null || visit === void 0 ? void 0 : visit.changeHistory();
- }
- return this.render(renderer);
- }
- renderError(snapshot, visit) {
- visit === null || visit === void 0 ? void 0 : visit.changeHistory();
- const renderer = new ErrorRenderer(this.snapshot, snapshot, ErrorRenderer.renderElement, false);
- return this.render(renderer);
- }
- clearSnapshotCache() {
- this.snapshotCache.clear();
- }
- async cacheSnapshot(snapshot = this.snapshot) {
- if (snapshot.isCacheable) {
- this.delegate.viewWillCacheSnapshot();
- const { lastRenderedLocation: location } = this;
- await nextEventLoopTick();
- const cachedSnapshot = snapshot.clone();
- this.snapshotCache.put(location, cachedSnapshot);
- return cachedSnapshot;
- }
- }
- getCachedSnapshotForLocation(location) {
- return this.snapshotCache.get(location);
- }
- get snapshot() {
- return PageSnapshot.fromElement(this.element);
- }
-}
-
-class Preloader {
- constructor(delegate) {
- this.selector = "a[data-turbo-preload]";
- this.delegate = delegate;
- }
- get snapshotCache() {
- return this.delegate.navigator.view.snapshotCache;
- }
- start() {
- if (document.readyState === "loading") {
- return document.addEventListener("DOMContentLoaded", () => {
- this.preloadOnLoadLinksForView(document.body);
- });
- }
- else {
- this.preloadOnLoadLinksForView(document.body);
- }
- }
- preloadOnLoadLinksForView(element) {
- for (const link of element.querySelectorAll(this.selector)) {
- this.preloadURL(link);
- }
- }
- async preloadURL(link) {
- const location = new URL(link.href);
- if (this.snapshotCache.has(location)) {
- return;
- }
- try {
- const response = await fetch(location.toString(), { headers: { "VND.PREFETCH": "true", Accept: "text/html" } });
- const responseText = await response.text();
- const snapshot = PageSnapshot.fromHTMLString(responseText);
- this.snapshotCache.put(location, snapshot);
- }
- catch (_) {
- }
- }
-}
-
-class Session {
- constructor() {
- this.navigator = new Navigator(this);
- this.history = new History(this);
- this.preloader = new Preloader(this);
- this.view = new PageView(this, document.documentElement);
- this.adapter = new BrowserAdapter(this);
- this.pageObserver = new PageObserver(this);
- this.cacheObserver = new CacheObserver();
- this.linkClickObserver = new LinkClickObserver(this, window);
- this.formSubmitObserver = new FormSubmitObserver(this, document);
- this.scrollObserver = new ScrollObserver(this);
- this.streamObserver = new StreamObserver(this);
- this.formLinkClickObserver = new FormLinkClickObserver(this, document.documentElement);
- this.frameRedirector = new FrameRedirector(this, document.documentElement);
- this.streamMessageRenderer = new StreamMessageRenderer();
- this.drive = true;
- this.enabled = true;
- this.progressBarDelay = 500;
- this.started = false;
- this.formMode = "on";
- }
- start() {
- if (!this.started) {
- this.pageObserver.start();
- this.cacheObserver.start();
- this.formLinkClickObserver.start();
- this.linkClickObserver.start();
- this.formSubmitObserver.start();
- this.scrollObserver.start();
- this.streamObserver.start();
- this.frameRedirector.start();
- this.history.start();
- this.preloader.start();
- this.started = true;
- this.enabled = true;
- }
- }
- disable() {
- this.enabled = false;
- }
- stop() {
- if (this.started) {
- this.pageObserver.stop();
- this.cacheObserver.stop();
- this.formLinkClickObserver.stop();
- this.linkClickObserver.stop();
- this.formSubmitObserver.stop();
- this.scrollObserver.stop();
- this.streamObserver.stop();
- this.frameRedirector.stop();
- this.history.stop();
- this.started = false;
- }
- }
- registerAdapter(adapter) {
- this.adapter = adapter;
- }
- visit(location, options = {}) {
- const frameElement = options.frame ? document.getElementById(options.frame) : null;
- if (frameElement instanceof FrameElement) {
- frameElement.src = location.toString();
- frameElement.loaded;
- }
- else {
- this.navigator.proposeVisit(expandURL(location), options);
- }
- }
- connectStreamSource(source) {
- this.streamObserver.connectStreamSource(source);
- }
- disconnectStreamSource(source) {
- this.streamObserver.disconnectStreamSource(source);
- }
- renderStreamMessage(message) {
- this.streamMessageRenderer.render(StreamMessage.wrap(message));
- }
- clearCache() {
- this.view.clearSnapshotCache();
- }
- setProgressBarDelay(delay) {
- this.progressBarDelay = delay;
- }
- setFormMode(mode) {
- this.formMode = mode;
- }
- get location() {
- return this.history.location;
- }
- get restorationIdentifier() {
- return this.history.restorationIdentifier;
- }
- historyPoppedToLocationWithRestorationIdentifier(location, restorationIdentifier) {
- if (this.enabled) {
- this.navigator.startVisit(location, restorationIdentifier, {
- action: "restore",
- historyChanged: true,
- });
- }
- else {
- this.adapter.pageInvalidated({
- reason: "turbo_disabled",
- });
- }
- }
- scrollPositionChanged(position) {
- this.history.updateRestorationData({ scrollPosition: position });
- }
- willSubmitFormLinkToLocation(link, location) {
- return this.elementIsNavigatable(link) && locationIsVisitable(location, this.snapshot.rootLocation);
- }
- submittedFormLinkToLocation() { }
- willFollowLinkToLocation(link, location, event) {
- return (this.elementIsNavigatable(link) &&
- locationIsVisitable(location, this.snapshot.rootLocation) &&
- this.applicationAllowsFollowingLinkToLocation(link, location, event));
- }
- followedLinkToLocation(link, location) {
- const action = this.getActionForLink(link);
- const acceptsStreamResponse = link.hasAttribute("data-turbo-stream");
- this.visit(location.href, { action, acceptsStreamResponse });
- }
- allowsVisitingLocationWithAction(location, action) {
- return this.locationWithActionIsSamePage(location, action) || this.applicationAllowsVisitingLocation(location);
- }
- visitProposedToLocation(location, options) {
- extendURLWithDeprecatedProperties(location);
- this.adapter.visitProposedToLocation(location, options);
- }
- visitStarted(visit) {
- if (!visit.acceptsStreamResponse) {
- markAsBusy(document.documentElement);
- }
- extendURLWithDeprecatedProperties(visit.location);
- if (!visit.silent) {
- this.notifyApplicationAfterVisitingLocation(visit.location, visit.action);
- }
- }
- visitCompleted(visit) {
- clearBusyState(document.documentElement);
- this.notifyApplicationAfterPageLoad(visit.getTimingMetrics());
- }
- locationWithActionIsSamePage(location, action) {
- return this.navigator.locationWithActionIsSamePage(location, action);
- }
- visitScrolledToSamePageLocation(oldURL, newURL) {
- this.notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL);
- }
- willSubmitForm(form, submitter) {
- const action = getAction(form, submitter);
- return (this.submissionIsNavigatable(form, submitter) &&
- locationIsVisitable(expandURL(action), this.snapshot.rootLocation));
- }
- formSubmitted(form, submitter) {
- this.navigator.submitForm(form, submitter);
- }
- pageBecameInteractive() {
- this.view.lastRenderedLocation = this.location;
- this.notifyApplicationAfterPageLoad();
- }
- pageLoaded() {
- this.history.assumeControlOfScrollRestoration();
- }
- pageWillUnload() {
- this.history.relinquishControlOfScrollRestoration();
- }
- receivedMessageFromStream(message) {
- this.renderStreamMessage(message);
- }
- viewWillCacheSnapshot() {
- var _a;
- if (!((_a = this.navigator.currentVisit) === null || _a === void 0 ? void 0 : _a.silent)) {
- this.notifyApplicationBeforeCachingSnapshot();
- }
- }
- allowsImmediateRender({ element }, options) {
- const event = this.notifyApplicationBeforeRender(element, options);
- const { defaultPrevented, detail: { render }, } = event;
- if (this.view.renderer && render) {
- this.view.renderer.renderElement = render;
- }
- return !defaultPrevented;
- }
- viewRenderedSnapshot(_snapshot, _isPreview) {
- this.view.lastRenderedLocation = this.history.location;
- this.notifyApplicationAfterRender();
- }
- preloadOnLoadLinksForView(element) {
- this.preloader.preloadOnLoadLinksForView(element);
- }
- viewInvalidated(reason) {
- this.adapter.pageInvalidated(reason);
- }
- frameLoaded(frame) {
- this.notifyApplicationAfterFrameLoad(frame);
- }
- frameRendered(fetchResponse, frame) {
- this.notifyApplicationAfterFrameRender(fetchResponse, frame);
- }
- applicationAllowsFollowingLinkToLocation(link, location, ev) {
- const event = this.notifyApplicationAfterClickingLinkToLocation(link, location, ev);
- return !event.defaultPrevented;
- }
- applicationAllowsVisitingLocation(location) {
- const event = this.notifyApplicationBeforeVisitingLocation(location);
- return !event.defaultPrevented;
- }
- notifyApplicationAfterClickingLinkToLocation(link, location, event) {
- return dispatch("turbo:click", {
- target: link,
- detail: { url: location.href, originalEvent: event },
- cancelable: true,
- });
- }
- notifyApplicationBeforeVisitingLocation(location) {
- return dispatch("turbo:before-visit", {
- detail: { url: location.href },
- cancelable: true,
- });
- }
- notifyApplicationAfterVisitingLocation(location, action) {
- return dispatch("turbo:visit", { detail: { url: location.href, action } });
- }
- notifyApplicationBeforeCachingSnapshot() {
- return dispatch("turbo:before-cache");
- }
- notifyApplicationBeforeRender(newBody, options) {
- return dispatch("turbo:before-render", {
- detail: Object.assign({ newBody }, options),
- cancelable: true,
- });
- }
- notifyApplicationAfterRender() {
- return dispatch("turbo:render");
- }
- notifyApplicationAfterPageLoad(timing = {}) {
- return dispatch("turbo:load", {
- detail: { url: this.location.href, timing },
- });
- }
- notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL) {
- dispatchEvent(new HashChangeEvent("hashchange", {
- oldURL: oldURL.toString(),
- newURL: newURL.toString(),
- }));
- }
- notifyApplicationAfterFrameLoad(frame) {
- return dispatch("turbo:frame-load", { target: frame });
- }
- notifyApplicationAfterFrameRender(fetchResponse, frame) {
- return dispatch("turbo:frame-render", {
- detail: { fetchResponse },
- target: frame,
- cancelable: true,
- });
- }
- submissionIsNavigatable(form, submitter) {
- if (this.formMode == "off") {
- return false;
- }
- else {
- const submitterIsNavigatable = submitter ? this.elementIsNavigatable(submitter) : true;
- if (this.formMode == "optin") {
- return submitterIsNavigatable && form.closest('[data-turbo="true"]') != null;
- }
- else {
- return submitterIsNavigatable && this.elementIsNavigatable(form);
- }
- }
- }
- elementIsNavigatable(element) {
- const container = findClosestRecursively(element, "[data-turbo]");
- const withinFrame = findClosestRecursively(element, "turbo-frame");
- if (this.drive || withinFrame) {
- if (container) {
- return container.getAttribute("data-turbo") != "false";
- }
- else {
- return true;
- }
- }
- else {
- if (container) {
- return container.getAttribute("data-turbo") == "true";
- }
- else {
- return false;
- }
- }
- }
- getActionForLink(link) {
- return getVisitAction(link) || "advance";
- }
- get snapshot() {
- return this.view.snapshot;
- }
-}
-function extendURLWithDeprecatedProperties(url) {
- Object.defineProperties(url, deprecatedLocationPropertyDescriptors);
-}
-const deprecatedLocationPropertyDescriptors = {
- absoluteURL: {
- get() {
- return this.toString();
- },
- },
-};
-
-class Cache {
- constructor(session) {
- this.session = session;
- }
- clear() {
- this.session.clearCache();
- }
- resetCacheControl() {
- this.setCacheControl("");
- }
- exemptPageFromCache() {
- this.setCacheControl("no-cache");
- }
- exemptPageFromPreview() {
- this.setCacheControl("no-preview");
- }
- setCacheControl(value) {
- setMetaContent("turbo-cache-control", value);
- }
-}
-
-const StreamActions = {
- after() {
- this.targetElements.forEach((e) => { var _a; return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.templateContent, e.nextSibling); });
- },
- append() {
- this.removeDuplicateTargetChildren();
- this.targetElements.forEach((e) => e.append(this.templateContent));
- },
- before() {
- this.targetElements.forEach((e) => { var _a; return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.templateContent, e); });
- },
- prepend() {
- this.removeDuplicateTargetChildren();
- this.targetElements.forEach((e) => e.prepend(this.templateContent));
- },
- remove() {
- this.targetElements.forEach((e) => e.remove());
- },
- replace() {
- this.targetElements.forEach((e) => e.replaceWith(this.templateContent));
- },
- update() {
- this.targetElements.forEach((targetElement) => {
- targetElement.innerHTML = "";
- targetElement.append(this.templateContent);
- });
- },
-};
-
-const session = new Session();
-const cache = new Cache(session);
-const { navigator: navigator$1 } = session;
-function start() {
- session.start();
-}
-function registerAdapter(adapter) {
- session.registerAdapter(adapter);
-}
-function visit(location, options) {
- session.visit(location, options);
-}
-function connectStreamSource(source) {
- session.connectStreamSource(source);
-}
-function disconnectStreamSource(source) {
- session.disconnectStreamSource(source);
-}
-function renderStreamMessage(message) {
- session.renderStreamMessage(message);
-}
-function clearCache() {
- console.warn("Please replace `Turbo.clearCache()` with `Turbo.cache.clear()`. The top-level function is deprecated and will be removed in a future version of Turbo.`");
- session.clearCache();
-}
-function setProgressBarDelay(delay) {
- session.setProgressBarDelay(delay);
-}
-function setConfirmMethod(confirmMethod) {
- FormSubmission.confirmMethod = confirmMethod;
-}
-function setFormMode(mode) {
- session.setFormMode(mode);
-}
-
-var Turbo = /*#__PURE__*/Object.freeze({
- __proto__: null,
- navigator: navigator$1,
- session: session,
- cache: cache,
- PageRenderer: PageRenderer,
- PageSnapshot: PageSnapshot,
- FrameRenderer: FrameRenderer,
- start: start,
- registerAdapter: registerAdapter,
- visit: visit,
- connectStreamSource: connectStreamSource,
- disconnectStreamSource: disconnectStreamSource,
- renderStreamMessage: renderStreamMessage,
- clearCache: clearCache,
- setProgressBarDelay: setProgressBarDelay,
- setConfirmMethod: setConfirmMethod,
- setFormMode: setFormMode,
- StreamActions: StreamActions
-});
-
-class TurboFrameMissingError extends Error {
-}
-
-class FrameController {
- constructor(element) {
- this.fetchResponseLoaded = (_fetchResponse) => { };
- this.currentFetchRequest = null;
- this.resolveVisitPromise = () => { };
- this.connected = false;
- this.hasBeenLoaded = false;
- this.ignoredAttributes = new Set();
- this.action = null;
- this.visitCachedSnapshot = ({ element }) => {
- const frame = element.querySelector("#" + this.element.id);
- if (frame && this.previousFrameElement) {
- frame.replaceChildren(...this.previousFrameElement.children);
- }
- delete this.previousFrameElement;
- };
- this.element = element;
- this.view = new FrameView(this, this.element);
- this.appearanceObserver = new AppearanceObserver(this, this.element);
- this.formLinkClickObserver = new FormLinkClickObserver(this, this.element);
- this.linkInterceptor = new LinkInterceptor(this, this.element);
- this.restorationIdentifier = uuid();
- this.formSubmitObserver = new FormSubmitObserver(this, this.element);
- }
- connect() {
- if (!this.connected) {
- this.connected = true;
- if (this.loadingStyle == FrameLoadingStyle.lazy) {
- this.appearanceObserver.start();
- }
- else {
- this.loadSourceURL();
- }
- this.formLinkClickObserver.start();
- this.linkInterceptor.start();
- this.formSubmitObserver.start();
- }
- }
- disconnect() {
- if (this.connected) {
- this.connected = false;
- this.appearanceObserver.stop();
- this.formLinkClickObserver.stop();
- this.linkInterceptor.stop();
- this.formSubmitObserver.stop();
- }
- }
- disabledChanged() {
- if (this.loadingStyle == FrameLoadingStyle.eager) {
- this.loadSourceURL();
- }
- }
- sourceURLChanged() {
- if (this.isIgnoringChangesTo("src"))
- return;
- if (this.element.isConnected) {
- this.complete = false;
- }
- if (this.loadingStyle == FrameLoadingStyle.eager || this.hasBeenLoaded) {
- this.loadSourceURL();
- }
- }
- sourceURLReloaded() {
- const { src } = this.element;
- this.ignoringChangesToAttribute("complete", () => {
- this.element.removeAttribute("complete");
- });
- this.element.src = null;
- this.element.src = src;
- return this.element.loaded;
- }
- completeChanged() {
- if (this.isIgnoringChangesTo("complete"))
- return;
- this.loadSourceURL();
- }
- loadingStyleChanged() {
- if (this.loadingStyle == FrameLoadingStyle.lazy) {
- this.appearanceObserver.start();
- }
- else {
- this.appearanceObserver.stop();
- this.loadSourceURL();
- }
- }
- async loadSourceURL() {
- if (this.enabled && this.isActive && !this.complete && this.sourceURL) {
- this.element.loaded = this.visit(expandURL(this.sourceURL));
- this.appearanceObserver.stop();
- await this.element.loaded;
- this.hasBeenLoaded = true;
- }
- }
- async loadResponse(fetchResponse) {
- if (fetchResponse.redirected || (fetchResponse.succeeded && fetchResponse.isHTML)) {
- this.sourceURL = fetchResponse.response.url;
- }
- try {
- const html = await fetchResponse.responseHTML;
- if (html) {
- const document = parseHTMLDocument(html);
- const pageSnapshot = PageSnapshot.fromDocument(document);
- if (pageSnapshot.isVisitable) {
- await this.loadFrameResponse(fetchResponse, document);
- }
- else {
- await this.handleUnvisitableFrameResponse(fetchResponse);
- }
- }
- }
- finally {
- this.fetchResponseLoaded = () => { };
- }
- }
- elementAppearedInViewport(element) {
- this.proposeVisitIfNavigatedWithAction(element, element);
- this.loadSourceURL();
- }
- willSubmitFormLinkToLocation(link) {
- return this.shouldInterceptNavigation(link);
- }
- submittedFormLinkToLocation(link, _location, form) {
- const frame = this.findFrameElement(link);
- if (frame)
- form.setAttribute("data-turbo-frame", frame.id);
- }
- shouldInterceptLinkClick(element, _location, _event) {
- return this.shouldInterceptNavigation(element);
- }
- linkClickIntercepted(element, location) {
- this.navigateFrame(element, location);
- }
- willSubmitForm(element, submitter) {
- return element.closest("turbo-frame") == this.element && this.shouldInterceptNavigation(element, submitter);
- }
- formSubmitted(element, submitter) {
- if (this.formSubmission) {
- this.formSubmission.stop();
- }
- this.formSubmission = new FormSubmission(this, element, submitter);
- const { fetchRequest } = this.formSubmission;
- this.prepareRequest(fetchRequest);
- this.formSubmission.start();
- }
- prepareRequest(request) {
- var _a;
- request.headers["Turbo-Frame"] = this.id;
- if ((_a = this.currentNavigationElement) === null || _a === void 0 ? void 0 : _a.hasAttribute("data-turbo-stream")) {
- request.acceptResponseType(StreamMessage.contentType);
- }
- }
- requestStarted(_request) {
- markAsBusy(this.element);
- }
- requestPreventedHandlingResponse(_request, _response) {
- this.resolveVisitPromise();
- }
- async requestSucceededWithResponse(request, response) {
- await this.loadResponse(response);
- this.resolveVisitPromise();
- }
- async requestFailedWithResponse(request, response) {
- await this.loadResponse(response);
- this.resolveVisitPromise();
- }
- requestErrored(request, error) {
- console.error(error);
- this.resolveVisitPromise();
- }
- requestFinished(_request) {
- clearBusyState(this.element);
- }
- formSubmissionStarted({ formElement }) {
- markAsBusy(formElement, this.findFrameElement(formElement));
- }
- formSubmissionSucceededWithResponse(formSubmission, response) {
- const frame = this.findFrameElement(formSubmission.formElement, formSubmission.submitter);
- frame.delegate.proposeVisitIfNavigatedWithAction(frame, formSubmission.formElement, formSubmission.submitter);
- frame.delegate.loadResponse(response);
- if (!formSubmission.isSafe) {
- session.clearCache();
- }
- }
- formSubmissionFailedWithResponse(formSubmission, fetchResponse) {
- this.element.delegate.loadResponse(fetchResponse);
- session.clearCache();
- }
- formSubmissionErrored(formSubmission, error) {
- console.error(error);
- }
- formSubmissionFinished({ formElement }) {
- clearBusyState(formElement, this.findFrameElement(formElement));
- }
- allowsImmediateRender({ element: newFrame }, options) {
- const event = dispatch("turbo:before-frame-render", {
- target: this.element,
- detail: Object.assign({ newFrame }, options),
- cancelable: true,
- });
- const { defaultPrevented, detail: { render }, } = event;
- if (this.view.renderer && render) {
- this.view.renderer.renderElement = render;
- }
- return !defaultPrevented;
- }
- viewRenderedSnapshot(_snapshot, _isPreview) { }
- preloadOnLoadLinksForView(element) {
- session.preloadOnLoadLinksForView(element);
- }
- viewInvalidated() { }
- willRenderFrame(currentElement, _newElement) {
- this.previousFrameElement = currentElement.cloneNode(true);
- }
- async loadFrameResponse(fetchResponse, document) {
- const newFrameElement = await this.extractForeignFrameElement(document.body);
- if (newFrameElement) {
- const snapshot = new Snapshot(newFrameElement);
- const renderer = new FrameRenderer(this, this.view.snapshot, snapshot, FrameRenderer.renderElement, false, false);
- if (this.view.renderPromise)
- await this.view.renderPromise;
- this.changeHistory();
- await this.view.render(renderer);
- this.complete = true;
- session.frameRendered(fetchResponse, this.element);
- session.frameLoaded(this.element);
- this.fetchResponseLoaded(fetchResponse);
- }
- else if (this.willHandleFrameMissingFromResponse(fetchResponse)) {
- this.handleFrameMissingFromResponse(fetchResponse);
- }
- }
- async visit(url) {
- var _a;
- const request = new FetchRequest(this, FetchMethod.get, url, new URLSearchParams(), this.element);
- (_a = this.currentFetchRequest) === null || _a === void 0 ? void 0 : _a.cancel();
- this.currentFetchRequest = request;
- return new Promise((resolve) => {
- this.resolveVisitPromise = () => {
- this.resolveVisitPromise = () => { };
- this.currentFetchRequest = null;
- resolve();
- };
- request.perform();
- });
- }
- navigateFrame(element, url, submitter) {
- const frame = this.findFrameElement(element, submitter);
- frame.delegate.proposeVisitIfNavigatedWithAction(frame, element, submitter);
- this.withCurrentNavigationElement(element, () => {
- frame.src = url;
- });
- }
- proposeVisitIfNavigatedWithAction(frame, element, submitter) {
- this.action = getVisitAction(submitter, element, frame);
- if (this.action) {
- const pageSnapshot = PageSnapshot.fromElement(frame).clone();
- const { visitCachedSnapshot } = frame.delegate;
- frame.delegate.fetchResponseLoaded = (fetchResponse) => {
- if (frame.src) {
- const { statusCode, redirected } = fetchResponse;
- const responseHTML = frame.ownerDocument.documentElement.outerHTML;
- const response = { statusCode, redirected, responseHTML };
- const options = {
- response,
- visitCachedSnapshot,
- willRender: false,
- updateHistory: false,
- restorationIdentifier: this.restorationIdentifier,
- snapshot: pageSnapshot,
- };
- if (this.action)
- options.action = this.action;
- session.visit(frame.src, options);
- }
- };
- }
- }
- changeHistory() {
- if (this.action) {
- const method = getHistoryMethodForAction(this.action);
- session.history.update(method, expandURL(this.element.src || ""), this.restorationIdentifier);
- }
- }
- async handleUnvisitableFrameResponse(fetchResponse) {
- console.warn(`The response (${fetchResponse.statusCode}) from is performing a full page visit due to turbo-visit-control.`);
- await this.visitResponse(fetchResponse.response);
- }
- willHandleFrameMissingFromResponse(fetchResponse) {
- this.element.setAttribute("complete", "");
- const response = fetchResponse.response;
- const visit = async (url, options = {}) => {
- if (url instanceof Response) {
- this.visitResponse(url);
- }
- else {
- session.visit(url, options);
- }
- };
- const event = dispatch("turbo:frame-missing", {
- target: this.element,
- detail: { response, visit },
- cancelable: true,
- });
- return !event.defaultPrevented;
- }
- handleFrameMissingFromResponse(fetchResponse) {
- this.view.missing();
- this.throwFrameMissingError(fetchResponse);
- }
- throwFrameMissingError(fetchResponse) {
- const message = `The response (${fetchResponse.statusCode}) did not contain the expected and will be ignored. To perform a full page visit instead, set turbo-visit-control to reload.`;
- throw new TurboFrameMissingError(message);
- }
- async visitResponse(response) {
- const wrapped = new FetchResponse(response);
- const responseHTML = await wrapped.responseHTML;
- const { location, redirected, statusCode } = wrapped;
- return session.visit(location, { response: { redirected, statusCode, responseHTML } });
- }
- findFrameElement(element, submitter) {
- var _a;
- const id = getAttribute("data-turbo-frame", submitter, element) || this.element.getAttribute("target");
- return (_a = getFrameElementById(id)) !== null && _a !== void 0 ? _a : this.element;
- }
- async extractForeignFrameElement(container) {
- let element;
- const id = CSS.escape(this.id);
- try {
- element = activateElement(container.querySelector(`turbo-frame#${id}`), this.sourceURL);
- if (element) {
- return element;
- }
- element = activateElement(container.querySelector(`turbo-frame[src][recurse~=${id}]`), this.sourceURL);
- if (element) {
- await element.loaded;
- return await this.extractForeignFrameElement(element);
- }
- }
- catch (error) {
- console.error(error);
- return new FrameElement();
- }
- return null;
- }
- formActionIsVisitable(form, submitter) {
- const action = getAction(form, submitter);
- return locationIsVisitable(expandURL(action), this.rootLocation);
- }
- shouldInterceptNavigation(element, submitter) {
- const id = getAttribute("data-turbo-frame", submitter, element) || this.element.getAttribute("target");
- if (element instanceof HTMLFormElement && !this.formActionIsVisitable(element, submitter)) {
- return false;
- }
- if (!this.enabled || id == "_top") {
- return false;
- }
- if (id) {
- const frameElement = getFrameElementById(id);
- if (frameElement) {
- return !frameElement.disabled;
- }
- }
- if (!session.elementIsNavigatable(element)) {
- return false;
- }
- if (submitter && !session.elementIsNavigatable(submitter)) {
- return false;
- }
- return true;
- }
- get id() {
- return this.element.id;
- }
- get enabled() {
- return !this.element.disabled;
- }
- get sourceURL() {
- if (this.element.src) {
- return this.element.src;
- }
- }
- set sourceURL(sourceURL) {
- this.ignoringChangesToAttribute("src", () => {
- this.element.src = sourceURL !== null && sourceURL !== void 0 ? sourceURL : null;
- });
- }
- get loadingStyle() {
- return this.element.loading;
- }
- get isLoading() {
- return this.formSubmission !== undefined || this.resolveVisitPromise() !== undefined;
- }
- get complete() {
- return this.element.hasAttribute("complete");
- }
- set complete(value) {
- this.ignoringChangesToAttribute("complete", () => {
- if (value) {
- this.element.setAttribute("complete", "");
- }
- else {
- this.element.removeAttribute("complete");
- }
- });
- }
- get isActive() {
- return this.element.isActive && this.connected;
- }
- get rootLocation() {
- var _a;
- const meta = this.element.ownerDocument.querySelector(`meta[name="turbo-root"]`);
- const root = (_a = meta === null || meta === void 0 ? void 0 : meta.content) !== null && _a !== void 0 ? _a : "/";
- return expandURL(root);
- }
- isIgnoringChangesTo(attributeName) {
- return this.ignoredAttributes.has(attributeName);
- }
- ignoringChangesToAttribute(attributeName, callback) {
- this.ignoredAttributes.add(attributeName);
- callback();
- this.ignoredAttributes.delete(attributeName);
- }
- withCurrentNavigationElement(element, callback) {
- this.currentNavigationElement = element;
- callback();
- delete this.currentNavigationElement;
- }
-}
-function getFrameElementById(id) {
- if (id != null) {
- const element = document.getElementById(id);
- if (element instanceof FrameElement) {
- return element;
- }
- }
-}
-function activateElement(element, currentURL) {
- if (element) {
- const src = element.getAttribute("src");
- if (src != null && currentURL != null && urlsAreEqual(src, currentURL)) {
- throw new Error(`Matching element has a source URL which references itself`);
- }
- if (element.ownerDocument !== document) {
- element = document.importNode(element, true);
- }
- if (element instanceof FrameElement) {
- element.connectedCallback();
- element.disconnectedCallback();
- return element;
- }
- }
-}
-
-class StreamElement extends HTMLElement {
- static async renderElement(newElement) {
- await newElement.performAction();
- }
- async connectedCallback() {
- try {
- await this.render();
- }
- catch (error) {
- console.error(error);
- }
- finally {
- this.disconnect();
- }
- }
- async render() {
- var _a;
- return ((_a = this.renderPromise) !== null && _a !== void 0 ? _a : (this.renderPromise = (async () => {
- const event = this.beforeRenderEvent;
- if (this.dispatchEvent(event)) {
- await nextAnimationFrame();
- await event.detail.render(this);
- }
- })()));
- }
- disconnect() {
- try {
- this.remove();
- }
- catch (_a) { }
- }
- removeDuplicateTargetChildren() {
- this.duplicateChildren.forEach((c) => c.remove());
- }
- get duplicateChildren() {
- var _a;
- const existingChildren = this.targetElements.flatMap((e) => [...e.children]).filter((c) => !!c.id);
- const newChildrenIds = [...(((_a = this.templateContent) === null || _a === void 0 ? void 0 : _a.children) || [])].filter((c) => !!c.id).map((c) => c.id);
- return existingChildren.filter((c) => newChildrenIds.includes(c.id));
- }
- get performAction() {
- if (this.action) {
- const actionFunction = StreamActions[this.action];
- if (actionFunction) {
- return actionFunction;
- }
- this.raise("unknown action");
- }
- this.raise("action attribute is missing");
- }
- get targetElements() {
- if (this.target) {
- return this.targetElementsById;
- }
- else if (this.targets) {
- return this.targetElementsByQuery;
- }
- else {
- this.raise("target or targets attribute is missing");
- }
- }
- get templateContent() {
- return this.templateElement.content.cloneNode(true);
- }
- get templateElement() {
- if (this.firstElementChild === null) {
- const template = this.ownerDocument.createElement("template");
- this.appendChild(template);
- return template;
- }
- else if (this.firstElementChild instanceof HTMLTemplateElement) {
- return this.firstElementChild;
- }
- this.raise("first child element must be a element");
- }
- get action() {
- return this.getAttribute("action");
- }
- get target() {
- return this.getAttribute("target");
- }
- get targets() {
- return this.getAttribute("targets");
- }
- raise(message) {
- throw new Error(`${this.description}: ${message}`);
- }
- get description() {
- var _a, _b;
- return (_b = ((_a = this.outerHTML.match(/<[^>]+>/)) !== null && _a !== void 0 ? _a : [])[0]) !== null && _b !== void 0 ? _b : "";
- }
- get beforeRenderEvent() {
- return new CustomEvent("turbo:before-stream-render", {
- bubbles: true,
- cancelable: true,
- detail: { newStream: this, render: StreamElement.renderElement },
- });
- }
- get targetElementsById() {
- var _a;
- const element = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.getElementById(this.target);
- if (element !== null) {
- return [element];
- }
- else {
- return [];
- }
- }
- get targetElementsByQuery() {
- var _a;
- const elements = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.targets);
- if (elements.length !== 0) {
- return Array.prototype.slice.call(elements);
- }
- else {
- return [];
- }
- }
-}
-
-class StreamSourceElement extends HTMLElement {
- constructor() {
- super(...arguments);
- this.streamSource = null;
- }
- connectedCallback() {
- this.streamSource = this.src.match(/^ws{1,2}:/) ? new WebSocket(this.src) : new EventSource(this.src);
- connectStreamSource(this.streamSource);
- }
- disconnectedCallback() {
- if (this.streamSource) {
- disconnectStreamSource(this.streamSource);
- }
- }
- get src() {
- return this.getAttribute("src") || "";
- }
-}
-
-FrameElement.delegateConstructor = FrameController;
-if (customElements.get("turbo-frame") === undefined) {
- customElements.define("turbo-frame", FrameElement);
-}
-if (customElements.get("turbo-stream") === undefined) {
- customElements.define("turbo-stream", StreamElement);
-}
-if (customElements.get("turbo-stream-source") === undefined) {
- customElements.define("turbo-stream-source", StreamSourceElement);
-}
-
-(() => {
- let element = document.currentScript;
- if (!element)
- return;
- if (element.hasAttribute("data-turbo-suppress-warning"))
- return;
- element = element.parentElement;
- while (element) {
- if (element == document.body) {
- return console.warn(unindent `
- You are loading Turbo from a
diff --git a/resources/js/components/fieldtypes/ExampleFieldtype.vue b/resources/js/components/fieldtypes/ExampleFieldtype.vue
deleted file mode 100644
index 1293e4e..0000000
--- a/resources/js/components/fieldtypes/ExampleFieldtype.vue
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
diff --git a/resources/js/components/fieldtypes/ITunesCategory.vue b/resources/js/components/fieldtypes/ITunesCategory.vue
deleted file mode 100644
index fb7b36f..0000000
--- a/resources/js/components/fieldtypes/ITunesCategory.vue
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/resources/js/podcaster.js b/resources/js/podcaster.js
new file mode 100644
index 0000000..6f37c2f
--- /dev/null
+++ b/resources/js/podcaster.js
@@ -0,0 +1,65 @@
+import Plyr from 'plyr';
+import chroma from "chroma-js";
+
+export default class Podcaster {
+ static start() {
+ Alpine.store('ui', {
+ colors: chroma.scale([
+ window.primaryColor,
+ window.secondaryColor
+ ]).colors(5),
+ });
+
+ let plyr = new Plyr('audio', {
+ controls: ['play', 'rewind', 'progress', 'fast-forward', 'current-time', 'settings'],
+ iconUrl: '/vendor/starter-kit-podcaster/img/plyr-sprite.svg',
+ seekTime: 15
+ });
+
+ Alpine.store('player', {
+ plyr: null,
+ playing: false,
+ audio_file: null,
+ episode_url: null,
+ title: null,
+ show: false,
+ init() {
+ plyr.on('playing', event => {
+ Alpine.store('player').playing = true
+ });
+ plyr.on('pause', event => {
+ Alpine.store('player').playing = false
+ });
+ plyr.on('ended', event => {
+ Alpine.store('player').playing = false
+ });
+ },
+ playEpisode(title, audio_file, mime_type, episode_url) {
+ if (this.audio_file !== audio_file) {
+ plyr.source = {
+ type: 'audio',
+ title: title,
+ audio_file: audio_file,
+ sources: [{src: audio_file, type: mime_type}]
+ };
+ }
+ this.toggle(audio_file);
+ this.title = title;
+ this.audio_file = audio_file;
+ this.episode_url = episode_url;
+ this.show = true;
+ },
+ toggle(file) {
+ if (this.playing && file === this.audio_file) {
+ plyr.pause();
+
+ // Events not sent when calling pause programmatically
+ // after setting .source
+ Alpine.store('player').playing = false
+ return;
+ }
+ plyr.togglePlay()
+ },
+ });
+ }
+};
diff --git a/resources/js/site.js b/resources/js/site.js
deleted file mode 100644
index 0f85d75..0000000
--- a/resources/js/site.js
+++ /dev/null
@@ -1,61 +0,0 @@
-import Plyr from 'plyr';
-import chroma from "chroma-js";
-
-Alpine.store('ui', {
- colors: chroma.scale([
- window.primaryColor,
- window.secondaryColor
- ]).colors(5),
-});
-
-let plyr = new Plyr('audio', {
- controls: ['play', 'rewind', 'progress', 'fast-forward', 'current-time', 'settings'],
- iconUrl: '/img/plyr-sprite.svg',
- seekTime: 15
-});
-
-Alpine.store('player', {
- plyr: null,
- playing: false,
- audio_file: null,
- episode_url: null,
- title: null,
- show: false,
- init() {
- plyr.on('playing', event => {
- Alpine.store('player').playing = true
- });
- plyr.on('pause', event => {
- Alpine.store('player').playing = false
- });
- plyr.on('ended', event => {
- Alpine.store('player').playing = false
- });
- },
- playEpisode(title, audio_file, mime_type, episode_url) {
- if (this.audio_file !== audio_file) {
- plyr.source = {
- type: 'audio',
- title: title,
- audio_file: audio_file,
- sources: [{ src: audio_file, type: mime_type }]
- };
- }
- this.toggle(audio_file);
- this.title = title;
- this.audio_file = audio_file;
- this.episode_url = episode_url;
- this.show = true;
- },
- toggle(file) {
- if (this.playing && file === this.audio_file) {
- plyr.pause();
-
- // Events not sent when calling pause programmatically
- // after setting .source
- Alpine.store('player').playing = false
- return;
- }
- plyr.togglePlay()
- },
-});
diff --git a/resources/views/.gitkeep b/resources/views/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/resources/views/episodes/_card.antlers.html b/resources/views/episodes/_card.antlers.html
index 3f546d4..baba978 100644
--- a/resources/views/episodes/_card.antlers.html
+++ b/resources/views/episodes/_card.antlers.html
@@ -1,5 +1,5 @@
- {{ partial:play-button }}
+ {{ partial:podcaster::partials/play-button }}
{{ title | widont }}
diff --git a/resources/views/episodes/index.antlers.html b/resources/views/episodes/index.antlers.html
index b9d910f..df16c9a 100644
--- a/resources/views/episodes/index.antlers.html
+++ b/resources/views/episodes/index.antlers.html
@@ -3,7 +3,7 @@
{{ title }}
{{ collection:episodes sort="date:{podcast:type}" }}
- {{ partial:episodes/card }}
+ {{ partial:podcaster::episodes/card }}
{{ /collection:episodes }}
diff --git a/resources/views/episodes/show.antlers.html b/resources/views/episodes/show.antlers.html
index 2148195..d1079d4 100644
--- a/resources/views/episodes/show.antlers.html
+++ b/resources/views/episodes/show.antlers.html
@@ -2,11 +2,11 @@
{{ if podcast:explicit || explicit }}
-
+
{{ /if }}
{{ title | entities | widont }}
- {{ partial:play-button height="h-10" width="h-10" }}
+ {{ partial:podcaster::partials/play-button height="h-10" width="h-10" }}
{{ summary }}
diff --git a/resources/views/home.antlers.html b/resources/views/home.antlers.html
index 7a5b3c8..df90fd3 100644
--- a/resources/views/home.antlers.html
+++ b/resources/views/home.antlers.html
@@ -21,7 +21,7 @@
{{ podcast:title }}
Recent Episodes