diff --git a/.idea/caisse.iml b/.idea/caisse.iml index 6f6f83a4..0a9d1222 100644 --- a/.idea/caisse.iml +++ b/.idea/caisse.iml @@ -11,8 +11,6 @@ - - diff --git a/.idea/php.xml b/.idea/php.xml index c2b10e30..6c03fce2 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -94,7 +94,6 @@ - @@ -112,7 +111,6 @@ - diff --git a/.idea/workspace.xml b/.idea/workspace.xml index d7042930..a310db71 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -20,9 +20,54 @@ + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -135,7 +180,6 @@ - @@ -153,7 +197,6 @@ - @@ -243,7 +286,7 @@ - + @@ -252,17 +295,18 @@ + - + + - @@ -288,7 +332,7 @@ - + @@ -336,14 +380,14 @@ - + - + - + - + \ No newline at end of file diff --git a/assets/app.js b/assets/app.js index bb0a6aa1..2b5d7908 100644 --- a/assets/app.js +++ b/assets/app.js @@ -6,7 +6,7 @@ */ // any CSS you import will output into a single css file (app.css in this case) -import './styles/app.css'; +import './styles/app.scss'; // start the Stimulus application import './bootstrap'; diff --git a/assets/img/accessories.jpg b/assets/img/accessories.jpg new file mode 100755 index 00000000..c2539475 Binary files /dev/null and b/assets/img/accessories.jpg differ diff --git a/assets/img/bg.jpg b/assets/img/bg.jpg new file mode 100755 index 00000000..5130f186 Binary files /dev/null and b/assets/img/bg.jpg differ diff --git a/assets/img/girl_computer.jpg b/assets/img/girl_computer.jpg new file mode 100755 index 00000000..74ec2e10 Binary files /dev/null and b/assets/img/girl_computer.jpg differ diff --git a/public/assets/img/logo_cipherbliss.png b/assets/img/logo_cipherbliss.png similarity index 100% rename from public/assets/img/logo_cipherbliss.png rename to assets/img/logo_cipherbliss.png diff --git a/assets/styles/app.scss b/assets/styles/app.scss index 4f7927a6..680a3397 100755 --- a/assets/styles/app.scss +++ b/assets/styles/app.scss @@ -10,4 +10,4 @@ @import 'pages/history'; @import 'pages/dashboard'; @import 'pages/special'; -@import 'pages/responsive'; +//@import 'pages/responsive'; diff --git a/assets/styles/global.scss b/assets/styles/global.scss index afa390ba..53d29327 100755 --- a/assets/styles/global.scss +++ b/assets/styles/global.scss @@ -1,4 +1,4 @@ $brand-primary: darken(#428bca, 20%); // the ~ allows you to reference things in node_modules -@import '~bootstrap-sass/assets/stylesheets/bootstrap'; \ No newline at end of file +//@import '~bootstrap-sass/assets/stylesheets/bootstrap'; \ No newline at end of file diff --git a/assets/styles/pages/global.scss b/assets/styles/pages/global.scss index acf04b3f..be69631e 100755 --- a/assets/styles/pages/global.scss +++ b/assets/styles/pages/global.scss @@ -1,6 +1,8 @@ @import '../split/custom_vars'; body { + margin: 0; + padding: 0; color: $all-text-color; font-family: "Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 1rem; diff --git a/assets/styles/pages/libs.scss b/assets/styles/pages/libs.scss index 7ae5a10c..52008985 100755 --- a/assets/styles/pages/libs.scss +++ b/assets/styles/pages/libs.scss @@ -1,4 +1,4 @@ -@import '~font-awesome/css/font-awesome.css'; -@import '~bootstrap-sass/assets/stylesheets/bootstrap'; -@import '~intro.js/minified/introjs.min.css'; -@import '~intro.js/themes/introjs-dark.css'; +//@import '~font-awesome/css/font-awesome.css'; +//@import '~bootstrap-sass/assets/stylesheets/bootstrap'; +//@import '~intro.js/minified/introjs.min.css'; +//@import '~intro.js/themes/introjs-dark.css'; diff --git a/composer.lock b/composer.lock index 4c092d01..4331b0d0 100644 --- a/composer.lock +++ b/composer.lock @@ -177,32 +177,34 @@ }, { "name": "doctrine/collections", - "version": "1.8.0", + "version": "2.1.2", "source": { "type": "git", "url": "https://github.com/doctrine/collections.git", - "reference": "2b44dd4cbca8b5744327de78bafef5945c7e7b5e" + "reference": "db8cda536a034337f7dd63febecc713d4957f9ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/2b44dd4cbca8b5744327de78bafef5945c7e7b5e", - "reference": "2b44dd4cbca8b5744327de78bafef5945c7e7b5e", + "url": "https://api.github.com/repos/doctrine/collections/zipball/db8cda536a034337f7dd63febecc713d4957f9ee", + "reference": "db8cda536a034337f7dd63febecc713d4957f9ee", "shasum": "" }, "require": { - "doctrine/deprecations": "^0.5.3 || ^1", - "php": "^7.1.3 || ^8.0" + "doctrine/deprecations": "^1", + "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^9.0 || ^10.0", - "phpstan/phpstan": "^1.4.8", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.1.5", + "doctrine/coding-standard": "^10.0", + "ext-json": "*", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5", "vimeo/psalm": "^4.22" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections" + "Doctrine\\Common\\Collections\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -241,9 +243,23 @@ ], "support": { "issues": "https://github.com/doctrine/collections/issues", - "source": "https://github.com/doctrine/collections/tree/1.8.0" + "source": "https://github.com/doctrine/collections/tree/2.1.2" }, - "time": "2022-09-01T20:12:10+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcollections", + "type": "tidelift" + } + ], + "time": "2022-12-27T23:41:38+00:00" }, { "name": "doctrine/common", @@ -338,16 +354,16 @@ }, { "name": "doctrine/dbal", - "version": "3.6.3", + "version": "3.6.4", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "9a747d29e7e6b39509b8f1847e37a23a0163ea6a" + "reference": "19f0dec95edd6a3c3c5ff1d188ea94c6b7fc903f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/9a747d29e7e6b39509b8f1847e37a23a0163ea6a", - "reference": "9a747d29e7e6b39509b8f1847e37a23a0163ea6a", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/19f0dec95edd6a3c3c5ff1d188ea94c6b7fc903f", + "reference": "19f0dec95edd6a3c3c5ff1d188ea94c6b7fc903f", "shasum": "" }, "require": { @@ -430,7 +446,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.6.3" + "source": "https://github.com/doctrine/dbal/tree/3.6.4" }, "funding": [ { @@ -446,7 +462,7 @@ "type": "tidelift" } ], - "time": "2023-06-01T05:46:46+00:00" + "time": "2023-06-15T07:40:12+00:00" }, { "name": "doctrine/deprecations", @@ -497,16 +513,16 @@ }, { "name": "doctrine/doctrine-bundle", - "version": "2.10.0", + "version": "2.10.1", "source": { "type": "git", "url": "https://github.com/doctrine/DoctrineBundle.git", - "reference": "b2ec6c2668f6dc514e8bf51257d19c7c19398afe" + "reference": "f9d59c90b6f525dfc2a2064a695cb56e0ab40311" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/b2ec6c2668f6dc514e8bf51257d19c7c19398afe", - "reference": "b2ec6c2668f6dc514e8bf51257d19c7c19398afe", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/f9d59c90b6f525dfc2a2064a695cb56e0ab40311", + "reference": "f9d59c90b6f525dfc2a2064a695cb56e0ab40311", "shasum": "" }, "require": { @@ -593,7 +609,7 @@ ], "support": { "issues": "https://github.com/doctrine/DoctrineBundle/issues", - "source": "https://github.com/doctrine/DoctrineBundle/tree/2.10.0" + "source": "https://github.com/doctrine/DoctrineBundle/tree/2.10.1" }, "funding": [ { @@ -609,7 +625,7 @@ "type": "tidelift" } ], - "time": "2023-06-05T14:43:41+00:00" + "time": "2023-06-28T07:47:41+00:00" }, { "name": "doctrine/doctrine-migrations-bundle", @@ -698,30 +714,29 @@ }, { "name": "doctrine/event-manager", - "version": "1.2.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/event-manager.git", - "reference": "95aa4cb529f1e96576f3fda9f5705ada4056a520" + "reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/event-manager/zipball/95aa4cb529f1e96576f3fda9f5705ada4056a520", - "reference": "95aa4cb529f1e96576f3fda9f5705ada4056a520", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/750671534e0241a7c50ea5b43f67e23eb5c96f32", + "reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32", "shasum": "" }, "require": { - "doctrine/deprecations": "^0.5.3 || ^1", - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "conflict": { "doctrine/common": "<2.9" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "~1.4.10 || ^1.8.8", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.24" + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.8.8", + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^4.28" }, "type": "library", "autoload": { @@ -770,7 +785,7 @@ ], "support": { "issues": "https://github.com/doctrine/event-manager/issues", - "source": "https://github.com/doctrine/event-manager/tree/1.2.0" + "source": "https://github.com/doctrine/event-manager/tree/2.0.0" }, "funding": [ { @@ -786,7 +801,7 @@ "type": "tidelift" } ], - "time": "2022-10-12T20:51:15+00:00" + "time": "2022-10-12T20:59:15+00:00" }, { "name": "doctrine/inflector", @@ -881,30 +896,30 @@ }, { "name": "doctrine/instantiator", - "version": "1.5.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^11", + "doctrine/coding-standard": "^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" }, "type": "library", "autoload": { @@ -931,7 +946,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" }, "funding": [ { @@ -947,7 +962,7 @@ "type": "tidelift" } ], - "time": "2022-12-30T00:15:36+00:00" + "time": "2022-12-30T00:23:10+00:00" }, { "name": "doctrine/lexer", @@ -1029,16 +1044,16 @@ }, { "name": "doctrine/migrations", - "version": "3.5.5", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/doctrine/migrations.git", - "reference": "4b1e2b6ba71d21d0c5be22ed03b6fc954d20b204" + "reference": "e542ad8bcd606d7a18d0875babb8a6d963c9c059" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/migrations/zipball/4b1e2b6ba71d21d0c5be22ed03b6fc954d20b204", - "reference": "4b1e2b6ba71d21d0c5be22ed03b6fc954d20b204", + "url": "https://api.github.com/repos/doctrine/migrations/zipball/e542ad8bcd606d7a18d0875babb8a6d963c9c059", + "reference": "e542ad8bcd606d7a18d0875babb8a6d963c9c059", "shasum": "" }, "require": { @@ -1046,11 +1061,11 @@ "doctrine/dbal": "^3.5.1", "doctrine/deprecations": "^0.5.3 || ^1", "doctrine/event-manager": "^1.2 || ^2.0", - "friendsofphp/proxy-manager-lts": "^1.0", - "php": "^7.4 || ^8.0", + "php": "^8.1", "psr/log": "^1.1.3 || ^2 || ^3", "symfony/console": "^4.4.16 || ^5.4 || ^6.0", - "symfony/stopwatch": "^4.4 || ^5.4 || ^6.0" + "symfony/stopwatch": "^4.4 || ^5.4 || ^6.0", + "symfony/var-exporter": "^6.2" }, "conflict": { "doctrine/orm": "<2.12" @@ -1066,7 +1081,7 @@ "phpstan/phpstan-phpunit": "^1.1", "phpstan/phpstan-strict-rules": "^1.1", "phpstan/phpstan-symfony": "^1.1", - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^9.5.24", "symfony/cache": "^4.4 || ^5.4 || ^6.0", "symfony/process": "^4.4 || ^5.4 || ^6.0", "symfony/yaml": "^4.4 || ^5.4 || ^6.0" @@ -1111,7 +1126,7 @@ ], "support": { "issues": "https://github.com/doctrine/migrations/issues", - "source": "https://github.com/doctrine/migrations/tree/3.5.5" + "source": "https://github.com/doctrine/migrations/tree/3.6.0" }, "funding": [ { @@ -1127,20 +1142,20 @@ "type": "tidelift" } ], - "time": "2023-01-18T12:44:30+00:00" + "time": "2023-02-15T18:49:46+00:00" }, { "name": "doctrine/orm", - "version": "2.15.2", + "version": "2.15.3", "source": { "type": "git", "url": "https://github.com/doctrine/orm.git", - "reference": "bf449bef7ddc47e62c22f9a06dacc1736abe1c0b" + "reference": "4c3bd208018c26498e5f682aaad45fa00ea307d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/orm/zipball/bf449bef7ddc47e62c22f9a06dacc1736abe1c0b", - "reference": "bf449bef7ddc47e62c22f9a06dacc1736abe1c0b", + "url": "https://api.github.com/repos/doctrine/orm/zipball/4c3bd208018c26498e5f682aaad45fa00ea307d5", + "reference": "4c3bd208018c26498e5f682aaad45fa00ea307d5", "shasum": "" }, "require": { @@ -1169,14 +1184,14 @@ "doctrine/annotations": "^1.13 || ^2", "doctrine/coding-standard": "^9.0.2 || ^12.0", "phpbench/phpbench": "^0.16.10 || ^1.0", - "phpstan/phpstan": "~1.4.10 || 1.10.14", + "phpstan/phpstan": "~1.4.10 || 1.10.18", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6", "psr/log": "^1 || ^2 || ^3", "squizlabs/php_codesniffer": "3.7.2", "symfony/cache": "^4.4 || ^5.4 || ^6.0", "symfony/var-exporter": "^4.4 || ^5.4 || ^6.2", "symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0", - "vimeo/psalm": "4.30.0 || 5.11.0" + "vimeo/psalm": "4.30.0 || 5.12.0" }, "suggest": { "ext-dom": "Provides support for XSD validation for XML mapping files", @@ -1226,9 +1241,9 @@ ], "support": { "issues": "https://github.com/doctrine/orm/issues", - "source": "https://github.com/doctrine/orm/tree/2.15.2" + "source": "https://github.com/doctrine/orm/tree/2.15.3" }, - "time": "2023-06-01T09:35:50+00:00" + "time": "2023-06-22T12:36:06+00:00" }, { "name": "doctrine/persistence", @@ -1382,16 +1397,16 @@ }, { "name": "easycorp/easyadmin-bundle", - "version": "v4.6.6", + "version": "v4.7.0", "source": { "type": "git", "url": "https://github.com/EasyCorp/EasyAdminBundle.git", - "reference": "ef10d412109429cf47bb5a406bbba6a256255350" + "reference": "17562010c5c7d160a5059c7f70b2c7e03f149d40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/EasyCorp/EasyAdminBundle/zipball/ef10d412109429cf47bb5a406bbba6a256255350", - "reference": "ef10d412109429cf47bb5a406bbba6a256255350", + "url": "https://api.github.com/repos/EasyCorp/EasyAdminBundle/zipball/17562010c5c7d160a5059c7f70b2c7e03f149d40", + "reference": "17562010c5c7d160a5059c7f70b2c7e03f149d40", "shasum": "" }, "require": { @@ -1464,7 +1479,7 @@ ], "support": { "issues": "https://github.com/EasyCorp/EasyAdminBundle/issues", - "source": "https://github.com/EasyCorp/EasyAdminBundle/tree/v4.6.6" + "source": "https://github.com/EasyCorp/EasyAdminBundle/tree/v4.7.0" }, "funding": [ { @@ -1472,30 +1487,30 @@ "type": "github" } ], - "time": "2023-05-30T18:19:51+00:00" + "time": "2023-06-26T18:40:07+00:00" }, { "name": "egulias/email-validator", - "version": "3.2.6", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7" + "reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7", - "reference": "e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/3a85486b709bc384dae8eb78fb2eec649bdb64ff", + "reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff", "shasum": "" }, "require": { - "doctrine/lexer": "^1.2|^2", - "php": ">=7.2", - "symfony/polyfill-intl-idn": "^1.15" + "doctrine/lexer": "^2.0 || ^3.0", + "php": ">=8.1", + "symfony/polyfill-intl-idn": "^1.26" }, "require-dev": { - "phpunit/phpunit": "^8.5.8|^9.3.3", - "vimeo/psalm": "^4" + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^4.30" }, "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" @@ -1503,7 +1518,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0.x-dev" } }, "autoload": { @@ -1531,7 +1546,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/3.2.6" + "source": "https://github.com/egulias/EmailValidator/tree/4.0.1" }, "funding": [ { @@ -1539,155 +1554,7 @@ "type": "github" } ], - "time": "2023-06-01T07:04:22+00:00" - }, - { - "name": "friendsofphp/proxy-manager-lts", - "version": "v1.0.16", - "source": { - "type": "git", - "url": "https://github.com/FriendsOfPHP/proxy-manager-lts.git", - "reference": "ecadbdc9052e4ad08c60c8a02268712e50427f7c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/proxy-manager-lts/zipball/ecadbdc9052e4ad08c60c8a02268712e50427f7c", - "reference": "ecadbdc9052e4ad08c60c8a02268712e50427f7c", - "shasum": "" - }, - "require": { - "laminas/laminas-code": "~3.4.1|^4.0", - "php": ">=7.1", - "symfony/filesystem": "^4.4.17|^5.0|^6.0|^7.0" - }, - "conflict": { - "laminas/laminas-stdlib": "<3.2.1", - "zendframework/zend-stdlib": "<3.2.1" - }, - "replace": { - "ocramius/proxy-manager": "^2.1" - }, - "require-dev": { - "ext-phar": "*", - "symfony/phpunit-bridge": "^5.4|^6.0|^7.0" - }, - "type": "library", - "extra": { - "thanks": { - "name": "ocramius/proxy-manager", - "url": "https://github.com/Ocramius/ProxyManager" - } - }, - "autoload": { - "psr-4": { - "ProxyManager\\": "src/ProxyManager" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - } - ], - "description": "Adding support for a wider range of PHP versions to ocramius/proxy-manager", - "homepage": "https://github.com/FriendsOfPHP/proxy-manager-lts", - "keywords": [ - "aop", - "lazy loading", - "proxy", - "proxy pattern", - "service proxies" - ], - "support": { - "issues": "https://github.com/FriendsOfPHP/proxy-manager-lts/issues", - "source": "https://github.com/FriendsOfPHP/proxy-manager-lts/tree/v1.0.16" - }, - "funding": [ - { - "url": "https://github.com/Ocramius", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/ocramius/proxy-manager", - "type": "tidelift" - } - ], - "time": "2023-05-24T07:17:17+00:00" - }, - { - "name": "laminas/laminas-code", - "version": "4.7.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-code.git", - "reference": "91aabc066d5620428120800c0eafc0411e441a62" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-code/zipball/91aabc066d5620428120800c0eafc0411e441a62", - "reference": "91aabc066d5620428120800c0eafc0411e441a62", - "shasum": "" - }, - "require": { - "php": ">=7.4, <8.2" - }, - "require-dev": { - "doctrine/annotations": "^1.13.2", - "ext-phar": "*", - "laminas/laminas-coding-standard": "^2.3.0", - "laminas/laminas-stdlib": "^3.6.1", - "phpunit/phpunit": "^9.5.10", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.13.1" - }, - "suggest": { - "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features", - "laminas/laminas-stdlib": "Laminas\\Stdlib component" - }, - "type": "library", - "autoload": { - "files": [ - "polyfill/ReflectionEnumPolyfill.php" - ], - "psr-4": { - "Laminas\\Code\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Extensions to the PHP Reflection API, static code scanning, and code generation", - "homepage": "https://laminas.dev", - "keywords": [ - "code", - "laminas", - "laminasframework" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-code/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-code/issues", - "rss": "https://github.com/laminas/laminas-code/releases.atom", - "source": "https://github.com/laminas/laminas-code" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2022-11-21T01:32:31+00:00" + "time": "2023-01-14T14:17:03+00:00" }, { "name": "monolog/monolog", @@ -2428,29 +2295,26 @@ }, { "name": "symfony/cache-contracts", - "version": "v3.0.2", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/cache-contracts.git", - "reference": "1c0a181c9ee221afe4fa55b2d13fc63c5ae14348" + "reference": "ad945640ccc0ae6e208bcea7d7de4b39b569896b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/1c0a181c9ee221afe4fa55b2d13fc63c5ae14348", - "reference": "1c0a181c9ee221afe4fa55b2d13fc63c5ae14348", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/ad945640ccc0ae6e208bcea7d7de4b39b569896b", + "reference": "ad945640ccc0ae6e208bcea7d7de4b39b569896b", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "psr/cache": "^3.0" }, - "suggest": { - "symfony/cache-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -2487,7 +2351,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/cache-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/cache-contracts/tree/v3.3.0" }, "funding": [ { @@ -2503,7 +2367,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/config", @@ -2768,25 +2632,25 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.2", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -2815,7 +2679,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" }, "funding": [ { @@ -2831,7 +2695,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/doctrine-bridge", @@ -3246,29 +3110,26 @@ }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.0.2", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "7bc61cc2db649b4637d331240c5346dcc7708051" + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7bc61cc2db649b4637d331240c5346dcc7708051", - "reference": "7bc61cc2db649b4637d331240c5346dcc7708051", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "psr/event-dispatcher": "^1" }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -3305,7 +3166,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.3.0" }, "funding": [ { @@ -3321,7 +3182,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/expression-language", @@ -3911,28 +3772,25 @@ }, { "name": "symfony/http-client-contracts", - "version": "v3.0.2", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "4184b9b63af1edaf35b6a7974c6f1f9f33294129" + "reference": "3b66325d0176b4ec826bffab57c9037d759c31fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/4184b9b63af1edaf35b6a7974c6f1f9f33294129", - "reference": "4184b9b63af1edaf35b6a7974c6f1f9f33294129", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/3b66325d0176b4ec826bffab57c9037d759c31fb", + "reference": "3b66325d0176b4ec826bffab57c9037d759c31fb", "shasum": "" }, "require": { - "php": ">=8.0.2" - }, - "suggest": { - "symfony/http-client-implementation": "" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -3942,7 +3800,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\HttpClient\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3969,7 +3830,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/http-client-contracts/tree/v3.3.0" }, "funding": [ { @@ -3985,7 +3846,7 @@ "type": "tidelift" } ], - "time": "2022-04-12T16:11:42+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/http-foundation", @@ -6294,32 +6155,29 @@ }, { "name": "symfony/service-contracts", - "version": "v3.0.2", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66" + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d78d39c1599bd1188b8e26bb341da52c3c6d8a66", - "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "psr/container": "^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" }, - "suggest": { - "symfony/service-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -6329,7 +6187,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -6356,7 +6217,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" }, "funding": [ { @@ -6372,7 +6233,7 @@ "type": "tidelift" } ], - "time": "2022-05-30T19:17:58+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/stopwatch", @@ -6618,28 +6479,25 @@ }, { "name": "symfony/translation-contracts", - "version": "v3.0.2", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "acbfbb274e730e5a0236f619b6168d9dedb3e282" + "reference": "02c24deb352fb0d79db5486c0c79905a85e37e86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/acbfbb274e730e5a0236f619b6168d9dedb3e282", - "reference": "acbfbb274e730e5a0236f619b6168d9dedb3e282", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/02c24deb352fb0d79db5486c0c79905a85e37e86", + "reference": "02c24deb352fb0d79db5486c0c79905a85e37e86", "shasum": "" }, "require": { - "php": ">=8.0.2" - }, - "suggest": { - "symfony/translation-implementation": "" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -6649,7 +6507,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Translation\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -6676,7 +6537,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/translation-contracts/tree/v3.3.0" }, "funding": [ { @@ -6692,7 +6553,7 @@ "type": "tidelift" } ], - "time": "2022-06-27T17:10:44+00:00" + "time": "2023-05-30T17:17:10+00:00" }, { "name": "symfony/twig-bridge", @@ -7173,20 +7034,20 @@ }, { "name": "symfony/var-exporter", - "version": "v6.0.19", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "df56f53818c2d5d9f683f4ad2e365ba73a3b69d2" + "reference": "db5416d04269f2827d8c54331ba4cfa42620d350" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/df56f53818c2d5d9f683f4ad2e365ba73a3b69d2", - "reference": "df56f53818c2d5d9f683f4ad2e365ba73a3b69d2", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/db5416d04269f2827d8c54331ba4cfa42620d350", + "reference": "db5416d04269f2827d8c54331ba4cfa42620d350", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "require-dev": { "symfony/var-dumper": "^5.4|^6.0" @@ -7222,10 +7083,12 @@ "export", "hydrate", "instantiate", + "lazy-loading", + "proxy", "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v6.0.19" + "source": "https://github.com/symfony/var-exporter/tree/v6.3.0" }, "funding": [ { @@ -7241,7 +7104,7 @@ "type": "tidelift" } ], - "time": "2023-01-13T08:34:10+00:00" + "time": "2023-04-21T08:48:44+00:00" }, { "name": "symfony/web-link", @@ -7742,16 +7605,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.5", + "version": "v4.16.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e" + "reference": "19526a33fb561ef417e822e85f08a00db4059c17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", + "reference": "19526a33fb561ef417e822e85f08a00db4059c17", "shasum": "" }, "require": { @@ -7792,9 +7655,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" }, - "time": "2023-05-19T20:20:00+00:00" + "time": "2023-06-25T14:52:30+00:00" }, { "name": "phar-io/manifest", @@ -9674,16 +9537,16 @@ }, { "name": "symfony/phpunit-bridge", - "version": "v6.3.0", + "version": "v6.3.1", "source": { "type": "git", "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "f8d75b4d9bf7243979b2c2e5e6cd73f03e10579f" + "reference": "0b0bf59b0d9bd1422145a123a67fb12af546ef0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/f8d75b4d9bf7243979b2c2e5e6cd73f03e10579f", - "reference": "f8d75b4d9bf7243979b2c2e5e6cd73f03e10579f", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/0b0bf59b0d9bd1422145a123a67fb12af546ef0d", + "reference": "0b0bf59b0d9bd1422145a123a67fb12af546ef0d", "shasum": "" }, "require": { @@ -9735,7 +9598,7 @@ "description": "Provides utilities for PHPUnit, especially user deprecation notices management", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/phpunit-bridge/tree/v6.3.0" + "source": "https://github.com/symfony/phpunit-bridge/tree/v6.3.1" }, "funding": [ { @@ -9751,7 +9614,7 @@ "type": "tidelift" } ], - "time": "2023-05-30T09:01:24+00:00" + "time": "2023-06-23T13:25:16+00:00" }, { "name": "symfony/web-profiler-bundle", diff --git a/public/css/app.scss b/public/assets/css/app.scss similarity index 100% rename from public/css/app.scss rename to public/assets/css/app.scss diff --git a/public/css/fonts/all.scss b/public/assets/css/fonts/all.scss similarity index 100% rename from public/css/fonts/all.scss rename to public/assets/css/fonts/all.scss diff --git a/public/css/fonts/source-sans-pro/SIL Open Font License.txt b/public/assets/css/fonts/source-sans-pro/SIL Open Font License.txt similarity index 100% rename from public/css/fonts/source-sans-pro/SIL Open Font License.txt rename to public/assets/css/fonts/source-sans-pro/SIL Open Font License.txt diff --git a/public/css/fonts/source-sans-pro/SourceSansPro-Black.otf b/public/assets/css/fonts/source-sans-pro/SourceSansPro-Black.otf similarity index 100% rename from public/css/fonts/source-sans-pro/SourceSansPro-Black.otf rename to public/assets/css/fonts/source-sans-pro/SourceSansPro-Black.otf diff --git a/public/css/fonts/source-sans-pro/SourceSansPro-BlackIt.otf b/public/assets/css/fonts/source-sans-pro/SourceSansPro-BlackIt.otf similarity index 100% rename from public/css/fonts/source-sans-pro/SourceSansPro-BlackIt.otf rename to public/assets/css/fonts/source-sans-pro/SourceSansPro-BlackIt.otf diff --git a/public/css/fonts/source-sans-pro/SourceSansPro-Bold.otf b/public/assets/css/fonts/source-sans-pro/SourceSansPro-Bold.otf similarity index 100% rename from public/css/fonts/source-sans-pro/SourceSansPro-Bold.otf rename to public/assets/css/fonts/source-sans-pro/SourceSansPro-Bold.otf diff --git a/public/css/fonts/source-sans-pro/SourceSansPro-BoldIt.otf b/public/assets/css/fonts/source-sans-pro/SourceSansPro-BoldIt.otf similarity index 100% rename from public/css/fonts/source-sans-pro/SourceSansPro-BoldIt.otf rename to public/assets/css/fonts/source-sans-pro/SourceSansPro-BoldIt.otf diff --git a/public/css/fonts/source-sans-pro/SourceSansPro-ExtraLight.otf b/public/assets/css/fonts/source-sans-pro/SourceSansPro-ExtraLight.otf similarity index 100% rename from public/css/fonts/source-sans-pro/SourceSansPro-ExtraLight.otf rename to public/assets/css/fonts/source-sans-pro/SourceSansPro-ExtraLight.otf diff --git a/public/css/fonts/source-sans-pro/SourceSansPro-ExtraLightIt.otf b/public/assets/css/fonts/source-sans-pro/SourceSansPro-ExtraLightIt.otf similarity index 100% rename from public/css/fonts/source-sans-pro/SourceSansPro-ExtraLightIt.otf rename to public/assets/css/fonts/source-sans-pro/SourceSansPro-ExtraLightIt.otf diff --git a/public/css/fonts/source-sans-pro/SourceSansPro-It.otf b/public/assets/css/fonts/source-sans-pro/SourceSansPro-It.otf similarity index 100% rename from public/css/fonts/source-sans-pro/SourceSansPro-It.otf rename to public/assets/css/fonts/source-sans-pro/SourceSansPro-It.otf diff --git a/public/css/fonts/source-sans-pro/SourceSansPro-Light.otf b/public/assets/css/fonts/source-sans-pro/SourceSansPro-Light.otf similarity index 100% rename from public/css/fonts/source-sans-pro/SourceSansPro-Light.otf rename to public/assets/css/fonts/source-sans-pro/SourceSansPro-Light.otf diff --git a/public/css/fonts/source-sans-pro/SourceSansPro-LightIt.otf b/public/assets/css/fonts/source-sans-pro/SourceSansPro-LightIt.otf similarity index 100% rename from public/css/fonts/source-sans-pro/SourceSansPro-LightIt.otf rename to public/assets/css/fonts/source-sans-pro/SourceSansPro-LightIt.otf diff --git a/public/css/fonts/source-sans-pro/SourceSansPro-Regular.otf b/public/assets/css/fonts/source-sans-pro/SourceSansPro-Regular.otf similarity index 100% rename from public/css/fonts/source-sans-pro/SourceSansPro-Regular.otf rename to public/assets/css/fonts/source-sans-pro/SourceSansPro-Regular.otf diff --git a/public/css/fonts/source-sans-pro/SourceSansPro-Semibold.otf b/public/assets/css/fonts/source-sans-pro/SourceSansPro-Semibold.otf similarity index 100% rename from public/css/fonts/source-sans-pro/SourceSansPro-Semibold.otf rename to public/assets/css/fonts/source-sans-pro/SourceSansPro-Semibold.otf diff --git a/public/css/fonts/source-sans-pro/SourceSansPro-SemiboldIt.otf b/public/assets/css/fonts/source-sans-pro/SourceSansPro-SemiboldIt.otf similarity index 100% rename from public/css/fonts/source-sans-pro/SourceSansPro-SemiboldIt.otf rename to public/assets/css/fonts/source-sans-pro/SourceSansPro-SemiboldIt.otf diff --git a/public/css/global.scss b/public/assets/css/global.scss similarity index 100% rename from public/css/global.scss rename to public/assets/css/global.scss diff --git a/public/css/pages/_dashboard.scss b/public/assets/css/pages/_dashboard.scss similarity index 100% rename from public/css/pages/_dashboard.scss rename to public/assets/css/pages/_dashboard.scss diff --git a/public/css/pages/_history.scss b/public/assets/css/pages/_history.scss similarity index 100% rename from public/css/pages/_history.scss rename to public/assets/css/pages/_history.scss diff --git a/public/css/pages/demo.scss b/public/assets/css/pages/demo.scss similarity index 100% rename from public/css/pages/demo.scss rename to public/assets/css/pages/demo.scss diff --git a/public/css/pages/global.scss b/public/assets/css/pages/global.scss similarity index 99% rename from public/css/pages/global.scss rename to public/assets/css/pages/global.scss index 36378df0..2812ea6b 100755 --- a/public/css/pages/global.scss +++ b/public/assets/css/pages/global.scss @@ -6,6 +6,7 @@ body { font-size: 1rem; line-height: 2rem; } + #wrapper { min-height: 100vh; } diff --git a/public/css/pages/home.scss b/public/assets/css/pages/home.scss similarity index 100% rename from public/css/pages/home.scss rename to public/assets/css/pages/home.scss diff --git a/public/css/pages/libs.scss b/public/assets/css/pages/libs.scss similarity index 100% rename from public/css/pages/libs.scss rename to public/assets/css/pages/libs.scss diff --git a/public/css/pages/responsive.scss b/public/assets/css/pages/responsive.scss similarity index 100% rename from public/css/pages/responsive.scss rename to public/assets/css/pages/responsive.scss diff --git a/public/css/pages/special.scss b/public/assets/css/pages/special.scss similarity index 100% rename from public/css/pages/special.scss rename to public/assets/css/pages/special.scss diff --git a/public/css/split/custom_vars.scss b/public/assets/css/split/custom_vars.scss similarity index 100% rename from public/css/split/custom_vars.scss rename to public/assets/css/split/custom_vars.scss diff --git a/public/css/split/formulaires.scss b/public/assets/css/split/formulaires.scss similarity index 100% rename from public/css/split/formulaires.scss rename to public/assets/css/split/formulaires.scss diff --git a/public/css/split/override_libs.scss b/public/assets/css/split/override_libs.scss similarity index 100% rename from public/css/split/override_libs.scss rename to public/assets/css/split/override_libs.scss diff --git a/public/css/split/typo.scss b/public/assets/css/split/typo.scss similarity index 100% rename from public/css/split/typo.scss rename to public/assets/css/split/typo.scss diff --git a/public/build/app.css b/public/build/app.css index 828ec2fa..9b1caca8 100644 --- a/public/build/app.css +++ b/public/build/app.css @@ -1,9 +1,585 @@ -/*!**************************************************************************************************************!*\ - !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[1].use[1]!./assets/styles/app.css ***! - \**************************************************************************************************************/ -body { - background-color: lightgray; +/*!***************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].oneOf[1].use[1]!./node_modules/resolve-url-loader/index.js??ruleSet[1].rules[4].oneOf[1].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].oneOf[1].use[3]!./assets/styles/app.scss ***! + \***************************************************************************************************************************************************************************************************************************************************************************/ +@font-face { + font-family: "Source Sans"; + src: url(/build/fonts/SourceSansPro-Bold.751d4a14.otf) format("opentype"); + src: url(/build/fonts/SourceSansPro-Regular.7a9975d8.otf) format("opentype"); + src: url(/build/fonts/SourceSansPro-Light.0d4a9a1b.otf) format("opentype"); +} +.hidden { + display: none; } +.current-selling ul { + list-style-type: none; +} -/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmNzcyIsIm1hcHBpbmdzIjoiOzs7QUFBQTtJQUNJLDJCQUEyQjtBQUMvQiIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Fzc2V0cy9zdHlsZXMvYXBwLmNzcyJdLCJzb3VyY2VzQ29udGVudCI6WyJib2R5IHtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiBsaWdodGdyYXk7XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=*/ \ No newline at end of file +label.required:after { + content: "*"; + color: red; + margin-left: 1em; +} + +table { + width: 100%; +} + +.btn-primary { + background: #1b6d85; +} + +.product-box { + margin-right: 0.5em; + margin-bottom: 0.5em; +} + +.remove-item { + margin-left: -1rem; +} + +h2, h3, h4, h5, h6 { + color: #50646a; +} + +h1, .h1, h2, .h2, h3, .h3 { + margin-top: 5px; + margin-bottom: 0.5em; +} + +body { + margin: 0; + padding: 0; + color: #7da6b2; + font-family: "Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 1rem; + line-height: 2rem; +} + +#wrapper { + min-height: 100vh; +} + +.main-screen { + min-height: 80vh; +} + +.bg-dark, .bg-shader { + background: rgba(0, 0, 0, 0.5); +} + +.bg-shader { + height: 100vh; +} + +.bg-img, .bg-girl, .bg-accessories { + background-attachment: fixed; + background-size: cover; + overflow: hidden; + background-position: center; + min-height: 100vh; +} + +.bg-accessories { + background-image: url(/build/images/accessories.b35eab90.jpg); +} + +.bg-girl { + background-image: url(/build/images/girl_computer.797d0805.jpg); +} + +.bg-color { + background: #1b6d85; + color: #dedede; + padding: 1rem; +} +.bg-color a { + color: lightblue; +} + +.logo-main { + color: #7da6b2; +} + +.big-footer { + background: #222; + color: #dedede; + height: 4em; + padding: 1em; + box-sizing: border-box; + position: static; + width: 100%; + bottom: 0; + display: block; + float: left; +} + +thead { + background: #0e3743; + color: #dedede; +} + +ul { + padding: 0; +} + +label { + min-width: 20em; + display: inline-block; +} + +.try { + margin: 0 auto; +} + +.padded { + padding: 1rem; +} +.padded-v { + padding: 0; + padding-top: 1rem; + padding-bottom: 1rem; +} + +.marged { + margin: 1rem; +} +.marged-v { + margin: 0; + margin-top: 1rem; + margin-bottom: 1rem; +} +.marged-h { + margin: 0; + margin-right: 1rem; + margin-left: 1rem; +} + +.bgwarning { + background: orange; + color: #ee5555; +} + +.bgdanger { + background: indianred; + color: #333; + font-weight: bold; +} + +.bgsuccess { + background: greenyellow; + color: #000000; +} + +.previsionnel { + font-size: 1rem; +} +.previsionnel label { + min-width: 220px; +} +.previsionnel .big-number { + font-size: 1.85rem; + color: #2B2d42; +} + +html, h1, h2, h3, h4, h5, h6 { + font-family: Source Sans, Arial, Helvetica, sans-serif; +} + +input { + width: auto; + min-width: 2em; +} + +#menu-dashboard { + background: #222; + display: flex; + position: fixed; + left: 0; + top: 0; + height: 100vh; + width: 13vw; + min-width: 300px; + overflow-x: auto; + z-index: 10; +} +#menu-dashboard .nav { + width: 100%; + min-width: 300px; + display: block; + border-right: solid 2px #838383; +} +#menu-dashboard .nav .btn { + color: #dedede; +} +#menu-dashboard .nav .btn-default { + color: #dedede; +} +#menu-dashboard .nav .btn-default:hover { + background: #7da6b2; + color: #222; + font-weight: 600; +} +#menu-dashboard i.fa { + float: left; + margin-right: 1em; + color: #dedede; +} + +.nav > li > a:hover:focus, .nav > li > a:focus { + background: transparent; + border: none; + color: lightblue; +} +.nav > li > a:hover:focus, .nav > li > a:focus { + background: transparent; + border: none; + color: lightblue; +} + +.btn { + border: 0; +} + +.btn-default { + background: transparent; +} + +.btn-success { + background-color: #1b6d85; + font-weight: 800; +} + +tr.bg-success td { + background: greenyellow; +} + +.table > div:hover { + background: #ccc; +} + +.table > thead > tr > td, +table td { + padding: 0.5em; +} + +.login-fosub .padded { + padding: 3em; +} +.login-fosub input[type=submit] { + background: #1b6d85; + color: #dedede; + display: block; + margin-top: 1em; + padding: 1em; + border: 0; + width: 100%; +} +.login-fosub input[type=submit]:hover { + background: lightblue; +} + +#fos_user_profile_form div { + margin: 0.5em auto; +} + +#bodyland { + min-height: 100vh; +} +#bodyland .container { + min-height: 90vh; +} +#bodyland > .row { + min-height: 90vh; +} +#bodyland > .row table thead th { + padding: 0.5rem; +} +#bodyland > .row table + ul a { + margin-top: 1em; +} +#bodyland table { + margin-top: 2em; +} + +#menu_button { + z-index: 10; + position: absolute; + right: 1em; + top: -2px; + font-size: 1rem; +} + +.heading-of-list a { + margin-top: 1em; +} + +.hint { + margin-top: 1em; +} + +body { + background: #F5F5F5; + font: 18px/1.5 sans-serif; +} + +h1, h2 { + line-height: 1.2; + margin: 0 0 0.5em; +} + +h1 { + font-size: 36px; +} + +h2 { + font-size: 21px; + margin-bottom: 1em; +} + +p { + margin: 0 0 1em 0; +} + +a { + color: #1b6d85; +} + +a:hover { + text-decoration: none; +} + +code { + background: #F5F5F5; + max-width: 100px; + padding: 2px 6px; + word-wrap: break-word; +} + +#wrapper { + background: #FFF; + margin: 1em auto; + width: 95%; +} + +#container { + padding: 2em; +} + +#homepage h1 span { + display: block; + font-size: 75%; +} + +.hint h2, +.product-values-block h2 { + font-size: 5rem; +} + +.bigger-text, #homepage, .hint, +.product-values-block { + font-size: 2rem; + line-height: 3.5rem; +} + +#icon-status, #icon-book { + float: left; + height: 64px; + margin-right: 1em; + margin-top: -4px; + width: 64px; +} + +#icon-book { + display: none; +} + +@media (min-width: 768px) { + #wrapper { + margin: 2em auto; + } + #icon-book { + display: inline-block; + } + #status a, #next a { + display: block; + } + @-webkit-keyframes fade-in { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } + } + @keyframes fade-in { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } + } + .sf-toolbar { + opacity: 0; + -webkit-animation: fade-in 1s 0.2s forwards; + animation: fade-in 1s 0.2s forwards; + } +} +.header-block { + background: #0e3743; +} +.header-block .btn-default { + color: #e3e3e3; +} +.header-block .btn span { + position: absolute; + right: 2.5em; + top: 1em; +} + +#menu-dashboard .nav .logo-home.btn-default { + background: #0e3743; + height: 52px; + font-size: 1em; +} + +.main-section { + padding: 1rem; + display: flex; + color: #dedede; + justify-content: center; +} +.main-section h1 { + font-size: 4em; +} +.main-section h2 { + color: #dedede !important; +} +.main-section > div { + height: 80vh; + padding-top: 25vh; + max-widht: 50%; +} + +.product-values { + color: #dedede; + padding: 4rem; + padding-top: 25vh; +} + +#homepage { + font-size: 1.5rem; +} +#homepage h2, #homepage h3, #homepage h4, #homepage h5, #homepage h6 { + color: #dedede; +} + +.key-figure { + font-size: 2em; + font-weight: light; +} + +#caisse-now .product-box { + display: inline-block; + margin-right: 1rem; + margin-bottom: 1rem; + width: 100%; + float: left; +} +#caisse-now .product-button { + width: 80%; + text-overflow-ellipsis: "..."; +} +#caisse-now .listing-products button.active { + background: yellowgreen; +} +#caisse-now .listing-products .btn, #caisse-now .listing-products button { + font-size: 1.6rem; + padding: 1.5rem; + -webkit-border-radius: 1rem; + -moz-border-radius: 1rem; + border-radius: 1rem; + border-color: #7da6b2; + box-shadow: 5px 3px 10px 2px #ddd; + border-width: 0; +} +#caisse-now .listing-products .btn.btn-primary, #caisse-now .listing-products button.btn-primary { + background-color: #1b6d85; +} +#caisse-now .listing-products .btn:hover, #caisse-now .listing-products button:hover { + background: lightblue; +} +#caisse-now .listing-products .badge-default { + background: lightblue; +} +#caisse-now .listing-products .badge-success { + background: #57ac73; +} +#caisse-now .input-comment { + width: calc(100% - 40px); +} + +.horizontal-land { + overflow-x: auto; + overflow-y: hidden; + height: 75vh; + background: #ccc; + padding: 0.5rem; +} + +.one-category { + background: #dedede; + width: 350px; + margin: 0 4px; + height: calc(74vh - 1rem); + box-sizing: border-box; + display: inline-block; + white-space: nowrap; +} +.one-category h2 { + font-weight: bold; +} +.one-category h2:first-letter { + text-transform: capitalize; +} + +.category-listing { + border: solid 1px #e3e3e3; + padding: 1rem; + margin: 0.5rem; + border-radius: 0.25rem; +} + +.validate_selling { + margin: 0.25rem; +} + +.product-listing { + height: 70vh; + overflow: auto; +} + +.sellings .remove-item { + margin-left: 1em; +} + +#not_loaded { + width: 100%; + height: 75vh; +} + +.selling-ok { + position: fixed; + bottom: 0; + left: 2em; + z-index: 10; +} + +.block { + display: block; + width: calc(100% - 2em); + text-align: center; +} + +/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmNzcyIsIm1hcHBpbmdzIjoiOzs7QUFBQTtFQUNFO0VBQ0E7RUFDQTtFQUNBO0FDQ0Y7QUNMQTtFQUNFO0FET0Y7O0FFUEU7RUFDRTtBRlVKOztBRUxJO0VBQ0U7RUFDQTtFQUNBO0FGUU47O0FFSkE7RUFDRTtBRk9GOztBRUpBO0VBQ0UsbUJDakJTO0FId0JYOztBRUpBO0VBQ0U7RUFDQTtBRk9GOztBRUxBO0VBQ0U7QUZRRjs7QUluQ0E7RUFDRTtBSnNDRjs7QUluQ0E7RUFDRTtFQUNBO0FKc0NGOztBSzFDQTtFQUNFO0VBQ0E7RUFDQSxjRkVlO0VFRGY7RUFDQTtFQUNBO0FMNkNGOztBS3pDQTtFQUNFO0FMNENGOztBS3pDQTtFQUNFO0FMNENGOztBS3pDQTtFQUNFO0FMNENGOztBS3pDQTtFQUVFO0FMMkNGOztBS3hDQTtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7QUwyQ0Y7O0FLeENBO0VBRUU7QUwwQ0Y7O0FLdkNBO0VBRUU7QUx5Q0Y7O0FLdENBO0VBQ0UsbUJGOUNTO0VFK0NULGNGaERNO0VFc0ROO0FMb0NGO0FLeENFO0VBQ0UsZ0JGaERRO0FIMEZaOztBS3BDQTtFQUNFLGNGckRXO0FINEZiOztBS3BDQTtFQUNFLGdCRi9ESztFRWdFTCxjRi9ETTtFRWdFTjtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0FMdUNGOztBS3BDQTtFQUNFLG1CRnpFUztFRTBFVCxjRjVFTTtBSG1IUjs7QUtwQ0E7RUFDRTtBTHVDRjs7QUtwQ0E7RUFDRTtFQUNBO0FMdUNGOztBS3BDQTtFQUNFO0FMdUNGOztBS3BDQTtFQUNFO0FMdUNGO0FLckNFO0VBQ0U7RUFDQTtFQUNBO0FMdUNKOztBS25DQTtFQUNFO0FMc0NGO0FLcENFO0VBQ0U7RUFDQTtFQUNBO0FMc0NKO0FLbkNFO0VBQ0U7RUFDQTtFQUNBO0FMcUNKOztBS2pDQTtFQUNFO0VBQ0E7QUxvQ0Y7O0FLakNBO0VBQ0U7RUFDQTtFQUNBO0FMb0NGOztBS2pDQTtFQUNFO0VBQ0E7QUxvQ0Y7O0FLakNBO0VBQ0U7QUxvQ0Y7QUtsQ0U7RUFDRTtBTG9DSjtBS2pDRTtFQUNFO0VBQ0E7QUxtQ0o7O0FLOUJBO0VBQ0U7QUxpQ0Y7O0FLOUJBO0VBQ0U7RUFDQTtBTGlDRjs7QUs5QkE7RUFDRSxnQkYvSks7RUVnS0w7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0FMaUNGO0FLL0JFO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7QUxpQ0o7QUsvQkk7RUFDRSxjRmhMRTtBSGlOUjtBSzlCSTtFQUNFLGNGcExFO0FIb05SO0FLOUJNO0VBQ0U7RUFDQSxXRnpMRDtFRTBMQztBTGdDUjtBSzNCRTtFQUNFO0VBQ0E7RUFDQSxjRmpNSTtBSDhOUjs7QUt4QkU7RUFDRTtFQUNBO0VBQ0EsZ0JGdE1RO0FIaU9aO0FLeEJFO0VBQ0U7RUFDQTtFQUNBLGdCRjVNUTtBSHNPWjs7QUt0QkE7RUFDRTtBTHlCRjs7QUt0QkE7RUFDRTtBTHlCRjs7QUtyQkE7RUFDRSx5QkY1TlM7RUU2TlQ7QUx3QkY7O0FLbkJJO0VBQ0U7QUxzQk47O0FLZkk7RUFDRTtBTGtCTjs7QUtiQTs7RUFFRTtBTGdCRjs7QUtaRTtFQUNFO0FMZUo7QUtaRTtFQUNFLG1CRjNQTztFRTRQUCxjRjdQSTtFRThQSjtFQUNBO0VBQ0E7RUFDQTtFQUNBO0FMY0o7QUtaSTtFQUNFLHFCRmxRTTtBSGdSWjs7QUtSRTtFQUNFO0FMV0o7O0FLUEE7RUFDRTtBTFVGO0FLVEU7RUFDRTtBTFdKO0FLUkU7RUFDRTtBTFVKO0FLTlE7RUFDRTtBTFFWO0FLSlE7RUFDRTtBTE1WO0FLREU7RUFDRTtBTEdKOztBS0NBO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtBTEVGOztBS0VFO0VBQ0U7QUxDSjs7QUtHQTtFQUNFO0FMQUY7O0FNMVRBO0VBQ0U7RUFDQTtBTjZURjs7QU0xVEE7RUFDRTtFQUNBO0FONlRGOztBTTFUQTtFQUNFO0FONlRGOztBTTFUQTtFQUNFO0VBQ0E7QU42VEY7O0FNMVRBO0VBQ0U7QU42VEY7O0FNMVRBO0VBQ0UsY0h2QlM7QUhvVlg7O0FNMVRBO0VBQ0U7QU42VEY7O0FNMVRBO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7QU42VEY7O0FNMVRBO0VBQ0U7RUFDQTtFQUVBO0FONFRGOztBTXpUQTtFQUNFO0FONFRGOztBTXZURTtFQUNFO0VBQ0E7QU4wVEo7O0FNcFRFOztFQUNFO0FOd1RKOztBTXJUQTs7RUFDRTtFQUNBO0FOeVRGOztBTXZUQTtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7QU4wVEY7O0FNdlRBO0VBQ0U7QU4wVEY7O0FNdlRBO0VBQ0U7SUFFRTtFTnlURjtFTXRUQTtJQUNFO0VOd1RGO0VNclRBO0lBQ0U7RU51VEY7RU1wVEE7SUFDRTtNQUNFO0lOc1RGO0lNcFRBO01BQ0U7SU5zVEY7RUFDRjtFTXBUQTtJQUNFO01BQ0U7SU5zVEY7SU1wVEE7TUFDRTtJTnNURjtFQUNGO0VNcFRBO0lBQ0U7SUFDQTtJQUNBO0VOc1RGO0FBQ0Y7QU1uVEE7RUFDRSxtQkhuSFM7QUh3YVg7QU1wVEU7RUFDRSxjSG5IRztBSHlhUDtBTWxURTtFQUNFO0VBQ0E7RUFDQTtBTm9USjs7QU1oVEE7RUFDRSxtQkhqSVM7RUdrSVQ7RUFDQTtBTm1URjs7QU94YkE7RUFDRTtFQUNBO0VBQ0EsY0pITTtFSUlOO0FQMmJGO0FPMWJFO0VBQ0U7QVA0Yko7QU8xYkU7RUFDRTtBUDRiSjtBTzFiRTtFQUNFO0VBQ0E7RUFDQTtBUDRiSjs7QU94YkE7RUFDRSxjSm5CTTtFSW9CTjtFQUNBO0FQMmJGOztBT3hiQTtFQUlFO0FQd2JGO0FPM2JFO0VBQ0UsY0oxQkk7QUh1ZFI7O0FReGRBO0VBQ0U7RUFDQTtBUjJkRjs7QVM1ZEU7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0FUK2RKO0FTNWRFO0VBQ0U7RUFDQTtBVDhkSjtBU3pkSTtFQUNFO0FUMmROO0FTeGRJO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBLHFCTm5CVztFTW9CWDtFQUNBO0FUMGROO0FTeGRNO0VBQ0UseUJON0JHO0FIdWZYO0FTdmRNO0VBQ0UscUJOL0JJO0FId2ZaO0FTcmRJO0VBQ0UscUJOcENNO0FIMmZaO0FTcGRJO0VBQ0U7QVRzZE47QVNsZEU7RUFDRTtBVG9kSjs7QVMvY0E7RUFDRTtFQUNBO0VBRUE7RUFDQTtFQUNBO0FUaWRGOztBUzdjQTtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUVBO0FUK2NGO0FTN2NFO0VBQ0U7QVQrY0o7QVM3Y0k7RUFDRTtBVCtjTjs7QVMxY0E7RUFDRTtFQUNBO0VBQ0E7RUFDQTtBVDZjRjs7QVMxY0E7RUFDRTtBVDZjRjs7QVMxY0E7RUFDRTtFQUNBO0FUNmNGOztBU3pjRTtFQUNFO0FUNGNKOztBU3hjQTtFQUNFO0VBQ0E7QVQyY0Y7O0FTeGNBO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7QVQyY0Y7O0FTeGNBO0VBQ0U7RUFDQTtFQUNBO0FUMmNGLEMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9hc3NldHMvc3R5bGVzL2ZvbnRzL2FsbC5zY3NzIiwid2VicGFjazovLy8uL2Fzc2V0cy9zdHlsZXMvYXBwLnNjc3MiLCJ3ZWJwYWNrOi8vLy4vYXNzZXRzL3N0eWxlcy9zcGxpdC9vdmVycmlkZV9saWJzLnNjc3MiLCJ3ZWJwYWNrOi8vLy4vYXNzZXRzL3N0eWxlcy9zcGxpdC9mb3JtdWxhaXJlcy5zY3NzIiwid2VicGFjazovLy8uL2Fzc2V0cy9zdHlsZXMvc3BsaXQvY3VzdG9tX3ZhcnMuc2NzcyIsIndlYnBhY2s6Ly8vLi9hc3NldHMvc3R5bGVzL3NwbGl0L3R5cG8uc2NzcyIsIndlYnBhY2s6Ly8vLi9hc3NldHMvc3R5bGVzL3BhZ2VzL2dsb2JhbC5zY3NzIiwid2VicGFjazovLy8uL2Fzc2V0cy9zdHlsZXMvcGFnZXMvZGVtby5zY3NzIiwid2VicGFjazovLy8uL2Fzc2V0cy9zdHlsZXMvcGFnZXMvaG9tZS5zY3NzIiwid2VicGFjazovLy8uL2Fzc2V0cy9zdHlsZXMvcGFnZXMvX2hpc3Rvcnkuc2NzcyIsIndlYnBhY2s6Ly8vLi9hc3NldHMvc3R5bGVzL3BhZ2VzL19kYXNoYm9hcmQuc2NzcyJdLCJzb3VyY2VzQ29udGVudCI6WyJAZm9udC1mYWNlIHtcbiAgZm9udC1mYW1pbHk6IFwiU291cmNlIFNhbnNcIjtcbiAgc3JjOiB1cmwoXCJzb3VyY2Utc2Fucy1wcm8vU291cmNlU2Fuc1Byby1Cb2xkLm90ZlwiKSBmb3JtYXQoJ29wZW50eXBlJyk7XG4gIHNyYzogdXJsKFwic291cmNlLXNhbnMtcHJvL1NvdXJjZVNhbnNQcm8tUmVndWxhci5vdGZcIikgZm9ybWF0KCdvcGVudHlwZScpO1xuICBzcmM6IHVybChcInNvdXJjZS1zYW5zLXByby9Tb3VyY2VTYW5zUHJvLUxpZ2h0Lm90ZlwiKSBmb3JtYXQoJ29wZW50eXBlJyk7XG59XG4iLCJAZm9udC1mYWNlIHtcbiAgZm9udC1mYW1pbHk6IFwiU291cmNlIFNhbnNcIjtcbiAgc3JjOiB1cmwoXCJzb3VyY2Utc2Fucy1wcm8vU291cmNlU2Fuc1Byby1Cb2xkLm90ZlwiKSBmb3JtYXQoXCJvcGVudHlwZVwiKTtcbiAgc3JjOiB1cmwoXCJzb3VyY2Utc2Fucy1wcm8vU291cmNlU2Fuc1Byby1SZWd1bGFyLm90ZlwiKSBmb3JtYXQoXCJvcGVudHlwZVwiKTtcbiAgc3JjOiB1cmwoXCJzb3VyY2Utc2Fucy1wcm8vU291cmNlU2Fuc1Byby1MaWdodC5vdGZcIikgZm9ybWF0KFwib3BlbnR5cGVcIik7XG59XG4uaGlkZGVuIHtcbiAgZGlzcGxheTogbm9uZTtcbn1cblxuLmN1cnJlbnQtc2VsbGluZyB1bCB7XG4gIGxpc3Qtc3R5bGUtdHlwZTogbm9uZTtcbn1cblxubGFiZWwucmVxdWlyZWQ6YWZ0ZXIge1xuICBjb250ZW50OiBcIipcIjtcbiAgY29sb3I6IHJlZDtcbiAgbWFyZ2luLWxlZnQ6IDFlbTtcbn1cblxudGFibGUge1xuICB3aWR0aDogMTAwJTtcbn1cblxuLmJ0bi1wcmltYXJ5IHtcbiAgYmFja2dyb3VuZDogIzFiNmQ4NTtcbn1cblxuLnByb2R1Y3QtYm94IHtcbiAgbWFyZ2luLXJpZ2h0OiAwLjVlbTtcbiAgbWFyZ2luLWJvdHRvbTogMC41ZW07XG59XG5cbi5yZW1vdmUtaXRlbSB7XG4gIG1hcmdpbi1sZWZ0OiAtMXJlbTtcbn1cblxuaDIsIGgzLCBoNCwgaDUsIGg2IHtcbiAgY29sb3I6ICM1MDY0NmE7XG59XG5cbmgxLCAuaDEsIGgyLCAuaDIsIGgzLCAuaDMge1xuICBtYXJnaW4tdG9wOiA1cHg7XG4gIG1hcmdpbi1ib3R0b206IDAuNWVtO1xufVxuXG5ib2R5IHtcbiAgbWFyZ2luOiAwO1xuICBwYWRkaW5nOiAwO1xuICBjb2xvcjogIzdkYTZiMjtcbiAgZm9udC1mYW1pbHk6IFwiU2FucyBQcm9cIiwgXCJIZWx2ZXRpY2EgTmV1ZVwiLCBIZWx2ZXRpY2EsIEFyaWFsLCBzYW5zLXNlcmlmO1xuICBmb250LXNpemU6IDFyZW07XG4gIGxpbmUtaGVpZ2h0OiAycmVtO1xufVxuXG4jd3JhcHBlciB7XG4gIG1pbi1oZWlnaHQ6IDEwMHZoO1xufVxuXG4ubWFpbi1zY3JlZW4ge1xuICBtaW4taGVpZ2h0OiA4MHZoO1xufVxuXG4uYmctZGFyaywgLmJnLXNoYWRlciB7XG4gIGJhY2tncm91bmQ6IHJnYmEoMCwgMCwgMCwgMC41KTtcbn1cblxuLmJnLXNoYWRlciB7XG4gIGhlaWdodDogMTAwdmg7XG59XG5cbi5iZy1pbWcsIC5iZy1naXJsLCAuYmctYWNjZXNzb3JpZXMge1xuICBiYWNrZ3JvdW5kLWF0dGFjaG1lbnQ6IGZpeGVkO1xuICBiYWNrZ3JvdW5kLXNpemU6IGNvdmVyO1xuICBvdmVyZmxvdzogaGlkZGVuO1xuICBiYWNrZ3JvdW5kLXBvc2l0aW9uOiBjZW50ZXI7XG4gIG1pbi1oZWlnaHQ6IDEwMHZoO1xufVxuXG4uYmctYWNjZXNzb3JpZXMge1xuICBiYWNrZ3JvdW5kLWltYWdlOiB1cmwoXCIuLi8uLi9pbWcvYWNjZXNzb3JpZXMuanBnXCIpO1xufVxuXG4uYmctZ2lybCB7XG4gIGJhY2tncm91bmQtaW1hZ2U6IHVybChcIi4uLy4uL2ltZy9naXJsX2NvbXB1dGVyLmpwZ1wiKTtcbn1cblxuLmJnLWNvbG9yIHtcbiAgYmFja2dyb3VuZDogIzFiNmQ4NTtcbiAgY29sb3I6ICNkZWRlZGU7XG4gIHBhZGRpbmc6IDFyZW07XG59XG4uYmctY29sb3IgYSB7XG4gIGNvbG9yOiBsaWdodGJsdWU7XG59XG5cbi5sb2dvLW1haW4ge1xuICBjb2xvcjogIzdkYTZiMjtcbn1cblxuLmJpZy1mb290ZXIge1xuICBiYWNrZ3JvdW5kOiAjMjIyO1xuICBjb2xvcjogI2RlZGVkZTtcbiAgaGVpZ2h0OiA0ZW07XG4gIHBhZGRpbmc6IDFlbTtcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgcG9zaXRpb246IHN0YXRpYztcbiAgd2lkdGg6IDEwMCU7XG4gIGJvdHRvbTogMDtcbiAgZGlzcGxheTogYmxvY2s7XG4gIGZsb2F0OiBsZWZ0O1xufVxuXG50aGVhZCB7XG4gIGJhY2tncm91bmQ6ICMwZTM3NDM7XG4gIGNvbG9yOiAjZGVkZWRlO1xufVxuXG51bCB7XG4gIHBhZGRpbmc6IDA7XG59XG5cbmxhYmVsIHtcbiAgbWluLXdpZHRoOiAyMGVtO1xuICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG59XG5cbi50cnkge1xuICBtYXJnaW46IDAgYXV0bztcbn1cblxuLnBhZGRlZCB7XG4gIHBhZGRpbmc6IDFyZW07XG59XG4ucGFkZGVkLXYge1xuICBwYWRkaW5nOiAwO1xuICBwYWRkaW5nLXRvcDogMXJlbTtcbiAgcGFkZGluZy1ib3R0b206IDFyZW07XG59XG5cbi5tYXJnZWQge1xuICBtYXJnaW46IDFyZW07XG59XG4ubWFyZ2VkLXYge1xuICBtYXJnaW46IDA7XG4gIG1hcmdpbi10b3A6IDFyZW07XG4gIG1hcmdpbi1ib3R0b206IDFyZW07XG59XG4ubWFyZ2VkLWgge1xuICBtYXJnaW46IDA7XG4gIG1hcmdpbi1yaWdodDogMXJlbTtcbiAgbWFyZ2luLWxlZnQ6IDFyZW07XG59XG5cbi5iZ3dhcm5pbmcge1xuICBiYWNrZ3JvdW5kOiBvcmFuZ2U7XG4gIGNvbG9yOiAjZWU1NTU1O1xufVxuXG4uYmdkYW5nZXIge1xuICBiYWNrZ3JvdW5kOiBpbmRpYW5yZWQ7XG4gIGNvbG9yOiAjMzMzO1xuICBmb250LXdlaWdodDogYm9sZDtcbn1cblxuLmJnc3VjY2VzcyB7XG4gIGJhY2tncm91bmQ6IGdyZWVueWVsbG93O1xuICBjb2xvcjogIzAwMDAwMDtcbn1cblxuLnByZXZpc2lvbm5lbCB7XG4gIGZvbnQtc2l6ZTogMXJlbTtcbn1cbi5wcmV2aXNpb25uZWwgbGFiZWwge1xuICBtaW4td2lkdGg6IDIyMHB4O1xufVxuLnByZXZpc2lvbm5lbCAuYmlnLW51bWJlciB7XG4gIGZvbnQtc2l6ZTogMS44NXJlbTtcbiAgY29sb3I6ICMyQjJkNDI7XG59XG5cbmh0bWwsIGgxLCBoMiwgaDMsIGg0LCBoNSwgaDYge1xuICBmb250LWZhbWlseTogU291cmNlIFNhbnMsIEFyaWFsLCBIZWx2ZXRpY2EsIHNhbnMtc2VyaWY7XG59XG5cbmlucHV0IHtcbiAgd2lkdGg6IGF1dG87XG4gIG1pbi13aWR0aDogMmVtO1xufVxuXG4jbWVudS1kYXNoYm9hcmQge1xuICBiYWNrZ3JvdW5kOiAjMjIyO1xuICBkaXNwbGF5OiBmbGV4O1xuICBwb3NpdGlvbjogZml4ZWQ7XG4gIGxlZnQ6IDA7XG4gIHRvcDogMDtcbiAgaGVpZ2h0OiAxMDB2aDtcbiAgd2lkdGg6IDEzdnc7XG4gIG1pbi13aWR0aDogMzAwcHg7XG4gIG92ZXJmbG93LXg6IGF1dG87XG4gIHotaW5kZXg6IDEwO1xufVxuI21lbnUtZGFzaGJvYXJkIC5uYXYge1xuICB3aWR0aDogMTAwJTtcbiAgbWluLXdpZHRoOiAzMDBweDtcbiAgZGlzcGxheTogYmxvY2s7XG4gIGJvcmRlci1yaWdodDogc29saWQgMnB4ICM4MzgzODM7XG59XG4jbWVudS1kYXNoYm9hcmQgLm5hdiAuYnRuIHtcbiAgY29sb3I6ICNkZWRlZGU7XG59XG4jbWVudS1kYXNoYm9hcmQgLm5hdiAuYnRuLWRlZmF1bHQge1xuICBjb2xvcjogI2RlZGVkZTtcbn1cbiNtZW51LWRhc2hib2FyZCAubmF2IC5idG4tZGVmYXVsdDpob3ZlciB7XG4gIGJhY2tncm91bmQ6ICM3ZGE2YjI7XG4gIGNvbG9yOiAjMjIyO1xuICBmb250LXdlaWdodDogNjAwO1xufVxuI21lbnUtZGFzaGJvYXJkIGkuZmEge1xuICBmbG9hdDogbGVmdDtcbiAgbWFyZ2luLXJpZ2h0OiAxZW07XG4gIGNvbG9yOiAjZGVkZWRlO1xufVxuXG4ubmF2ID4gbGkgPiBhOmhvdmVyOmZvY3VzLCAubmF2ID4gbGkgPiBhOmZvY3VzIHtcbiAgYmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG4gIGJvcmRlcjogbm9uZTtcbiAgY29sb3I6IGxpZ2h0Ymx1ZTtcbn1cbi5uYXYgPiBsaSA+IGE6aG92ZXI6Zm9jdXMsIC5uYXYgPiBsaSA+IGE6Zm9jdXMge1xuICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcbiAgYm9yZGVyOiBub25lO1xuICBjb2xvcjogbGlnaHRibHVlO1xufVxuXG4uYnRuIHtcbiAgYm9yZGVyOiAwO1xufVxuXG4uYnRuLWRlZmF1bHQge1xuICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcbn1cblxuLmJ0bi1zdWNjZXNzIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogIzFiNmQ4NTtcbiAgZm9udC13ZWlnaHQ6IDgwMDtcbn1cblxudHIuYmctc3VjY2VzcyB0ZCB7XG4gIGJhY2tncm91bmQ6IGdyZWVueWVsbG93O1xufVxuXG4udGFibGUgPiBkaXY6aG92ZXIge1xuICBiYWNrZ3JvdW5kOiAjY2NjO1xufVxuXG4udGFibGUgPiB0aGVhZCA+IHRyID4gdGQsXG50YWJsZSB0ZCB7XG4gIHBhZGRpbmc6IDAuNWVtO1xufVxuXG4ubG9naW4tZm9zdWIgLnBhZGRlZCB7XG4gIHBhZGRpbmc6IDNlbTtcbn1cbi5sb2dpbi1mb3N1YiBpbnB1dFt0eXBlPXN1Ym1pdF0ge1xuICBiYWNrZ3JvdW5kOiAjMWI2ZDg1O1xuICBjb2xvcjogI2RlZGVkZTtcbiAgZGlzcGxheTogYmxvY2s7XG4gIG1hcmdpbi10b3A6IDFlbTtcbiAgcGFkZGluZzogMWVtO1xuICBib3JkZXI6IDA7XG4gIHdpZHRoOiAxMDAlO1xufVxuLmxvZ2luLWZvc3ViIGlucHV0W3R5cGU9c3VibWl0XTpob3ZlciB7XG4gIGJhY2tncm91bmQ6IGxpZ2h0Ymx1ZTtcbn1cblxuI2Zvc191c2VyX3Byb2ZpbGVfZm9ybSBkaXYge1xuICBtYXJnaW46IDAuNWVtIGF1dG87XG59XG5cbiNib2R5bGFuZCB7XG4gIG1pbi1oZWlnaHQ6IDEwMHZoO1xufVxuI2JvZHlsYW5kIC5jb250YWluZXIge1xuICBtaW4taGVpZ2h0OiA5MHZoO1xufVxuI2JvZHlsYW5kID4gLnJvdyB7XG4gIG1pbi1oZWlnaHQ6IDkwdmg7XG59XG4jYm9keWxhbmQgPiAucm93IHRhYmxlIHRoZWFkIHRoIHtcbiAgcGFkZGluZzogMC41cmVtO1xufVxuI2JvZHlsYW5kID4gLnJvdyB0YWJsZSArIHVsIGEge1xuICBtYXJnaW4tdG9wOiAxZW07XG59XG4jYm9keWxhbmQgdGFibGUge1xuICBtYXJnaW4tdG9wOiAyZW07XG59XG5cbiNtZW51X2J1dHRvbiB7XG4gIHotaW5kZXg6IDEwO1xuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIHJpZ2h0OiAxZW07XG4gIHRvcDogLTJweDtcbiAgZm9udC1zaXplOiAxcmVtO1xufVxuXG4uaGVhZGluZy1vZi1saXN0IGEge1xuICBtYXJnaW4tdG9wOiAxZW07XG59XG5cbi5oaW50IHtcbiAgbWFyZ2luLXRvcDogMWVtO1xufVxuXG5ib2R5IHtcbiAgYmFja2dyb3VuZDogI0Y1RjVGNTtcbiAgZm9udDogMThweC8xLjUgc2Fucy1zZXJpZjtcbn1cblxuaDEsIGgyIHtcbiAgbGluZS1oZWlnaHQ6IDEuMjtcbiAgbWFyZ2luOiAwIDAgMC41ZW07XG59XG5cbmgxIHtcbiAgZm9udC1zaXplOiAzNnB4O1xufVxuXG5oMiB7XG4gIGZvbnQtc2l6ZTogMjFweDtcbiAgbWFyZ2luLWJvdHRvbTogMWVtO1xufVxuXG5wIHtcbiAgbWFyZ2luOiAwIDAgMWVtIDA7XG59XG5cbmEge1xuICBjb2xvcjogIzFiNmQ4NTtcbn1cblxuYTpob3ZlciB7XG4gIHRleHQtZGVjb3JhdGlvbjogbm9uZTtcbn1cblxuY29kZSB7XG4gIGJhY2tncm91bmQ6ICNGNUY1RjU7XG4gIG1heC13aWR0aDogMTAwcHg7XG4gIHBhZGRpbmc6IDJweCA2cHg7XG4gIHdvcmQtd3JhcDogYnJlYWstd29yZDtcbn1cblxuI3dyYXBwZXIge1xuICBiYWNrZ3JvdW5kOiAjRkZGO1xuICBtYXJnaW46IDFlbSBhdXRvO1xuICB3aWR0aDogOTUlO1xufVxuXG4jY29udGFpbmVyIHtcbiAgcGFkZGluZzogMmVtO1xufVxuXG4jaG9tZXBhZ2UgaDEgc3BhbiB7XG4gIGRpc3BsYXk6IGJsb2NrO1xuICBmb250LXNpemU6IDc1JTtcbn1cblxuLmhpbnQgaDIsXG4ucHJvZHVjdC12YWx1ZXMtYmxvY2sgaDIge1xuICBmb250LXNpemU6IDVyZW07XG59XG5cbi5iaWdnZXItdGV4dCwgI2hvbWVwYWdlLCAuaGludCxcbi5wcm9kdWN0LXZhbHVlcy1ibG9jayB7XG4gIGZvbnQtc2l6ZTogMnJlbTtcbiAgbGluZS1oZWlnaHQ6IDMuNXJlbTtcbn1cblxuI2ljb24tc3RhdHVzLCAjaWNvbi1ib29rIHtcbiAgZmxvYXQ6IGxlZnQ7XG4gIGhlaWdodDogNjRweDtcbiAgbWFyZ2luLXJpZ2h0OiAxZW07XG4gIG1hcmdpbi10b3A6IC00cHg7XG4gIHdpZHRoOiA2NHB4O1xufVxuXG4jaWNvbi1ib29rIHtcbiAgZGlzcGxheTogbm9uZTtcbn1cblxuQG1lZGlhIChtaW4td2lkdGg6IDc2OHB4KSB7XG4gICN3cmFwcGVyIHtcbiAgICBtYXJnaW46IDJlbSBhdXRvO1xuICB9XG4gICNpY29uLWJvb2sge1xuICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgfVxuICAjc3RhdHVzIGEsICNuZXh0IGEge1xuICAgIGRpc3BsYXk6IGJsb2NrO1xuICB9XG4gIEAtd2Via2l0LWtleWZyYW1lcyBmYWRlLWluIHtcbiAgICAwJSB7XG4gICAgICBvcGFjaXR5OiAwO1xuICAgIH1cbiAgICAxMDAlIHtcbiAgICAgIG9wYWNpdHk6IDE7XG4gICAgfVxuICB9XG4gIEBrZXlmcmFtZXMgZmFkZS1pbiB7XG4gICAgMCUge1xuICAgICAgb3BhY2l0eTogMDtcbiAgICB9XG4gICAgMTAwJSB7XG4gICAgICBvcGFjaXR5OiAxO1xuICAgIH1cbiAgfVxuICAuc2YtdG9vbGJhciB7XG4gICAgb3BhY2l0eTogMDtcbiAgICAtd2Via2l0LWFuaW1hdGlvbjogZmFkZS1pbiAxcyAwLjJzIGZvcndhcmRzO1xuICAgIGFuaW1hdGlvbjogZmFkZS1pbiAxcyAwLjJzIGZvcndhcmRzO1xuICB9XG59XG4uaGVhZGVyLWJsb2NrIHtcbiAgYmFja2dyb3VuZDogIzBlMzc0Mztcbn1cbi5oZWFkZXItYmxvY2sgLmJ0bi1kZWZhdWx0IHtcbiAgY29sb3I6ICNlM2UzZTM7XG59XG4uaGVhZGVyLWJsb2NrIC5idG4gc3BhbiB7XG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgcmlnaHQ6IDIuNWVtO1xuICB0b3A6IDFlbTtcbn1cblxuI21lbnUtZGFzaGJvYXJkIC5uYXYgLmxvZ28taG9tZS5idG4tZGVmYXVsdCB7XG4gIGJhY2tncm91bmQ6ICMwZTM3NDM7XG4gIGhlaWdodDogNTJweDtcbiAgZm9udC1zaXplOiAxZW07XG59XG5cbi5tYWluLXNlY3Rpb24ge1xuICBwYWRkaW5nOiAxcmVtO1xuICBkaXNwbGF5OiBmbGV4O1xuICBjb2xvcjogI2RlZGVkZTtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG59XG4ubWFpbi1zZWN0aW9uIGgxIHtcbiAgZm9udC1zaXplOiA0ZW07XG59XG4ubWFpbi1zZWN0aW9uIGgyIHtcbiAgY29sb3I6ICNkZWRlZGUgIWltcG9ydGFudDtcbn1cbi5tYWluLXNlY3Rpb24gPiBkaXYge1xuICBoZWlnaHQ6IDgwdmg7XG4gIHBhZGRpbmctdG9wOiAyNXZoO1xuICBtYXgtd2lkaHQ6IDUwJTtcbn1cblxuLnByb2R1Y3QtdmFsdWVzIHtcbiAgY29sb3I6ICNkZWRlZGU7XG4gIHBhZGRpbmc6IDRyZW07XG4gIHBhZGRpbmctdG9wOiAyNXZoO1xufVxuXG4jaG9tZXBhZ2Uge1xuICBmb250LXNpemU6IDEuNXJlbTtcbn1cbiNob21lcGFnZSBoMiwgI2hvbWVwYWdlIGgzLCAjaG9tZXBhZ2UgaDQsICNob21lcGFnZSBoNSwgI2hvbWVwYWdlIGg2IHtcbiAgY29sb3I6ICNkZWRlZGU7XG59XG5cbi5rZXktZmlndXJlIHtcbiAgZm9udC1zaXplOiAyZW07XG4gIGZvbnQtd2VpZ2h0OiBsaWdodDtcbn1cblxuI2NhaXNzZS1ub3cgLnByb2R1Y3QtYm94IHtcbiAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICBtYXJnaW4tcmlnaHQ6IDFyZW07XG4gIG1hcmdpbi1ib3R0b206IDFyZW07XG4gIHdpZHRoOiAxMDAlO1xuICBmbG9hdDogbGVmdDtcbn1cbiNjYWlzc2Utbm93IC5wcm9kdWN0LWJ1dHRvbiB7XG4gIHdpZHRoOiA4MCU7XG4gIHRleHQtb3ZlcmZsb3ctZWxsaXBzaXM6IFwiLi4uXCI7XG59XG4jY2Fpc3NlLW5vdyAubGlzdGluZy1wcm9kdWN0cyBidXR0b24uYWN0aXZlIHtcbiAgYmFja2dyb3VuZDogeWVsbG93Z3JlZW47XG59XG4jY2Fpc3NlLW5vdyAubGlzdGluZy1wcm9kdWN0cyAuYnRuLCAjY2Fpc3NlLW5vdyAubGlzdGluZy1wcm9kdWN0cyBidXR0b24ge1xuICBmb250LXNpemU6IDEuNnJlbTtcbiAgcGFkZGluZzogMS41cmVtO1xuICAtd2Via2l0LWJvcmRlci1yYWRpdXM6IDFyZW07XG4gIC1tb3otYm9yZGVyLXJhZGl1czogMXJlbTtcbiAgYm9yZGVyLXJhZGl1czogMXJlbTtcbiAgYm9yZGVyLWNvbG9yOiAjN2RhNmIyO1xuICBib3gtc2hhZG93OiA1cHggM3B4IDEwcHggMnB4ICNkZGQ7XG4gIGJvcmRlci13aWR0aDogMDtcbn1cbiNjYWlzc2Utbm93IC5saXN0aW5nLXByb2R1Y3RzIC5idG4uYnRuLXByaW1hcnksICNjYWlzc2Utbm93IC5saXN0aW5nLXByb2R1Y3RzIGJ1dHRvbi5idG4tcHJpbWFyeSB7XG4gIGJhY2tncm91bmQtY29sb3I6ICMxYjZkODU7XG59XG4jY2Fpc3NlLW5vdyAubGlzdGluZy1wcm9kdWN0cyAuYnRuOmhvdmVyLCAjY2Fpc3NlLW5vdyAubGlzdGluZy1wcm9kdWN0cyBidXR0b246aG92ZXIge1xuICBiYWNrZ3JvdW5kOiBsaWdodGJsdWU7XG59XG4jY2Fpc3NlLW5vdyAubGlzdGluZy1wcm9kdWN0cyAuYmFkZ2UtZGVmYXVsdCB7XG4gIGJhY2tncm91bmQ6IGxpZ2h0Ymx1ZTtcbn1cbiNjYWlzc2Utbm93IC5saXN0aW5nLXByb2R1Y3RzIC5iYWRnZS1zdWNjZXNzIHtcbiAgYmFja2dyb3VuZDogIzU3YWM3Mztcbn1cbiNjYWlzc2Utbm93IC5pbnB1dC1jb21tZW50IHtcbiAgd2lkdGg6IGNhbGMoMTAwJSAtIDQwcHgpO1xufVxuXG4uaG9yaXpvbnRhbC1sYW5kIHtcbiAgb3ZlcmZsb3cteDogYXV0bztcbiAgb3ZlcmZsb3cteTogaGlkZGVuO1xuICBoZWlnaHQ6IDc1dmg7XG4gIGJhY2tncm91bmQ6ICNjY2M7XG4gIHBhZGRpbmc6IDAuNXJlbTtcbn1cblxuLm9uZS1jYXRlZ29yeSB7XG4gIGJhY2tncm91bmQ6ICNkZWRlZGU7XG4gIHdpZHRoOiAzNTBweDtcbiAgbWFyZ2luOiAwIDRweDtcbiAgaGVpZ2h0OiBjYWxjKDc0dmggLSAxcmVtKTtcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICB3aGl0ZS1zcGFjZTogbm93cmFwO1xufVxuLm9uZS1jYXRlZ29yeSBoMiB7XG4gIGZvbnQtd2VpZ2h0OiBib2xkO1xufVxuLm9uZS1jYXRlZ29yeSBoMjpmaXJzdC1sZXR0ZXIge1xuICB0ZXh0LXRyYW5zZm9ybTogY2FwaXRhbGl6ZTtcbn1cblxuLmNhdGVnb3J5LWxpc3Rpbmcge1xuICBib3JkZXI6IHNvbGlkIDFweCAjZTNlM2UzO1xuICBwYWRkaW5nOiAxcmVtO1xuICBtYXJnaW46IDAuNXJlbTtcbiAgYm9yZGVyLXJhZGl1czogMC4yNXJlbTtcbn1cblxuLnZhbGlkYXRlX3NlbGxpbmcge1xuICBtYXJnaW46IDAuMjVyZW07XG59XG5cbi5wcm9kdWN0LWxpc3Rpbmcge1xuICBoZWlnaHQ6IDcwdmg7XG4gIG92ZXJmbG93OiBhdXRvO1xufVxuXG4uc2VsbGluZ3MgLnJlbW92ZS1pdGVtIHtcbiAgbWFyZ2luLWxlZnQ6IDFlbTtcbn1cblxuI25vdF9sb2FkZWQge1xuICB3aWR0aDogMTAwJTtcbiAgaGVpZ2h0OiA3NXZoO1xufVxuXG4uc2VsbGluZy1vayB7XG4gIHBvc2l0aW9uOiBmaXhlZDtcbiAgYm90dG9tOiAwO1xuICBsZWZ0OiAyZW07XG4gIHotaW5kZXg6IDEwO1xufVxuXG4uYmxvY2sge1xuICBkaXNwbGF5OiBibG9jaztcbiAgd2lkdGg6IGNhbGMoMTAwJSAtIDJlbSk7XG4gIHRleHQtYWxpZ246IGNlbnRlcjtcbn0iLCIuaGlkZGVuIHtcbiAgZGlzcGxheTogbm9uZTtcbn0iLCIuY3VycmVudC1zZWxsaW5nIHtcbiAgdWwge1xuICAgIGxpc3Qtc3R5bGUtdHlwZTogbm9uZTtcbiAgfVxufVxubGFiZWx7XG4gICYucmVxdWlyZWR7XG4gICAgJjphZnRlcntcbiAgICAgIGNvbnRlbnQ6IFwiKlwiO1xuICAgICAgY29sb3I6IHJlZDtcbiAgICAgIG1hcmdpbi1sZWZ0OiAxZW07XG4gICAgfVxuICB9XG59XG50YWJsZSB7XG4gIHdpZHRoOiAxMDAlO1xufVxuXG4uYnRuLXByaW1hcnkge1xuICBiYWNrZ3JvdW5kOiAkZGVlcGJsdWU7XG59XG5cbi5wcm9kdWN0LWJveCB7XG4gIG1hcmdpbi1yaWdodDogMC41ZW07XG4gIG1hcmdpbi1ib3R0b206IDAuNWVtO1xufVxuLnJlbW92ZS1pdGVte1xuICBtYXJnaW4tbGVmdDogLTFyZW07XG59XG4iLCIkZGFyazogIzIyMjtcbiRsaWdodDogI2RlZGVkZTtcbiRkZWVwYmx1ZTogIzFiNmQ4NTtcbiRkYXJrYmx1ZTogbWl4KCMwMDAsICRkZWVwYmx1ZSk7XG4kbGlnaHRibHVlOiBsaWdodGJsdWU7XG4kZ3JleTogI2UzZTNlMztcbiRsb2dvLWNvbG9yOiBtaXgoJGRlZXBibHVlLCAkbGlnaHQpO1xuJGFsbC10ZXh0LWNvbG9yOiBtaXgoJGRlZXBibHVlLCAkbGlnaHQpO1xuXG4kcHJpbWFyeTogJGRlZXBibHVlO1xuJGJ0bi1wcmltYXJ5LWJnOiAkZGVlcGJsdWU7IiwiaDIsIGgzLCBoNCwgaDUsIGg2IHtcbiAgY29sb3I6IG1peCgkZGFyaywgJGFsbC10ZXh0LWNvbG9yKTtcbn1cblxuaDEsIC5oMSwgaDIsIC5oMiwgaDMsIC5oMyB7XG4gIG1hcmdpbi10b3A6IDVweDtcbiAgbWFyZ2luLWJvdHRvbTogMC41ZW07XG59XG4iLCJAaW1wb3J0ICcuLi9zcGxpdC9jdXN0b21fdmFycyc7XG5cbmJvZHkge1xuICBtYXJnaW46IDA7XG4gIHBhZGRpbmc6IDA7XG4gIGNvbG9yOiAkYWxsLXRleHQtY29sb3I7XG4gIGZvbnQtZmFtaWx5OiBcIlNhbnMgUHJvXCIsIFwiSGVsdmV0aWNhIE5ldWVcIiwgSGVsdmV0aWNhLCBBcmlhbCwgc2Fucy1zZXJpZjtcbiAgZm9udC1zaXplOiAxcmVtO1xuICBsaW5lLWhlaWdodDogMnJlbTtcbn1cblxuXG4jd3JhcHBlciB7XG4gIG1pbi1oZWlnaHQ6IDEwMHZoO1xufVxuXG4ubWFpbi1zY3JlZW4ge1xuICBtaW4taGVpZ2h0OiA4MHZoO1xufVxuXG4uYmctZGFyayB7XG4gIGJhY2tncm91bmQ6IHJnYmEoMCwgMCwgMCwgMC41KTtcbn1cblxuLmJnLXNoYWRlciB7XG4gIEBleHRlbmQgLmJnLWRhcms7XG4gIGhlaWdodDogMTAwdmg7XG59XG5cbi5iZy1pbWcge1xuICBiYWNrZ3JvdW5kLWF0dGFjaG1lbnQ6IGZpeGVkO1xuICBiYWNrZ3JvdW5kLXNpemU6IGNvdmVyO1xuICBvdmVyZmxvdzogaGlkZGVuO1xuICBiYWNrZ3JvdW5kLXBvc2l0aW9uOiBjZW50ZXI7XG4gIG1pbi1oZWlnaHQ6IDEwMHZoO1xufVxuXG4uYmctYWNjZXNzb3JpZXMge1xuICBAZXh0ZW5kIC5iZy1pbWc7XG4gIGJhY2tncm91bmQtaW1hZ2U6IHVybCgnLi4vLi4vaW1nL2FjY2Vzc29yaWVzLmpwZycpO1xufVxuXG4uYmctZ2lybCB7XG4gIEBleHRlbmQgLmJnLWltZztcbiAgYmFja2dyb3VuZC1pbWFnZTogdXJsKCcuLi8uLi9pbWcvZ2lybF9jb21wdXRlci5qcGcnKTtcbn1cblxuLmJnLWNvbG9yIHtcbiAgYmFja2dyb3VuZDogJGRlZXBibHVlO1xuICBjb2xvcjogJGxpZ2h0O1xuXG4gIGEge1xuICAgIGNvbG9yOiAkbGlnaHRibHVlO1xuICB9XG5cbiAgcGFkZGluZzogMXJlbTtcbn1cblxuLmxvZ28tbWFpbiB7XG4gIGNvbG9yOiAkbG9nby1jb2xvcjtcbn1cblxuLmJpZy1mb290ZXIge1xuICBiYWNrZ3JvdW5kOiAkZGFyaztcbiAgY29sb3I6ICRsaWdodDtcbiAgaGVpZ2h0OiA0ZW07XG4gIHBhZGRpbmc6IDFlbTtcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgcG9zaXRpb246IHN0YXRpYztcbiAgd2lkdGg6IDEwMCU7XG4gIGJvdHRvbTogMDtcbiAgZGlzcGxheTogYmxvY2s7XG4gIGZsb2F0OmxlZnQ7XG59XG5cbnRoZWFkIHtcbiAgYmFja2dyb3VuZDogJGRhcmtibHVlO1xuICBjb2xvcjogJGxpZ2h0O1xufVxuXG51bCB7XG4gIHBhZGRpbmc6IDA7XG59XG5cbmxhYmVsIHtcbiAgbWluLXdpZHRoOiAyMGVtO1xuICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG59XG5cbi50cnkge1xuICBtYXJnaW46IDAgYXV0bztcbn1cblxuLnBhZGRlZCB7XG4gIHBhZGRpbmc6IDFyZW07XG5cbiAgJi12IHtcbiAgICBwYWRkaW5nOiAwO1xuICAgIHBhZGRpbmctdG9wOiAxcmVtO1xuICAgIHBhZGRpbmctYm90dG9tOiAxcmVtO1xuICB9XG59XG5cbi5tYXJnZWQge1xuICBtYXJnaW46IDFyZW07XG5cbiAgJi12IHtcbiAgICBtYXJnaW46IDA7XG4gICAgbWFyZ2luLXRvcDogMXJlbTtcbiAgICBtYXJnaW4tYm90dG9tOiAxcmVtO1xuICB9XG5cbiAgJi1oIHtcbiAgICBtYXJnaW46IDA7XG4gICAgbWFyZ2luLXJpZ2h0OiAxcmVtO1xuICAgIG1hcmdpbi1sZWZ0OiAxcmVtO1xuICB9XG59XG5cbi5iZ3dhcm5pbmcge1xuICBiYWNrZ3JvdW5kOiBvcmFuZ2U7XG4gIGNvbG9yOiAjZWU1NTU1O1xufVxuXG4uYmdkYW5nZXIge1xuICBiYWNrZ3JvdW5kOiBpbmRpYW5yZWQ7XG4gIGNvbG9yOiAjMzMzO1xuICBmb250LXdlaWdodDogYm9sZDtcbn1cblxuLmJnc3VjY2VzcyB7XG4gIGJhY2tncm91bmQ6IGdyZWVueWVsbG93O1xuICBjb2xvcjogIzAwMDAwMDtcbn1cblxuLnByZXZpc2lvbm5lbCB7XG4gIGZvbnQtc2l6ZTogMXJlbTtcblxuICBsYWJlbCB7XG4gICAgbWluLXdpZHRoOiAyMjBweDtcbiAgfVxuXG4gIC5iaWctbnVtYmVyIHtcbiAgICBmb250LXNpemU6IDEuODVyZW07XG4gICAgY29sb3I6ICMyQjJkNDI7XG4gIH1cbn1cblxuXG5odG1sLCBoMSwgaDIsIGgzLCBoNCwgaDUsIGg2IHtcbiAgZm9udC1mYW1pbHk6IFNvdXJjZSBTYW5zLCBBcmlhbCwgSGVsdmV0aWNhLCBzYW5zLXNlcmlmO1xufVxuXG5pbnB1dCB7XG4gIHdpZHRoOiBhdXRvO1xuICBtaW4td2lkdGg6IDJlbTtcbn1cblxuI21lbnUtZGFzaGJvYXJkIHtcbiAgYmFja2dyb3VuZDogJGRhcms7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIHBvc2l0aW9uOiBmaXhlZDtcbiAgbGVmdDogMDtcbiAgdG9wOiAwO1xuICBoZWlnaHQ6IDEwMHZoO1xuICB3aWR0aDogMTN2dztcbiAgbWluLXdpZHRoOiAzMDBweDtcbiAgb3ZlcmZsb3cteDogYXV0bztcbiAgei1pbmRleDogMTA7XG5cbiAgLm5hdiB7XG4gICAgd2lkdGg6IDEwMCU7XG4gICAgbWluLXdpZHRoOiAzMDBweDtcbiAgICBkaXNwbGF5OiBibG9jaztcbiAgICBib3JkZXItcmlnaHQ6IHNvbGlkIDJweCBtaXgoJGRhcmssICRncmV5KTtcblxuICAgIC5idG4ge1xuICAgICAgY29sb3I6ICRsaWdodDtcbiAgICB9XG5cbiAgICAuYnRuLWRlZmF1bHQge1xuICAgICAgY29sb3I6ICRsaWdodDtcblxuICAgICAgJjpob3ZlciB7XG4gICAgICAgIGJhY2tncm91bmQ6IG1peCgkZGVlcGJsdWUsICRsaWdodCk7XG4gICAgICAgIGNvbG9yOiAkZGFyaztcbiAgICAgICAgZm9udC13ZWlnaHQ6IDYwMDtcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICBpLmZhIHtcbiAgICBmbG9hdDogbGVmdDtcbiAgICBtYXJnaW4tcmlnaHQ6IDFlbTtcbiAgICBjb2xvcjogJGxpZ2h0O1xuICB9XG59XG5cbi5uYXYgPiBsaSA+IGE6aG92ZXIsIC5uYXYgPiBsaSA+IGEge1xuICAmOmZvY3VzIHtcbiAgICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcbiAgICBib3JkZXI6IG5vbmU7XG4gICAgY29sb3I6ICRsaWdodGJsdWU7XG4gIH1cblxuICAmOmZvY3VzIHtcbiAgICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcbiAgICBib3JkZXI6IG5vbmU7XG4gICAgY29sb3I6ICRsaWdodGJsdWU7XG4gIH1cbn1cblxuLmJ0biB7XG4gIGJvcmRlcjogMDtcbn1cblxuLmJ0bi1kZWZhdWx0IHtcbiAgYmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cbn1cblxuLmJ0bi1zdWNjZXNzIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogJGRlZXBibHVlO1xuICBmb250LXdlaWdodDogODAwO1xufVxuXG50ciB7XG4gICYuYmctc3VjY2VzcyB7XG4gICAgdGQge1xuICAgICAgYmFja2dyb3VuZDogZ3JlZW55ZWxsb3c7XG4gICAgfVxuICB9XG59XG5cbi50YWJsZSB7XG4gID4gZGl2IHtcbiAgICAmOmhvdmVyIHtcbiAgICAgIGJhY2tncm91bmQ6ICNjY2M7XG4gICAgfVxuICB9XG59XG5cbi50YWJsZSA+IHRoZWFkID4gdHIgPiB0ZCxcbnRhYmxlIHRkIHtcbiAgcGFkZGluZzogMC41ZW07XG59XG5cbi5sb2dpbi1mb3N1YiB7XG4gIC5wYWRkZWQge1xuICAgIHBhZGRpbmc6IDNlbTtcbiAgfVxuXG4gIGlucHV0W3R5cGU9c3VibWl0XSB7XG4gICAgYmFja2dyb3VuZDogJHByaW1hcnk7XG4gICAgY29sb3I6ICRsaWdodDtcbiAgICBkaXNwbGF5OiBibG9jaztcbiAgICBtYXJnaW4tdG9wOiAxZW07XG4gICAgcGFkZGluZzogMWVtO1xuICAgIGJvcmRlcjogMDtcbiAgICB3aWR0aDogMTAwJTtcblxuICAgICY6aG92ZXIge1xuICAgICAgYmFja2dyb3VuZDogJGxpZ2h0Ymx1ZTtcbiAgICB9XG4gIH1cbn1cblxuI2Zvc191c2VyX3Byb2ZpbGVfZm9ybSB7XG4gIGRpdiB7XG4gICAgbWFyZ2luOiAwLjVlbSBhdXRvO1xuICB9XG59XG5cbiNib2R5bGFuZCB7XG4gIG1pbi1oZWlnaHQ6IDEwMHZoO1xuICAuY29udGFpbmVyIHtcbiAgICBtaW4taGVpZ2h0OiA5MHZoO1xuICB9XG5cbiAgPiAucm93IHtcbiAgICBtaW4taGVpZ2h0OiA5MHZoO1xuICAgIC8vIGZvciBjcnVkIGZvcm1zXG4gICAgdGFibGV7XG4gICAgICB0aGVhZHtcbiAgICAgICAgdGh7XG4gICAgICAgICAgcGFkZGluZzogMC41cmVtO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICArIHVse1xuICAgICAgICBhIHtcbiAgICAgICAgICBtYXJnaW4tdG9wOiAxZW07XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cbiAgdGFibGUge1xuICAgIG1hcmdpbi10b3A6IDJlbTtcbiAgfVxufVxuXG4jbWVudV9idXR0b24ge1xuICB6LWluZGV4OiAxMDtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICByaWdodDogMWVtO1xuICB0b3A6IC0ycHg7XG4gIGZvbnQtc2l6ZTogMXJlbTtcbn1cblxuLmhlYWRpbmctb2YtbGlzdCB7XG4gIGEge1xuICAgIG1hcmdpbi10b3A6IDFlbTtcbiAgfVxufVxuXG4uaGludCB7XG4gIG1hcmdpbi10b3A6IDFlbTtcbn1cbiIsIlxuYm9keSB7XG4gIGJhY2tncm91bmQ6ICNGNUY1RjU7XG4gIGZvbnQ6IDE4cHgvMS41IHNhbnMtc2VyaWY7XG59XG5cbmgxLCBoMiB7XG4gIGxpbmUtaGVpZ2h0OiAxLjI7XG4gIG1hcmdpbjogMCAwIC41ZW07XG59XG5cbmgxIHtcbiAgZm9udC1zaXplOiAzNnB4O1xufVxuXG5oMiB7XG4gIGZvbnQtc2l6ZTogMjFweDtcbiAgbWFyZ2luLWJvdHRvbTogMWVtO1xufVxuXG5wIHtcbiAgbWFyZ2luOiAwIDAgMWVtIDA7XG59XG5cbmEge1xuICBjb2xvcjogJHByaW1hcnk7XG59XG5cbmE6aG92ZXIge1xuICB0ZXh0LWRlY29yYXRpb246IG5vbmU7XG59XG5cbmNvZGUge1xuICBiYWNrZ3JvdW5kOiAjRjVGNUY1O1xuICBtYXgtd2lkdGg6IDEwMHB4O1xuICBwYWRkaW5nOiAycHggNnB4O1xuICB3b3JkLXdyYXA6IGJyZWFrLXdvcmQ7XG59XG5cbiN3cmFwcGVyIHtcbiAgYmFja2dyb3VuZDogI0ZGRjtcbiAgbWFyZ2luOiAxZW0gYXV0bztcbiAgLy9tYXgtd2lkdGg6IDgwMHB4O1xuICB3aWR0aDogOTUlO1xufVxuXG4jY29udGFpbmVyIHtcbiAgcGFkZGluZzogMmVtO1xufVxuXG4jaG9tZXBhZ2V7XG4gIEBleHRlbmQgLmJpZ2dlci10ZXh0O1xuICBoMSBzcGFuIHtcbiAgICBkaXNwbGF5OiBibG9jaztcbiAgICBmb250LXNpemU6IDc1JTtcbiAgfVxufVxuLmhpbnQsXG4ucHJvZHVjdC12YWx1ZXMtYmxvY2t7XG4gIEBleHRlbmQgLmJpZ2dlci10ZXh0O1xuICBoMntcbiAgICBmb250LXNpemU6IDVyZW07XG4gIH1cbn1cbi5iaWdnZXItdGV4dHtcbiAgZm9udC1zaXplOiAycmVtO1xuICBsaW5lLWhlaWdodDogMy41cmVtO1xufVxuI2ljb24tc3RhdHVzLCAjaWNvbi1ib29rIHtcbiAgZmxvYXQ6IGxlZnQ7XG4gIGhlaWdodDogNjRweDtcbiAgbWFyZ2luLXJpZ2h0OiAxZW07XG4gIG1hcmdpbi10b3A6IC00cHg7XG4gIHdpZHRoOiA2NHB4O1xufVxuXG4jaWNvbi1ib29rIHtcbiAgZGlzcGxheTogbm9uZTtcbn1cblxuQG1lZGlhIChtaW4td2lkdGg6IDc2OHB4KSB7XG4gICN3cmFwcGVyIHtcbiAgICAvL3dpZHRoOiA4MCU7XG4gICAgbWFyZ2luOiAyZW0gYXV0bztcbiAgfVxuXG4gICNpY29uLWJvb2sge1xuICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgfVxuXG4gICNzdGF0dXMgYSwgI25leHQgYSB7XG4gICAgZGlzcGxheTogYmxvY2s7XG4gIH1cblxuICBALXdlYmtpdC1rZXlmcmFtZXMgZmFkZS1pbiB7XG4gICAgMCUge1xuICAgICAgb3BhY2l0eTogMDtcbiAgICB9XG4gICAgMTAwJSB7XG4gICAgICBvcGFjaXR5OiAxO1xuICAgIH1cbiAgfVxuICBAa2V5ZnJhbWVzIGZhZGUtaW4ge1xuICAgIDAlIHtcbiAgICAgIG9wYWNpdHk6IDA7XG4gICAgfVxuICAgIDEwMCUge1xuICAgICAgb3BhY2l0eTogMTtcbiAgICB9XG4gIH1cbiAgLnNmLXRvb2xiYXIge1xuICAgIG9wYWNpdHk6IDA7XG4gICAgLXdlYmtpdC1hbmltYXRpb246IGZhZGUtaW4gMXMgLjJzIGZvcndhcmRzO1xuICAgIGFuaW1hdGlvbjogZmFkZS1pbiAxcyAuMnMgZm9yd2FyZHM7XG4gIH1cbn1cblxuLmhlYWRlci1ibG9ja3tcbiAgYmFja2dyb3VuZDogJGRhcmtibHVlO1xuICAuYnRuLWRlZmF1bHR7XG4gICAgY29sb3I6ICRncmV5O1xuICB9XG4gIC5idG57XG5cbiAgc3BhbntcbiAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgcmlnaHQ6IDIuNWVtO1xuICAgIHRvcDogMWVtO1xuICB9XG4gIH1cbn1cbiNtZW51LWRhc2hib2FyZCAubmF2IC5sb2dvLWhvbWUuYnRuLWRlZmF1bHR7XG4gIGJhY2tncm91bmQ6ICRkYXJrYmx1ZTtcbiAgaGVpZ2h0OiA1MnB4O1xuICBmb250LXNpemU6IDFlbTtcbn1cbiIsIlxuLm1haW4tc2VjdGlvbiB7XG4gIHBhZGRpbmc6IDFyZW07XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGNvbG9yOiAkbGlnaHQ7XG4gIGp1c3RpZnktY29udGVudDogY2VudGVyO1xuICBoMSB7XG4gICAgZm9udC1zaXplOiA0ZW07XG4gIH1cbiAgaDIge1xuICAgIGNvbG9yOiAkbGlnaHQgIWltcG9ydGFudDtcbiAgfVxuICA+IGRpdiB7XG4gICAgaGVpZ2h0OiA4MHZoO1xuICAgIHBhZGRpbmctdG9wOiAyNXZoO1xuICAgIG1heC13aWRodDogNTAlO1xuICB9XG59XG5cbi5wcm9kdWN0LXZhbHVlcyB7XG4gIGNvbG9yOiAkbGlnaHQ7XG4gIHBhZGRpbmc6IDRyZW07XG4gIHBhZGRpbmctdG9wOiAyNXZoO1xufVxuXG4jaG9tZXBhZ2Uge1xuICBoMiwgaDMsIGg0LCBoNSwgaDYge1xuICAgIGNvbG9yOiAkbGlnaHQ7XG4gIH1cbiAgZm9udC1zaXplOiAxLjVyZW07XG59XG4iLCIua2V5LWZpZ3VyZXtcbiAgZm9udC1zaXplOiAyZW07XG4gIGZvbnQtd2VpZ2h0OiBsaWdodDtcbn1cbiIsIiNjYWlzc2Utbm93IHtcbiAgLnByb2R1Y3QtYm94IHtcbiAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG4gICAgbWFyZ2luLXJpZ2h0OiAxcmVtO1xuICAgIG1hcmdpbi1ib3R0b206IDFyZW07XG4gICAgd2lkdGg6IDEwMCU7XG4gICAgZmxvYXQ6IGxlZnQ7XG4gIH1cblxuICAucHJvZHVjdC1idXR0b24ge1xuICAgIHdpZHRoOiA4MCU7XG4gICAgdGV4dC1vdmVyZmxvdy1lbGxpcHNpczogXCIuLi5cIjtcbiAgfVxuXG4gIC5saXN0aW5nLXByb2R1Y3RzIHtcblxuICAgIGJ1dHRvbi5hY3RpdmUge1xuICAgICAgYmFja2dyb3VuZDogeWVsbG93Z3JlZW47XG4gICAgfVxuXG4gICAgLmJ0biwgYnV0dG9uIHtcbiAgICAgIGZvbnQtc2l6ZTogMS42cmVtO1xuICAgICAgcGFkZGluZzogMS41cmVtO1xuICAgICAgLXdlYmtpdC1ib3JkZXItcmFkaXVzOiAxcmVtO1xuICAgICAgLW1vei1ib3JkZXItcmFkaXVzOiAxcmVtO1xuICAgICAgYm9yZGVyLXJhZGl1czogMXJlbTtcbiAgICAgIGJvcmRlci1jb2xvcjogJGFsbC10ZXh0LWNvbG9yO1xuICAgICAgYm94LXNoYWRvdzogNXB4IDNweCAxMHB4IDJweCAjZGRkO1xuICAgICAgYm9yZGVyLXdpZHRoOiAwO1xuXG4gICAgICAmLmJ0bi1wcmltYXJ5IHtcbiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogJGRlZXBibHVlO1xuICAgICAgfVxuXG4gICAgICAmOmhvdmVyIHtcbiAgICAgICAgYmFja2dyb3VuZDogJGxpZ2h0Ymx1ZTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICAuYmFkZ2UtZGVmYXVsdCB7XG4gICAgICBiYWNrZ3JvdW5kOiAkbGlnaHRibHVlO1xuICAgIH1cblxuICAgIC5iYWRnZS1zdWNjZXNzIHtcbiAgICAgIGJhY2tncm91bmQ6IG1peChncmVlbiwgJGxpZ2h0Ymx1ZSk7XG4gICAgfVxuICB9XG5cbiAgLmlucHV0LWNvbW1lbnQge1xuICAgIHdpZHRoOiBjYWxjKDEwMCUgLSA0MHB4KTtcbiAgfVxufVxuXG4vLyBjb250YWluZXIgb2YgY2F0ZWdvcmllc1xuLmhvcml6b250YWwtbGFuZCB7XG4gIG92ZXJmbG93LXg6IGF1dG87XG4gIG92ZXJmbG93LXk6IGhpZGRlbjtcbiAgLy93aWR0aDogMTAwJTtcbiAgaGVpZ2h0OiA3NXZoO1xuICBiYWNrZ3JvdW5kOiAjY2NjO1xuICBwYWRkaW5nOiAwLjVyZW07XG59XG5cbi8vIGxpc3Qgb2Ygb25lIGNhdGVnb3J5XG4ub25lLWNhdGVnb3J5IHtcbiAgYmFja2dyb3VuZDogI2RlZGVkZTtcbiAgd2lkdGg6IDM1MHB4O1xuICBtYXJnaW46IDAgNHB4O1xuICBoZWlnaHQ6IGNhbGMoNzR2aCAtIDFyZW0pO1xuICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG4gIC8vdmVydGljYWwtYWxpZ246IHRvcDtcbiAgd2hpdGUtc3BhY2U6IG5vd3JhcDtcbiAgLy9mbG9hdDogbGVmdDtcbiAgaDIge1xuICAgIGZvbnQtd2VpZ2h0OiBib2xkO1xuXG4gICAgJjpmaXJzdC1sZXR0ZXIge1xuICAgICAgdGV4dC10cmFuc2Zvcm06IGNhcGl0YWxpemU7XG4gICAgfVxuICB9XG59XG5cbi5jYXRlZ29yeS1saXN0aW5nIHtcbiAgYm9yZGVyOiBzb2xpZCAxcHggJGdyZXk7XG4gIHBhZGRpbmc6IDFyZW07XG4gIG1hcmdpbjogMC41cmVtO1xuICBib3JkZXItcmFkaXVzOiAwLjI1cmVtO1xufVxuXG4udmFsaWRhdGVfc2VsbGluZyB7XG4gIG1hcmdpbjogMC4yNXJlbTtcbn1cblxuLnByb2R1Y3QtbGlzdGluZyB7XG4gIGhlaWdodDogNzB2aDtcbiAgb3ZlcmZsb3c6IGF1dG87XG59XG5cbi5zZWxsaW5ncyB7XG4gIC5yZW1vdmUtaXRlbSB7XG4gICAgbWFyZ2luLWxlZnQ6IDFlbTtcbiAgfVxufVxuXG4jbm90X2xvYWRlZCB7XG4gIHdpZHRoOiAxMDAlO1xuICBoZWlnaHQ6IDc1dmg7XG59XG5cbi5zZWxsaW5nLW9rIHtcbiAgcG9zaXRpb246IGZpeGVkO1xuICBib3R0b206IDA7XG4gIGxlZnQ6IDJlbTtcbiAgei1pbmRleDogMTA7XG59XG5cbi5ibG9jayB7XG4gIGRpc3BsYXk6IGJsb2NrO1xuICB3aWR0aDogY2FsYygxMDAlIC0gMmVtKTtcbiAgdGV4dC1hbGlnbjogY2VudGVyO1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9*/ \ No newline at end of file diff --git a/public/build/app.js b/public/build/app.js index cfabd954..e6e9b1da 100644 --- a/public/build/app.js +++ b/public/build/app.js @@ -168,7 +168,7 @@ var _default = /*#__PURE__*/function (_Controller) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _styles_app_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./styles/app.css */ "./assets/styles/app.css"); +/* harmony import */ var _styles_app_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./styles/app.scss */ "./assets/styles/app.scss"); /* harmony import */ var _bootstrap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bootstrap */ "./assets/bootstrap.js"); /* * Welcome to your app's main JavaScript file! @@ -207,10 +207,10 @@ var app = (0,_symfony_stimulus_bridge__WEBPACK_IMPORTED_MODULE_0__.startStimulus /***/ }), -/***/ "./assets/styles/app.css": -/*!*******************************!*\ - !*** ./assets/styles/app.css ***! - \*******************************/ +/***/ "./assets/styles/app.scss": +/*!********************************!*\ + !*** ./assets/styles/app.scss ***! + \********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; @@ -227,4 +227,4 @@ __webpack_require__.r(__webpack_exports__); /******/ var __webpack_exports__ = __webpack_require__.O(); /******/ } ]); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBQUE7QUFDQTtBQUNBOzs7QUFHQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7Ozs7Ozs7OztBQ3RCQSxpRUFBZTtBQUNmLENBQUM7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FDRCtDOztBQUVoRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFSQSxJQUFBQyxRQUFBLDBCQUFBQyxXQUFBO0VBQUFDLFNBQUEsQ0FBQUYsUUFBQSxFQUFBQyxXQUFBO0VBQUEsSUFBQUUsTUFBQSxHQUFBQyxZQUFBLENBQUFKLFFBQUE7RUFBQSxTQUFBQSxTQUFBO0lBQUFLLGVBQUEsT0FBQUwsUUFBQTtJQUFBLE9BQUFHLE1BQUEsQ0FBQUcsS0FBQSxPQUFBQyxTQUFBO0VBQUE7RUFBQUMsWUFBQSxDQUFBUixRQUFBO0lBQUFTLEdBQUE7SUFBQUMsS0FBQSxFQVVJLFNBQUFDLFFBQUEsRUFBVTtNQUNOLElBQUksQ0FBQ0MsT0FBTyxDQUFDQyxXQUFXLEdBQUcsbUVBQW1FO0lBQ2xHO0VBQUM7RUFBQSxPQUFBYixRQUFBO0FBQUEsRUFId0JELDJEQUFVOzs7Ozs7Ozs7Ozs7Ozs7QUNYdkM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQzBCOztBQUUxQjs7Ozs7Ozs7Ozs7Ozs7Ozs7QUNWNEQ7O0FBRTVEO0FBQ08sSUFBTWlCLEdBQUcsR0FBR0QsMEVBQWdCLENBQUNFLHlJQUluQyxDQUFDOztBQUVGO0FBQ0E7Ozs7Ozs7Ozs7OztBQ1ZBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLyBcXC5banRdc3giLCJ3ZWJwYWNrOi8vLy4vYXNzZXRzL2NvbnRyb2xsZXJzLmpzb24iLCJ3ZWJwYWNrOi8vLy4vYXNzZXRzL2NvbnRyb2xsZXJzL2hlbGxvX2NvbnRyb2xsZXIuanMiLCJ3ZWJwYWNrOi8vLy4vYXNzZXRzL2FwcC5qcyIsIndlYnBhY2s6Ly8vLi9hc3NldHMvYm9vdHN0cmFwLmpzIiwid2VicGFjazovLy8uL2Fzc2V0cy9zdHlsZXMvYXBwLmNzcz8zZmJhIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBtYXAgPSB7XG5cdFwiLi9oZWxsb19jb250cm9sbGVyLmpzXCI6IFwiLi9ub2RlX21vZHVsZXMvQHN5bWZvbnkvc3RpbXVsdXMtYnJpZGdlL2xhenktY29udHJvbGxlci1sb2FkZXIuanMhLi9hc3NldHMvY29udHJvbGxlcnMvaGVsbG9fY29udHJvbGxlci5qc1wiXG59O1xuXG5cbmZ1bmN0aW9uIHdlYnBhY2tDb250ZXh0KHJlcSkge1xuXHR2YXIgaWQgPSB3ZWJwYWNrQ29udGV4dFJlc29sdmUocmVxKTtcblx0cmV0dXJuIF9fd2VicGFja19yZXF1aXJlX18oaWQpO1xufVxuZnVuY3Rpb24gd2VicGFja0NvbnRleHRSZXNvbHZlKHJlcSkge1xuXHRpZighX193ZWJwYWNrX3JlcXVpcmVfXy5vKG1hcCwgcmVxKSkge1xuXHRcdHZhciBlID0gbmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIiArIHJlcSArIFwiJ1wiKTtcblx0XHRlLmNvZGUgPSAnTU9EVUxFX05PVF9GT1VORCc7XG5cdFx0dGhyb3cgZTtcblx0fVxuXHRyZXR1cm4gbWFwW3JlcV07XG59XG53ZWJwYWNrQ29udGV4dC5rZXlzID0gZnVuY3Rpb24gd2VicGFja0NvbnRleHRLZXlzKCkge1xuXHRyZXR1cm4gT2JqZWN0LmtleXMobWFwKTtcbn07XG53ZWJwYWNrQ29udGV4dC5yZXNvbHZlID0gd2VicGFja0NvbnRleHRSZXNvbHZlO1xubW9kdWxlLmV4cG9ydHMgPSB3ZWJwYWNrQ29udGV4dDtcbndlYnBhY2tDb250ZXh0LmlkID0gXCIuL2Fzc2V0cy9jb250cm9sbGVycyBzeW5jIHJlY3Vyc2l2ZSAuL25vZGVfbW9kdWxlcy9Ac3ltZm9ueS9zdGltdWx1cy1icmlkZ2UvbGF6eS1jb250cm9sbGVyLWxvYWRlci5qcyEgXFxcXC5banRdc3g/JFwiOyIsImV4cG9ydCBkZWZhdWx0IHtcbn07IiwiaW1wb3J0IHsgQ29udHJvbGxlciB9IGZyb20gJ0Bob3R3aXJlZC9zdGltdWx1cyc7XG5cbi8qXG4gKiBUaGlzIGlzIGFuIGV4YW1wbGUgU3RpbXVsdXMgY29udHJvbGxlciFcbiAqXG4gKiBBbnkgZWxlbWVudCB3aXRoIGEgZGF0YS1jb250cm9sbGVyPVwiaGVsbG9cIiBhdHRyaWJ1dGUgd2lsbCBjYXVzZVxuICogdGhpcyBjb250cm9sbGVyIHRvIGJlIGV4ZWN1dGVkLiBUaGUgbmFtZSBcImhlbGxvXCIgY29tZXMgZnJvbSB0aGUgZmlsZW5hbWU6XG4gKiBoZWxsb19jb250cm9sbGVyLmpzIC0+IFwiaGVsbG9cIlxuICpcbiAqIERlbGV0ZSB0aGlzIGZpbGUgb3IgYWRhcHQgaXQgZm9yIHlvdXIgdXNlIVxuICovXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBleHRlbmRzIENvbnRyb2xsZXIge1xuICAgIGNvbm5lY3QoKSB7XG4gICAgICAgIHRoaXMuZWxlbWVudC50ZXh0Q29udGVudCA9ICdIZWxsbyBTdGltdWx1cyEgRWRpdCBtZSBpbiBhc3NldHMvY29udHJvbGxlcnMvaGVsbG9fY29udHJvbGxlci5qcyc7XG4gICAgfVxufVxuIiwiLypcbiAqIFdlbGNvbWUgdG8geW91ciBhcHAncyBtYWluIEphdmFTY3JpcHQgZmlsZSFcbiAqXG4gKiBXZSByZWNvbW1lbmQgaW5jbHVkaW5nIHRoZSBidWlsdCB2ZXJzaW9uIG9mIHRoaXMgSmF2YVNjcmlwdCBmaWxlXG4gKiAoYW5kIGl0cyBDU1MgZmlsZSkgaW4geW91ciBiYXNlIGxheW91dCAoYmFzZS5odG1sLnR3aWcpLlxuICovXG5cbi8vIGFueSBDU1MgeW91IGltcG9ydCB3aWxsIG91dHB1dCBpbnRvIGEgc2luZ2xlIGNzcyBmaWxlIChhcHAuY3NzIGluIHRoaXMgY2FzZSlcbmltcG9ydCAnLi9zdHlsZXMvYXBwLmNzcyc7XG5cbi8vIHN0YXJ0IHRoZSBTdGltdWx1cyBhcHBsaWNhdGlvblxuaW1wb3J0ICcuL2Jvb3RzdHJhcCc7XG4iLCJpbXBvcnQgeyBzdGFydFN0aW11bHVzQXBwIH0gZnJvbSAnQHN5bWZvbnkvc3RpbXVsdXMtYnJpZGdlJztcblxuLy8gUmVnaXN0ZXJzIFN0aW11bHVzIGNvbnRyb2xsZXJzIGZyb20gY29udHJvbGxlcnMuanNvbiBhbmQgaW4gdGhlIGNvbnRyb2xsZXJzLyBkaXJlY3RvcnlcbmV4cG9ydCBjb25zdCBhcHAgPSBzdGFydFN0aW11bHVzQXBwKHJlcXVpcmUuY29udGV4dChcbiAgICAnQHN5bWZvbnkvc3RpbXVsdXMtYnJpZGdlL2xhenktY29udHJvbGxlci1sb2FkZXIhLi9jb250cm9sbGVycycsXG4gICAgdHJ1ZSxcbiAgICAvXFwuW2p0XXN4PyQvXG4pKTtcblxuLy8gcmVnaXN0ZXIgYW55IGN1c3RvbSwgM3JkIHBhcnR5IGNvbnRyb2xsZXJzIGhlcmVcbi8vIGFwcC5yZWdpc3Rlcignc29tZV9jb250cm9sbGVyX25hbWUnLCBTb21lSW1wb3J0ZWRDb250cm9sbGVyKTtcbiIsIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxuZXhwb3J0IHt9OyJdLCJuYW1lcyI6WyJDb250cm9sbGVyIiwiX2RlZmF1bHQiLCJfQ29udHJvbGxlciIsIl9pbmhlcml0cyIsIl9zdXBlciIsIl9jcmVhdGVTdXBlciIsIl9jbGFzc0NhbGxDaGVjayIsImFwcGx5IiwiYXJndW1lbnRzIiwiX2NyZWF0ZUNsYXNzIiwia2V5IiwidmFsdWUiLCJjb25uZWN0IiwiZWxlbWVudCIsInRleHRDb250ZW50IiwiZGVmYXVsdCIsInN0YXJ0U3RpbXVsdXNBcHAiLCJhcHAiLCJyZXF1aXJlIiwiY29udGV4dCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBQUE7QUFDQTtBQUNBOzs7QUFHQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7Ozs7Ozs7OztBQ3RCQSxpRUFBZTtBQUNmLENBQUM7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FDRCtDOztBQUVoRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFSQSxJQUFBQyxRQUFBLDBCQUFBQyxXQUFBO0VBQUFDLFNBQUEsQ0FBQUYsUUFBQSxFQUFBQyxXQUFBO0VBQUEsSUFBQUUsTUFBQSxHQUFBQyxZQUFBLENBQUFKLFFBQUE7RUFBQSxTQUFBQSxTQUFBO0lBQUFLLGVBQUEsT0FBQUwsUUFBQTtJQUFBLE9BQUFHLE1BQUEsQ0FBQUcsS0FBQSxPQUFBQyxTQUFBO0VBQUE7RUFBQUMsWUFBQSxDQUFBUixRQUFBO0lBQUFTLEdBQUE7SUFBQUMsS0FBQSxFQVVJLFNBQUFDLFFBQUEsRUFBVTtNQUNOLElBQUksQ0FBQ0MsT0FBTyxDQUFDQyxXQUFXLEdBQUcsbUVBQW1FO0lBQ2xHO0VBQUM7RUFBQSxPQUFBYixRQUFBO0FBQUEsRUFId0JELDJEQUFVOzs7Ozs7Ozs7Ozs7Ozs7QUNYdkM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQzJCOztBQUUzQjs7Ozs7Ozs7Ozs7Ozs7Ozs7QUNWNEQ7O0FBRTVEO0FBQ08sSUFBTWlCLEdBQUcsR0FBR0QsMEVBQWdCLENBQUNFLHlJQUluQyxDQUFDOztBQUVGO0FBQ0E7Ozs7Ozs7Ozs7OztBQ1ZBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLyBcXC5banRdc3giLCJ3ZWJwYWNrOi8vLy4vYXNzZXRzL2NvbnRyb2xsZXJzLmpzb24iLCJ3ZWJwYWNrOi8vLy4vYXNzZXRzL2NvbnRyb2xsZXJzL2hlbGxvX2NvbnRyb2xsZXIuanMiLCJ3ZWJwYWNrOi8vLy4vYXNzZXRzL2FwcC5qcyIsIndlYnBhY2s6Ly8vLi9hc3NldHMvYm9vdHN0cmFwLmpzIiwid2VicGFjazovLy8uL2Fzc2V0cy9zdHlsZXMvYXBwLnNjc3MiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIG1hcCA9IHtcblx0XCIuL2hlbGxvX2NvbnRyb2xsZXIuanNcIjogXCIuL25vZGVfbW9kdWxlcy9Ac3ltZm9ueS9zdGltdWx1cy1icmlkZ2UvbGF6eS1jb250cm9sbGVyLWxvYWRlci5qcyEuL2Fzc2V0cy9jb250cm9sbGVycy9oZWxsb19jb250cm9sbGVyLmpzXCJcbn07XG5cblxuZnVuY3Rpb24gd2VicGFja0NvbnRleHQocmVxKSB7XG5cdHZhciBpZCA9IHdlYnBhY2tDb250ZXh0UmVzb2x2ZShyZXEpO1xuXHRyZXR1cm4gX193ZWJwYWNrX3JlcXVpcmVfXyhpZCk7XG59XG5mdW5jdGlvbiB3ZWJwYWNrQ29udGV4dFJlc29sdmUocmVxKSB7XG5cdGlmKCFfX3dlYnBhY2tfcmVxdWlyZV9fLm8obWFwLCByZXEpKSB7XG5cdFx0dmFyIGUgPSBuZXcgRXJyb3IoXCJDYW5ub3QgZmluZCBtb2R1bGUgJ1wiICsgcmVxICsgXCInXCIpO1xuXHRcdGUuY29kZSA9ICdNT0RVTEVfTk9UX0ZPVU5EJztcblx0XHR0aHJvdyBlO1xuXHR9XG5cdHJldHVybiBtYXBbcmVxXTtcbn1cbndlYnBhY2tDb250ZXh0LmtleXMgPSBmdW5jdGlvbiB3ZWJwYWNrQ29udGV4dEtleXMoKSB7XG5cdHJldHVybiBPYmplY3Qua2V5cyhtYXApO1xufTtcbndlYnBhY2tDb250ZXh0LnJlc29sdmUgPSB3ZWJwYWNrQ29udGV4dFJlc29sdmU7XG5tb2R1bGUuZXhwb3J0cyA9IHdlYnBhY2tDb250ZXh0O1xud2VicGFja0NvbnRleHQuaWQgPSBcIi4vYXNzZXRzL2NvbnRyb2xsZXJzIHN5bmMgcmVjdXJzaXZlIC4vbm9kZV9tb2R1bGVzL0BzeW1mb255L3N0aW11bHVzLWJyaWRnZS9sYXp5LWNvbnRyb2xsZXItbG9hZGVyLmpzISBcXFxcLltqdF1zeD8kXCI7IiwiZXhwb3J0IGRlZmF1bHQge1xufTsiLCJpbXBvcnQgeyBDb250cm9sbGVyIH0gZnJvbSAnQGhvdHdpcmVkL3N0aW11bHVzJztcblxuLypcbiAqIFRoaXMgaXMgYW4gZXhhbXBsZSBTdGltdWx1cyBjb250cm9sbGVyIVxuICpcbiAqIEFueSBlbGVtZW50IHdpdGggYSBkYXRhLWNvbnRyb2xsZXI9XCJoZWxsb1wiIGF0dHJpYnV0ZSB3aWxsIGNhdXNlXG4gKiB0aGlzIGNvbnRyb2xsZXIgdG8gYmUgZXhlY3V0ZWQuIFRoZSBuYW1lIFwiaGVsbG9cIiBjb21lcyBmcm9tIHRoZSBmaWxlbmFtZTpcbiAqIGhlbGxvX2NvbnRyb2xsZXIuanMgLT4gXCJoZWxsb1wiXG4gKlxuICogRGVsZXRlIHRoaXMgZmlsZSBvciBhZGFwdCBpdCBmb3IgeW91ciB1c2UhXG4gKi9cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIGV4dGVuZHMgQ29udHJvbGxlciB7XG4gICAgY29ubmVjdCgpIHtcbiAgICAgICAgdGhpcy5lbGVtZW50LnRleHRDb250ZW50ID0gJ0hlbGxvIFN0aW11bHVzISBFZGl0IG1lIGluIGFzc2V0cy9jb250cm9sbGVycy9oZWxsb19jb250cm9sbGVyLmpzJztcbiAgICB9XG59XG4iLCIvKlxuICogV2VsY29tZSB0byB5b3VyIGFwcCdzIG1haW4gSmF2YVNjcmlwdCBmaWxlIVxuICpcbiAqIFdlIHJlY29tbWVuZCBpbmNsdWRpbmcgdGhlIGJ1aWx0IHZlcnNpb24gb2YgdGhpcyBKYXZhU2NyaXB0IGZpbGVcbiAqIChhbmQgaXRzIENTUyBmaWxlKSBpbiB5b3VyIGJhc2UgbGF5b3V0IChiYXNlLmh0bWwudHdpZykuXG4gKi9cblxuLy8gYW55IENTUyB5b3UgaW1wb3J0IHdpbGwgb3V0cHV0IGludG8gYSBzaW5nbGUgY3NzIGZpbGUgKGFwcC5jc3MgaW4gdGhpcyBjYXNlKVxuaW1wb3J0ICcuL3N0eWxlcy9hcHAuc2Nzcyc7XG5cbi8vIHN0YXJ0IHRoZSBTdGltdWx1cyBhcHBsaWNhdGlvblxuaW1wb3J0ICcuL2Jvb3RzdHJhcCc7XG4iLCJpbXBvcnQgeyBzdGFydFN0aW11bHVzQXBwIH0gZnJvbSAnQHN5bWZvbnkvc3RpbXVsdXMtYnJpZGdlJztcblxuLy8gUmVnaXN0ZXJzIFN0aW11bHVzIGNvbnRyb2xsZXJzIGZyb20gY29udHJvbGxlcnMuanNvbiBhbmQgaW4gdGhlIGNvbnRyb2xsZXJzLyBkaXJlY3RvcnlcbmV4cG9ydCBjb25zdCBhcHAgPSBzdGFydFN0aW11bHVzQXBwKHJlcXVpcmUuY29udGV4dChcbiAgICAnQHN5bWZvbnkvc3RpbXVsdXMtYnJpZGdlL2xhenktY29udHJvbGxlci1sb2FkZXIhLi9jb250cm9sbGVycycsXG4gICAgdHJ1ZSxcbiAgICAvXFwuW2p0XXN4PyQvXG4pKTtcblxuLy8gcmVnaXN0ZXIgYW55IGN1c3RvbSwgM3JkIHBhcnR5IGNvbnRyb2xsZXJzIGhlcmVcbi8vIGFwcC5yZWdpc3Rlcignc29tZV9jb250cm9sbGVyX25hbWUnLCBTb21lSW1wb3J0ZWRDb250cm9sbGVyKTtcbiIsIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxuZXhwb3J0IHt9OyJdLCJuYW1lcyI6WyJDb250cm9sbGVyIiwiX2RlZmF1bHQiLCJfQ29udHJvbGxlciIsIl9pbmhlcml0cyIsIl9zdXBlciIsIl9jcmVhdGVTdXBlciIsIl9jbGFzc0NhbGxDaGVjayIsImFwcGx5IiwiYXJndW1lbnRzIiwiX2NyZWF0ZUNsYXNzIiwia2V5IiwidmFsdWUiLCJjb25uZWN0IiwiZWxlbWVudCIsInRleHRDb250ZW50IiwiZGVmYXVsdCIsInN0YXJ0U3RpbXVsdXNBcHAiLCJhcHAiLCJyZXF1aXJlIiwiY29udGV4dCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/public/build/fonts/SourceSansPro-Bold.751d4a14.otf b/public/build/fonts/SourceSansPro-Bold.751d4a14.otf new file mode 100644 index 00000000..98dbee74 Binary files /dev/null and b/public/build/fonts/SourceSansPro-Bold.751d4a14.otf differ diff --git a/public/build/fonts/SourceSansPro-Light.0d4a9a1b.otf b/public/build/fonts/SourceSansPro-Light.0d4a9a1b.otf new file mode 100644 index 00000000..159979f6 Binary files /dev/null and b/public/build/fonts/SourceSansPro-Light.0d4a9a1b.otf differ diff --git a/public/build/fonts/SourceSansPro-Regular.7a9975d8.otf b/public/build/fonts/SourceSansPro-Regular.7a9975d8.otf new file mode 100644 index 00000000..bdcfb27a Binary files /dev/null and b/public/build/fonts/SourceSansPro-Regular.7a9975d8.otf differ diff --git a/public/build/images/accessories.b35eab90.jpg b/public/build/images/accessories.b35eab90.jpg new file mode 100644 index 00000000..c2539475 Binary files /dev/null and b/public/build/images/accessories.b35eab90.jpg differ diff --git a/public/build/images/girl_computer.797d0805.jpg b/public/build/images/girl_computer.797d0805.jpg new file mode 100644 index 00000000..74ec2e10 Binary files /dev/null and b/public/build/images/girl_computer.797d0805.jpg differ diff --git a/public/build/manifest.json b/public/build/manifest.json index 10bd54b3..897c80a2 100644 --- a/public/build/manifest.json +++ b/public/build/manifest.json @@ -2,5 +2,10 @@ "build/app.css": "/build/app.css", "build/app.js": "/build/app.js", "build/runtime.js": "/build/runtime.js", - "build/vendors-node_modules_symfony_stimulus-bridge_dist_index_js-node_modules_core-js_modules_es_da-03e5c3.js": "/build/vendors-node_modules_symfony_stimulus-bridge_dist_index_js-node_modules_core-js_modules_es_da-03e5c3.js" + "build/vendors-node_modules_symfony_stimulus-bridge_dist_index_js-node_modules_core-js_modules_es_da-03e5c3.js": "/build/vendors-node_modules_symfony_stimulus-bridge_dist_index_js-node_modules_core-js_modules_es_da-03e5c3.js", + "build/images/girl_computer.jpg": "/build/images/girl_computer.797d0805.jpg", + "build/images/accessories.jpg": "/build/images/accessories.b35eab90.jpg", + "build/fonts/SourceSansPro-Bold.otf": "/build/fonts/SourceSansPro-Bold.751d4a14.otf", + "build/fonts/SourceSansPro-Regular.otf": "/build/fonts/SourceSansPro-Regular.7a9975d8.otf", + "build/fonts/SourceSansPro-Light.otf": "/build/fonts/SourceSansPro-Light.0d4a9a1b.otf" } \ No newline at end of file diff --git a/public/bundles/easyadmin/app.b5acb2f0.js b/public/bundles/easyadmin/app.914bb6ba.js similarity index 96% rename from public/bundles/easyadmin/app.b5acb2f0.js rename to public/bundles/easyadmin/app.914bb6ba.js index f03563b5..4dfab57b 100644 --- a/public/bundles/easyadmin/app.b5acb2f0.js +++ b/public/bundles/easyadmin/app.914bb6ba.js @@ -1,2 +1,2 @@ -/*! For license information please see app.b5acb2f0.js.LICENSE.txt */ -(()=>{var t={5577:function(t){t.exports=function(){"use strict";const t=1e6,e=1e3,i="transitionend",n=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),s=e=>{do{e+=Math.floor(Math.random()*t)}while(document.getElementById(e));return e},o=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},r=t=>{const e=o(t);return e&&document.querySelector(e)?e:null},a=t=>{const e=o(t);return e?document.querySelector(e):null},l=t=>{if(!t)return 0;let{transitionDuration:i,transitionDelay:n}=window.getComputedStyle(t);const s=Number.parseFloat(i),o=Number.parseFloat(n);return s||o?(i=i.split(",")[0],n=n.split(",")[0],(Number.parseFloat(i)+Number.parseFloat(n))*e):0},c=t=>{t.dispatchEvent(new Event(i))},d=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),u=t=>d(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,h=t=>{if(!d(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},p=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),f=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?f(t.parentNode):null},g=()=>{},m=t=>{t.offsetHeight},v=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,_=[],b=t=>{"loading"===document.readyState?(_.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of _)t()})),_.push(t)):t()},y=()=>"rtl"===document.documentElement.dir,w=t=>{b((()=>{const e=v();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}}))},O=t=>{"function"==typeof t&&t()},A=(t,e,n=!0)=>{if(!n)return void O(t);const s=5,o=l(e)+s;let r=!1;const a=({target:n})=>{n===e&&(r=!0,e.removeEventListener(i,a),O(t))};e.addEventListener(i,a),setTimeout((()=>{r||c(e)}),o)},x=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},E=/[^.]*(?=\..*)\.|.*/,S=/\..*/,C=/::\d+$/,k={};let I=1;const T={mouseenter:"mouseover",mouseleave:"mouseout"},L=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function N(t,e){return e&&`${e}::${I++}`||t.uidEvent||I++}function $(t){const e=N(t);return t.uidEvent=e,k[e]=k[e]||{},k[e]}function P(t,e){return function i(n){return z(n,{delegateTarget:t}),i.oneOff&&W.off(t,n.type,e),e.apply(t,[n])}}function D(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return z(s,{delegateTarget:r}),n.oneOff&&W.off(t,s.type,e,i),i.apply(r,[s])}}function j(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function F(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=H(t);return L.has(o)||(o=t),[n,s,o]}function M(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=F(e,i,n);if(e in T){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=$(t),c=l[a]||(l[a]={}),d=j(c,r,o?i:null);if(d)return void(d.oneOff=d.oneOff&&s);const u=N(r,e.replace(E,"")),h=o?D(t,i,r):P(t,r);h.delegationSelector=o?i:null,h.callable=r,h.oneOff=s,h.uidEvent=u,c[u]=h,t.addEventListener(a,h,o)}function q(t,e,i,n,s){const o=j(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function R(t,e,i,n){const s=e[i]||{};for(const o of Object.keys(s))if(o.includes(n)){const n=s[o];q(t,e,i,n.callable,n.delegationSelector)}}function H(t){return t=t.replace(S,""),T[t]||t}const W={on(t,e,i,n){M(t,e,i,n,!1)},one(t,e,i,n){M(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=F(e,i,n),a=r!==e,l=$(t),c=l[r]||{},d=e.startsWith(".");if(void 0===o){if(d)for(const i of Object.keys(l))R(t,l,i,e.slice(1));for(const i of Object.keys(c)){const n=i.replace(C,"");if(!a||e.includes(n)){const e=c[i];q(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;q(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=v();let s=null,o=!0,r=!0,a=!1;e!==H(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());let l=new Event(e,{bubbles:o,cancelable:!0});return l=z(l,i),a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function z(t,e){for(const[i,n]of Object.entries(e||{}))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}const V=new Map,B={set(t,e,i){V.has(t)||V.set(t,new Map);const n=V.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>V.has(t)&&V.get(t).get(e)||null,remove(t,e){if(!V.has(t))return;const i=V.get(t);i.delete(e),0===i.size&&V.delete(t)}};function K(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function U(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const Q={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${U(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${U(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=K(t.dataset[n])}return e},getDataAttribute:(t,e)=>K(t.getAttribute(`data-bs-${U(e)}`))};class J{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=d(e)?Q.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...d(e)?Q.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const i of Object.keys(e)){const s=e[i],o=t[i],r=d(o)?"element":n(o);if(!new RegExp(s).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${r}" but expected type "${s}".`)}}}const Y="5.2.3";class X extends J{constructor(t,e){super(),(t=u(t))&&(this._element=t,this._config=this._getConfig(e),B.set(this._element,this.constructor.DATA_KEY,this))}dispose(){B.remove(this._element,this.constructor.DATA_KEY),W.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){A(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return B.get(u(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return Y}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const G=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;W.on(document,i,`[data-bs-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),p(this))return;const s=a(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()}))},Z="alert",tt=".bs.alert",et=`close${tt}`,it=`closed${tt}`,nt="fade",st="show";class ot extends X{static get NAME(){return Z}close(){if(W.trigger(this._element,et).defaultPrevented)return;this._element.classList.remove(st);const t=this._element.classList.contains(nt);this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),W.trigger(this._element,it),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=ot.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}G(ot,"close"),w(ot);const rt="button",at="active",lt='[data-bs-toggle="button"]',ct="click.bs.button.data-api";class dt extends X{static get NAME(){return rt}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(at))}static jQueryInterface(t){return this.each((function(){const e=dt.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}W.on(document,ct,lt,(t=>{t.preventDefault();const e=t.target.closest(lt);dt.getOrCreateInstance(e).toggle()})),w(dt);const ut={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!p(t)&&h(t)))}},ht="swipe",pt=".bs.swipe",ft=`touchstart${pt}`,gt=`touchmove${pt}`,mt=`touchend${pt}`,vt=`pointerdown${pt}`,_t=`pointerup${pt}`,bt="touch",yt="pen",wt="pointer-event",Ot=40,At={endCallback:null,leftCallback:null,rightCallback:null},xt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Et extends J{constructor(t,e){super(),this._element=t,t&&Et.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return At}static get DefaultType(){return xt}static get NAME(){return ht}dispose(){W.off(this._element,pt)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),O(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=Ot)return;const e=t/this._deltaX;this._deltaX=0,e&&O(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(W.on(this._element,vt,(t=>this._start(t))),W.on(this._element,_t,(t=>this._end(t))),this._element.classList.add(wt)):(W.on(this._element,ft,(t=>this._start(t))),W.on(this._element,gt,(t=>this._move(t))),W.on(this._element,mt,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&(t.pointerType===yt||t.pointerType===bt)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const St="carousel",Ct=".bs.carousel",kt=".data-api",It=500,Tt="next",Lt="prev",Nt="left",$t="right",Pt=`slide${Ct}`,Dt=`slid${Ct}`,jt=`keydown${Ct}`,Ft=`mouseenter${Ct}`,Mt=`mouseleave${Ct}`,qt=`dragstart${Ct}`,Rt=`load${Ct}${kt}`,Ht=`click${Ct}${kt}`,Wt="carousel",zt="active",Vt="slide",Bt="carousel-item-end",Kt="carousel-item-start",Ut="carousel-item-next",Qt="carousel-item-prev",Jt=".active",Yt=".carousel-item",Xt=Jt+Yt,Gt=".carousel-item img",Zt=".carousel-indicators",te="[data-bs-slide], [data-bs-slide-to]",ee='[data-bs-ride="carousel"]',ie={ArrowLeft:$t,ArrowRight:Nt},ne={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},se={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class oe extends X{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=ut.findOne(Zt,this._element),this._addEventListeners(),this._config.ride===Wt&&this.cycle()}static get Default(){return ne}static get DefaultType(){return se}static get NAME(){return St}next(){this._slide(Tt)}nextWhenVisible(){!document.hidden&&h(this._element)&&this.next()}prev(){this._slide(Lt)}pause(){this._isSliding&&c(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?W.one(this._element,Dt,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void W.one(this._element,Dt,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?Tt:Lt;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&W.on(this._element,jt,(t=>this._keydown(t))),"hover"===this._config.pause&&(W.on(this._element,Ft,(()=>this.pause())),W.on(this._element,Mt,(()=>this._maybeEnableCycle()))),this._config.touch&&Et.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of ut.find(Gt,this._element))W.on(t,qt,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(Nt)),rightCallback:()=>this._slide(this._directionToOrder($t)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),It+this._config.interval))}};this._swipeHelper=new Et(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=ie[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=ut.findOne(Jt,this._indicatorsElement);e.classList.remove(zt),e.removeAttribute("aria-current");const i=ut.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(zt),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),n=t===Tt,s=e||x(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=e=>W.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(Pt).defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?Kt:Bt,c=n?Ut:Qt;s.classList.add(c),m(s),i.classList.add(l),s.classList.add(l);const d=()=>{s.classList.remove(l,c),s.classList.add(zt),i.classList.remove(zt,c,l),this._isSliding=!1,r(Dt)};this._queueCallback(d,i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains(Vt)}_getActive(){return ut.findOne(Xt,this._element)}_getItems(){return ut.find(Yt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return y()?t===Nt?Lt:Tt:t===Nt?Tt:Lt}_orderToDirection(t){return y()?t===Lt?Nt:$t:t===Lt?$t:Nt}static jQueryInterface(t){return this.each((function(){const e=oe.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}W.on(document,Ht,te,(function(t){const e=a(this);if(!e||!e.classList.contains(Wt))return;t.preventDefault();const i=oe.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===Q.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),W.on(window,Rt,(()=>{const t=ut.find(ee);for(const e of t)oe.getOrCreateInstance(e)})),w(oe);const re="collapse",ae=".bs.collapse",le=`show${ae}`,ce=`shown${ae}`,de=`hide${ae}`,ue=`hidden${ae}`,he=`click${ae}.data-api`,pe="show",fe="collapse",ge="collapsing",me="collapsed",ve=`:scope .${fe} .${fe}`,_e="collapse-horizontal",be="width",ye="height",we=".collapse.show, .collapse.collapsing",Oe='[data-bs-toggle="collapse"]',Ae={parent:null,toggle:!0},xe={parent:"(null|element)",toggle:"boolean"};class Ee extends X{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=ut.find(Oe);for(const t of i){const e=r(t),i=ut.find(e).filter((t=>t===this._element));null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Ae}static get DefaultType(){return xe}static get NAME(){return re}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(we).filter((t=>t!==this._element)).map((t=>Ee.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(W.trigger(this._element,le).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(fe),this._element.classList.add(ge),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=()=>{this._isTransitioning=!1,this._element.classList.remove(ge),this._element.classList.add(fe,pe),this._element.style[e]="",W.trigger(this._element,ce)},n=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback(i,this._element,!0),this._element.style[e]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(W.trigger(this._element,de).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,m(this._element),this._element.classList.add(ge),this._element.classList.remove(fe,pe);for(const t of this._triggerArray){const e=a(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;const e=()=>{this._isTransitioning=!1,this._element.classList.remove(ge),this._element.classList.add(fe),W.trigger(this._element,ue)};this._element.style[t]="",this._queueCallback(e,this._element,!0)}_isShown(t=this._element){return t.classList.contains(pe)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=u(t.parent),t}_getDimension(){return this._element.classList.contains(_e)?be:ye}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Oe);for(const e of t){const t=a(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=ut.find(ve,this._config.parent);return ut.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle(me,!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=Ee.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}W.on(document,he,Oe,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=r(this),i=ut.find(e);for(const t of i)Ee.getOrCreateInstance(t,{toggle:!1}).toggle()})),w(Ee);var Se="top",Ce="bottom",ke="right",Ie="left",Te="auto",Le=[Se,Ce,ke,Ie],Ne="start",$e="end",Pe="clippingParents",De="viewport",je="popper",Fe="reference",Me=Le.reduce((function(t,e){return t.concat([e+"-"+Ne,e+"-"+$e])}),[]),qe=[].concat(Le,[Te]).reduce((function(t,e){return t.concat([e,e+"-"+Ne,e+"-"+$e])}),[]),Re="beforeRead",He="read",We="afterRead",ze="beforeMain",Ve="main",Be="afterMain",Ke="beforeWrite",Ue="write",Qe="afterWrite",Je=[Re,He,We,ze,Ve,Be,Ke,Ue,Qe];function Ye(t){return t?(t.nodeName||"").toLowerCase():null}function Xe(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ge(t){return t instanceof Xe(t).Element||t instanceof Element}function Ze(t){return t instanceof Xe(t).HTMLElement||t instanceof HTMLElement}function ti(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Xe(t).ShadowRoot||t instanceof ShadowRoot)}function ei(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];Ze(s)&&Ye(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))}function ii(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});Ze(n)&&Ye(n)&&(Object.assign(n.style,o),Object.keys(s).forEach((function(t){n.removeAttribute(t)})))}))}}const ni={name:"applyStyles",enabled:!0,phase:"write",fn:ei,effect:ii,requires:["computeStyles"]};function si(t){return t.split("-")[0]}var oi=Math.max,ri=Math.min,ai=Math.round;function li(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function ci(){return!/^((?!chrome|android).)*safari/i.test(li())}function di(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&Ze(t)&&(s=t.offsetWidth>0&&ai(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&ai(n.height)/t.offsetHeight||1);var r=(Ge(t)?Xe(t):window).visualViewport,a=!ci()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,d=n.width/s,u=n.height/o;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l,x:l,y:c}}function ui(t){var e=di(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function hi(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&ti(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function pi(t){return Xe(t).getComputedStyle(t)}function fi(t){return["table","td","th"].indexOf(Ye(t))>=0}function gi(t){return((Ge(t)?t.ownerDocument:t.document)||window.document).documentElement}function mi(t){return"html"===Ye(t)?t:t.assignedSlot||t.parentNode||(ti(t)?t.host:null)||gi(t)}function vi(t){return Ze(t)&&"fixed"!==pi(t).position?t.offsetParent:null}function _i(t){var e=/firefox/i.test(li());if(/Trident/i.test(li())&&Ze(t)&&"fixed"===pi(t).position)return null;var i=mi(t);for(ti(i)&&(i=i.host);Ze(i)&&["html","body"].indexOf(Ye(i))<0;){var n=pi(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}function bi(t){for(var e=Xe(t),i=vi(t);i&&fi(i)&&"static"===pi(i).position;)i=vi(i);return i&&("html"===Ye(i)||"body"===Ye(i)&&"static"===pi(i).position)?e:i||_i(t)||e}function yi(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function wi(t,e,i){return oi(t,ri(e,i))}function Oi(t,e,i){var n=wi(t,e,i);return n>i?i:n}function Ai(){return{top:0,right:0,bottom:0,left:0}}function xi(t){return Object.assign({},Ai(),t)}function Ei(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var Si=function(t,e){return xi("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Ei(t,Le))};function Ci(t){var e,i=t.state,n=t.name,s=t.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=si(i.placement),l=yi(a),c=[Ie,ke].indexOf(a)>=0?"height":"width";if(o&&r){var d=Si(s.padding,i),u=ui(o),h="y"===l?Se:Ie,p="y"===l?Ce:ke,f=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],g=r[l]-i.rects.reference[l],m=bi(o),v=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,_=f/2-g/2,b=d[h],y=v-u[c]-d[p],w=v/2-u[c]/2+_,O=wi(b,w,y),A=l;i.modifiersData[n]=((e={})[A]=O,e.centerOffset=O-w,e)}}function ki(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&hi(e.elements.popper,n)&&(e.elements.arrow=n)}const Ii={name:"arrow",enabled:!0,phase:"main",fn:Ci,effect:ki,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ti(t){return t.split("-")[1]}var Li={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ni(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:ai(e*n)/n||0,y:ai(i*n)/n||0}}function $i(t){var e,i=t.popper,n=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,u=t.isFixed,h=r.x,p=void 0===h?0:h,f=r.y,g=void 0===f?0:f,m="function"==typeof d?d({x:p,y:g}):{x:p,y:g};p=m.x,g=m.y;var v=r.hasOwnProperty("x"),_=r.hasOwnProperty("y"),b=Ie,y=Se,w=window;if(c){var O=bi(i),A="clientHeight",x="clientWidth";O===Xe(i)&&"static"!==pi(O=gi(i)).position&&"absolute"===a&&(A="scrollHeight",x="scrollWidth"),(s===Se||(s===Ie||s===ke)&&o===$e)&&(y=Ce,g-=(u&&O===w&&w.visualViewport?w.visualViewport.height:O[A])-n.height,g*=l?1:-1),s!==Ie&&(s!==Se&&s!==Ce||o!==$e)||(b=ke,p-=(u&&O===w&&w.visualViewport?w.visualViewport.width:O[x])-n.width,p*=l?1:-1)}var E,S=Object.assign({position:a},c&&Li),C=!0===d?Ni({x:p,y:g}):{x:p,y:g};return p=C.x,g=C.y,l?Object.assign({},S,((E={})[y]=_?"0":"",E[b]=v?"0":"",E.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",E)):Object.assign({},S,((e={})[y]=_?g+"px":"",e[b]=v?p+"px":"",e.transform="",e))}function Pi(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:si(e.placement),variation:Ti(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,$i(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,$i(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Di={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Pi,data:{}};var ji={passive:!0};function Fi(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=Xe(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,ji)})),a&&l.addEventListener("resize",i.update,ji),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,ji)})),a&&l.removeEventListener("resize",i.update,ji)}}const Mi={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Fi,data:{}};var qi={left:"right",right:"left",bottom:"top",top:"bottom"};function Ri(t){return t.replace(/left|right|bottom|top/g,(function(t){return qi[t]}))}var Hi={start:"end",end:"start"};function Wi(t){return t.replace(/start|end/g,(function(t){return Hi[t]}))}function zi(t){var e=Xe(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Vi(t){return di(gi(t)).left+zi(t).scrollLeft}function Bi(t,e){var i=Xe(t),n=gi(t),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=ci();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+Vi(t),y:l}}function Ki(t){var e,i=gi(t),n=zi(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=oi(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=oi(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+Vi(t),l=-n.scrollTop;return"rtl"===pi(s||i).direction&&(a+=oi(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function Ui(t){var e=pi(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function Qi(t){return["html","body","#document"].indexOf(Ye(t))>=0?t.ownerDocument.body:Ze(t)&&Ui(t)?t:Qi(mi(t))}function Ji(t,e){var i;void 0===e&&(e=[]);var n=Qi(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=Xe(n),r=s?[o].concat(o.visualViewport||[],Ui(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(Ji(mi(r)))}function Yi(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Xi(t,e){var i=di(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}function Gi(t,e,i){return e===De?Yi(Bi(t,i)):Ge(e)?Xi(e,i):Yi(Ki(gi(t)))}function Zi(t){var e=Ji(mi(t)),i=["absolute","fixed"].indexOf(pi(t).position)>=0&&Ze(t)?bi(t):t;return Ge(i)?e.filter((function(t){return Ge(t)&&hi(t,i)&&"body"!==Ye(t)})):[]}function tn(t,e,i,n){var s="clippingParents"===e?Zi(t):[].concat(e),o=[].concat(s,[i]),r=o[0],a=o.reduce((function(e,i){var s=Gi(t,i,n);return e.top=oi(s.top,e.top),e.right=ri(s.right,e.right),e.bottom=ri(s.bottom,e.bottom),e.left=oi(s.left,e.left),e}),Gi(t,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function en(t){var e,i=t.reference,n=t.element,s=t.placement,o=s?si(s):null,r=s?Ti(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case Se:e={x:a,y:i.y-n.height};break;case Ce:e={x:a,y:i.y+i.height};break;case ke:e={x:i.x+i.width,y:l};break;case Ie:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?yi(o):null;if(null!=c){var d="y"===c?"height":"width";switch(r){case Ne:e[c]=e[c]-(i[d]/2-n[d]/2);break;case $e:e[c]=e[c]+(i[d]/2-n[d]/2)}}return e}function nn(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=void 0===n?t.placement:n,o=i.strategy,r=void 0===o?t.strategy:o,a=i.boundary,l=void 0===a?Pe:a,c=i.rootBoundary,d=void 0===c?De:c,u=i.elementContext,h=void 0===u?je:u,p=i.altBoundary,f=void 0!==p&&p,g=i.padding,m=void 0===g?0:g,v=xi("number"!=typeof m?m:Ei(m,Le)),_=h===je?Fe:je,b=t.rects.popper,y=t.elements[f?_:h],w=tn(Ge(y)?y:y.contextElement||gi(t.elements.popper),l,d,r),O=di(t.elements.reference),A=en({reference:O,element:b,strategy:"absolute",placement:s}),x=Yi(Object.assign({},b,A)),E=h===je?x:O,S={top:w.top-E.top+v.top,bottom:E.bottom-w.bottom+v.bottom,left:w.left-E.left+v.left,right:E.right-w.right+v.right},C=t.modifiersData.offset;if(h===je&&C){var k=C[s];Object.keys(S).forEach((function(t){var e=[ke,Ce].indexOf(t)>=0?1:-1,i=[Se,Ce].indexOf(t)>=0?"y":"x";S[t]+=k[i]*e}))}return S}function sn(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?qe:l,d=Ti(n),u=d?a?Me:Me.filter((function(t){return Ti(t)===d})):Le,h=u.filter((function(t){return c.indexOf(t)>=0}));0===h.length&&(h=u);var p=h.reduce((function(e,i){return e[i]=nn(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[si(i)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}function on(t){if(si(t)===Te)return[];var e=Ri(t);return[Wi(t),e,Wi(e)]}function rn(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,d=i.boundary,u=i.rootBoundary,h=i.altBoundary,p=i.flipVariations,f=void 0===p||p,g=i.allowedAutoPlacements,m=e.options.placement,v=si(m),_=l||(v!==m&&f?on(m):[Ri(m)]),b=[m].concat(_).reduce((function(t,i){return t.concat(si(i)===Te?sn(e,{placement:i,boundary:d,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:g}):i)}),[]),y=e.rects.reference,w=e.rects.popper,O=new Map,A=!0,x=b[0],E=0;E=0,T=I?"width":"height",L=nn(e,{placement:S,boundary:d,rootBoundary:u,altBoundary:h,padding:c}),N=I?k?ke:Ie:k?Ce:Se;y[T]>w[T]&&(N=Ri(N));var $=Ri(N),P=[];if(o&&P.push(L[C]<=0),a&&P.push(L[N]<=0,L[$]<=0),P.every((function(t){return t}))){x=S,A=!1;break}O.set(S,P)}if(A)for(var D=function(t){var e=b.find((function(e){var i=O.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return x=e,"break"},j=f?3:1;j>0&&"break"!==D(j);j--);e.placement!==x&&(e.modifiersData[n]._skip=!0,e.placement=x,e.reset=!0)}}const an={name:"flip",enabled:!0,phase:"main",fn:rn,requiresIfExists:["offset"],data:{_skip:!1}};function ln(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function cn(t){return[Se,ke,Ce,Ie].some((function(e){return t[e]>=0}))}function dn(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=nn(e,{elementContext:"reference"}),a=nn(e,{altBoundary:!0}),l=ln(r,n),c=ln(a,s,o),d=cn(l),u=cn(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}const un={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:dn};function hn(t,e,i){var n=si(t),s=[Ie,Se].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[Ie,ke].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}function pn(t){var e=t.state,i=t.options,n=t.name,s=i.offset,o=void 0===s?[0,0]:s,r=qe.reduce((function(t,i){return t[i]=hn(i,e.rects,o),t}),{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=r}const fn={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:pn};function gn(t){var e=t.state,i=t.name;e.modifiersData[i]=en({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const mn={name:"popperOffsets",enabled:!0,phase:"read",fn:gn,data:{}};function vn(t){return"x"===t?"y":"x"}function _n(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,d=i.altBoundary,u=i.padding,h=i.tether,p=void 0===h||h,f=i.tetherOffset,g=void 0===f?0:f,m=nn(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:d}),v=si(e.placement),_=Ti(e.placement),b=!_,y=yi(v),w=vn(y),O=e.modifiersData.popperOffsets,A=e.rects.reference,x=e.rects.popper,E="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,S="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),C=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,k={x:0,y:0};if(O){if(o){var I,T="y"===y?Se:Ie,L="y"===y?Ce:ke,N="y"===y?"height":"width",$=O[y],P=$+m[T],D=$-m[L],j=p?-x[N]/2:0,F=_===Ne?A[N]:x[N],M=_===Ne?-x[N]:-A[N],q=e.elements.arrow,R=p&&q?ui(q):{width:0,height:0},H=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Ai(),W=H[T],z=H[L],V=wi(0,A[N],R[N]),B=b?A[N]/2-j-V-W-S.mainAxis:F-V-W-S.mainAxis,K=b?-A[N]/2+j+V+z+S.mainAxis:M+V+z+S.mainAxis,U=e.elements.arrow&&bi(e.elements.arrow),Q=U?"y"===y?U.clientTop||0:U.clientLeft||0:0,J=null!=(I=null==C?void 0:C[y])?I:0,Y=$+K-J,X=wi(p?ri(P,$+B-J-Q):P,$,p?oi(D,Y):D);O[y]=X,k[y]=X-$}if(a){var G,Z="x"===y?Se:Ie,tt="x"===y?Ce:ke,et=O[w],it="y"===w?"height":"width",nt=et+m[Z],st=et-m[tt],ot=-1!==[Se,Ie].indexOf(v),rt=null!=(G=null==C?void 0:C[w])?G:0,at=ot?nt:et-A[it]-x[it]-rt+S.altAxis,lt=ot?et+A[it]+x[it]-rt-S.altAxis:st,ct=p&&ot?Oi(at,et,lt):wi(p?at:nt,et,p?lt:st);O[w]=ct,k[w]=ct-et}e.modifiersData[n]=k}}const bn={name:"preventOverflow",enabled:!0,phase:"main",fn:_n,requiresIfExists:["offset"]};function yn(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function wn(t){return t!==Xe(t)&&Ze(t)?yn(t):zi(t)}function On(t){var e=t.getBoundingClientRect(),i=ai(e.width)/t.offsetWidth||1,n=ai(e.height)/t.offsetHeight||1;return 1!==i||1!==n}function An(t,e,i){void 0===i&&(i=!1);var n=Ze(e),s=Ze(e)&&On(e),o=gi(e),r=di(t,s,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!i)&&(("body"!==Ye(e)||Ui(o))&&(a=wn(e)),Ze(e)?((l=di(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=Vi(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function xn(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||s(t)})),n}function En(t){var e=xn(t);return Je.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}function Sn(t){var e;return function(){return e||(e=new Promise((function(i){Promise.resolve().then((function(){e=void 0,i(t())}))}))),e}}function Cn(t){var e=t.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}var kn={placement:"bottom",modifiers:[],strategy:"absolute"};function In(){for(var t=arguments.length,e=new Array(t),i=0;iNumber.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(Q.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const i=ut.find(as,this._menu).filter((t=>h(t)));i.length&&x(i,e,t===Hn,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=_s.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(t.button===Wn||"keyup"===t.type&&t.key!==qn)return;const e=ut.find(ns);for(const i of e){const e=_s.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),s=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&t.key===qn||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i=t.key===Mn,n=[Rn,Hn].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const s=this.matches(is)?this:ut.prev(this,is)[0]||ut.next(this,is)[0]||ut.findOne(is,t.delegateTarget.parentNode),o=_s.getOrCreateInstance(s);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}W.on(document,Qn,is,_s.dataApiKeydownHandler),W.on(document,Qn,ss,_s.dataApiKeydownHandler),W.on(document,Un,_s.clearMenus),W.on(document,Jn,_s.clearMenus),W.on(document,Un,is,(function(t){t.preventDefault(),_s.getOrCreateInstance(this).toggle()})),w(_s);const bs=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ys=".sticky-top",ws="padding-right",Os="margin-right";class As{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,ws,(e=>e+t)),this._setElementAttributes(bs,ws,(e=>e+t)),this._setElementAttributes(ys,Os,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ws),this._resetElementAttributes(bs,ws),this._resetElementAttributes(ys,Os)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth(),s=t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)};this._applyManipulationCallback(t,s)}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&Q.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){const i=t=>{const i=Q.getDataAttribute(t,e);null!==i?(Q.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)};this._applyManipulationCallback(t,i)}_applyManipulationCallback(t,e){if(d(t))e(t);else for(const i of ut.find(t,this._element))e(i)}}const xs="backdrop",Es="fade",Ss="show",Cs=`mousedown.bs.${xs}`,ks={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Is={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Ts extends J{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return ks}static get DefaultType(){return Is}static get NAME(){return xs}show(t){if(!this._config.isVisible)return void O(t);this._append();const e=this._getElement();this._config.isAnimated&&m(e),e.classList.add(Ss),this._emulateAnimation((()=>{O(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(Ss),this._emulateAnimation((()=>{this.dispose(),O(t)}))):O(t)}dispose(){this._isAppended&&(W.off(this._element,Cs),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add(Es),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=u(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),W.on(t,Cs,(()=>{O(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){A(t,this._getElement(),this._config.isAnimated)}}const Ls="focustrap",Ns=".bs.focustrap",$s=`focusin${Ns}`,Ps=`keydown.tab${Ns}`,Ds="Tab",js="forward",Fs="backward",Ms={autofocus:!0,trapElement:null},qs={autofocus:"boolean",trapElement:"element"};class Rs extends J{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Ms}static get DefaultType(){return qs}static get NAME(){return Ls}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),W.off(document,Ns),W.on(document,$s,(t=>this._handleFocusin(t))),W.on(document,Ps,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,W.off(document,Ns))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=ut.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===Fs?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){t.key===Ds&&(this._lastTabNavDirection=t.shiftKey?Fs:js)}}const Hs="modal",Ws=".bs.modal",zs="Escape",Vs=`hide${Ws}`,Bs=`hidePrevented${Ws}`,Ks=`hidden${Ws}`,Us=`show${Ws}`,Qs=`shown${Ws}`,Js=`resize${Ws}`,Ys=`click.dismiss${Ws}`,Xs=`mousedown.dismiss${Ws}`,Gs=`keydown.dismiss${Ws}`,Zs=`click${Ws}.data-api`,to="modal-open",eo="fade",io="show",no="modal-static",so=".modal.show",oo=".modal-dialog",ro=".modal-body",ao='[data-bs-toggle="modal"]',lo={backdrop:!0,focus:!0,keyboard:!0},co={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class uo extends X{constructor(t,e){super(t,e),this._dialog=ut.findOne(oo,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new As,this._addEventListeners()}static get Default(){return lo}static get DefaultType(){return co}static get NAME(){return Hs}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||W.trigger(this._element,Us,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(to),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(W.trigger(this._element,Vs).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(io),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const t of[window,this._dialog])W.off(t,Ws);this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ts({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Rs({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=ut.findOne(ro,this._dialog);e&&(e.scrollTop=0),m(this._element),this._element.classList.add(io);const i=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,W.trigger(this._element,Qs,{relatedTarget:t})};this._queueCallback(i,this._dialog,this._isAnimated())}_addEventListeners(){W.on(this._element,Gs,(t=>{if(t.key===zs)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),W.on(window,Js,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),W.on(this._element,Xs,(t=>{W.one(this._element,Ys,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(to),this._resetAdjustments(),this._scrollBar.reset(),W.trigger(this._element,Ks)}))}_isAnimated(){return this._element.classList.contains(eo)}_triggerBackdropTransition(){if(W.trigger(this._element,Bs).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(no)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(no),this._queueCallback((()=>{this._element.classList.remove(no),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=y()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=y()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=uo.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}W.on(document,Zs,ao,(function(t){const e=a(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),W.one(e,Us,(t=>{t.defaultPrevented||W.one(e,Ks,(()=>{h(this)&&this.focus()}))}));const i=ut.findOne(so);i&&uo.getInstance(i).hide(),uo.getOrCreateInstance(e).toggle(this)})),G(uo),w(uo);const ho="offcanvas",po=".bs.offcanvas",fo=".data-api",go=`load${po}${fo}`,mo="Escape",vo="show",_o="showing",bo="hiding",yo="offcanvas-backdrop",wo=".offcanvas.show",Oo=`show${po}`,Ao=`shown${po}`,xo=`hide${po}`,Eo=`hidePrevented${po}`,So=`hidden${po}`,Co=`resize${po}`,ko=`click${po}${fo}`,Io=`keydown.dismiss${po}`,To='[data-bs-toggle="offcanvas"]',Lo={backdrop:!0,keyboard:!0,scroll:!1},No={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class $o extends X{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Lo}static get DefaultType(){return No}static get NAME(){return ho}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(W.trigger(this._element,Oo,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new As).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(_o);const e=()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(vo),this._element.classList.remove(_o),W.trigger(this._element,Ao,{relatedTarget:t})};this._queueCallback(e,this._element,!0)}hide(){if(!this._isShown)return;if(W.trigger(this._element,xo).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(bo),this._backdrop.hide();const t=()=>{this._element.classList.remove(vo,bo),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new As).reset(),W.trigger(this._element,So)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=()=>{"static"!==this._config.backdrop?this.hide():W.trigger(this._element,Eo)},e=Boolean(this._config.backdrop);return new Ts({className:yo,isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?t:null})}_initializeFocusTrap(){return new Rs({trapElement:this._element})}_addEventListeners(){W.on(this._element,Io,(t=>{t.key===mo&&(this._config.keyboard?this.hide():W.trigger(this._element,Eo))}))}static jQueryInterface(t){return this.each((function(){const e=$o.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}W.on(document,ko,To,(function(t){const e=a(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this))return;W.one(e,So,(()=>{h(this)&&this.focus()}));const i=ut.findOne(wo);i&&i!==e&&$o.getInstance(i).hide(),$o.getOrCreateInstance(e).toggle(this)})),W.on(window,go,(()=>{for(const t of ut.find(wo))$o.getOrCreateInstance(t).show()})),W.on(window,Co,(()=>{for(const t of ut.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&$o.getOrCreateInstance(t).hide()})),G($o),w($o);const Po=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Do=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,jo=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Fo=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!Po.has(i)||Boolean(Do.test(t.nodeValue)||jo.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))},Mo={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};function qo(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(const t of s){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[i]||[]);for(const e of n)Fo(e,s)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}const Ro="TemplateFactory",Ho={allowList:Mo,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},Wo={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},zo={entry:"(string|element|function|null)",selector:"(string|element)"};class Vo extends J{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Ho}static get DefaultType(){return Wo}static get NAME(){return Ro}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},zo)}_setContent(t,e,i){const n=ut.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?d(e)?this._putElementInTemplate(u(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?qo(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return"function"==typeof t?t(this):t}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const Bo="tooltip",Ko=new Set(["sanitize","allowList","sanitizeFn"]),Uo="fade",Qo="show",Jo=".tooltip-inner",Yo=".modal",Xo="hide.bs.modal",Go="hover",Zo="focus",tr="click",er="manual",ir="hide",nr="hidden",sr="show",or="shown",rr="inserted",ar="click",lr="focusin",cr="focusout",dr="mouseenter",ur="mouseleave",hr={AUTO:"auto",TOP:"top",RIGHT:y()?"left":"right",BOTTOM:"bottom",LEFT:y()?"right":"left"},pr={allowList:Mo,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},fr={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class gr extends X{constructor(t,e){if(void 0===Pn)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return pr}static get DefaultType(){return fr}static get NAME(){return Bo}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),W.off(this._element.closest(Yo),Xo,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=W.trigger(this._element,this.constructor.eventName(sr)),e=(f(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),W.trigger(this._element,this.constructor.eventName(rr))),this._popper=this._createPopper(i),i.classList.add(Qo),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))W.on(t,"mouseover",g);const s=()=>{W.trigger(this._element,this.constructor.eventName(or)),!1===this._isHovered&&this._leave(),this._isHovered=!1};this._queueCallback(s,this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(W.trigger(this._element,this.constructor.eventName(ir)).defaultPrevented)return;if(this._getTipElement().classList.remove(Qo),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))W.off(t,"mouseover",g);this._activeTrigger[tr]=!1,this._activeTrigger[Zo]=!1,this._activeTrigger[Go]=!1,this._isHovered=null;const t=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),W.trigger(this._element,this.constructor.eventName(nr)))};this._queueCallback(t,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(Uo,Qo),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=s(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(Uo),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Vo({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Jo]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Uo)}_isShown(){return this.tip&&this.tip.classList.contains(Qo)}_createPopper(t){const e="function"==typeof this._config.placement?this._config.placement.call(this,t,this._element):this._config.placement,i=hr[e.toUpperCase()];return $n(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)W.on(this._element,this.constructor.eventName(ar),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if(e!==er){const t=e===Go?this.constructor.eventName(dr):this.constructor.eventName(lr),i=e===Go?this.constructor.eventName(ur):this.constructor.eventName(cr);W.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Zo:Go]=!0,e._enter()})),W.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Zo:Go]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},W.on(this._element.closest(Yo),Xo,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=Q.getDataAttributes(this._element);for(const t of Object.keys(e))Ko.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:u(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=gr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}w(gr);const mr="popover",vr=".popover-header",_r=".popover-body",br={...gr.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},yr={...gr.DefaultType,content:"(null|string|element|function)"};class wr extends gr{static get Default(){return br}static get DefaultType(){return yr}static get NAME(){return mr}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[vr]:this._getTitle(),[_r]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=wr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}w(wr);const Or="scrollspy",Ar=".bs.scrollspy",xr=`activate${Ar}`,Er=`click${Ar}`,Sr=`load${Ar}.data-api`,Cr="dropdown-item",kr="active",Ir='[data-bs-spy="scroll"]',Tr="[href]",Lr=".nav, .list-group",Nr=".nav-link",$r=`${Nr}, .nav-item > ${Nr}, .list-group-item`,Pr=".dropdown",Dr=".dropdown-toggle",jr={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Fr={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Mr extends X{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return jr}static get DefaultType(){return Fr}static get NAME(){return Or}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=u(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(W.off(this._config.target,Er),W.on(this._config.target,Er,Tr,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(i(o),!n)return}else s||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=ut.find(Tr,this._config.target);for(const e of t){if(!e.hash||p(e))continue;const t=ut.findOne(e.hash,this._element);h(t)&&(this._targetLinks.set(e.hash,e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(kr),this._activateParents(t),W.trigger(this._element,xr,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains(Cr))ut.findOne(Dr,t.closest(Pr)).classList.add(kr);else for(const e of ut.parents(t,Lr))for(const t of ut.prev(e,$r))t.classList.add(kr)}_clearActiveClass(t){t.classList.remove(kr);const e=ut.find(`${Tr}.${kr}`,t);for(const t of e)t.classList.remove(kr)}static jQueryInterface(t){return this.each((function(){const e=Mr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}W.on(window,Sr,(()=>{for(const t of ut.find(Ir))Mr.getOrCreateInstance(t)})),w(Mr);const qr="tab",Rr=".bs.tab",Hr=`hide${Rr}`,Wr=`hidden${Rr}`,zr=`show${Rr}`,Vr=`shown${Rr}`,Br=`click${Rr}`,Kr=`keydown${Rr}`,Ur=`load${Rr}`,Qr="ArrowLeft",Jr="ArrowRight",Yr="ArrowUp",Xr="ArrowDown",Gr="active",Zr="fade",ta="show",ea="dropdown",ia=".dropdown-toggle",na=".dropdown-menu",sa=":not(.dropdown-toggle)",oa='.list-group, .nav, [role="tablist"]',ra=".nav-item, .list-group-item",aa='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',la=`.nav-link${sa}, .list-group-item${sa}, [role="tab"]${sa}, ${aa}`,ca=`.${Gr}[data-bs-toggle="tab"], .${Gr}[data-bs-toggle="pill"], .${Gr}[data-bs-toggle="list"]`;class da extends X{constructor(t){super(t),this._parent=this._element.closest(oa),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),W.on(this._element,Kr,(t=>this._keydown(t))))}static get NAME(){return qr}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?W.trigger(e,Hr,{relatedTarget:t}):null;W.trigger(t,zr,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(Gr),this._activate(a(t));const i=()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),W.trigger(t,Vr,{relatedTarget:e})):t.classList.add(ta)};this._queueCallback(i,t,t.classList.contains(Zr))}_deactivate(t,e){if(!t)return;t.classList.remove(Gr),t.blur(),this._deactivate(a(t));const i=()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),W.trigger(t,Wr,{relatedTarget:e})):t.classList.remove(ta)};this._queueCallback(i,t,t.classList.contains(Zr))}_keydown(t){if(![Qr,Jr,Yr,Xr].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[Jr,Xr].includes(t.key),i=x(this._getChildren().filter((t=>!p(t))),t.target,e,!0);i&&(i.focus({preventScroll:!0}),da.getOrCreateInstance(i).show())}_getChildren(){return ut.find(la,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=a(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`#${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains(ea))return;const n=(t,n)=>{const s=ut.findOne(t,i);s&&s.classList.toggle(n,e)};n(ia,Gr),n(na,ta),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Gr)}_getInnerElement(t){return t.matches(la)?t:ut.findOne(la,t)}_getOuterElement(t){return t.closest(ra)||t}static jQueryInterface(t){return this.each((function(){const e=da.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}W.on(document,Br,aa,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this)||da.getOrCreateInstance(this).show()})),W.on(window,Ur,(()=>{for(const t of ut.find(ca))da.getOrCreateInstance(t)})),w(da);const ua="toast",ha=".bs.toast",pa=`mouseover${ha}`,fa=`mouseout${ha}`,ga=`focusin${ha}`,ma=`focusout${ha}`,va=`hide${ha}`,_a=`hidden${ha}`,ba=`show${ha}`,ya=`shown${ha}`,wa="fade",Oa="hide",Aa="show",xa="showing",Ea={animation:"boolean",autohide:"boolean",delay:"number"},Sa={animation:!0,autohide:!0,delay:5e3};class Ca extends X{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Sa}static get DefaultType(){return Ea}static get NAME(){return ua}show(){if(W.trigger(this._element,ba).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(wa);const t=()=>{this._element.classList.remove(xa),W.trigger(this._element,ya),this._maybeScheduleHide()};this._element.classList.remove(Oa),m(this._element),this._element.classList.add(Aa,xa),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this.isShown())return;if(W.trigger(this._element,va).defaultPrevented)return;const t=()=>{this._element.classList.add(Oa),this._element.classList.remove(xa,Aa),W.trigger(this._element,_a)};this._element.classList.add(xa),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Aa),super.dispose()}isShown(){return this._element.classList.contains(Aa)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){W.on(this._element,pa,(t=>this._onInteraction(t,!0))),W.on(this._element,fa,(t=>this._onInteraction(t,!1))),W.on(this._element,ga,(t=>this._onInteraction(t,!0))),W.on(this._element,ma,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Ca.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return G(Ca),w(Ca),{Alert:ot,Button:dt,Carousel:oe,Collapse:Ee,Dropdown:_s,Modal:uo,Offcanvas:$o,Popover:wr,ScrollSpy:Mr,Tab:da,Toast:Ca,Tooltip:gr}}()},312:(t,e,i)=>{"use strict";i.r(e)},6416:function(t){t.exports=function(){"use strict";function t(t,e){t.split(/\s+/).forEach((t=>{e(t)}))}class e{constructor(){this._events=void 0,this._events={}}on(e,i){t(e,(t=>{const e=this._events[t]||[];e.push(i),this._events[t]=e}))}off(e,i){var n=arguments.length;0!==n?t(e,(t=>{if(1===n)return void delete this._events[t];const e=this._events[t];void 0!==e&&(e.splice(e.indexOf(i),1),this._events[t]=e)})):this._events={}}trigger(e,...i){var n=this;t(e,(t=>{const e=n._events[t];void 0!==e&&e.forEach((t=>{t.apply(n,i)}))}))}}const i=t=>(t=t.filter(Boolean)).length<2?t[0]||"":1==a(t)?"["+t.join("")+"]":"(?:"+t.join("|")+")",n=t=>{if(!o(t))return t.join("");let e="",i=0;const n=()=>{i>1&&(e+="{"+i+"}")};return t.forEach(((s,o)=>{s!==t[o-1]?(n(),e+=s,i=1):i++})),n(),e},s=t=>{let e=c(t);return i(e)},o=t=>new Set(t).size!==t.length,r=t=>(t+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),a=t=>t.reduce(((t,e)=>Math.max(t,l(e))),0),l=t=>c(t).length,c=t=>Array.from(t),d=t=>{if(1===t.length)return[[t]];let e=[];const i=t.substring(1);return d(i).forEach((function(i){let n=i.slice(0);n[0]=t.charAt(0)+n[0],e.push(n),n=i.slice(0),n.unshift(t.charAt(0)),e.push(n)})),e},u=[[0,65535]];let h,p;const f={},g={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"};for(let t in g){let e=g[t]||"";for(let i=0;it.normalize(e),_=t=>c(t).reduce(((t,e)=>t+b(e)),""),b=t=>(t=v(t).toLowerCase().replace(m,(t=>f[t]||"")),v(t,"NFC")),y=t=>{const e={},i=(t,i)=>{const n=e[t]||new Set,o=new RegExp("^"+s(n)+"$","iu");i.match(o)||(n.add(r(i)),e[t]=n)};for(let e of function*(t){for(const[e,i]of t)for(let t=e;t<=i;t++){let e=String.fromCharCode(t),i=_(e);i!=e.toLowerCase()&&(i.length>3||0!=i.length&&(yield{folded:i,composed:e,code_point:t}))}}(t))i(e.folded,e.folded),i(e.folded,e.composed);return e},w=t=>{const e=y(t),n={};let o=[];for(let t in e){let i=e[t];i&&(n[t]=s(i)),t.length>1&&o.push(r(t))}o.sort(((t,e)=>e.length-t.length));const a=i(o);return p=new RegExp("^"+a,"u"),n},O=(t,e=1)=>(e=Math.max(e,t.length-1),i(d(t).map((t=>((t,e=1)=>{let i=0;return t=t.map((t=>(h[t]&&(i+=t.length),h[t]||t))),i>=e?n(t):""})(t,e))))),A=(t,e=!0)=>{let s=t.length>1?1:0;return i(t.map((t=>{let i=[];const o=e?t.length():t.length()-1;for(let e=0;e{for(const i of e){if(i.start!=t.start||i.end!=t.end)continue;if(i.substrs.join("")!==t.substrs.join(""))continue;let e=t.parts;const n=t=>{for(const i of e){if(i.start===t.start&&i.substr===t.substr)return!1;if(1!=t.length&&1!=i.length){if(t.starti.start)return!0;if(i.startt.start)return!0}}return!1};if(!(i.parts.filter(n).length>0))return!0}return!1};class E{constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(t){t&&(this.parts.push(t),this.substrs.push(t.substr),this.start=Math.min(t.start,this.start),this.end=Math.max(t.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(t,e){let i=new E,n=JSON.parse(JSON.stringify(this.parts)),s=n.pop();for(const t of n)i.add(t);let o=e.substr.substring(0,t-s.start),r=o.length;return i.add({start:s.start,end:s.start+r,length:r,substr:o}),i}}const S=t=>{var e;void 0===h&&(h=w(e||u)),t=_(t);let i="",n=[new E];for(let e=0;e0){a=a.sort(((t,e)=>t.length()-e.length()));for(let t of a)x(t,n)||n.push(t)}else if(e>0&&1==l.size&&!l.has("3")){i+=A(n,!1);let t=new E;const e=n[0];e&&t.add(e.last()),n=[t]}}return i+=A(n,!0),i},C=(t,e)=>{if(t)return t[e]},k=(t,e)=>{if(t){for(var i,n=e.split(".");(i=n.shift())&&(t=t[i]););return t}},I=(t,e,i)=>{var n,s;return t?(t+="",null==e.regex||-1===(s=t.search(e.regex))?0:(n=e.string.length/t.length,0===s&&(n+=.5),n*i)):0},T=(t,e)=>{var i=t[e];if("function"==typeof i)return i;i&&!Array.isArray(i)&&(t[e]=[i])},L=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},N=(t,e)=>"number"==typeof t&&"number"==typeof e?t>e?1:t(e=_(e+"").toLowerCase())?1:e>t?-1:0;class P{constructor(t,e){this.items=void 0,this.settings=void 0,this.items=t,this.settings=e||{diacritics:!0}}tokenize(t,e,i){if(!t||!t.length)return[];const n=[],s=t.split(/\s+/);var o;return i&&(o=new RegExp("^("+Object.keys(i).map(r).join("|")+"):(.*)$")),s.forEach((t=>{let i,s=null,a=null;o&&(i=t.match(o))&&(s=i[1],t=i[2]),t.length>0&&(a=this.settings.diacritics?S(t)||null:r(t),a&&e&&(a="\\b"+a)),n.push({string:t,regex:a?new RegExp(a,"iu"):null,field:s})})),n}getScoreFunction(t,e){var i=this.prepareSearch(t,e);return this._getScoreFunction(i)}_getScoreFunction(t){const e=t.tokens,i=e.length;if(!i)return function(){return 0};const n=t.options.fields,s=t.weights,o=n.length,r=t.getAttrFn;if(!o)return function(){return 1};const a=1===o?function(t,e){const i=n[0].field;return I(r(e,i),t,s[i]||1)}:function(t,e){var i=0;if(t.field){const n=r(e,t.field);!t.regex&&n?i+=1/o:i+=I(n,t,1)}else L(s,((n,s)=>{i+=I(r(e,s),t,n)}));return i/o};return 1===i?function(t){return a(e[0],t)}:"and"===t.options.conjunction?function(t){var n,s=0;for(let i of e){if((n=a(i,t))<=0)return 0;s+=n}return s/i}:function(t){var n=0;return L(e,(e=>{n+=a(e,t)})),n/i}}getSortFunction(t,e){var i=this.prepareSearch(t,e);return this._getSortFunction(i)}_getSortFunction(t){var e,i=[];const n=this,s=t.options,o=!t.query&&s.sort_empty?s.sort_empty:s.sort;if("function"==typeof o)return o.bind(this);const r=function(e,i){return"$score"===e?i.score:t.getAttrFn(n.items[i.id],e)};if(o)for(let e of o)(t.query||"$score"!==e.field)&&i.push(e);if(t.query){e=!0;for(let t of i)if("$score"===t.field){e=!1;break}e&&i.unshift({field:"$score",direction:"desc"})}else i=i.filter((t=>"$score"!==t.field));return i.length?function(t,e){var n,s;for(let o of i)if(s=o.field,n=("desc"===o.direction?-1:1)*N(r(s,t),r(s,e)))return n;return 0}:null}prepareSearch(t,e){const i={};var n=Object.assign({},e);if(T(n,"sort"),T(n,"sort_empty"),n.fields){T(n,"fields");const t=[];n.fields.forEach((e=>{"string"==typeof e&&(e={field:e,weight:1}),t.push(e),i[e.field]="weight"in e?e.weight:1})),n.fields=t}return{options:n,query:t.toLowerCase().trim(),tokens:this.tokenize(t,n.respect_word_boundaries,i),total:0,items:[],weights:i,getAttrFn:n.nesting?k:C}}search(t,e){var i,n,s=this;n=this.prepareSearch(t,e),e=n.options,t=n.query;const o=e.score||s._getScoreFunction(n);t.length?L(s.items,((t,s)=>{i=o(t),(!1===e.filter||i>0)&&n.items.push({score:i,id:s})})):L(s.items,((t,e)=>{n.items.push({score:1,id:e})}));const r=s._getSortFunction(n);return r&&n.items.sort(r),n.total=n.items.length,"number"==typeof e.limit&&(n.items=n.items.slice(0,e.limit)),n}}const D=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},j=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(F(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},F=t=>"string"==typeof t&&t.indexOf("<")>-1,M=(t,e)=>{var i=document.createEvent("HTMLEvents");i.initEvent(e,!0,!1),t.dispatchEvent(i)},q=(t,e)=>{Object.assign(t.style,e)},R=(t,...e)=>{var i=W(e);(t=z(t)).map((t=>{i.map((e=>{t.classList.add(e)}))}))},H=(t,...e)=>{var i=W(e);(t=z(t)).map((t=>{i.map((e=>{t.classList.remove(e)}))}))},W=t=>{var e=[];return D(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\11\12\14\15\40]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},z=t=>(Array.isArray(t)||(t=[t]),t),V=(t,e,i)=>{if(!i||i.contains(t))for(;t&&t.matches;){if(t.matches(e))return t;t=t.parentNode}},B=(t,e=0)=>e>0?t[t.length-1]:t[0],K=(t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var i=0;t=t.previousElementSibling;)t.matches(e)&&i++;return i},U=(t,e)=>{D(e,((e,i)=>{null==e?t.removeAttribute(i):t.setAttribute(i,""+e)}))},Q=(t,e)=>{t.parentNode&&t.parentNode.replaceChild(e,t)},J=(t,e)=>{if(null===e)return;if("string"==typeof e){if(!e.length)return;e=new RegExp(e,"i")}const i=t=>3===t.nodeType?(t=>{var i=t.data.match(e);if(i&&t.data.length>0){var n=document.createElement("span");n.className="highlight";var s=t.splitText(i.index);s.splitText(i[0].length);var o=s.cloneNode(!0);return n.appendChild(o),Q(s,n),1}return 0})(t):((t=>{1!==t.nodeType||!t.childNodes||/(script|style)/i.test(t.tagName)||"highlight"===t.className&&"SPAN"===t.tagName||Array.from(t.childNodes).forEach((t=>{i(t)}))})(t),0);i(t)},Y="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey";var X={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(t){return t.length>0},render:{}};const G=t=>null==t?null:Z(t),Z=t=>"boolean"==typeof t?t?"1":"0":t+"",tt=t=>(t+"").replace(/&/g,"&").replace(//g,">").replace(/"/g,"""),et=(t,e)=>{var i;return function(n,s){var o=this;i&&(o.loading=Math.max(o.loading-1,0),clearTimeout(i)),i=setTimeout((function(){i=null,o.loadedSearches[n]=!0,t.call(o,n,s)}),e)}},it=(t,e,i)=>{var n,s=t.trigger,o={};for(n of(t.trigger=function(){var i=arguments[0];if(-1===e.indexOf(i))return s.apply(t,arguments);o[i]=arguments},i.apply(t,[]),t.trigger=s,e))n in o&&s.apply(t,o[n])},nt=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},st=(t,e,i,n)=>{t.addEventListener(e,i,n)},ot=(t,e)=>!!e&&!!e[t]&&1==(e.altKey?1:0)+(e.ctrlKey?1:0)+(e.shiftKey?1:0)+(e.metaKey?1:0),rt=(t,e)=>t.getAttribute("id")||(t.setAttribute("id",e),e),at=t=>t.replace(/[\\"']/g,"\\$&"),lt=(t,e)=>{e&&t.append(e)};function ct(t,e){var i=Object.assign({},X,e),n=i.dataAttr,s=i.labelField,o=i.valueField,r=i.disabledField,a=i.optgroupField,l=i.optgroupLabelField,c=i.optgroupValueField,d=t.tagName.toLowerCase(),u=t.getAttribute("placeholder")||t.getAttribute("data-placeholder");if(!u&&!i.allowEmptyOption){let e=t.querySelector('option[value=""]');e&&(u=e.textContent)}var h,p,f,g,m,v,_={placeholder:u,options:[],optgroups:[],items:[],maxItems:null};return"select"===d?(p=_.options,f={},g=1,m=t=>{var e=Object.assign({},t.dataset),i=n&&e[n];return"string"==typeof i&&i.length&&(e=Object.assign(e,JSON.parse(i))),e},v=(t,e)=>{var n=G(t.value);if(null!=n&&(n||i.allowEmptyOption)){if(f.hasOwnProperty(n)){if(e){var l=f[n][a];l?Array.isArray(l)?l.push(e):f[n][a]=[l,e]:f[n][a]=e}}else{var c=m(t);c[s]=c[s]||t.textContent,c[o]=c[o]||n,c[r]=c[r]||t.disabled,c[a]=c[a]||e,c.$option=t,f[n]=c,p.push(c)}t.selected&&_.items.push(n)}},_.maxItems=t.hasAttribute("multiple")?null:1,D(t.children,(t=>{var e,i,n;"optgroup"===(h=t.tagName.toLowerCase())?((n=m(e=t))[l]=n[l]||e.getAttribute("label")||"",n[c]=n[c]||g++,n[r]=n[r]||e.disabled,_.optgroups.push(n),i=n[c],D(e.children,(t=>{v(t,i)}))):"option"===h&&v(t)}))):(()=>{const e=t.getAttribute(n);if(e)_.options=JSON.parse(e),D(_.options,(t=>{_.items.push(t[o])}));else{var r=t.value.trim()||"";if(!i.allowEmptyOption&&!r.length)return;const e=r.split(i.delimiter);D(e,(t=>{const e={};e[s]=t,e[o]=t,_.options.push(e)})),_.items=e}})(),Object.assign({},X,_,e)}var dt=0;class ut extends(function(t){return t.plugins={},class extends t{constructor(...t){super(...t),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(e,i){t.plugins[e]={name:e,fn:i}}initializePlugins(t){var e,i;const n=this,s=[];if(Array.isArray(t))t.forEach((t=>{"string"==typeof t?s.push(t):(n.plugins.settings[t.name]=t.options,s.push(t.name))}));else if(t)for(e in t)t.hasOwnProperty(e)&&(n.plugins.settings[e]=t[e],s.push(e));for(;i=s.shift();)n.require(i)}loadPlugin(e){var i=this,n=i.plugins,s=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin');n.requested[e]=!0,n.loaded[e]=s.fn.apply(i,[i.plugins.settings[e]||{}]),n.names.push(e)}require(t){var e=this,i=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(i.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return i.loaded[t]}}}(e)){constructor(t,e){var i;super(),this.control_input=void 0,this.wrapper=void 0,this.dropdown=void 0,this.control=void 0,this.dropdown_content=void 0,this.focus_node=void 0,this.order=0,this.settings=void 0,this.input=void 0,this.tabIndex=void 0,this.is_select_tag=void 0,this.rtl=void 0,this.inputId=void 0,this._destroy=void 0,this.sifter=void 0,this.isOpen=!1,this.isDisabled=!1,this.isRequired=void 0,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.currentResults=void 0,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],dt++;var n=j(t);if(n.tomselect)throw new Error("Tom Select already initialized on this element");n.tomselect=this,i=(window.getComputedStyle&&window.getComputedStyle(n,null)).getPropertyValue("direction");const s=ct(n,e);this.settings=s,this.input=n,this.tabIndex=n.tabIndex||0,this.is_select_tag="select"===n.tagName.toLowerCase(),this.rtl=/rtl/i.test(i),this.inputId=rt(n,"tomselect-"+dt),this.isRequired=n.required,this.sifter=new P(this.options,{diacritics:s.diacritics}),s.mode=s.mode||(1===s.maxItems?"single":"multi"),"boolean"!=typeof s.hideSelected&&(s.hideSelected="multi"===s.mode),"boolean"!=typeof s.hidePlaceholder&&(s.hidePlaceholder="multi"!==s.mode);var o=s.createFilter;"function"!=typeof o&&("string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?s.createFilter=t=>o.test(t):s.createFilter=t=>this.settings.duplicates||!this.options[t]),this.initializePlugins(s.plugins),this.setupCallbacks(),this.setupTemplates();const r=j("
"),a=j("
"),l=this._render("dropdown"),c=j('
'),d=this.input.getAttribute("class")||"",u=s.mode;var h;R(r,s.wrapperClass,d,u),R(a,s.controlClass),lt(r,a),R(l,s.dropdownClass,u),s.copyClassesToDropdown&&R(l,d),R(c,s.dropdownContentClass),lt(l,c),j(s.dropdownParent||r).appendChild(l),F(s.controlInput)?(h=j(s.controlInput),L(["autocorrect","autocapitalize","autocomplete"],(t=>{n.getAttribute(t)&&U(h,{[t]:n.getAttribute(t)})})),h.tabIndex=-1,a.appendChild(h),this.focus_node=h):s.controlInput?(h=j(s.controlInput),this.focus_node=h):(h=j(""),this.focus_node=a),this.wrapper=r,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=h,this.setup()}setup(){const t=this,e=t.settings,i=t.control_input,n=t.dropdown,s=t.dropdown_content,o=t.wrapper,a=t.control,l=t.input,c=t.focus_node,d={passive:!0},u=t.inputId+"-ts-dropdown";U(s,{id:u}),U(c,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":u});const h=rt(c,t.inputId+"-ts-control"),p="label[for='"+(t=>t.replace(/['"\\]/g,"\\$&"))(t.inputId)+"']",f=document.querySelector(p),g=t.focus.bind(t);if(f){st(f,"click",g),U(f,{for:h});const e=rt(f,t.inputId+"-ts-label");U(c,{"aria-labelledby":e}),U(s,{"aria-labelledby":e})}if(o.style.width=l.style.width,t.plugins.names.length){const e="plugin-"+t.plugins.names.join(" plugin-");R([o,n],e)}(null===e.maxItems||e.maxItems>1)&&t.is_select_tag&&U(l,{multiple:"multiple"}),e.placeholder&&U(i,{placeholder:e.placeholder}),!e.splitOn&&e.delimiter&&(e.splitOn=new RegExp("\\s*"+r(e.delimiter)+"+\\s*")),e.load&&e.loadThrottle&&(e.load=et(e.load,e.loadThrottle)),t.control_input.type=l.type,st(n,"mousemove",(()=>{t.ignoreHover=!1})),st(n,"mouseenter",(e=>{var i=V(e.target,"[data-selectable]",n);i&&t.onOptionHover(e,i)}),{capture:!0}),st(n,"click",(e=>{const i=V(e.target,"[data-selectable]");i&&(t.onOptionSelect(e,i),nt(e,!0))})),st(a,"click",(e=>{var n=V(e.target,"[data-ts-item]",a);n&&t.onItemSelect(e,n)?nt(e,!0):""==i.value&&(t.onClick(),nt(e,!0))})),st(c,"keydown",(e=>t.onKeyDown(e))),st(i,"keypress",(e=>t.onKeyPress(e))),st(i,"input",(e=>t.onInput(e))),st(c,"blur",(e=>t.onBlur(e))),st(c,"focus",(e=>t.onFocus(e))),st(i,"paste",(e=>t.onPaste(e)));const m=e=>{const s=e.composedPath()[0];if(!o.contains(s)&&!n.contains(s))return t.isFocused&&t.blur(),void t.inputState();s==i&&t.isOpen?e.stopPropagation():nt(e,!0)},v=()=>{t.isOpen&&t.positionDropdown()};st(document,"mousedown",m),st(window,"scroll",v,d),st(window,"resize",v,d),this._destroy=()=>{document.removeEventListener("mousedown",m),window.removeEventListener("scroll",v),window.removeEventListener("resize",v),f&&f.removeEventListener("click",g)},this.revertSettings={innerHTML:l.innerHTML,tabIndex:l.tabIndex},l.tabIndex=-1,l.insertAdjacentElement("afterend",t.wrapper),t.sync(!1),e.items=[],delete e.optgroups,delete e.options,st(l,"invalid",(()=>{t.isValid&&(t.isValid=!1,t.isInvalid=!0,t.refreshState())})),t.updateOriginalInput(),t.refreshItems(),t.close(!1),t.inputState(),t.isSetup=!0,l.disabled?t.disable():t.enable(),t.on("change",this.onChange),R(l,"tomselected","ts-hidden-accessible"),t.trigger("initialize"),!0===e.preload&&t.preload()}setupOptions(t=[],e=[]){this.addOptions(t),L(e,(t=>{this.registerOptionGroup(t)}))}setupTemplates(){var t=this,e=t.settings.labelField,i=t.settings.optgroupLabelField,n={optgroup:t=>{let e=document.createElement("div");return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,e)=>'
'+e(t[i])+"
",option:(t,i)=>"
"+i(t[e])+"
",item:(t,i)=>"
"+i(t[e])+"
",option_create:(t,e)=>'
Add '+e(t.input)+"
",no_results:()=>'
No results found
',loading:()=>'
',not_loading:()=>{},dropdown:()=>"
"};t.settings.render=Object.assign({},n,t.settings.render)}setupCallbacks(){var t,e,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in i)(e=this.settings[i[t]])&&this.on(t,e)}sync(t=!0){const e=this,i=t?ct(e.input,{delimiter:e.settings.delimiter}):e.settings;e.setupOptions(i.options,i.optgroups),e.setValue(i.items||[],!0),e.lastQuery=null}onClick(){var t=this;if(t.activeItems.length>0)return t.clearActiveItems(),void t.focus();t.isFocused&&t.isOpen?t.blur():t.focus()}onMouseDown(){}onChange(){M(this.input,"input"),M(this.input,"change")}onPaste(t){var e=this;e.isInputHidden||e.isLocked?nt(t):e.settings.splitOn&&setTimeout((()=>{var t=e.inputValue();if(t.match(e.settings.splitOn)){var i=t.trim().split(e.settings.splitOn);L(i,(t=>{G(t)&&(this.options[t]?e.addItem(t):e.createItem(t))}))}}),0)}onKeyPress(t){var e=this;if(!e.isLocked){var i=String.fromCharCode(t.keyCode||t.which);return e.settings.create&&"multi"===e.settings.mode&&i===e.settings.delimiter?(e.createItem(),void nt(t)):void 0}nt(t)}onKeyDown(t){var e=this;if(e.ignoreHover=!0,e.isLocked)9!==t.keyCode&&nt(t);else{switch(t.keyCode){case 65:if(ot(Y,t)&&""==e.control_input.value)return nt(t),void e.selectAll();break;case 27:return e.isOpen&&(nt(t,!0),e.close()),void e.clearActiveItems();case 40:if(!e.isOpen&&e.hasOptions)e.open();else if(e.activeOption){let t=e.getAdjacent(e.activeOption,1);t&&e.setActiveOption(t)}return void nt(t);case 38:if(e.activeOption){let t=e.getAdjacent(e.activeOption,-1);t&&e.setActiveOption(t)}return void nt(t);case 13:return void(e.canSelect(e.activeOption)?(e.onOptionSelect(t,e.activeOption),nt(t)):(e.settings.create&&e.createItem()||document.activeElement==e.control_input&&e.isOpen)&&nt(t));case 37:return void e.advanceSelection(-1,t);case 39:return void e.advanceSelection(1,t);case 9:return void(e.settings.selectOnTab&&(e.canSelect(e.activeOption)&&(e.onOptionSelect(t,e.activeOption),nt(t)),e.settings.create&&e.createItem()&&nt(t)));case 8:case 46:return void e.deleteSelection(t)}e.isInputHidden&&!ot(Y,t)&&nt(t)}}onInput(t){var e=this;if(!e.isLocked){var i=e.inputValue();e.lastValue!==i&&(e.lastValue=i,e.settings.shouldLoad.call(e,i)&&e.load(i),e.refreshOptions(),e.trigger("type",i))}}onOptionHover(t,e){this.ignoreHover||this.setActiveOption(e,!1)}onFocus(t){var e=this,i=e.isFocused;if(e.isDisabled)return e.blur(),void nt(t);e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.preload(),i||e.trigger("focus"),e.activeItems.length||(e.showInput(),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())}onBlur(t){if(!1!==document.hasFocus()){var e=this;if(e.isFocused){e.isFocused=!1,e.ignoreFocus=!1;var i=()=>{e.close(),e.setActiveItem(),e.setCaret(e.items.length),e.trigger("blur")};e.settings.create&&e.settings.createOnBlur?e.createItem(null,i):i()}}}onOptionSelect(t,e){var i,n=this;e.parentElement&&e.parentElement.matches("[data-disabled]")||(e.classList.contains("create")?n.createItem(null,(()=>{n.settings.closeAfterSelect&&n.close()})):void 0!==(i=e.dataset.value)&&(n.lastQuery=null,n.addItem(i),n.settings.closeAfterSelect&&n.close(),!n.settings.hideSelected&&t.type&&/click/.test(t.type)&&n.setActiveOption(e)))}canSelect(t){return!!(this.isOpen&&t&&this.dropdown_content.contains(t))}onItemSelect(t,e){var i=this;return!i.isLocked&&"multi"===i.settings.mode&&(nt(t),i.setActiveItem(e,t),!0)}canLoad(t){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(t)}load(t){const e=this;if(!e.canLoad(t))return;R(e.wrapper,e.settings.loadingClass),e.loading++;const i=e.loadCallback.bind(e);e.settings.load.call(e,t,i)}loadCallback(t,e){const i=this;i.loading=Math.max(i.loading-1,0),i.lastQuery=null,i.clearActiveOption(),i.setupOptions(t,e),i.refreshOptions(i.isFocused&&!i.isInputHidden),i.loading||H(i.wrapper,i.settings.loadingClass),i.trigger("load",t,e)}preload(){var t=this.wrapper.classList;t.contains("preloaded")||(t.add("preloaded"),this.load(""))}setTextboxValue(t=""){var e=this.control_input;e.value!==t&&(e.value=t,M(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){it(this,e?[]:["change"],(()=>{this.clear(e),this.addItems(t,e)}))}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var i,n,s,o,r,a,l=this;if("single"!==l.settings.mode){if(!t)return l.clearActiveItems(),void(l.isFocused&&l.showInput());if("click"===(i=e&&e.type.toLowerCase())&&ot("shiftKey",e)&&l.activeItems.length){for(a=l.getLastActive(),(s=Array.prototype.indexOf.call(l.control.children,a))>(o=Array.prototype.indexOf.call(l.control.children,t))&&(r=s,s=o,o=r),n=s;n<=o;n++)t=l.control.children[n],-1===l.activeItems.indexOf(t)&&l.setActiveItemClass(t);nt(e)}else"click"===i&&ot(Y,e)||"keydown"===i&&ot("shiftKey",e)?t.classList.contains("active")?l.removeActiveItem(t):l.setActiveItemClass(t):(l.clearActiveItems(),l.setActiveItemClass(t));l.hideInput(),l.isFocused||l.focus()}}setActiveItemClass(t){const e=this,i=e.control.querySelector(".last-active");i&&H(i,"last-active"),R(t,"active last-active"),e.trigger("item_select",t),-1==e.activeItems.indexOf(t)&&e.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t);this.activeItems.splice(e,1),H(t,"active")}clearActiveItems(){H(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t,e=!0){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,U(this.focus_node,{"aria-activedescendant":t.getAttribute("id")}),U(t,{"aria-selected":"true"}),R(t,"active"),e&&this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return;const i=this.dropdown_content,n=i.clientHeight,s=i.scrollTop||0,o=t.offsetHeight,r=t.getBoundingClientRect().top-i.getBoundingClientRect().top+s;r+o>n+s?this.scroll(r-n+o,e):r{t.setActiveItemClass(e)})))}inputState(){var t=this;t.control.contains(t.control_input)&&(U(t.control_input,{placeholder:t.settings.placeholder}),t.activeItems.length>0||!t.isFocused&&t.settings.hidePlaceholder&&t.items.length>0?(t.setTextboxValue(),t.isInputHidden=!0):(t.settings.hidePlaceholder&&t.items.length>0&&U(t.control_input,{placeholder:""}),t.isInputHidden=!1),t.wrapper.classList.toggle("input-hidden",t.isInputHidden))}hideInput(){this.inputState()}showInput(){this.inputState()}inputValue(){return this.control_input.value.trim()}focus(){var t=this;t.isDisabled||(t.ignoreFocus=!0,t.control_input.offsetWidth?t.control_input.focus():t.focus_node.focus(),setTimeout((()=>{t.ignoreFocus=!1,t.onFocus()}),0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField;return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,i,n=this,s=this.getSearchOptions();if(n.settings.score&&"function"!=typeof(i=n.settings.score.call(n,t)))throw new Error('Tom Select "score" setting must be a function that returns a function');return t!==n.lastQuery?(n.lastQuery=t,e=n.sifter.search(t,Object.assign(s,{score:i})),n.currentResults=e):e=Object.assign({},n.currentResults),n.settings.hideSelected&&(e.items=e.items.filter((t=>{let e=G(t.id);return!(e&&-1!==n.items.indexOf(e))}))),e}refreshOptions(t=!0){var e,i,n,s,o,r,a,l,c,d;const u={},h=[];var p=this,f=p.inputValue();const g=f===p.lastQuery||""==f&&null==p.lastQuery;var m,v=p.search(f),_=null,b=p.settings.shouldOpen||!1,y=p.dropdown_content;for(g&&(_=p.activeOption)&&(c=_.closest("[data-group]")),s=v.items.length,"number"==typeof p.settings.maxOptions&&(s=Math.min(s,p.settings.maxOptions)),s>0&&(b=!0),e=0;e0&&(d=d.cloneNode(!0),U(d,{id:a.$id+"-clone-"+i,"aria-selected":null}),d.classList.add("ts-cloned"),H(d,"active"),p.activeOption&&p.activeOption.dataset.value==s&&c&&c.dataset.group===o.toString()&&(_=d)),t.appendChild(d),u[o]=t}}p.settings.lockOptgroupOrder&&h.sort(((t,e)=>{const i=p.optgroups[t],n=p.optgroups[e];return(i&&i.$order||0)-(n&&n.$order||0)})),a=document.createDocumentFragment(),L(h,(t=>{let e=u[t];if(!e||!e.children.length)return;let i=p.optgroups[t];if(void 0!==i){let t=document.createDocumentFragment(),n=p.render("optgroup_header",i);lt(t,n),lt(t,e);let s=p.render("optgroup",{group:i,options:t});lt(a,s)}else lt(a,e)})),y.innerHTML="",lt(y,a),p.settings.highlight&&(m=y.querySelectorAll("span.highlight"),Array.prototype.forEach.call(m,(function(t){var e=t.parentNode;e.replaceChild(t.firstChild,t),e.normalize()})),v.query.length&&v.tokens.length&&L(v.tokens,(t=>{J(y,t.regex)})));var w=t=>{let e=p.render(t,{input:f});return e&&(b=!0,y.insertBefore(e,y.firstChild)),e};if(p.loading?w("loading"):p.settings.shouldLoad.call(p,f)?0===v.items.length&&w("no_results"):w("not_loading"),(l=p.canCreate(f))&&(d=w("option_create")),p.hasOptions=v.items.length>0||l,b){if(v.items.length>0){if(_||"single"!==p.settings.mode||null==p.items[0]||(_=p.getOption(p.items[0])),!y.contains(_)){let t=0;d&&!p.settings.addPrecedence&&(t=1),_=p.selectable()[t]}}else d&&(_=d);t&&!p.isOpen&&(p.open(),p.scrollToOption(_,"auto")),p.setActiveOption(_)}else p.clearActiveOption(),t&&p.isOpen&&p.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t,e=!1){const i=this;if(Array.isArray(t))return i.addOptions(t,e),!1;const n=G(t[i.settings.valueField]);return null!==n&&!i.options.hasOwnProperty(n)&&(t.$order=t.$order||++i.order,t.$id=i.inputId+"-opt-"+t.$order,i.options[n]=t,i.lastQuery=null,e&&(i.userOptions[n]=e,i.trigger("option_add",n,t)),n)}addOptions(t,e=!1){L(t,(t=>{this.addOption(t,e)}))}registerOption(t){return this.addOption(t)}registerOptionGroup(t){var e=G(t[this.settings.optgroupValueField]);return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var i;e[this.settings.optgroupValueField]=t,(i=this.registerOptionGroup(e))&&this.trigger("optgroup_add",i,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){const i=this;var n,s;const o=G(t),r=G(e[i.settings.valueField]);if(null===o)return;const a=i.options[o];if(null==a)return;if("string"!=typeof r)throw new Error("Value must be set in option data");const l=i.getOption(o),c=i.getItem(o);if(e.$order=e.$order||a.$order,delete i.options[o],i.uncacheValue(r),i.options[r]=e,l){if(i.dropdown_content.contains(l)){const t=i._render("option",e);Q(l,t),i.activeOption===l&&i.setActiveOption(t)}l.remove()}c&&(-1!==(s=i.items.indexOf(o))&&i.items.splice(s,1,r),n=i._render("item",e),c.classList.contains("active")&&R(n,"active"),Q(c,n)),i.lastQuery=null}removeOption(t,e){const i=this;t=Z(t),i.uncacheValue(t),delete i.userOptions[t],delete i.options[t],i.lastQuery=null,i.trigger("option_remove",t),i.removeItem(t,e)}clearOptions(t){const e=(t||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const i={};L(this.options,((t,n)=>{e(t,n)&&(i[n]=t)})),this.options=this.sifter.items=i,this.lastQuery=null,this.trigger("option_clear")}clearFilter(t,e){return this.items.indexOf(e)>=0}getOption(t,e=!1){const i=G(t);if(null===i)return null;const n=this.options[i];if(null!=n){if(n.$div)return n.$div;if(e)return this._render("option",n)}return null}getAdjacent(t,e,i="option"){var n;if(!t)return null;n="item"==i?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let i=0;i0?n[i+1]:n[i-1];return null}getItem(t){if("object"==typeof t)return t;var e=G(t);return null!==e?this.control.querySelector(`[data-value="${at(e)}"]`):null}addItems(t,e){var i=this,n=Array.isArray(t)?t:[t];const s=(n=n.filter((t=>-1===i.items.indexOf(t))))[n.length-1];n.forEach((t=>{i.isPending=t!==s,i.addItem(t,e)}))}addItem(t,e){it(this,e?[]:["change","dropdown_close"],(()=>{var i,n;const s=this,o=s.settings.mode,r=G(t);if((!r||-1===s.items.indexOf(r)||("single"===o&&s.close(),"single"!==o&&s.settings.duplicates))&&null!==r&&s.options.hasOwnProperty(r)&&("single"===o&&s.clear(e),"multi"!==o||!s.isFull())){if(i=s._render("item",s.options[r]),s.control.contains(i)&&(i=i.cloneNode(!0)),n=s.isFull(),s.items.splice(s.caretPos,0,r),s.insertAtCaret(i),s.isSetup){if(!s.isPending&&s.settings.hideSelected){let t=s.getOption(r),e=s.getAdjacent(t,1);e&&s.setActiveOption(e)}s.isPending||s.settings.closeAfterSelect||s.refreshOptions(s.isFocused&&"single"!==o),0!=s.settings.closeAfterSelect&&s.isFull()?s.close():s.isPending||s.positionDropdown(),s.trigger("item_add",r,i),s.isPending||s.updateOriginalInput({silent:e})}(!s.isPending||!n&&s.isFull())&&(s.inputState(),s.refreshState())}}))}removeItem(t=null,e){const i=this;if(!(t=i.getItem(t)))return;var n,s;const o=t.dataset.value;n=K(t),t.remove(),t.classList.contains("active")&&(s=i.activeItems.indexOf(t),i.activeItems.splice(s,1),H(t,"active")),i.items.splice(n,1),i.lastQuery=null,!i.settings.persist&&i.userOptions.hasOwnProperty(o)&&i.removeOption(o,e),n{})){3===arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{});var i,n=this,s=n.caretPos;if(t=t||n.inputValue(),!n.canCreate(t))return e(),!1;n.lock();var o=!1,r=t=>{if(n.unlock(),!t||"object"!=typeof t)return e();var i=G(t[n.settings.valueField]);if("string"!=typeof i)return e();n.setTextboxValue(),n.addOption(t,!0),n.setCaret(s),n.addItem(i),e(t),o=!0};return i="function"==typeof n.settings.create?n.settings.create.call(this,t,r):{[n.settings.labelField]:t,[n.settings.valueField]:t},o||r(i),!0}refreshItems(){var t=this;t.lastQuery=null,t.isSetup&&t.addItems(t.items),t.updateOriginalInput(),t.refreshState()}refreshState(){const t=this;t.refreshValidityState();const e=t.isFull(),i=t.isLocked;t.wrapper.classList.toggle("rtl",t.rtl);const n=t.wrapper.classList;var s;n.toggle("focus",t.isFocused),n.toggle("disabled",t.isDisabled),n.toggle("required",t.isRequired),n.toggle("invalid",!t.isValid),n.toggle("locked",i),n.toggle("full",e),n.toggle("input-active",t.isFocused&&!t.isInputHidden),n.toggle("dropdown-active",t.isOpen),n.toggle("has-options",(s=t.options,0===Object.keys(s).length)),n.toggle("has-items",t.items.length>0)}refreshValidityState(){var t=this;t.input.validity&&(t.isValid=t.input.validity.valid,t.isInvalid=!t.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){const e=this;var i,n;const s=e.input.querySelector('option[value=""]');if(e.is_select_tag){const o=[],r=e.input.querySelectorAll("option:checked").length;function a(t,i,n){return t||(t=j('")),t!=s&&e.input.append(t),o.push(t),(t!=s||r>0)&&(t.selected=!0),t}e.input.querySelectorAll("option:checked").forEach((t=>{t.selected=!1})),0==e.items.length&&"single"==e.settings.mode?a(s,"",""):e.items.forEach((t=>{i=e.options[t],n=i[e.settings.labelField]||"",o.includes(i.$option)?a(e.input.querySelector(`option[value="${at(t)}"]:not(:checked)`),t,n):i.$option=a(i.$option,t,n)}))}else e.input.value=e.getValue();e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,U(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),q(t.dropdown,{visibility:"hidden",display:"block"}),t.positionDropdown(),q(t.dropdown,{visibility:"visible",display:"block"}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,i=e.isOpen;t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&e.hideInput()),e.isOpen=!1,U(e.focus_node,{"aria-expanded":"false"}),q(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),i&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),i=t.offsetHeight+e.top+window.scrollY,n=e.left+window.scrollX;q(this.dropdown,{width:e.width+"px",top:i+"px",left:n+"px"})}}clear(t){var e=this;if(e.items.length){var i=e.controlChildren();L(i,(t=>{e.removeItem(t,!0)})),e.showInput(),t||e.updateOriginalInput(),e.trigger("clear")}}insertAtCaret(t){const e=this,i=e.caretPos,n=e.control;n.insertBefore(t,n.children[i]||null),e.setCaret(i+1)}deleteSelection(t){var e,i,n,s,o,r=this;e=t&&8===t.keyCode?-1:1,i={start:(o=r.control_input).selectionStart||0,length:(o.selectionEnd||0)-(o.selectionStart||0)};const a=[];if(r.activeItems.length)s=B(r.activeItems,e),n=K(s),e>0&&n++,L(r.activeItems,(t=>a.push(t)));else if((r.isFocused||"single"===r.settings.mode)&&r.items.length){const t=r.controlChildren();let n;e<0&&0===i.start&&0===i.length?n=t[r.caretPos-1]:e>0&&i.start===r.inputValue().length&&(n=t[r.caretPos]),void 0!==n&&a.push(n)}if(!r.shouldDelete(a,t))return!1;for(nt(t,!0),void 0!==n&&r.setCaret(n);a.length;)r.removeItem(a.pop());return r.showInput(),r.positionDropdown(),r.refreshOptions(!1),!0}shouldDelete(t,e){const i=t.map((t=>t.dataset.value));return!(!i.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(i,e))}advanceSelection(t,e){var i,n,s=this;s.rtl&&(t*=-1),s.inputValue().length||(ot(Y,e)||ot("shiftKey",e)?(n=(i=s.getLastActive(t))?i.classList.contains("active")?s.getAdjacent(i,t,"item"):i:t>0?s.control_input.nextElementSibling:s.control_input.previousElementSibling)&&(n.classList.contains("active")&&s.removeActiveItem(i),s.setActiveItemClass(n)):s.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active");if(e)return e;var i=this.control.querySelectorAll(".active");return i?B(i,t):void 0}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.isLocked=!0,this.refreshState()}unlock(){this.isLocked=!1,this.refreshState()}disable(){var t=this;t.input.disabled=!0,t.control_input.disabled=!0,t.focus_node.tabIndex=-1,t.isDisabled=!0,this.close(),t.lock()}enable(){var t=this;t.input.disabled=!1,t.control_input.disabled=!1,t.focus_node.tabIndex=t.tabIndex,t.isDisabled=!1,t.unlock()}destroy(){var t=this,e=t.revertSettings;t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,H(t.input,"tomselected","ts-hidden-accessible"),t._destroy(),delete t.input.tomselect}render(t,e){var i,n;const s=this;if("function"!=typeof this.settings.render[t])return null;if(!(n=s.settings.render[t].call(this,e,tt)))return null;if(n=j(n),"option"===t||"option_create"===t?e[s.settings.disabledField]?U(n,{"aria-disabled":"true"}):U(n,{"data-selectable":""}):"optgroup"===t&&(i=e.group[s.settings.optgroupValueField],U(n,{"data-group":i}),e.group[s.settings.disabledField]&&U(n,{"data-disabled":""})),"option"===t||"item"===t){const i=Z(e[s.settings.valueField]);U(n,{"data-value":i}),"item"===t?(R(n,s.settings.itemClass),U(n,{"data-ts-item":""})):(R(n,s.settings.optionClass),U(n,{role:"option",id:e.$id}),e.$div=n,s.options[i]=e)}return n}_render(t,e){const i=this.render(t,e);if(null==i)throw"HTMLElement expected";return i}clearCache(){L(this.options,(t=>{t.$div&&(t.$div.remove(),delete t.$div)}))}uncacheValue(t){const e=this.getOption(t);e&&e.remove()}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,i){var n=this,s=n[e];n[e]=function(){var e,o;return"after"===t&&(e=s.apply(n,arguments)),o=i.apply(n,arguments),"instead"===t?o:("before"===t&&(e=s.apply(n,arguments)),e)}}}return ut.define("change_listener",(function(){st(this.input,"change",(()=>{this.sync()}))})),ut.define("checkbox_options",(function(){var t=this,e=t.onOptionSelect;t.settings.hideSelected=!1;var i=function(t){setTimeout((()=>{var e=t.querySelector("input");e instanceof HTMLInputElement&&(t.classList.contains("selected")?e.checked=!0:e.checked=!1)}),1)};t.hook("after","setupTemplates",(()=>{var e=t.settings.render.option;t.settings.render.option=(i,n)=>{var s=j(e.call(t,i,n)),o=document.createElement("input");o.addEventListener("click",(function(t){nt(t)})),o.type="checkbox";const r=G(i[t.settings.valueField]);return r&&t.items.indexOf(r)>-1&&(o.checked=!0),s.prepend(o),s}})),t.on("item_remove",(e=>{var n=t.getOption(e);n&&(n.classList.remove("selected"),i(n))})),t.on("item_add",(e=>{var n=t.getOption(e);n&&i(n)})),t.hook("instead","onOptionSelect",((n,s)=>{if(s.classList.contains("selected"))return s.classList.remove("selected"),t.removeItem(s.dataset.value),t.refreshOptions(),void nt(n,!0);e.call(t,n,s),i(s)}))})),ut.define("clear_button",(function(t){const e=this,i=Object.assign({className:"clear-button",title:"Clear All",html:t=>`
`},t);e.on("initialize",(()=>{var t=j(i.html(i));t.addEventListener("click",(t=>{e.isDisabled||(e.clear(),"single"===e.settings.mode&&e.settings.allowEmptyOption&&e.addItem(""),t.preventDefault(),t.stopPropagation())})),e.control.appendChild(t)}))})),ut.define("drag_drop",(function(){var t=this;if(!$.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===t.settings.mode){var e=t.lock,i=t.unlock;t.hook("instead","lock",(()=>{var i=$(t.control).data("sortable");return i&&i.disable(),e.call(t)})),t.hook("instead","unlock",(()=>{var e=$(t.control).data("sortable");return e&&e.enable(),i.call(t)})),t.on("initialize",(()=>{var e=$(t.control).sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:t.isLocked,start:(t,i)=>{i.placeholder.css("width",i.helper.css("width")),e.css({overflow:"visible"})},stop:()=>{e.css({overflow:"hidden"});var i=[];e.children("[data-value]").each((function(){this.dataset.value&&i.push(this.dataset.value)})),t.setValue(i)}})}))}})),ut.define("dropdown_header",(function(t){const e=this,i=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:t=>'
'+t.title+'×
'},t);e.on("initialize",(()=>{var t=j(i.html(i)),n=t.querySelector("."+i.closeClass);n&&n.addEventListener("click",(t=>{nt(t,!0),e.close()})),e.dropdown.insertBefore(t,e.dropdown.firstChild)}))})),ut.define("caret_position",(function(){var t=this;t.hook("instead","setCaret",(e=>{"single"!==t.settings.mode&&t.control.contains(t.control_input)?(e=Math.max(0,Math.min(t.items.length,e)))==t.caretPos||t.isPending||t.controlChildren().forEach(((i,n)=>{n{if(!t.isFocused)return;const i=t.getLastActive(e);if(i){const n=K(i);t.setCaret(e>0?n+1:n),t.setActiveItem(),H(i,"last-active")}else t.setCaret(t.caretPos+e)}))})),ut.define("dropdown_input",(function(){const t=this;t.settings.shouldOpen=!0,t.hook("before","setup",(()=>{t.focus_node=t.control,R(t.control_input,"dropdown-input");const e=j('")}},plugins:{dropdown_input:{}}};return null===t.getAttribute("required")&&null===t.getAttribute("disabled")&&(e.plugins.clear_button={title:""}),null!==t.getAttribute("multiple")&&(e.plugins.remove_button={title:""}),null!==t.getAttribute("data-ea-autocomplete-endpoint-url")&&(e.plugins.virtual_scroll={}),"true"===t.getAttribute("data-ea-autocomplete-allow-item-create")&&(e.create=!0),e}function x(t){var e=g(this,w,k).call(this,g(this,m,A).call(this,t),{maxOptions:null});return new(a())(t,e)}function E(t){for(var e=[],i=0;i".concat(t.label_raw,"
")},option:function(t,e){return"
".concat(t.label_raw,"
")}}});return new(a())(t,o)}function S(t,e){var i=g(this,w,k).call(this,g(this,m,A).call(this,t),{valueField:"entityId",labelField:"entityAsString",searchField:["entityAsString"],firstUrl:function(t){return e+"&query="+encodeURIComponent(t)},load:function(t,e){var i=this,n=this.getUrl(t);fetch(n).then((function(t){return t.json()})).then((function(n){i.setNextUrl(t,n.next_page),e(n.results)})).catch((function(){return e()}))},preload:"focus",maxOptions:null,score:function(t){return function(t){return 1}},render:{option:function(t,e){return"
".concat(t.entityAsString,"
")},item:function(t,e){return"
".concat(t.entityAsString,"
")},loading_more:function(e,i){return'
'.concat(t.getAttribute("data-ea-i18n-loading-more-results"),"
")},no_more_results:function(e,i){return'
'.concat(t.getAttribute("data-ea-i18n-no-more-results"),"
")},no_results:function(e,i){return'
'.concat(t.getAttribute("data-ea-i18n-no-results-found"),"
")}}});return new(a())(t,i)}function C(t){return t.replace(/(<([^>]+)>)/gi,"")}function k(t,e){return d(d({},t),e)}function I(t,e){e?(t.classList.remove("d-block"),t.classList.add("d-none")):(t.classList.remove("d-none"),t.classList.add("d-block"))}function T(t){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T(t)}function L(t,e){for(var i=0;i
',fetch(e.getAttribute("href")).then((function(t){return t.text()})).then((function(e){s.innerHTML=e,F(t,Q,ot).call(t),F(t,X,lt).call(t)})).catch((function(t){console.error(t)})),n.preventDefault()}));var n=function(t){t.closest("form").querySelectorAll('input[name^="filters['.concat(t.dataset.filterProperty,']"]')).forEach((function(t){t.remove()})),t.remove()};document.querySelector("#modal-clear-button").addEventListener("click",(function(){i.querySelectorAll(".filter-field").forEach((function(t){n(t)})),i.querySelector("form").submit()})),document.querySelector("#modal-apply-button").addEventListener("click",(function(){i.querySelectorAll(".filter-checkbox:not(:checked)").forEach((function(t){n(t.closest(".filter-field"))})),i.querySelector("form").submit()}))}}function st(){var t=null,e=document.querySelector(".form-batch-checkbox-all");if(null!==e){var i=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox');e.addEventListener("change",(function(){i.forEach((function(t){t.checked=e.checked,t.dispatchEvent(new Event("change"))}))}));var n=document.querySelector(".deselect-batch-button");null!==n&&n.addEventListener("click",(function(){e.checked=!1,e.dispatchEvent(new Event("change"))})),i.forEach((function(n,s){n.dataset.rowIndex=s,n.addEventListener("click",(function(e){if(t&&e.shiftKey){var n=parseInt(t.dataset.rowIndex),s=parseInt(e.target.dataset.rowIndex),o=e.target.checked,r=Math.min(n,s),a=Math.max(n,s);i.forEach((function(t,e){r<=e&&e<=a&&(t.checked=o,t.dispatchEvent(new Event("change")))}))}t=e.target})),n.addEventListener("change",(function(){var t=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox:checked'),i=n.closest("tr"),s=n.closest(".content");n.checked?i.classList.add("selected-row"):(i.classList.remove("selected-row"),e.checked=!1);var o=0!==t.length,r=document.querySelector(".content-header-title > .title"),a=s.querySelector(".datagrid-filters"),l=s.querySelector(".global-actions"),c=s.querySelector(".batch-actions");null!==r&&I(r,o),null!==a&&I(a,o),null!==l&&I(l,o),null!==c&&I(c,!o)}))}));var s=document.querySelector("#batch-action-confirmation-title"),o=s.textContent;document.querySelectorAll("[data-action-batch]").forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault();var e="A"===t.target.tagName.toUpperCase()?t.target:t.target.parentNode,i=e.textContent.trim()||e.getAttribute("title"),n=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox:checked');s.textContent=o.replace("%action_name%",i).replace("%num_items%",n.length.toString()),document.querySelector("#modal-batch-action-button").addEventListener("click",(function(){e.setAttribute("disabled","disabled");var t={batchActionName:e.getAttribute("data-action-name"),entityFqcn:e.getAttribute("data-entity-fqcn"),batchActionUrl:e.getAttribute("data-action-url"),batchActionCsrfToken:e.getAttribute("data-action-csrf-token")};n.forEach((function(e,i){t["batchActionEntityIds[".concat(i,"]")]=e.value}));var i=document.createElement("form");for(var s in i.setAttribute("method","POST"),i.setAttribute("action",e.getAttribute("data-action-url")),t){var o=document.createElement("input");o.setAttribute("type","hidden"),o.setAttribute("name",s),o.setAttribute("value",t[s]),i.appendChild(o)}document.body.appendChild(i),i.submit()}))}))}))}}function ot(){var t=new O;document.querySelectorAll('[data-ea-widget="ea-autocomplete"]').forEach((function(e){t.create(e)}))}function rt(){document.querySelectorAll(".action-delete").forEach((function(t){t.addEventListener("click",(function(e){e.preventDefault(),document.querySelector("#modal-delete-button").addEventListener("click",(function(){var e=t.getAttribute("formaction"),i=document.querySelector("#delete-form");i.setAttribute("action",e),i.submit()}))}))}))}function at(){document.querySelectorAll('[data-bs-toggle="popover"]').forEach((function(t){new(e().Popover)(t)}))}function lt(){document.querySelectorAll(".filter-checkbox").forEach((function(t){t.addEventListener("change",(function(){var e=t.nextElementSibling,i=t.nextElementSibling.getAttribute("aria-expanded");(t.checked&&"false"===i||!t.checked&&"true"===i)&&e.click()}))})),document.querySelectorAll("form[data-ea-filters-form-id]").forEach((function(t){t.addEventListener("change",(function(t){if(!t.target.classList.contains("filter-checkbox")){var e=t.target.closest(".filter-field").querySelector(".filter-checkbox");e.checked||(e.checked=!0)}}))})),document.querySelectorAll("[data-ea-comparison-id]").forEach((function(t){t.addEventListener("change",(function(t){var e=t.currentTarget,i=e.dataset.eaComparisonId;if(void 0!==i){var n=document.querySelector('[data-ea-value2-of-comparison-id="'.concat(i,'"]'));null!==n&&I(n,"between"!==e.value)}}))}))}})()})(); \ No newline at end of file +/*! For license information please see app.914bb6ba.js.LICENSE.txt */ +(()=>{var t={5577:function(t){t.exports=function(){"use strict";const t=1e6,e=1e3,i="transitionend",n=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),s=e=>{do{e+=Math.floor(Math.random()*t)}while(document.getElementById(e));return e},o=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},r=t=>{const e=o(t);return e&&document.querySelector(e)?e:null},a=t=>{const e=o(t);return e?document.querySelector(e):null},l=t=>{if(!t)return 0;let{transitionDuration:i,transitionDelay:n}=window.getComputedStyle(t);const s=Number.parseFloat(i),o=Number.parseFloat(n);return s||o?(i=i.split(",")[0],n=n.split(",")[0],(Number.parseFloat(i)+Number.parseFloat(n))*e):0},c=t=>{t.dispatchEvent(new Event(i))},d=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),u=t=>d(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,h=t=>{if(!d(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},p=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),f=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?f(t.parentNode):null},g=()=>{},m=t=>{t.offsetHeight},v=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,_=[],b=t=>{"loading"===document.readyState?(_.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of _)t()})),_.push(t)):t()},y=()=>"rtl"===document.documentElement.dir,w=t=>{b((()=>{const e=v();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}}))},O=t=>{"function"==typeof t&&t()},A=(t,e,n=!0)=>{if(!n)return void O(t);const s=5,o=l(e)+s;let r=!1;const a=({target:n})=>{n===e&&(r=!0,e.removeEventListener(i,a),O(t))};e.addEventListener(i,a),setTimeout((()=>{r||c(e)}),o)},x=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},E=/[^.]*(?=\..*)\.|.*/,S=/\..*/,C=/::\d+$/,k={};let I=1;const T={mouseenter:"mouseover",mouseleave:"mouseout"},L=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function N(t,e){return e&&`${e}::${I++}`||t.uidEvent||I++}function $(t){const e=N(t);return t.uidEvent=e,k[e]=k[e]||{},k[e]}function P(t,e){return function i(n){return z(n,{delegateTarget:t}),i.oneOff&&W.off(t,n.type,e),e.apply(t,[n])}}function D(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return z(s,{delegateTarget:r}),n.oneOff&&W.off(t,s.type,e,i),i.apply(r,[s])}}function j(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function F(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=H(t);return L.has(o)||(o=t),[n,s,o]}function M(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=F(e,i,n);if(e in T){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=$(t),c=l[a]||(l[a]={}),d=j(c,r,o?i:null);if(d)return void(d.oneOff=d.oneOff&&s);const u=N(r,e.replace(E,"")),h=o?D(t,i,r):P(t,r);h.delegationSelector=o?i:null,h.callable=r,h.oneOff=s,h.uidEvent=u,c[u]=h,t.addEventListener(a,h,o)}function q(t,e,i,n,s){const o=j(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function R(t,e,i,n){const s=e[i]||{};for(const o of Object.keys(s))if(o.includes(n)){const n=s[o];q(t,e,i,n.callable,n.delegationSelector)}}function H(t){return t=t.replace(S,""),T[t]||t}const W={on(t,e,i,n){M(t,e,i,n,!1)},one(t,e,i,n){M(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=F(e,i,n),a=r!==e,l=$(t),c=l[r]||{},d=e.startsWith(".");if(void 0===o){if(d)for(const i of Object.keys(l))R(t,l,i,e.slice(1));for(const i of Object.keys(c)){const n=i.replace(C,"");if(!a||e.includes(n)){const e=c[i];q(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;q(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=v();let s=null,o=!0,r=!0,a=!1;e!==H(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());let l=new Event(e,{bubbles:o,cancelable:!0});return l=z(l,i),a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function z(t,e){for(const[i,n]of Object.entries(e||{}))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}const V=new Map,B={set(t,e,i){V.has(t)||V.set(t,new Map);const n=V.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>V.has(t)&&V.get(t).get(e)||null,remove(t,e){if(!V.has(t))return;const i=V.get(t);i.delete(e),0===i.size&&V.delete(t)}};function K(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function U(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const Q={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${U(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${U(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=K(t.dataset[n])}return e},getDataAttribute:(t,e)=>K(t.getAttribute(`data-bs-${U(e)}`))};class J{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=d(e)?Q.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...d(e)?Q.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const i of Object.keys(e)){const s=e[i],o=t[i],r=d(o)?"element":n(o);if(!new RegExp(s).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${r}" but expected type "${s}".`)}}}const Y="5.2.3";class X extends J{constructor(t,e){super(),(t=u(t))&&(this._element=t,this._config=this._getConfig(e),B.set(this._element,this.constructor.DATA_KEY,this))}dispose(){B.remove(this._element,this.constructor.DATA_KEY),W.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){A(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return B.get(u(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return Y}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const G=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;W.on(document,i,`[data-bs-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),p(this))return;const s=a(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()}))},Z="alert",tt=".bs.alert",et=`close${tt}`,it=`closed${tt}`,nt="fade",st="show";class ot extends X{static get NAME(){return Z}close(){if(W.trigger(this._element,et).defaultPrevented)return;this._element.classList.remove(st);const t=this._element.classList.contains(nt);this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),W.trigger(this._element,it),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=ot.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}G(ot,"close"),w(ot);const rt="button",at="active",lt='[data-bs-toggle="button"]',ct="click.bs.button.data-api";class dt extends X{static get NAME(){return rt}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(at))}static jQueryInterface(t){return this.each((function(){const e=dt.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}W.on(document,ct,lt,(t=>{t.preventDefault();const e=t.target.closest(lt);dt.getOrCreateInstance(e).toggle()})),w(dt);const ut={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!p(t)&&h(t)))}},ht="swipe",pt=".bs.swipe",ft=`touchstart${pt}`,gt=`touchmove${pt}`,mt=`touchend${pt}`,vt=`pointerdown${pt}`,_t=`pointerup${pt}`,bt="touch",yt="pen",wt="pointer-event",Ot=40,At={endCallback:null,leftCallback:null,rightCallback:null},xt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Et extends J{constructor(t,e){super(),this._element=t,t&&Et.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return At}static get DefaultType(){return xt}static get NAME(){return ht}dispose(){W.off(this._element,pt)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),O(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=Ot)return;const e=t/this._deltaX;this._deltaX=0,e&&O(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(W.on(this._element,vt,(t=>this._start(t))),W.on(this._element,_t,(t=>this._end(t))),this._element.classList.add(wt)):(W.on(this._element,ft,(t=>this._start(t))),W.on(this._element,gt,(t=>this._move(t))),W.on(this._element,mt,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&(t.pointerType===yt||t.pointerType===bt)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const St="carousel",Ct=".bs.carousel",kt=".data-api",It=500,Tt="next",Lt="prev",Nt="left",$t="right",Pt=`slide${Ct}`,Dt=`slid${Ct}`,jt=`keydown${Ct}`,Ft=`mouseenter${Ct}`,Mt=`mouseleave${Ct}`,qt=`dragstart${Ct}`,Rt=`load${Ct}${kt}`,Ht=`click${Ct}${kt}`,Wt="carousel",zt="active",Vt="slide",Bt="carousel-item-end",Kt="carousel-item-start",Ut="carousel-item-next",Qt="carousel-item-prev",Jt=".active",Yt=".carousel-item",Xt=Jt+Yt,Gt=".carousel-item img",Zt=".carousel-indicators",te="[data-bs-slide], [data-bs-slide-to]",ee='[data-bs-ride="carousel"]',ie={ArrowLeft:$t,ArrowRight:Nt},ne={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},se={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class oe extends X{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=ut.findOne(Zt,this._element),this._addEventListeners(),this._config.ride===Wt&&this.cycle()}static get Default(){return ne}static get DefaultType(){return se}static get NAME(){return St}next(){this._slide(Tt)}nextWhenVisible(){!document.hidden&&h(this._element)&&this.next()}prev(){this._slide(Lt)}pause(){this._isSliding&&c(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?W.one(this._element,Dt,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void W.one(this._element,Dt,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?Tt:Lt;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&W.on(this._element,jt,(t=>this._keydown(t))),"hover"===this._config.pause&&(W.on(this._element,Ft,(()=>this.pause())),W.on(this._element,Mt,(()=>this._maybeEnableCycle()))),this._config.touch&&Et.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of ut.find(Gt,this._element))W.on(t,qt,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(Nt)),rightCallback:()=>this._slide(this._directionToOrder($t)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),It+this._config.interval))}};this._swipeHelper=new Et(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=ie[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=ut.findOne(Jt,this._indicatorsElement);e.classList.remove(zt),e.removeAttribute("aria-current");const i=ut.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(zt),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),n=t===Tt,s=e||x(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=e=>W.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(Pt).defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?Kt:Bt,c=n?Ut:Qt;s.classList.add(c),m(s),i.classList.add(l),s.classList.add(l);const d=()=>{s.classList.remove(l,c),s.classList.add(zt),i.classList.remove(zt,c,l),this._isSliding=!1,r(Dt)};this._queueCallback(d,i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains(Vt)}_getActive(){return ut.findOne(Xt,this._element)}_getItems(){return ut.find(Yt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return y()?t===Nt?Lt:Tt:t===Nt?Tt:Lt}_orderToDirection(t){return y()?t===Lt?Nt:$t:t===Lt?$t:Nt}static jQueryInterface(t){return this.each((function(){const e=oe.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}W.on(document,Ht,te,(function(t){const e=a(this);if(!e||!e.classList.contains(Wt))return;t.preventDefault();const i=oe.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===Q.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),W.on(window,Rt,(()=>{const t=ut.find(ee);for(const e of t)oe.getOrCreateInstance(e)})),w(oe);const re="collapse",ae=".bs.collapse",le=`show${ae}`,ce=`shown${ae}`,de=`hide${ae}`,ue=`hidden${ae}`,he=`click${ae}.data-api`,pe="show",fe="collapse",ge="collapsing",me="collapsed",ve=`:scope .${fe} .${fe}`,_e="collapse-horizontal",be="width",ye="height",we=".collapse.show, .collapse.collapsing",Oe='[data-bs-toggle="collapse"]',Ae={parent:null,toggle:!0},xe={parent:"(null|element)",toggle:"boolean"};class Ee extends X{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=ut.find(Oe);for(const t of i){const e=r(t),i=ut.find(e).filter((t=>t===this._element));null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Ae}static get DefaultType(){return xe}static get NAME(){return re}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(we).filter((t=>t!==this._element)).map((t=>Ee.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(W.trigger(this._element,le).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(fe),this._element.classList.add(ge),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=()=>{this._isTransitioning=!1,this._element.classList.remove(ge),this._element.classList.add(fe,pe),this._element.style[e]="",W.trigger(this._element,ce)},n=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback(i,this._element,!0),this._element.style[e]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(W.trigger(this._element,de).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,m(this._element),this._element.classList.add(ge),this._element.classList.remove(fe,pe);for(const t of this._triggerArray){const e=a(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;const e=()=>{this._isTransitioning=!1,this._element.classList.remove(ge),this._element.classList.add(fe),W.trigger(this._element,ue)};this._element.style[t]="",this._queueCallback(e,this._element,!0)}_isShown(t=this._element){return t.classList.contains(pe)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=u(t.parent),t}_getDimension(){return this._element.classList.contains(_e)?be:ye}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Oe);for(const e of t){const t=a(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=ut.find(ve,this._config.parent);return ut.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle(me,!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=Ee.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}W.on(document,he,Oe,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=r(this),i=ut.find(e);for(const t of i)Ee.getOrCreateInstance(t,{toggle:!1}).toggle()})),w(Ee);var Se="top",Ce="bottom",ke="right",Ie="left",Te="auto",Le=[Se,Ce,ke,Ie],Ne="start",$e="end",Pe="clippingParents",De="viewport",je="popper",Fe="reference",Me=Le.reduce((function(t,e){return t.concat([e+"-"+Ne,e+"-"+$e])}),[]),qe=[].concat(Le,[Te]).reduce((function(t,e){return t.concat([e,e+"-"+Ne,e+"-"+$e])}),[]),Re="beforeRead",He="read",We="afterRead",ze="beforeMain",Ve="main",Be="afterMain",Ke="beforeWrite",Ue="write",Qe="afterWrite",Je=[Re,He,We,ze,Ve,Be,Ke,Ue,Qe];function Ye(t){return t?(t.nodeName||"").toLowerCase():null}function Xe(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ge(t){return t instanceof Xe(t).Element||t instanceof Element}function Ze(t){return t instanceof Xe(t).HTMLElement||t instanceof HTMLElement}function ti(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Xe(t).ShadowRoot||t instanceof ShadowRoot)}function ei(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];Ze(s)&&Ye(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))}function ii(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});Ze(n)&&Ye(n)&&(Object.assign(n.style,o),Object.keys(s).forEach((function(t){n.removeAttribute(t)})))}))}}const ni={name:"applyStyles",enabled:!0,phase:"write",fn:ei,effect:ii,requires:["computeStyles"]};function si(t){return t.split("-")[0]}var oi=Math.max,ri=Math.min,ai=Math.round;function li(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function ci(){return!/^((?!chrome|android).)*safari/i.test(li())}function di(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&Ze(t)&&(s=t.offsetWidth>0&&ai(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&ai(n.height)/t.offsetHeight||1);var r=(Ge(t)?Xe(t):window).visualViewport,a=!ci()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,d=n.width/s,u=n.height/o;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l,x:l,y:c}}function ui(t){var e=di(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function hi(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&ti(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function pi(t){return Xe(t).getComputedStyle(t)}function fi(t){return["table","td","th"].indexOf(Ye(t))>=0}function gi(t){return((Ge(t)?t.ownerDocument:t.document)||window.document).documentElement}function mi(t){return"html"===Ye(t)?t:t.assignedSlot||t.parentNode||(ti(t)?t.host:null)||gi(t)}function vi(t){return Ze(t)&&"fixed"!==pi(t).position?t.offsetParent:null}function _i(t){var e=/firefox/i.test(li());if(/Trident/i.test(li())&&Ze(t)&&"fixed"===pi(t).position)return null;var i=mi(t);for(ti(i)&&(i=i.host);Ze(i)&&["html","body"].indexOf(Ye(i))<0;){var n=pi(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}function bi(t){for(var e=Xe(t),i=vi(t);i&&fi(i)&&"static"===pi(i).position;)i=vi(i);return i&&("html"===Ye(i)||"body"===Ye(i)&&"static"===pi(i).position)?e:i||_i(t)||e}function yi(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function wi(t,e,i){return oi(t,ri(e,i))}function Oi(t,e,i){var n=wi(t,e,i);return n>i?i:n}function Ai(){return{top:0,right:0,bottom:0,left:0}}function xi(t){return Object.assign({},Ai(),t)}function Ei(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var Si=function(t,e){return xi("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Ei(t,Le))};function Ci(t){var e,i=t.state,n=t.name,s=t.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=si(i.placement),l=yi(a),c=[Ie,ke].indexOf(a)>=0?"height":"width";if(o&&r){var d=Si(s.padding,i),u=ui(o),h="y"===l?Se:Ie,p="y"===l?Ce:ke,f=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],g=r[l]-i.rects.reference[l],m=bi(o),v=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,_=f/2-g/2,b=d[h],y=v-u[c]-d[p],w=v/2-u[c]/2+_,O=wi(b,w,y),A=l;i.modifiersData[n]=((e={})[A]=O,e.centerOffset=O-w,e)}}function ki(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&hi(e.elements.popper,n)&&(e.elements.arrow=n)}const Ii={name:"arrow",enabled:!0,phase:"main",fn:Ci,effect:ki,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ti(t){return t.split("-")[1]}var Li={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ni(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:ai(e*n)/n||0,y:ai(i*n)/n||0}}function $i(t){var e,i=t.popper,n=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,u=t.isFixed,h=r.x,p=void 0===h?0:h,f=r.y,g=void 0===f?0:f,m="function"==typeof d?d({x:p,y:g}):{x:p,y:g};p=m.x,g=m.y;var v=r.hasOwnProperty("x"),_=r.hasOwnProperty("y"),b=Ie,y=Se,w=window;if(c){var O=bi(i),A="clientHeight",x="clientWidth";O===Xe(i)&&"static"!==pi(O=gi(i)).position&&"absolute"===a&&(A="scrollHeight",x="scrollWidth"),(s===Se||(s===Ie||s===ke)&&o===$e)&&(y=Ce,g-=(u&&O===w&&w.visualViewport?w.visualViewport.height:O[A])-n.height,g*=l?1:-1),s!==Ie&&(s!==Se&&s!==Ce||o!==$e)||(b=ke,p-=(u&&O===w&&w.visualViewport?w.visualViewport.width:O[x])-n.width,p*=l?1:-1)}var E,S=Object.assign({position:a},c&&Li),C=!0===d?Ni({x:p,y:g}):{x:p,y:g};return p=C.x,g=C.y,l?Object.assign({},S,((E={})[y]=_?"0":"",E[b]=v?"0":"",E.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",E)):Object.assign({},S,((e={})[y]=_?g+"px":"",e[b]=v?p+"px":"",e.transform="",e))}function Pi(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:si(e.placement),variation:Ti(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,$i(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,$i(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Di={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Pi,data:{}};var ji={passive:!0};function Fi(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=Xe(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,ji)})),a&&l.addEventListener("resize",i.update,ji),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,ji)})),a&&l.removeEventListener("resize",i.update,ji)}}const Mi={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Fi,data:{}};var qi={left:"right",right:"left",bottom:"top",top:"bottom"};function Ri(t){return t.replace(/left|right|bottom|top/g,(function(t){return qi[t]}))}var Hi={start:"end",end:"start"};function Wi(t){return t.replace(/start|end/g,(function(t){return Hi[t]}))}function zi(t){var e=Xe(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Vi(t){return di(gi(t)).left+zi(t).scrollLeft}function Bi(t,e){var i=Xe(t),n=gi(t),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=ci();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+Vi(t),y:l}}function Ki(t){var e,i=gi(t),n=zi(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=oi(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=oi(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+Vi(t),l=-n.scrollTop;return"rtl"===pi(s||i).direction&&(a+=oi(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function Ui(t){var e=pi(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function Qi(t){return["html","body","#document"].indexOf(Ye(t))>=0?t.ownerDocument.body:Ze(t)&&Ui(t)?t:Qi(mi(t))}function Ji(t,e){var i;void 0===e&&(e=[]);var n=Qi(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=Xe(n),r=s?[o].concat(o.visualViewport||[],Ui(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(Ji(mi(r)))}function Yi(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Xi(t,e){var i=di(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}function Gi(t,e,i){return e===De?Yi(Bi(t,i)):Ge(e)?Xi(e,i):Yi(Ki(gi(t)))}function Zi(t){var e=Ji(mi(t)),i=["absolute","fixed"].indexOf(pi(t).position)>=0&&Ze(t)?bi(t):t;return Ge(i)?e.filter((function(t){return Ge(t)&&hi(t,i)&&"body"!==Ye(t)})):[]}function tn(t,e,i,n){var s="clippingParents"===e?Zi(t):[].concat(e),o=[].concat(s,[i]),r=o[0],a=o.reduce((function(e,i){var s=Gi(t,i,n);return e.top=oi(s.top,e.top),e.right=ri(s.right,e.right),e.bottom=ri(s.bottom,e.bottom),e.left=oi(s.left,e.left),e}),Gi(t,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function en(t){var e,i=t.reference,n=t.element,s=t.placement,o=s?si(s):null,r=s?Ti(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case Se:e={x:a,y:i.y-n.height};break;case Ce:e={x:a,y:i.y+i.height};break;case ke:e={x:i.x+i.width,y:l};break;case Ie:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?yi(o):null;if(null!=c){var d="y"===c?"height":"width";switch(r){case Ne:e[c]=e[c]-(i[d]/2-n[d]/2);break;case $e:e[c]=e[c]+(i[d]/2-n[d]/2)}}return e}function nn(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=void 0===n?t.placement:n,o=i.strategy,r=void 0===o?t.strategy:o,a=i.boundary,l=void 0===a?Pe:a,c=i.rootBoundary,d=void 0===c?De:c,u=i.elementContext,h=void 0===u?je:u,p=i.altBoundary,f=void 0!==p&&p,g=i.padding,m=void 0===g?0:g,v=xi("number"!=typeof m?m:Ei(m,Le)),_=h===je?Fe:je,b=t.rects.popper,y=t.elements[f?_:h],w=tn(Ge(y)?y:y.contextElement||gi(t.elements.popper),l,d,r),O=di(t.elements.reference),A=en({reference:O,element:b,strategy:"absolute",placement:s}),x=Yi(Object.assign({},b,A)),E=h===je?x:O,S={top:w.top-E.top+v.top,bottom:E.bottom-w.bottom+v.bottom,left:w.left-E.left+v.left,right:E.right-w.right+v.right},C=t.modifiersData.offset;if(h===je&&C){var k=C[s];Object.keys(S).forEach((function(t){var e=[ke,Ce].indexOf(t)>=0?1:-1,i=[Se,Ce].indexOf(t)>=0?"y":"x";S[t]+=k[i]*e}))}return S}function sn(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?qe:l,d=Ti(n),u=d?a?Me:Me.filter((function(t){return Ti(t)===d})):Le,h=u.filter((function(t){return c.indexOf(t)>=0}));0===h.length&&(h=u);var p=h.reduce((function(e,i){return e[i]=nn(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[si(i)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}function on(t){if(si(t)===Te)return[];var e=Ri(t);return[Wi(t),e,Wi(e)]}function rn(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,d=i.boundary,u=i.rootBoundary,h=i.altBoundary,p=i.flipVariations,f=void 0===p||p,g=i.allowedAutoPlacements,m=e.options.placement,v=si(m),_=l||(v!==m&&f?on(m):[Ri(m)]),b=[m].concat(_).reduce((function(t,i){return t.concat(si(i)===Te?sn(e,{placement:i,boundary:d,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:g}):i)}),[]),y=e.rects.reference,w=e.rects.popper,O=new Map,A=!0,x=b[0],E=0;E=0,T=I?"width":"height",L=nn(e,{placement:S,boundary:d,rootBoundary:u,altBoundary:h,padding:c}),N=I?k?ke:Ie:k?Ce:Se;y[T]>w[T]&&(N=Ri(N));var $=Ri(N),P=[];if(o&&P.push(L[C]<=0),a&&P.push(L[N]<=0,L[$]<=0),P.every((function(t){return t}))){x=S,A=!1;break}O.set(S,P)}if(A)for(var D=function(t){var e=b.find((function(e){var i=O.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return x=e,"break"},j=f?3:1;j>0&&"break"!==D(j);j--);e.placement!==x&&(e.modifiersData[n]._skip=!0,e.placement=x,e.reset=!0)}}const an={name:"flip",enabled:!0,phase:"main",fn:rn,requiresIfExists:["offset"],data:{_skip:!1}};function ln(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function cn(t){return[Se,ke,Ce,Ie].some((function(e){return t[e]>=0}))}function dn(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=nn(e,{elementContext:"reference"}),a=nn(e,{altBoundary:!0}),l=ln(r,n),c=ln(a,s,o),d=cn(l),u=cn(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}const un={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:dn};function hn(t,e,i){var n=si(t),s=[Ie,Se].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[Ie,ke].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}function pn(t){var e=t.state,i=t.options,n=t.name,s=i.offset,o=void 0===s?[0,0]:s,r=qe.reduce((function(t,i){return t[i]=hn(i,e.rects,o),t}),{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=r}const fn={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:pn};function gn(t){var e=t.state,i=t.name;e.modifiersData[i]=en({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const mn={name:"popperOffsets",enabled:!0,phase:"read",fn:gn,data:{}};function vn(t){return"x"===t?"y":"x"}function _n(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,d=i.altBoundary,u=i.padding,h=i.tether,p=void 0===h||h,f=i.tetherOffset,g=void 0===f?0:f,m=nn(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:d}),v=si(e.placement),_=Ti(e.placement),b=!_,y=yi(v),w=vn(y),O=e.modifiersData.popperOffsets,A=e.rects.reference,x=e.rects.popper,E="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,S="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),C=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,k={x:0,y:0};if(O){if(o){var I,T="y"===y?Se:Ie,L="y"===y?Ce:ke,N="y"===y?"height":"width",$=O[y],P=$+m[T],D=$-m[L],j=p?-x[N]/2:0,F=_===Ne?A[N]:x[N],M=_===Ne?-x[N]:-A[N],q=e.elements.arrow,R=p&&q?ui(q):{width:0,height:0},H=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Ai(),W=H[T],z=H[L],V=wi(0,A[N],R[N]),B=b?A[N]/2-j-V-W-S.mainAxis:F-V-W-S.mainAxis,K=b?-A[N]/2+j+V+z+S.mainAxis:M+V+z+S.mainAxis,U=e.elements.arrow&&bi(e.elements.arrow),Q=U?"y"===y?U.clientTop||0:U.clientLeft||0:0,J=null!=(I=null==C?void 0:C[y])?I:0,Y=$+K-J,X=wi(p?ri(P,$+B-J-Q):P,$,p?oi(D,Y):D);O[y]=X,k[y]=X-$}if(a){var G,Z="x"===y?Se:Ie,tt="x"===y?Ce:ke,et=O[w],it="y"===w?"height":"width",nt=et+m[Z],st=et-m[tt],ot=-1!==[Se,Ie].indexOf(v),rt=null!=(G=null==C?void 0:C[w])?G:0,at=ot?nt:et-A[it]-x[it]-rt+S.altAxis,lt=ot?et+A[it]+x[it]-rt-S.altAxis:st,ct=p&&ot?Oi(at,et,lt):wi(p?at:nt,et,p?lt:st);O[w]=ct,k[w]=ct-et}e.modifiersData[n]=k}}const bn={name:"preventOverflow",enabled:!0,phase:"main",fn:_n,requiresIfExists:["offset"]};function yn(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function wn(t){return t!==Xe(t)&&Ze(t)?yn(t):zi(t)}function On(t){var e=t.getBoundingClientRect(),i=ai(e.width)/t.offsetWidth||1,n=ai(e.height)/t.offsetHeight||1;return 1!==i||1!==n}function An(t,e,i){void 0===i&&(i=!1);var n=Ze(e),s=Ze(e)&&On(e),o=gi(e),r=di(t,s,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!i)&&(("body"!==Ye(e)||Ui(o))&&(a=wn(e)),Ze(e)?((l=di(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=Vi(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function xn(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||s(t)})),n}function En(t){var e=xn(t);return Je.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}function Sn(t){var e;return function(){return e||(e=new Promise((function(i){Promise.resolve().then((function(){e=void 0,i(t())}))}))),e}}function Cn(t){var e=t.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}var kn={placement:"bottom",modifiers:[],strategy:"absolute"};function In(){for(var t=arguments.length,e=new Array(t),i=0;iNumber.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(Q.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const i=ut.find(as,this._menu).filter((t=>h(t)));i.length&&x(i,e,t===Hn,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=_s.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(t.button===Wn||"keyup"===t.type&&t.key!==qn)return;const e=ut.find(ns);for(const i of e){const e=_s.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),s=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&t.key===qn||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i=t.key===Mn,n=[Rn,Hn].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const s=this.matches(is)?this:ut.prev(this,is)[0]||ut.next(this,is)[0]||ut.findOne(is,t.delegateTarget.parentNode),o=_s.getOrCreateInstance(s);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}W.on(document,Qn,is,_s.dataApiKeydownHandler),W.on(document,Qn,ss,_s.dataApiKeydownHandler),W.on(document,Un,_s.clearMenus),W.on(document,Jn,_s.clearMenus),W.on(document,Un,is,(function(t){t.preventDefault(),_s.getOrCreateInstance(this).toggle()})),w(_s);const bs=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ys=".sticky-top",ws="padding-right",Os="margin-right";class As{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,ws,(e=>e+t)),this._setElementAttributes(bs,ws,(e=>e+t)),this._setElementAttributes(ys,Os,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ws),this._resetElementAttributes(bs,ws),this._resetElementAttributes(ys,Os)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth(),s=t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)};this._applyManipulationCallback(t,s)}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&Q.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){const i=t=>{const i=Q.getDataAttribute(t,e);null!==i?(Q.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)};this._applyManipulationCallback(t,i)}_applyManipulationCallback(t,e){if(d(t))e(t);else for(const i of ut.find(t,this._element))e(i)}}const xs="backdrop",Es="fade",Ss="show",Cs=`mousedown.bs.${xs}`,ks={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Is={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Ts extends J{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return ks}static get DefaultType(){return Is}static get NAME(){return xs}show(t){if(!this._config.isVisible)return void O(t);this._append();const e=this._getElement();this._config.isAnimated&&m(e),e.classList.add(Ss),this._emulateAnimation((()=>{O(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(Ss),this._emulateAnimation((()=>{this.dispose(),O(t)}))):O(t)}dispose(){this._isAppended&&(W.off(this._element,Cs),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add(Es),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=u(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),W.on(t,Cs,(()=>{O(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){A(t,this._getElement(),this._config.isAnimated)}}const Ls="focustrap",Ns=".bs.focustrap",$s=`focusin${Ns}`,Ps=`keydown.tab${Ns}`,Ds="Tab",js="forward",Fs="backward",Ms={autofocus:!0,trapElement:null},qs={autofocus:"boolean",trapElement:"element"};class Rs extends J{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Ms}static get DefaultType(){return qs}static get NAME(){return Ls}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),W.off(document,Ns),W.on(document,$s,(t=>this._handleFocusin(t))),W.on(document,Ps,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,W.off(document,Ns))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=ut.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===Fs?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){t.key===Ds&&(this._lastTabNavDirection=t.shiftKey?Fs:js)}}const Hs="modal",Ws=".bs.modal",zs="Escape",Vs=`hide${Ws}`,Bs=`hidePrevented${Ws}`,Ks=`hidden${Ws}`,Us=`show${Ws}`,Qs=`shown${Ws}`,Js=`resize${Ws}`,Ys=`click.dismiss${Ws}`,Xs=`mousedown.dismiss${Ws}`,Gs=`keydown.dismiss${Ws}`,Zs=`click${Ws}.data-api`,to="modal-open",eo="fade",io="show",no="modal-static",so=".modal.show",oo=".modal-dialog",ro=".modal-body",ao='[data-bs-toggle="modal"]',lo={backdrop:!0,focus:!0,keyboard:!0},co={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class uo extends X{constructor(t,e){super(t,e),this._dialog=ut.findOne(oo,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new As,this._addEventListeners()}static get Default(){return lo}static get DefaultType(){return co}static get NAME(){return Hs}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||W.trigger(this._element,Us,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(to),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(W.trigger(this._element,Vs).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(io),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const t of[window,this._dialog])W.off(t,Ws);this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ts({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Rs({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=ut.findOne(ro,this._dialog);e&&(e.scrollTop=0),m(this._element),this._element.classList.add(io);const i=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,W.trigger(this._element,Qs,{relatedTarget:t})};this._queueCallback(i,this._dialog,this._isAnimated())}_addEventListeners(){W.on(this._element,Gs,(t=>{if(t.key===zs)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),W.on(window,Js,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),W.on(this._element,Xs,(t=>{W.one(this._element,Ys,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(to),this._resetAdjustments(),this._scrollBar.reset(),W.trigger(this._element,Ks)}))}_isAnimated(){return this._element.classList.contains(eo)}_triggerBackdropTransition(){if(W.trigger(this._element,Bs).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(no)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(no),this._queueCallback((()=>{this._element.classList.remove(no),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=y()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=y()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=uo.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}W.on(document,Zs,ao,(function(t){const e=a(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),W.one(e,Us,(t=>{t.defaultPrevented||W.one(e,Ks,(()=>{h(this)&&this.focus()}))}));const i=ut.findOne(so);i&&uo.getInstance(i).hide(),uo.getOrCreateInstance(e).toggle(this)})),G(uo),w(uo);const ho="offcanvas",po=".bs.offcanvas",fo=".data-api",go=`load${po}${fo}`,mo="Escape",vo="show",_o="showing",bo="hiding",yo="offcanvas-backdrop",wo=".offcanvas.show",Oo=`show${po}`,Ao=`shown${po}`,xo=`hide${po}`,Eo=`hidePrevented${po}`,So=`hidden${po}`,Co=`resize${po}`,ko=`click${po}${fo}`,Io=`keydown.dismiss${po}`,To='[data-bs-toggle="offcanvas"]',Lo={backdrop:!0,keyboard:!0,scroll:!1},No={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class $o extends X{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Lo}static get DefaultType(){return No}static get NAME(){return ho}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(W.trigger(this._element,Oo,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new As).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(_o);const e=()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(vo),this._element.classList.remove(_o),W.trigger(this._element,Ao,{relatedTarget:t})};this._queueCallback(e,this._element,!0)}hide(){if(!this._isShown)return;if(W.trigger(this._element,xo).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(bo),this._backdrop.hide();const t=()=>{this._element.classList.remove(vo,bo),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new As).reset(),W.trigger(this._element,So)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=()=>{"static"!==this._config.backdrop?this.hide():W.trigger(this._element,Eo)},e=Boolean(this._config.backdrop);return new Ts({className:yo,isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?t:null})}_initializeFocusTrap(){return new Rs({trapElement:this._element})}_addEventListeners(){W.on(this._element,Io,(t=>{t.key===mo&&(this._config.keyboard?this.hide():W.trigger(this._element,Eo))}))}static jQueryInterface(t){return this.each((function(){const e=$o.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}W.on(document,ko,To,(function(t){const e=a(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this))return;W.one(e,So,(()=>{h(this)&&this.focus()}));const i=ut.findOne(wo);i&&i!==e&&$o.getInstance(i).hide(),$o.getOrCreateInstance(e).toggle(this)})),W.on(window,go,(()=>{for(const t of ut.find(wo))$o.getOrCreateInstance(t).show()})),W.on(window,Co,(()=>{for(const t of ut.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&$o.getOrCreateInstance(t).hide()})),G($o),w($o);const Po=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Do=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,jo=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Fo=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!Po.has(i)||Boolean(Do.test(t.nodeValue)||jo.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))},Mo={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};function qo(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(const t of s){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[i]||[]);for(const e of n)Fo(e,s)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}const Ro="TemplateFactory",Ho={allowList:Mo,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},Wo={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},zo={entry:"(string|element|function|null)",selector:"(string|element)"};class Vo extends J{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Ho}static get DefaultType(){return Wo}static get NAME(){return Ro}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},zo)}_setContent(t,e,i){const n=ut.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?d(e)?this._putElementInTemplate(u(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?qo(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return"function"==typeof t?t(this):t}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const Bo="tooltip",Ko=new Set(["sanitize","allowList","sanitizeFn"]),Uo="fade",Qo="show",Jo=".tooltip-inner",Yo=".modal",Xo="hide.bs.modal",Go="hover",Zo="focus",tr="click",er="manual",ir="hide",nr="hidden",sr="show",or="shown",rr="inserted",ar="click",lr="focusin",cr="focusout",dr="mouseenter",ur="mouseleave",hr={AUTO:"auto",TOP:"top",RIGHT:y()?"left":"right",BOTTOM:"bottom",LEFT:y()?"right":"left"},pr={allowList:Mo,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},fr={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class gr extends X{constructor(t,e){if(void 0===Pn)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return pr}static get DefaultType(){return fr}static get NAME(){return Bo}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),W.off(this._element.closest(Yo),Xo,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=W.trigger(this._element,this.constructor.eventName(sr)),e=(f(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),W.trigger(this._element,this.constructor.eventName(rr))),this._popper=this._createPopper(i),i.classList.add(Qo),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))W.on(t,"mouseover",g);const s=()=>{W.trigger(this._element,this.constructor.eventName(or)),!1===this._isHovered&&this._leave(),this._isHovered=!1};this._queueCallback(s,this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(W.trigger(this._element,this.constructor.eventName(ir)).defaultPrevented)return;if(this._getTipElement().classList.remove(Qo),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))W.off(t,"mouseover",g);this._activeTrigger[tr]=!1,this._activeTrigger[Zo]=!1,this._activeTrigger[Go]=!1,this._isHovered=null;const t=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),W.trigger(this._element,this.constructor.eventName(nr)))};this._queueCallback(t,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(Uo,Qo),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=s(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(Uo),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Vo({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Jo]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Uo)}_isShown(){return this.tip&&this.tip.classList.contains(Qo)}_createPopper(t){const e="function"==typeof this._config.placement?this._config.placement.call(this,t,this._element):this._config.placement,i=hr[e.toUpperCase()];return $n(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)W.on(this._element,this.constructor.eventName(ar),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if(e!==er){const t=e===Go?this.constructor.eventName(dr):this.constructor.eventName(lr),i=e===Go?this.constructor.eventName(ur):this.constructor.eventName(cr);W.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Zo:Go]=!0,e._enter()})),W.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Zo:Go]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},W.on(this._element.closest(Yo),Xo,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=Q.getDataAttributes(this._element);for(const t of Object.keys(e))Ko.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:u(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=gr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}w(gr);const mr="popover",vr=".popover-header",_r=".popover-body",br={...gr.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},yr={...gr.DefaultType,content:"(null|string|element|function)"};class wr extends gr{static get Default(){return br}static get DefaultType(){return yr}static get NAME(){return mr}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[vr]:this._getTitle(),[_r]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=wr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}w(wr);const Or="scrollspy",Ar=".bs.scrollspy",xr=`activate${Ar}`,Er=`click${Ar}`,Sr=`load${Ar}.data-api`,Cr="dropdown-item",kr="active",Ir='[data-bs-spy="scroll"]',Tr="[href]",Lr=".nav, .list-group",Nr=".nav-link",$r=`${Nr}, .nav-item > ${Nr}, .list-group-item`,Pr=".dropdown",Dr=".dropdown-toggle",jr={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Fr={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Mr extends X{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return jr}static get DefaultType(){return Fr}static get NAME(){return Or}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=u(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(W.off(this._config.target,Er),W.on(this._config.target,Er,Tr,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(i(o),!n)return}else s||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=ut.find(Tr,this._config.target);for(const e of t){if(!e.hash||p(e))continue;const t=ut.findOne(e.hash,this._element);h(t)&&(this._targetLinks.set(e.hash,e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(kr),this._activateParents(t),W.trigger(this._element,xr,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains(Cr))ut.findOne(Dr,t.closest(Pr)).classList.add(kr);else for(const e of ut.parents(t,Lr))for(const t of ut.prev(e,$r))t.classList.add(kr)}_clearActiveClass(t){t.classList.remove(kr);const e=ut.find(`${Tr}.${kr}`,t);for(const t of e)t.classList.remove(kr)}static jQueryInterface(t){return this.each((function(){const e=Mr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}W.on(window,Sr,(()=>{for(const t of ut.find(Ir))Mr.getOrCreateInstance(t)})),w(Mr);const qr="tab",Rr=".bs.tab",Hr=`hide${Rr}`,Wr=`hidden${Rr}`,zr=`show${Rr}`,Vr=`shown${Rr}`,Br=`click${Rr}`,Kr=`keydown${Rr}`,Ur=`load${Rr}`,Qr="ArrowLeft",Jr="ArrowRight",Yr="ArrowUp",Xr="ArrowDown",Gr="active",Zr="fade",ta="show",ea="dropdown",ia=".dropdown-toggle",na=".dropdown-menu",sa=":not(.dropdown-toggle)",oa='.list-group, .nav, [role="tablist"]',ra=".nav-item, .list-group-item",aa='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',la=`.nav-link${sa}, .list-group-item${sa}, [role="tab"]${sa}, ${aa}`,ca=`.${Gr}[data-bs-toggle="tab"], .${Gr}[data-bs-toggle="pill"], .${Gr}[data-bs-toggle="list"]`;class da extends X{constructor(t){super(t),this._parent=this._element.closest(oa),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),W.on(this._element,Kr,(t=>this._keydown(t))))}static get NAME(){return qr}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?W.trigger(e,Hr,{relatedTarget:t}):null;W.trigger(t,zr,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(Gr),this._activate(a(t));const i=()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),W.trigger(t,Vr,{relatedTarget:e})):t.classList.add(ta)};this._queueCallback(i,t,t.classList.contains(Zr))}_deactivate(t,e){if(!t)return;t.classList.remove(Gr),t.blur(),this._deactivate(a(t));const i=()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),W.trigger(t,Wr,{relatedTarget:e})):t.classList.remove(ta)};this._queueCallback(i,t,t.classList.contains(Zr))}_keydown(t){if(![Qr,Jr,Yr,Xr].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[Jr,Xr].includes(t.key),i=x(this._getChildren().filter((t=>!p(t))),t.target,e,!0);i&&(i.focus({preventScroll:!0}),da.getOrCreateInstance(i).show())}_getChildren(){return ut.find(la,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=a(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`#${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains(ea))return;const n=(t,n)=>{const s=ut.findOne(t,i);s&&s.classList.toggle(n,e)};n(ia,Gr),n(na,ta),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Gr)}_getInnerElement(t){return t.matches(la)?t:ut.findOne(la,t)}_getOuterElement(t){return t.closest(ra)||t}static jQueryInterface(t){return this.each((function(){const e=da.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}W.on(document,Br,aa,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this)||da.getOrCreateInstance(this).show()})),W.on(window,Ur,(()=>{for(const t of ut.find(ca))da.getOrCreateInstance(t)})),w(da);const ua="toast",ha=".bs.toast",pa=`mouseover${ha}`,fa=`mouseout${ha}`,ga=`focusin${ha}`,ma=`focusout${ha}`,va=`hide${ha}`,_a=`hidden${ha}`,ba=`show${ha}`,ya=`shown${ha}`,wa="fade",Oa="hide",Aa="show",xa="showing",Ea={animation:"boolean",autohide:"boolean",delay:"number"},Sa={animation:!0,autohide:!0,delay:5e3};class Ca extends X{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Sa}static get DefaultType(){return Ea}static get NAME(){return ua}show(){if(W.trigger(this._element,ba).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(wa);const t=()=>{this._element.classList.remove(xa),W.trigger(this._element,ya),this._maybeScheduleHide()};this._element.classList.remove(Oa),m(this._element),this._element.classList.add(Aa,xa),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this.isShown())return;if(W.trigger(this._element,va).defaultPrevented)return;const t=()=>{this._element.classList.add(Oa),this._element.classList.remove(xa,Aa),W.trigger(this._element,_a)};this._element.classList.add(xa),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Aa),super.dispose()}isShown(){return this._element.classList.contains(Aa)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){W.on(this._element,pa,(t=>this._onInteraction(t,!0))),W.on(this._element,fa,(t=>this._onInteraction(t,!1))),W.on(this._element,ga,(t=>this._onInteraction(t,!0))),W.on(this._element,ma,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Ca.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return G(Ca),w(Ca),{Alert:ot,Button:dt,Carousel:oe,Collapse:Ee,Dropdown:_s,Modal:uo,Offcanvas:$o,Popover:wr,ScrollSpy:Mr,Tab:da,Toast:Ca,Tooltip:gr}}()},312:(t,e,i)=>{"use strict";i.r(e)},6416:function(t){t.exports=function(){"use strict";function t(t,e){t.split(/\s+/).forEach((t=>{e(t)}))}class e{constructor(){this._events=void 0,this._events={}}on(e,i){t(e,(t=>{const e=this._events[t]||[];e.push(i),this._events[t]=e}))}off(e,i){var n=arguments.length;0!==n?t(e,(t=>{if(1===n)return void delete this._events[t];const e=this._events[t];void 0!==e&&(e.splice(e.indexOf(i),1),this._events[t]=e)})):this._events={}}trigger(e,...i){var n=this;t(e,(t=>{const e=n._events[t];void 0!==e&&e.forEach((t=>{t.apply(n,i)}))}))}}const i=t=>(t=t.filter(Boolean)).length<2?t[0]||"":1==a(t)?"["+t.join("")+"]":"(?:"+t.join("|")+")",n=t=>{if(!o(t))return t.join("");let e="",i=0;const n=()=>{i>1&&(e+="{"+i+"}")};return t.forEach(((s,o)=>{s!==t[o-1]?(n(),e+=s,i=1):i++})),n(),e},s=t=>{let e=c(t);return i(e)},o=t=>new Set(t).size!==t.length,r=t=>(t+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),a=t=>t.reduce(((t,e)=>Math.max(t,l(e))),0),l=t=>c(t).length,c=t=>Array.from(t),d=t=>{if(1===t.length)return[[t]];let e=[];const i=t.substring(1);return d(i).forEach((function(i){let n=i.slice(0);n[0]=t.charAt(0)+n[0],e.push(n),n=i.slice(0),n.unshift(t.charAt(0)),e.push(n)})),e},u=[[0,65535]];let h,p;const f={},g={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"};for(let t in g){let e=g[t]||"";for(let i=0;it.normalize(e),_=t=>c(t).reduce(((t,e)=>t+b(e)),""),b=t=>(t=v(t).toLowerCase().replace(m,(t=>f[t]||"")),v(t,"NFC")),y=t=>{const e={},i=(t,i)=>{const n=e[t]||new Set,o=new RegExp("^"+s(n)+"$","iu");i.match(o)||(n.add(r(i)),e[t]=n)};for(let e of function*(t){for(const[e,i]of t)for(let t=e;t<=i;t++){let e=String.fromCharCode(t),i=_(e);i!=e.toLowerCase()&&(i.length>3||0!=i.length&&(yield{folded:i,composed:e,code_point:t}))}}(t))i(e.folded,e.folded),i(e.folded,e.composed);return e},w=t=>{const e=y(t),n={};let o=[];for(let t in e){let i=e[t];i&&(n[t]=s(i)),t.length>1&&o.push(r(t))}o.sort(((t,e)=>e.length-t.length));const a=i(o);return p=new RegExp("^"+a,"u"),n},O=(t,e=1)=>(e=Math.max(e,t.length-1),i(d(t).map((t=>((t,e=1)=>{let i=0;return t=t.map((t=>(h[t]&&(i+=t.length),h[t]||t))),i>=e?n(t):""})(t,e))))),A=(t,e=!0)=>{let s=t.length>1?1:0;return i(t.map((t=>{let i=[];const o=e?t.length():t.length()-1;for(let e=0;e{for(const i of e){if(i.start!=t.start||i.end!=t.end)continue;if(i.substrs.join("")!==t.substrs.join(""))continue;let e=t.parts;const n=t=>{for(const i of e){if(i.start===t.start&&i.substr===t.substr)return!1;if(1!=t.length&&1!=i.length){if(t.starti.start)return!0;if(i.startt.start)return!0}}return!1};if(!(i.parts.filter(n).length>0))return!0}return!1};class E{constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(t){t&&(this.parts.push(t),this.substrs.push(t.substr),this.start=Math.min(t.start,this.start),this.end=Math.max(t.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(t,e){let i=new E,n=JSON.parse(JSON.stringify(this.parts)),s=n.pop();for(const t of n)i.add(t);let o=e.substr.substring(0,t-s.start),r=o.length;return i.add({start:s.start,end:s.start+r,length:r,substr:o}),i}}const S=t=>{var e;void 0===h&&(h=w(e||u)),t=_(t);let i="",n=[new E];for(let e=0;e0){a=a.sort(((t,e)=>t.length()-e.length()));for(let t of a)x(t,n)||n.push(t)}else if(e>0&&1==l.size&&!l.has("3")){i+=A(n,!1);let t=new E;const e=n[0];e&&t.add(e.last()),n=[t]}}return i+=A(n,!0),i},C=(t,e)=>{if(t)return t[e]},k=(t,e)=>{if(t){for(var i,n=e.split(".");(i=n.shift())&&(t=t[i]););return t}},I=(t,e,i)=>{var n,s;return t?(t+="",null==e.regex||-1===(s=t.search(e.regex))?0:(n=e.string.length/t.length,0===s&&(n+=.5),n*i)):0},T=(t,e)=>{var i=t[e];if("function"==typeof i)return i;i&&!Array.isArray(i)&&(t[e]=[i])},L=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},N=(t,e)=>"number"==typeof t&&"number"==typeof e?t>e?1:t(e=_(e+"").toLowerCase())?1:e>t?-1:0;class P{constructor(t,e){this.items=void 0,this.settings=void 0,this.items=t,this.settings=e||{diacritics:!0}}tokenize(t,e,i){if(!t||!t.length)return[];const n=[],s=t.split(/\s+/);var o;return i&&(o=new RegExp("^("+Object.keys(i).map(r).join("|")+"):(.*)$")),s.forEach((t=>{let i,s=null,a=null;o&&(i=t.match(o))&&(s=i[1],t=i[2]),t.length>0&&(a=this.settings.diacritics?S(t)||null:r(t),a&&e&&(a="\\b"+a)),n.push({string:t,regex:a?new RegExp(a,"iu"):null,field:s})})),n}getScoreFunction(t,e){var i=this.prepareSearch(t,e);return this._getScoreFunction(i)}_getScoreFunction(t){const e=t.tokens,i=e.length;if(!i)return function(){return 0};const n=t.options.fields,s=t.weights,o=n.length,r=t.getAttrFn;if(!o)return function(){return 1};const a=1===o?function(t,e){const i=n[0].field;return I(r(e,i),t,s[i]||1)}:function(t,e){var i=0;if(t.field){const n=r(e,t.field);!t.regex&&n?i+=1/o:i+=I(n,t,1)}else L(s,((n,s)=>{i+=I(r(e,s),t,n)}));return i/o};return 1===i?function(t){return a(e[0],t)}:"and"===t.options.conjunction?function(t){var n,s=0;for(let i of e){if((n=a(i,t))<=0)return 0;s+=n}return s/i}:function(t){var n=0;return L(e,(e=>{n+=a(e,t)})),n/i}}getSortFunction(t,e){var i=this.prepareSearch(t,e);return this._getSortFunction(i)}_getSortFunction(t){var e,i=[];const n=this,s=t.options,o=!t.query&&s.sort_empty?s.sort_empty:s.sort;if("function"==typeof o)return o.bind(this);const r=function(e,i){return"$score"===e?i.score:t.getAttrFn(n.items[i.id],e)};if(o)for(let e of o)(t.query||"$score"!==e.field)&&i.push(e);if(t.query){e=!0;for(let t of i)if("$score"===t.field){e=!1;break}e&&i.unshift({field:"$score",direction:"desc"})}else i=i.filter((t=>"$score"!==t.field));return i.length?function(t,e){var n,s;for(let o of i)if(s=o.field,n=("desc"===o.direction?-1:1)*N(r(s,t),r(s,e)))return n;return 0}:null}prepareSearch(t,e){const i={};var n=Object.assign({},e);if(T(n,"sort"),T(n,"sort_empty"),n.fields){T(n,"fields");const t=[];n.fields.forEach((e=>{"string"==typeof e&&(e={field:e,weight:1}),t.push(e),i[e.field]="weight"in e?e.weight:1})),n.fields=t}return{options:n,query:t.toLowerCase().trim(),tokens:this.tokenize(t,n.respect_word_boundaries,i),total:0,items:[],weights:i,getAttrFn:n.nesting?k:C}}search(t,e){var i,n,s=this;n=this.prepareSearch(t,e),e=n.options,t=n.query;const o=e.score||s._getScoreFunction(n);t.length?L(s.items,((t,s)=>{i=o(t),(!1===e.filter||i>0)&&n.items.push({score:i,id:s})})):L(s.items,((t,e)=>{n.items.push({score:1,id:e})}));const r=s._getSortFunction(n);return r&&n.items.sort(r),n.total=n.items.length,"number"==typeof e.limit&&(n.items=n.items.slice(0,e.limit)),n}}const D=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},j=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(F(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},F=t=>"string"==typeof t&&t.indexOf("<")>-1,M=(t,e)=>{var i=document.createEvent("HTMLEvents");i.initEvent(e,!0,!1),t.dispatchEvent(i)},q=(t,e)=>{Object.assign(t.style,e)},R=(t,...e)=>{var i=W(e);(t=z(t)).map((t=>{i.map((e=>{t.classList.add(e)}))}))},H=(t,...e)=>{var i=W(e);(t=z(t)).map((t=>{i.map((e=>{t.classList.remove(e)}))}))},W=t=>{var e=[];return D(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\11\12\14\15\40]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},z=t=>(Array.isArray(t)||(t=[t]),t),V=(t,e,i)=>{if(!i||i.contains(t))for(;t&&t.matches;){if(t.matches(e))return t;t=t.parentNode}},B=(t,e=0)=>e>0?t[t.length-1]:t[0],K=(t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var i=0;t=t.previousElementSibling;)t.matches(e)&&i++;return i},U=(t,e)=>{D(e,((e,i)=>{null==e?t.removeAttribute(i):t.setAttribute(i,""+e)}))},Q=(t,e)=>{t.parentNode&&t.parentNode.replaceChild(e,t)},J=(t,e)=>{if(null===e)return;if("string"==typeof e){if(!e.length)return;e=new RegExp(e,"i")}const i=t=>3===t.nodeType?(t=>{var i=t.data.match(e);if(i&&t.data.length>0){var n=document.createElement("span");n.className="highlight";var s=t.splitText(i.index);s.splitText(i[0].length);var o=s.cloneNode(!0);return n.appendChild(o),Q(s,n),1}return 0})(t):((t=>{1!==t.nodeType||!t.childNodes||/(script|style)/i.test(t.tagName)||"highlight"===t.className&&"SPAN"===t.tagName||Array.from(t.childNodes).forEach((t=>{i(t)}))})(t),0);i(t)},Y="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey";var X={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(t){return t.length>0},render:{}};const G=t=>null==t?null:Z(t),Z=t=>"boolean"==typeof t?t?"1":"0":t+"",tt=t=>(t+"").replace(/&/g,"&").replace(//g,">").replace(/"/g,"""),et=(t,e)=>{var i;return function(n,s){var o=this;i&&(o.loading=Math.max(o.loading-1,0),clearTimeout(i)),i=setTimeout((function(){i=null,o.loadedSearches[n]=!0,t.call(o,n,s)}),e)}},it=(t,e,i)=>{var n,s=t.trigger,o={};for(n of(t.trigger=function(){var i=arguments[0];if(-1===e.indexOf(i))return s.apply(t,arguments);o[i]=arguments},i.apply(t,[]),t.trigger=s,e))n in o&&s.apply(t,o[n])},nt=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},st=(t,e,i,n)=>{t.addEventListener(e,i,n)},ot=(t,e)=>!!e&&!!e[t]&&1==(e.altKey?1:0)+(e.ctrlKey?1:0)+(e.shiftKey?1:0)+(e.metaKey?1:0),rt=(t,e)=>t.getAttribute("id")||(t.setAttribute("id",e),e),at=t=>t.replace(/[\\"']/g,"\\$&"),lt=(t,e)=>{e&&t.append(e)};function ct(t,e){var i=Object.assign({},X,e),n=i.dataAttr,s=i.labelField,o=i.valueField,r=i.disabledField,a=i.optgroupField,l=i.optgroupLabelField,c=i.optgroupValueField,d=t.tagName.toLowerCase(),u=t.getAttribute("placeholder")||t.getAttribute("data-placeholder");if(!u&&!i.allowEmptyOption){let e=t.querySelector('option[value=""]');e&&(u=e.textContent)}var h,p,f,g,m,v,_={placeholder:u,options:[],optgroups:[],items:[],maxItems:null};return"select"===d?(p=_.options,f={},g=1,m=t=>{var e=Object.assign({},t.dataset),i=n&&e[n];return"string"==typeof i&&i.length&&(e=Object.assign(e,JSON.parse(i))),e},v=(t,e)=>{var n=G(t.value);if(null!=n&&(n||i.allowEmptyOption)){if(f.hasOwnProperty(n)){if(e){var l=f[n][a];l?Array.isArray(l)?l.push(e):f[n][a]=[l,e]:f[n][a]=e}}else{var c=m(t);c[s]=c[s]||t.textContent,c[o]=c[o]||n,c[r]=c[r]||t.disabled,c[a]=c[a]||e,c.$option=t,f[n]=c,p.push(c)}t.selected&&_.items.push(n)}},_.maxItems=t.hasAttribute("multiple")?null:1,D(t.children,(t=>{var e,i,n;"optgroup"===(h=t.tagName.toLowerCase())?((n=m(e=t))[l]=n[l]||e.getAttribute("label")||"",n[c]=n[c]||g++,n[r]=n[r]||e.disabled,_.optgroups.push(n),i=n[c],D(e.children,(t=>{v(t,i)}))):"option"===h&&v(t)}))):(()=>{const e=t.getAttribute(n);if(e)_.options=JSON.parse(e),D(_.options,(t=>{_.items.push(t[o])}));else{var r=t.value.trim()||"";if(!i.allowEmptyOption&&!r.length)return;const e=r.split(i.delimiter);D(e,(t=>{const e={};e[s]=t,e[o]=t,_.options.push(e)})),_.items=e}})(),Object.assign({},X,_,e)}var dt=0;class ut extends(function(t){return t.plugins={},class extends t{constructor(...t){super(...t),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(e,i){t.plugins[e]={name:e,fn:i}}initializePlugins(t){var e,i;const n=this,s=[];if(Array.isArray(t))t.forEach((t=>{"string"==typeof t?s.push(t):(n.plugins.settings[t.name]=t.options,s.push(t.name))}));else if(t)for(e in t)t.hasOwnProperty(e)&&(n.plugins.settings[e]=t[e],s.push(e));for(;i=s.shift();)n.require(i)}loadPlugin(e){var i=this,n=i.plugins,s=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin');n.requested[e]=!0,n.loaded[e]=s.fn.apply(i,[i.plugins.settings[e]||{}]),n.names.push(e)}require(t){var e=this,i=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(i.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return i.loaded[t]}}}(e)){constructor(t,e){var i;super(),this.control_input=void 0,this.wrapper=void 0,this.dropdown=void 0,this.control=void 0,this.dropdown_content=void 0,this.focus_node=void 0,this.order=0,this.settings=void 0,this.input=void 0,this.tabIndex=void 0,this.is_select_tag=void 0,this.rtl=void 0,this.inputId=void 0,this._destroy=void 0,this.sifter=void 0,this.isOpen=!1,this.isDisabled=!1,this.isRequired=void 0,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.currentResults=void 0,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],dt++;var n=j(t);if(n.tomselect)throw new Error("Tom Select already initialized on this element");n.tomselect=this,i=(window.getComputedStyle&&window.getComputedStyle(n,null)).getPropertyValue("direction");const s=ct(n,e);this.settings=s,this.input=n,this.tabIndex=n.tabIndex||0,this.is_select_tag="select"===n.tagName.toLowerCase(),this.rtl=/rtl/i.test(i),this.inputId=rt(n,"tomselect-"+dt),this.isRequired=n.required,this.sifter=new P(this.options,{diacritics:s.diacritics}),s.mode=s.mode||(1===s.maxItems?"single":"multi"),"boolean"!=typeof s.hideSelected&&(s.hideSelected="multi"===s.mode),"boolean"!=typeof s.hidePlaceholder&&(s.hidePlaceholder="multi"!==s.mode);var o=s.createFilter;"function"!=typeof o&&("string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?s.createFilter=t=>o.test(t):s.createFilter=t=>this.settings.duplicates||!this.options[t]),this.initializePlugins(s.plugins),this.setupCallbacks(),this.setupTemplates();const r=j("
"),a=j("
"),l=this._render("dropdown"),c=j('
'),d=this.input.getAttribute("class")||"",u=s.mode;var h;R(r,s.wrapperClass,d,u),R(a,s.controlClass),lt(r,a),R(l,s.dropdownClass,u),s.copyClassesToDropdown&&R(l,d),R(c,s.dropdownContentClass),lt(l,c),j(s.dropdownParent||r).appendChild(l),F(s.controlInput)?(h=j(s.controlInput),L(["autocorrect","autocapitalize","autocomplete"],(t=>{n.getAttribute(t)&&U(h,{[t]:n.getAttribute(t)})})),h.tabIndex=-1,a.appendChild(h),this.focus_node=h):s.controlInput?(h=j(s.controlInput),this.focus_node=h):(h=j(""),this.focus_node=a),this.wrapper=r,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=h,this.setup()}setup(){const t=this,e=t.settings,i=t.control_input,n=t.dropdown,s=t.dropdown_content,o=t.wrapper,a=t.control,l=t.input,c=t.focus_node,d={passive:!0},u=t.inputId+"-ts-dropdown";U(s,{id:u}),U(c,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":u});const h=rt(c,t.inputId+"-ts-control"),p="label[for='"+(t=>t.replace(/['"\\]/g,"\\$&"))(t.inputId)+"']",f=document.querySelector(p),g=t.focus.bind(t);if(f){st(f,"click",g),U(f,{for:h});const e=rt(f,t.inputId+"-ts-label");U(c,{"aria-labelledby":e}),U(s,{"aria-labelledby":e})}if(o.style.width=l.style.width,t.plugins.names.length){const e="plugin-"+t.plugins.names.join(" plugin-");R([o,n],e)}(null===e.maxItems||e.maxItems>1)&&t.is_select_tag&&U(l,{multiple:"multiple"}),e.placeholder&&U(i,{placeholder:e.placeholder}),!e.splitOn&&e.delimiter&&(e.splitOn=new RegExp("\\s*"+r(e.delimiter)+"+\\s*")),e.load&&e.loadThrottle&&(e.load=et(e.load,e.loadThrottle)),t.control_input.type=l.type,st(n,"mousemove",(()=>{t.ignoreHover=!1})),st(n,"mouseenter",(e=>{var i=V(e.target,"[data-selectable]",n);i&&t.onOptionHover(e,i)}),{capture:!0}),st(n,"click",(e=>{const i=V(e.target,"[data-selectable]");i&&(t.onOptionSelect(e,i),nt(e,!0))})),st(a,"click",(e=>{var n=V(e.target,"[data-ts-item]",a);n&&t.onItemSelect(e,n)?nt(e,!0):""==i.value&&(t.onClick(),nt(e,!0))})),st(c,"keydown",(e=>t.onKeyDown(e))),st(i,"keypress",(e=>t.onKeyPress(e))),st(i,"input",(e=>t.onInput(e))),st(c,"blur",(e=>t.onBlur(e))),st(c,"focus",(e=>t.onFocus(e))),st(i,"paste",(e=>t.onPaste(e)));const m=e=>{const s=e.composedPath()[0];if(!o.contains(s)&&!n.contains(s))return t.isFocused&&t.blur(),void t.inputState();s==i&&t.isOpen?e.stopPropagation():nt(e,!0)},v=()=>{t.isOpen&&t.positionDropdown()};st(document,"mousedown",m),st(window,"scroll",v,d),st(window,"resize",v,d),this._destroy=()=>{document.removeEventListener("mousedown",m),window.removeEventListener("scroll",v),window.removeEventListener("resize",v),f&&f.removeEventListener("click",g)},this.revertSettings={innerHTML:l.innerHTML,tabIndex:l.tabIndex},l.tabIndex=-1,l.insertAdjacentElement("afterend",t.wrapper),t.sync(!1),e.items=[],delete e.optgroups,delete e.options,st(l,"invalid",(()=>{t.isValid&&(t.isValid=!1,t.isInvalid=!0,t.refreshState())})),t.updateOriginalInput(),t.refreshItems(),t.close(!1),t.inputState(),t.isSetup=!0,l.disabled?t.disable():t.enable(),t.on("change",this.onChange),R(l,"tomselected","ts-hidden-accessible"),t.trigger("initialize"),!0===e.preload&&t.preload()}setupOptions(t=[],e=[]){this.addOptions(t),L(e,(t=>{this.registerOptionGroup(t)}))}setupTemplates(){var t=this,e=t.settings.labelField,i=t.settings.optgroupLabelField,n={optgroup:t=>{let e=document.createElement("div");return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,e)=>'
'+e(t[i])+"
",option:(t,i)=>"
"+i(t[e])+"
",item:(t,i)=>"
"+i(t[e])+"
",option_create:(t,e)=>'
Add '+e(t.input)+"
",no_results:()=>'
No results found
',loading:()=>'
',not_loading:()=>{},dropdown:()=>"
"};t.settings.render=Object.assign({},n,t.settings.render)}setupCallbacks(){var t,e,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in i)(e=this.settings[i[t]])&&this.on(t,e)}sync(t=!0){const e=this,i=t?ct(e.input,{delimiter:e.settings.delimiter}):e.settings;e.setupOptions(i.options,i.optgroups),e.setValue(i.items||[],!0),e.lastQuery=null}onClick(){var t=this;if(t.activeItems.length>0)return t.clearActiveItems(),void t.focus();t.isFocused&&t.isOpen?t.blur():t.focus()}onMouseDown(){}onChange(){M(this.input,"input"),M(this.input,"change")}onPaste(t){var e=this;e.isInputHidden||e.isLocked?nt(t):e.settings.splitOn&&setTimeout((()=>{var t=e.inputValue();if(t.match(e.settings.splitOn)){var i=t.trim().split(e.settings.splitOn);L(i,(t=>{G(t)&&(this.options[t]?e.addItem(t):e.createItem(t))}))}}),0)}onKeyPress(t){var e=this;if(!e.isLocked){var i=String.fromCharCode(t.keyCode||t.which);return e.settings.create&&"multi"===e.settings.mode&&i===e.settings.delimiter?(e.createItem(),void nt(t)):void 0}nt(t)}onKeyDown(t){var e=this;if(e.ignoreHover=!0,e.isLocked)9!==t.keyCode&&nt(t);else{switch(t.keyCode){case 65:if(ot(Y,t)&&""==e.control_input.value)return nt(t),void e.selectAll();break;case 27:return e.isOpen&&(nt(t,!0),e.close()),void e.clearActiveItems();case 40:if(!e.isOpen&&e.hasOptions)e.open();else if(e.activeOption){let t=e.getAdjacent(e.activeOption,1);t&&e.setActiveOption(t)}return void nt(t);case 38:if(e.activeOption){let t=e.getAdjacent(e.activeOption,-1);t&&e.setActiveOption(t)}return void nt(t);case 13:return void(e.canSelect(e.activeOption)?(e.onOptionSelect(t,e.activeOption),nt(t)):(e.settings.create&&e.createItem()||document.activeElement==e.control_input&&e.isOpen)&&nt(t));case 37:return void e.advanceSelection(-1,t);case 39:return void e.advanceSelection(1,t);case 9:return void(e.settings.selectOnTab&&(e.canSelect(e.activeOption)&&(e.onOptionSelect(t,e.activeOption),nt(t)),e.settings.create&&e.createItem()&&nt(t)));case 8:case 46:return void e.deleteSelection(t)}e.isInputHidden&&!ot(Y,t)&&nt(t)}}onInput(t){var e=this;if(!e.isLocked){var i=e.inputValue();e.lastValue!==i&&(e.lastValue=i,e.settings.shouldLoad.call(e,i)&&e.load(i),e.refreshOptions(),e.trigger("type",i))}}onOptionHover(t,e){this.ignoreHover||this.setActiveOption(e,!1)}onFocus(t){var e=this,i=e.isFocused;if(e.isDisabled)return e.blur(),void nt(t);e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.preload(),i||e.trigger("focus"),e.activeItems.length||(e.showInput(),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())}onBlur(t){if(!1!==document.hasFocus()){var e=this;if(e.isFocused){e.isFocused=!1,e.ignoreFocus=!1;var i=()=>{e.close(),e.setActiveItem(),e.setCaret(e.items.length),e.trigger("blur")};e.settings.create&&e.settings.createOnBlur?e.createItem(null,i):i()}}}onOptionSelect(t,e){var i,n=this;e.parentElement&&e.parentElement.matches("[data-disabled]")||(e.classList.contains("create")?n.createItem(null,(()=>{n.settings.closeAfterSelect&&n.close()})):void 0!==(i=e.dataset.value)&&(n.lastQuery=null,n.addItem(i),n.settings.closeAfterSelect&&n.close(),!n.settings.hideSelected&&t.type&&/click/.test(t.type)&&n.setActiveOption(e)))}canSelect(t){return!!(this.isOpen&&t&&this.dropdown_content.contains(t))}onItemSelect(t,e){var i=this;return!i.isLocked&&"multi"===i.settings.mode&&(nt(t),i.setActiveItem(e,t),!0)}canLoad(t){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(t)}load(t){const e=this;if(!e.canLoad(t))return;R(e.wrapper,e.settings.loadingClass),e.loading++;const i=e.loadCallback.bind(e);e.settings.load.call(e,t,i)}loadCallback(t,e){const i=this;i.loading=Math.max(i.loading-1,0),i.lastQuery=null,i.clearActiveOption(),i.setupOptions(t,e),i.refreshOptions(i.isFocused&&!i.isInputHidden),i.loading||H(i.wrapper,i.settings.loadingClass),i.trigger("load",t,e)}preload(){var t=this.wrapper.classList;t.contains("preloaded")||(t.add("preloaded"),this.load(""))}setTextboxValue(t=""){var e=this.control_input;e.value!==t&&(e.value=t,M(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){it(this,e?[]:["change"],(()=>{this.clear(e),this.addItems(t,e)}))}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var i,n,s,o,r,a,l=this;if("single"!==l.settings.mode){if(!t)return l.clearActiveItems(),void(l.isFocused&&l.showInput());if("click"===(i=e&&e.type.toLowerCase())&&ot("shiftKey",e)&&l.activeItems.length){for(a=l.getLastActive(),(s=Array.prototype.indexOf.call(l.control.children,a))>(o=Array.prototype.indexOf.call(l.control.children,t))&&(r=s,s=o,o=r),n=s;n<=o;n++)t=l.control.children[n],-1===l.activeItems.indexOf(t)&&l.setActiveItemClass(t);nt(e)}else"click"===i&&ot(Y,e)||"keydown"===i&&ot("shiftKey",e)?t.classList.contains("active")?l.removeActiveItem(t):l.setActiveItemClass(t):(l.clearActiveItems(),l.setActiveItemClass(t));l.hideInput(),l.isFocused||l.focus()}}setActiveItemClass(t){const e=this,i=e.control.querySelector(".last-active");i&&H(i,"last-active"),R(t,"active last-active"),e.trigger("item_select",t),-1==e.activeItems.indexOf(t)&&e.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t);this.activeItems.splice(e,1),H(t,"active")}clearActiveItems(){H(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t,e=!0){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,U(this.focus_node,{"aria-activedescendant":t.getAttribute("id")}),U(t,{"aria-selected":"true"}),R(t,"active"),e&&this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return;const i=this.dropdown_content,n=i.clientHeight,s=i.scrollTop||0,o=t.offsetHeight,r=t.getBoundingClientRect().top-i.getBoundingClientRect().top+s;r+o>n+s?this.scroll(r-n+o,e):r{t.setActiveItemClass(e)})))}inputState(){var t=this;t.control.contains(t.control_input)&&(U(t.control_input,{placeholder:t.settings.placeholder}),t.activeItems.length>0||!t.isFocused&&t.settings.hidePlaceholder&&t.items.length>0?(t.setTextboxValue(),t.isInputHidden=!0):(t.settings.hidePlaceholder&&t.items.length>0&&U(t.control_input,{placeholder:""}),t.isInputHidden=!1),t.wrapper.classList.toggle("input-hidden",t.isInputHidden))}hideInput(){this.inputState()}showInput(){this.inputState()}inputValue(){return this.control_input.value.trim()}focus(){var t=this;t.isDisabled||(t.ignoreFocus=!0,t.control_input.offsetWidth?t.control_input.focus():t.focus_node.focus(),setTimeout((()=>{t.ignoreFocus=!1,t.onFocus()}),0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField;return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,i,n=this,s=this.getSearchOptions();if(n.settings.score&&"function"!=typeof(i=n.settings.score.call(n,t)))throw new Error('Tom Select "score" setting must be a function that returns a function');return t!==n.lastQuery?(n.lastQuery=t,e=n.sifter.search(t,Object.assign(s,{score:i})),n.currentResults=e):e=Object.assign({},n.currentResults),n.settings.hideSelected&&(e.items=e.items.filter((t=>{let e=G(t.id);return!(e&&-1!==n.items.indexOf(e))}))),e}refreshOptions(t=!0){var e,i,n,s,o,r,a,l,c,d;const u={},h=[];var p=this,f=p.inputValue();const g=f===p.lastQuery||""==f&&null==p.lastQuery;var m,v=p.search(f),_=null,b=p.settings.shouldOpen||!1,y=p.dropdown_content;for(g&&(_=p.activeOption)&&(c=_.closest("[data-group]")),s=v.items.length,"number"==typeof p.settings.maxOptions&&(s=Math.min(s,p.settings.maxOptions)),s>0&&(b=!0),e=0;e0&&(d=d.cloneNode(!0),U(d,{id:a.$id+"-clone-"+i,"aria-selected":null}),d.classList.add("ts-cloned"),H(d,"active"),p.activeOption&&p.activeOption.dataset.value==s&&c&&c.dataset.group===o.toString()&&(_=d)),t.appendChild(d),u[o]=t}}p.settings.lockOptgroupOrder&&h.sort(((t,e)=>{const i=p.optgroups[t],n=p.optgroups[e];return(i&&i.$order||0)-(n&&n.$order||0)})),a=document.createDocumentFragment(),L(h,(t=>{let e=u[t];if(!e||!e.children.length)return;let i=p.optgroups[t];if(void 0!==i){let t=document.createDocumentFragment(),n=p.render("optgroup_header",i);lt(t,n),lt(t,e);let s=p.render("optgroup",{group:i,options:t});lt(a,s)}else lt(a,e)})),y.innerHTML="",lt(y,a),p.settings.highlight&&(m=y.querySelectorAll("span.highlight"),Array.prototype.forEach.call(m,(function(t){var e=t.parentNode;e.replaceChild(t.firstChild,t),e.normalize()})),v.query.length&&v.tokens.length&&L(v.tokens,(t=>{J(y,t.regex)})));var w=t=>{let e=p.render(t,{input:f});return e&&(b=!0,y.insertBefore(e,y.firstChild)),e};if(p.loading?w("loading"):p.settings.shouldLoad.call(p,f)?0===v.items.length&&w("no_results"):w("not_loading"),(l=p.canCreate(f))&&(d=w("option_create")),p.hasOptions=v.items.length>0||l,b){if(v.items.length>0){if(_||"single"!==p.settings.mode||null==p.items[0]||(_=p.getOption(p.items[0])),!y.contains(_)){let t=0;d&&!p.settings.addPrecedence&&(t=1),_=p.selectable()[t]}}else d&&(_=d);t&&!p.isOpen&&(p.open(),p.scrollToOption(_,"auto")),p.setActiveOption(_)}else p.clearActiveOption(),t&&p.isOpen&&p.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t,e=!1){const i=this;if(Array.isArray(t))return i.addOptions(t,e),!1;const n=G(t[i.settings.valueField]);return null!==n&&!i.options.hasOwnProperty(n)&&(t.$order=t.$order||++i.order,t.$id=i.inputId+"-opt-"+t.$order,i.options[n]=t,i.lastQuery=null,e&&(i.userOptions[n]=e,i.trigger("option_add",n,t)),n)}addOptions(t,e=!1){L(t,(t=>{this.addOption(t,e)}))}registerOption(t){return this.addOption(t)}registerOptionGroup(t){var e=G(t[this.settings.optgroupValueField]);return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var i;e[this.settings.optgroupValueField]=t,(i=this.registerOptionGroup(e))&&this.trigger("optgroup_add",i,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){const i=this;var n,s;const o=G(t),r=G(e[i.settings.valueField]);if(null===o)return;const a=i.options[o];if(null==a)return;if("string"!=typeof r)throw new Error("Value must be set in option data");const l=i.getOption(o),c=i.getItem(o);if(e.$order=e.$order||a.$order,delete i.options[o],i.uncacheValue(r),i.options[r]=e,l){if(i.dropdown_content.contains(l)){const t=i._render("option",e);Q(l,t),i.activeOption===l&&i.setActiveOption(t)}l.remove()}c&&(-1!==(s=i.items.indexOf(o))&&i.items.splice(s,1,r),n=i._render("item",e),c.classList.contains("active")&&R(n,"active"),Q(c,n)),i.lastQuery=null}removeOption(t,e){const i=this;t=Z(t),i.uncacheValue(t),delete i.userOptions[t],delete i.options[t],i.lastQuery=null,i.trigger("option_remove",t),i.removeItem(t,e)}clearOptions(t){const e=(t||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const i={};L(this.options,((t,n)=>{e(t,n)&&(i[n]=t)})),this.options=this.sifter.items=i,this.lastQuery=null,this.trigger("option_clear")}clearFilter(t,e){return this.items.indexOf(e)>=0}getOption(t,e=!1){const i=G(t);if(null===i)return null;const n=this.options[i];if(null!=n){if(n.$div)return n.$div;if(e)return this._render("option",n)}return null}getAdjacent(t,e,i="option"){var n;if(!t)return null;n="item"==i?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let i=0;i0?n[i+1]:n[i-1];return null}getItem(t){if("object"==typeof t)return t;var e=G(t);return null!==e?this.control.querySelector(`[data-value="${at(e)}"]`):null}addItems(t,e){var i=this,n=Array.isArray(t)?t:[t];const s=(n=n.filter((t=>-1===i.items.indexOf(t))))[n.length-1];n.forEach((t=>{i.isPending=t!==s,i.addItem(t,e)}))}addItem(t,e){it(this,e?[]:["change","dropdown_close"],(()=>{var i,n;const s=this,o=s.settings.mode,r=G(t);if((!r||-1===s.items.indexOf(r)||("single"===o&&s.close(),"single"!==o&&s.settings.duplicates))&&null!==r&&s.options.hasOwnProperty(r)&&("single"===o&&s.clear(e),"multi"!==o||!s.isFull())){if(i=s._render("item",s.options[r]),s.control.contains(i)&&(i=i.cloneNode(!0)),n=s.isFull(),s.items.splice(s.caretPos,0,r),s.insertAtCaret(i),s.isSetup){if(!s.isPending&&s.settings.hideSelected){let t=s.getOption(r),e=s.getAdjacent(t,1);e&&s.setActiveOption(e)}s.isPending||s.settings.closeAfterSelect||s.refreshOptions(s.isFocused&&"single"!==o),0!=s.settings.closeAfterSelect&&s.isFull()?s.close():s.isPending||s.positionDropdown(),s.trigger("item_add",r,i),s.isPending||s.updateOriginalInput({silent:e})}(!s.isPending||!n&&s.isFull())&&(s.inputState(),s.refreshState())}}))}removeItem(t=null,e){const i=this;if(!(t=i.getItem(t)))return;var n,s;const o=t.dataset.value;n=K(t),t.remove(),t.classList.contains("active")&&(s=i.activeItems.indexOf(t),i.activeItems.splice(s,1),H(t,"active")),i.items.splice(n,1),i.lastQuery=null,!i.settings.persist&&i.userOptions.hasOwnProperty(o)&&i.removeOption(o,e),n{})){3===arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{});var i,n=this,s=n.caretPos;if(t=t||n.inputValue(),!n.canCreate(t))return e(),!1;n.lock();var o=!1,r=t=>{if(n.unlock(),!t||"object"!=typeof t)return e();var i=G(t[n.settings.valueField]);if("string"!=typeof i)return e();n.setTextboxValue(),n.addOption(t,!0),n.setCaret(s),n.addItem(i),e(t),o=!0};return i="function"==typeof n.settings.create?n.settings.create.call(this,t,r):{[n.settings.labelField]:t,[n.settings.valueField]:t},o||r(i),!0}refreshItems(){var t=this;t.lastQuery=null,t.isSetup&&t.addItems(t.items),t.updateOriginalInput(),t.refreshState()}refreshState(){const t=this;t.refreshValidityState();const e=t.isFull(),i=t.isLocked;t.wrapper.classList.toggle("rtl",t.rtl);const n=t.wrapper.classList;var s;n.toggle("focus",t.isFocused),n.toggle("disabled",t.isDisabled),n.toggle("required",t.isRequired),n.toggle("invalid",!t.isValid),n.toggle("locked",i),n.toggle("full",e),n.toggle("input-active",t.isFocused&&!t.isInputHidden),n.toggle("dropdown-active",t.isOpen),n.toggle("has-options",(s=t.options,0===Object.keys(s).length)),n.toggle("has-items",t.items.length>0)}refreshValidityState(){var t=this;t.input.validity&&(t.isValid=t.input.validity.valid,t.isInvalid=!t.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){const e=this;var i,n;const s=e.input.querySelector('option[value=""]');if(e.is_select_tag){const o=[],r=e.input.querySelectorAll("option:checked").length;function a(t,i,n){return t||(t=j('")),t!=s&&e.input.append(t),o.push(t),(t!=s||r>0)&&(t.selected=!0),t}e.input.querySelectorAll("option:checked").forEach((t=>{t.selected=!1})),0==e.items.length&&"single"==e.settings.mode?a(s,"",""):e.items.forEach((t=>{i=e.options[t],n=i[e.settings.labelField]||"",o.includes(i.$option)?a(e.input.querySelector(`option[value="${at(t)}"]:not(:checked)`),t,n):i.$option=a(i.$option,t,n)}))}else e.input.value=e.getValue();e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,U(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),q(t.dropdown,{visibility:"hidden",display:"block"}),t.positionDropdown(),q(t.dropdown,{visibility:"visible",display:"block"}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,i=e.isOpen;t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&e.hideInput()),e.isOpen=!1,U(e.focus_node,{"aria-expanded":"false"}),q(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),i&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),i=t.offsetHeight+e.top+window.scrollY,n=e.left+window.scrollX;q(this.dropdown,{width:e.width+"px",top:i+"px",left:n+"px"})}}clear(t){var e=this;if(e.items.length){var i=e.controlChildren();L(i,(t=>{e.removeItem(t,!0)})),e.showInput(),t||e.updateOriginalInput(),e.trigger("clear")}}insertAtCaret(t){const e=this,i=e.caretPos,n=e.control;n.insertBefore(t,n.children[i]||null),e.setCaret(i+1)}deleteSelection(t){var e,i,n,s,o,r=this;e=t&&8===t.keyCode?-1:1,i={start:(o=r.control_input).selectionStart||0,length:(o.selectionEnd||0)-(o.selectionStart||0)};const a=[];if(r.activeItems.length)s=B(r.activeItems,e),n=K(s),e>0&&n++,L(r.activeItems,(t=>a.push(t)));else if((r.isFocused||"single"===r.settings.mode)&&r.items.length){const t=r.controlChildren();let n;e<0&&0===i.start&&0===i.length?n=t[r.caretPos-1]:e>0&&i.start===r.inputValue().length&&(n=t[r.caretPos]),void 0!==n&&a.push(n)}if(!r.shouldDelete(a,t))return!1;for(nt(t,!0),void 0!==n&&r.setCaret(n);a.length;)r.removeItem(a.pop());return r.showInput(),r.positionDropdown(),r.refreshOptions(!1),!0}shouldDelete(t,e){const i=t.map((t=>t.dataset.value));return!(!i.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(i,e))}advanceSelection(t,e){var i,n,s=this;s.rtl&&(t*=-1),s.inputValue().length||(ot(Y,e)||ot("shiftKey",e)?(n=(i=s.getLastActive(t))?i.classList.contains("active")?s.getAdjacent(i,t,"item"):i:t>0?s.control_input.nextElementSibling:s.control_input.previousElementSibling)&&(n.classList.contains("active")&&s.removeActiveItem(i),s.setActiveItemClass(n)):s.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active");if(e)return e;var i=this.control.querySelectorAll(".active");return i?B(i,t):void 0}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.isLocked=!0,this.refreshState()}unlock(){this.isLocked=!1,this.refreshState()}disable(){var t=this;t.input.disabled=!0,t.control_input.disabled=!0,t.focus_node.tabIndex=-1,t.isDisabled=!0,this.close(),t.lock()}enable(){var t=this;t.input.disabled=!1,t.control_input.disabled=!1,t.focus_node.tabIndex=t.tabIndex,t.isDisabled=!1,t.unlock()}destroy(){var t=this,e=t.revertSettings;t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,H(t.input,"tomselected","ts-hidden-accessible"),t._destroy(),delete t.input.tomselect}render(t,e){var i,n;const s=this;if("function"!=typeof this.settings.render[t])return null;if(!(n=s.settings.render[t].call(this,e,tt)))return null;if(n=j(n),"option"===t||"option_create"===t?e[s.settings.disabledField]?U(n,{"aria-disabled":"true"}):U(n,{"data-selectable":""}):"optgroup"===t&&(i=e.group[s.settings.optgroupValueField],U(n,{"data-group":i}),e.group[s.settings.disabledField]&&U(n,{"data-disabled":""})),"option"===t||"item"===t){const i=Z(e[s.settings.valueField]);U(n,{"data-value":i}),"item"===t?(R(n,s.settings.itemClass),U(n,{"data-ts-item":""})):(R(n,s.settings.optionClass),U(n,{role:"option",id:e.$id}),e.$div=n,s.options[i]=e)}return n}_render(t,e){const i=this.render(t,e);if(null==i)throw"HTMLElement expected";return i}clearCache(){L(this.options,(t=>{t.$div&&(t.$div.remove(),delete t.$div)}))}uncacheValue(t){const e=this.getOption(t);e&&e.remove()}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,i){var n=this,s=n[e];n[e]=function(){var e,o;return"after"===t&&(e=s.apply(n,arguments)),o=i.apply(n,arguments),"instead"===t?o:("before"===t&&(e=s.apply(n,arguments)),e)}}}return ut.define("change_listener",(function(){st(this.input,"change",(()=>{this.sync()}))})),ut.define("checkbox_options",(function(){var t=this,e=t.onOptionSelect;t.settings.hideSelected=!1;var i=function(t){setTimeout((()=>{var e=t.querySelector("input");e instanceof HTMLInputElement&&(t.classList.contains("selected")?e.checked=!0:e.checked=!1)}),1)};t.hook("after","setupTemplates",(()=>{var e=t.settings.render.option;t.settings.render.option=(i,n)=>{var s=j(e.call(t,i,n)),o=document.createElement("input");o.addEventListener("click",(function(t){nt(t)})),o.type="checkbox";const r=G(i[t.settings.valueField]);return r&&t.items.indexOf(r)>-1&&(o.checked=!0),s.prepend(o),s}})),t.on("item_remove",(e=>{var n=t.getOption(e);n&&(n.classList.remove("selected"),i(n))})),t.on("item_add",(e=>{var n=t.getOption(e);n&&i(n)})),t.hook("instead","onOptionSelect",((n,s)=>{if(s.classList.contains("selected"))return s.classList.remove("selected"),t.removeItem(s.dataset.value),t.refreshOptions(),void nt(n,!0);e.call(t,n,s),i(s)}))})),ut.define("clear_button",(function(t){const e=this,i=Object.assign({className:"clear-button",title:"Clear All",html:t=>`
`},t);e.on("initialize",(()=>{var t=j(i.html(i));t.addEventListener("click",(t=>{e.isDisabled||(e.clear(),"single"===e.settings.mode&&e.settings.allowEmptyOption&&e.addItem(""),t.preventDefault(),t.stopPropagation())})),e.control.appendChild(t)}))})),ut.define("drag_drop",(function(){var t=this;if(!$.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===t.settings.mode){var e=t.lock,i=t.unlock;t.hook("instead","lock",(()=>{var i=$(t.control).data("sortable");return i&&i.disable(),e.call(t)})),t.hook("instead","unlock",(()=>{var e=$(t.control).data("sortable");return e&&e.enable(),i.call(t)})),t.on("initialize",(()=>{var e=$(t.control).sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:t.isLocked,start:(t,i)=>{i.placeholder.css("width",i.helper.css("width")),e.css({overflow:"visible"})},stop:()=>{e.css({overflow:"hidden"});var i=[];e.children("[data-value]").each((function(){this.dataset.value&&i.push(this.dataset.value)})),t.setValue(i)}})}))}})),ut.define("dropdown_header",(function(t){const e=this,i=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:t=>'
'+t.title+'×
'},t);e.on("initialize",(()=>{var t=j(i.html(i)),n=t.querySelector("."+i.closeClass);n&&n.addEventListener("click",(t=>{nt(t,!0),e.close()})),e.dropdown.insertBefore(t,e.dropdown.firstChild)}))})),ut.define("caret_position",(function(){var t=this;t.hook("instead","setCaret",(e=>{"single"!==t.settings.mode&&t.control.contains(t.control_input)?(e=Math.max(0,Math.min(t.items.length,e)))==t.caretPos||t.isPending||t.controlChildren().forEach(((i,n)=>{n{if(!t.isFocused)return;const i=t.getLastActive(e);if(i){const n=K(i);t.setCaret(e>0?n+1:n),t.setActiveItem(),H(i,"last-active")}else t.setCaret(t.caretPos+e)}))})),ut.define("dropdown_input",(function(){const t=this;t.settings.shouldOpen=!0,t.hook("before","setup",(()=>{t.focus_node=t.control,R(t.control_input,"dropdown-input");const e=j('")}},plugins:{dropdown_input:{}}};return null===t.getAttribute("required")&&null===t.getAttribute("disabled")&&(e.plugins.clear_button={title:""}),null!==t.getAttribute("multiple")&&(e.plugins.remove_button={title:""}),null!==t.getAttribute("data-ea-autocomplete-endpoint-url")&&(e.plugins.virtual_scroll={}),"true"===t.getAttribute("data-ea-autocomplete-allow-item-create")&&(e.create=!0),e}function x(t){var e=g(this,w,k).call(this,g(this,m,A).call(this,t),{maxOptions:null});return new(a())(t,e)}function E(t){for(var e=[],i=0;i".concat(t.label_raw,"
")},option:function(t,e){return"
".concat(t.label_raw,"
")}}});return new(a())(t,o)}function S(t,e){var i=g(this,w,k).call(this,g(this,m,A).call(this,t),{valueField:"entityId",labelField:"entityAsString",searchField:["entityAsString"],firstUrl:function(t){return e+"&query="+encodeURIComponent(t)},load:function(t,e){var i=this,n=this.getUrl(t);fetch(n).then((function(t){return t.json()})).then((function(n){i.setNextUrl(t,n.next_page),e(n.results)})).catch((function(){return e()}))},preload:"focus",maxOptions:null,score:function(t){return function(t){return 1}},render:{option:function(t,e){return"
".concat(t.entityAsString,"
")},item:function(t,e){return"
".concat(t.entityAsString,"
")},loading_more:function(e,i){return'
'.concat(t.getAttribute("data-ea-i18n-loading-more-results"),"
")},no_more_results:function(e,i){return'
'.concat(t.getAttribute("data-ea-i18n-no-more-results"),"
")},no_results:function(e,i){return'
'.concat(t.getAttribute("data-ea-i18n-no-results-found"),"
")}}});return new(a())(t,i)}function C(t){return t.replace(/(<([^>]+)>)/gi,"")}function k(t,e){return d(d({},t),e)}function I(t,e){e?(t.classList.remove("d-block"),t.classList.add("d-none")):(t.classList.remove("d-none"),t.classList.add("d-block"))}function T(t){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T(t)}function L(t,e){for(var i=0;i
',fetch(e.getAttribute("href")).then((function(t){return t.text()})).then((function(e){s.innerHTML=e,F(t,Q,ot).call(t),F(t,X,lt).call(t)})).catch((function(t){console.error(t)})),n.preventDefault()}));var n=function(t){t.closest("form").querySelectorAll('input[name^="filters['.concat(t.dataset.filterProperty,']"]')).forEach((function(t){t.remove()})),t.remove()};document.querySelector("#modal-clear-button").addEventListener("click",(function(){i.querySelectorAll(".filter-field").forEach((function(t){n(t)})),i.querySelector("form").submit()})),document.querySelector("#modal-apply-button").addEventListener("click",(function(){i.querySelectorAll(".filter-checkbox:not(:checked)").forEach((function(t){n(t.closest(".filter-field"))})),i.querySelector("form").submit()}))}}function st(){var t=null,e=document.querySelector(".form-batch-checkbox-all");if(null!==e){var i=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox');e.addEventListener("change",(function(){i.forEach((function(t){t.checked=e.checked,t.dispatchEvent(new Event("change"))}))}));var n=document.querySelector(".deselect-batch-button");null!==n&&n.addEventListener("click",(function(){e.checked=!1,e.dispatchEvent(new Event("change"))})),i.forEach((function(n,s){n.dataset.rowIndex=s,n.addEventListener("click",(function(e){if(t&&e.shiftKey){var n=parseInt(t.dataset.rowIndex),s=parseInt(e.target.dataset.rowIndex),o=e.target.checked,r=Math.min(n,s),a=Math.max(n,s);i.forEach((function(t,e){r<=e&&e<=a&&(t.checked=o,t.dispatchEvent(new Event("change")))}))}t=e.target})),n.addEventListener("change",(function(){var t=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox:checked'),i=n.closest("tr"),s=n.closest(".content");n.checked?i.classList.add("selected-row"):(i.classList.remove("selected-row"),e.checked=!1);var o=0!==t.length,r=document.querySelector(".content-header-title > .title"),a=s.querySelector(".datagrid-filters"),l=s.querySelector(".global-actions"),c=s.querySelector(".batch-actions");null!==r&&I(r,o),null!==a&&I(a,o),null!==l&&I(l,o),null!==c&&I(c,!o)}))}));var s=document.querySelector("#batch-action-confirmation-title"),o=s.textContent;document.querySelectorAll("[data-action-batch]").forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault();var e="A"===t.target.tagName.toUpperCase()?t.target:t.target.parentNode,i=e.textContent.trim()||e.getAttribute("title"),n=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox:checked');s.textContent=o.replace("%action_name%",i).replace("%num_items%",n.length.toString()),document.querySelector("#modal-batch-action-button").addEventListener("click",(function(){e.setAttribute("disabled","disabled");var t={batchActionName:e.getAttribute("data-action-name"),entityFqcn:e.getAttribute("data-entity-fqcn"),batchActionUrl:e.getAttribute("data-action-url"),batchActionCsrfToken:e.getAttribute("data-action-csrf-token")};n.forEach((function(e,i){t["batchActionEntityIds[".concat(i,"]")]=e.value}));var i=document.createElement("form");for(var s in i.setAttribute("method","POST"),i.setAttribute("action",e.getAttribute("data-action-url")),t){var o=document.createElement("input");o.setAttribute("type","hidden"),o.setAttribute("name",s),o.setAttribute("value",t[s]),i.appendChild(o)}document.body.appendChild(i),i.submit()}))}))}))}}function ot(){var t=new O;document.querySelectorAll('[data-ea-widget="ea-autocomplete"]').forEach((function(e){t.create(e)}))}function rt(){document.querySelectorAll(".action-delete").forEach((function(t){t.addEventListener("click",(function(e){e.preventDefault(),document.querySelector("#modal-delete-button").addEventListener("click",(function(){var e=t.getAttribute("formaction"),i=document.querySelector("#delete-form");i.setAttribute("action",e),i.submit()}))}))}))}function at(){document.querySelectorAll('[data-bs-toggle="popover"]').forEach((function(t){new(e().Popover)(t)}))}function lt(){document.querySelectorAll(".filter-checkbox").forEach((function(t){t.addEventListener("change",(function(){var e=t.nextElementSibling,i=t.nextElementSibling.getAttribute("aria-expanded");(t.checked&&"false"===i||!t.checked&&"true"===i)&&e.click()}))})),document.querySelectorAll("form[data-ea-filters-form-id]").forEach((function(t){t.addEventListener("change",(function(t){if(!t.target.classList.contains("filter-checkbox")){var e=t.target.closest(".filter-field").querySelector(".filter-checkbox");e.checked||(e.checked=!0)}}))})),document.querySelectorAll("[data-ea-comparison-id]").forEach((function(t){t.addEventListener("change",(function(t){var e=t.currentTarget,i=e.dataset.eaComparisonId;if(void 0!==i){var n=document.querySelector('[data-ea-value2-of-comparison-id="'.concat(i,'"]'));null!==n&&I(n,"between"!==e.value)}}))}))}})()})(); \ No newline at end of file diff --git a/public/bundles/easyadmin/app.b5acb2f0.js.LICENSE.txt b/public/bundles/easyadmin/app.914bb6ba.js.LICENSE.txt similarity index 100% rename from public/bundles/easyadmin/app.b5acb2f0.js.LICENSE.txt rename to public/bundles/easyadmin/app.914bb6ba.js.LICENSE.txt diff --git a/public/bundles/easyadmin/entrypoints.json b/public/bundles/easyadmin/entrypoints.json index fdde6860..08104dea 100644 --- a/public/bundles/easyadmin/entrypoints.json +++ b/public/bundles/easyadmin/entrypoints.json @@ -6,7 +6,7 @@ "/app.404e52fc.rtl.css" ], "js": [ - "/app.b5acb2f0.js" + "/app.914bb6ba.js" ] }, "form": { @@ -69,7 +69,7 @@ "/field-text-editor.7348fb97.rtl.css" ], "js": [ - "/field-text-editor.beed4e76.js" + "/field-text-editor.47d6e6da.js" ] }, "login": { diff --git a/public/bundles/easyadmin/field-text-editor.beed4e76.js b/public/bundles/easyadmin/field-text-editor.47d6e6da.js similarity index 98% rename from public/bundles/easyadmin/field-text-editor.beed4e76.js rename to public/bundles/easyadmin/field-text-editor.47d6e6da.js index dd7d72d7..6fdfa2ea 100644 --- a/public/bundles/easyadmin/field-text-editor.beed4e76.js +++ b/public/bundles/easyadmin/field-text-editor.47d6e6da.js @@ -1,2 +1,2 @@ -/*! For license information please see field-text-editor.beed4e76.js.LICENSE.txt */ -(()=>{var t={6035:function(t){var e;e=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e){function n(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.form=e,this.isDirty=!1,this.initialValues={},this.fields=[].concat(n(this.form.elements),n(this.form.querySelectorAll("trix-editor"))),this.message=i.message||"You have unsaved changes!",this.setupFields(),this.setFormHandlers()}var e,r,o;return e=t,(r=[{key:"setupFields",value:function(){var t=this;this.fields.forEach((function(e){e.name&&"submit"!=e.type&&"button"!=e.type&&"hidden"!=e.type&&(t.initialValues[e.name]=e.value,"TRIX-EDITOR"==e.nodeName?e.addEventListener("trix-change",t.checkValue.bind(t)):(e.addEventListener("change",t.checkValue.bind(t)),e.addEventListener("input",t.checkValue.bind(t))))}))}},{key:"setFormHandlers",value:function(){var t=this;window.addEventListener("submit",this.handleSubmit.bind(this)),this.form.addEventListener("submit",this.handleSubmit.bind(this)),window.onbeforeunload=function(){if(t.isDirty)return t.message},"undefined"!=typeof Turbolinks&&document.addEventListener("turbolinks:before-visit",(function(e){t.isDirty&&!confirm(t.message)?e.preventDefault():t.isDirty=!1}))}},{key:"checkValue",value:function(t){var e=t.target;this.initialValues[e.name]!=e.value&&(this.isDirty=!0)}},{key:"handleSubmit",value:function(){this.isDirty=!1}}])&&i(e.prototype,r),o&&i(e,o),t}();t.exports=r}])},t.exports=e()},728:(t,e,n)=>{"use strict";n.r(e)},6250:function(t,e,n){var i,r;(function(){}).call(this),function(){null==window.Set&&(window.Set=function(){function t(){this.clear()}return t.prototype.clear=function(){return this.values=[]},t.prototype.has=function(t){return-1!==this.values.indexOf(t)},t.prototype.add=function(t){return this.has(t)||this.values.push(t),this},t.prototype.delete=function(t){var e;return-1!==(e=this.values.indexOf(t))&&(this.values.splice(e,1),!0)},t.prototype.forEach=function(){var t;return(t=this.values).forEach.apply(t,arguments)},t}())}.call(this),function(e){function n(){}function i(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(t,this)}function r(t,e){for(;3===t._state;)t=t._value;return 0===t._state?void t._deferreds.push(e):(t._handled=!0,void h((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var i;try{i=n(t._value)}catch(t){return void s(e.promise,t)}o(e.promise,i)}else(1===t._state?o:s)(e.promise,t._value)})))}function o(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void a(t);if("function"==typeof n)return void c(function(t,e){return function(){t.apply(e,arguments)}}(n,e),t)}t._state=1,t._value=e,a(t)}catch(e){s(t,e)}}function s(t,e){t._state=2,t._value=e,a(t)}function a(t){2===t._state&&0===t._deferreds.length&&setTimeout((function(){t._handled||p(t._value)}),1);for(var e=0,n=t._deferreds.length;n>e;e++)r(t,t._deferreds[e]);t._deferreds=null}function u(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function c(t,e){var n=!1;try{t((function(t){n||(n=!0,o(e,t))}),(function(t){n||(n=!0,s(e,t))}))}catch(t){if(n)return;n=!0,s(e,t)}}var l=setTimeout,h="function"==typeof setImmediate&&setImmediate||function(t){l(t,1)},p=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};i.prototype.catch=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var o=new i(n);return r(this,new u(t,e,o)),o},i.all=function(t){var e=Array.prototype.slice.call(t);return new i((function(t,n){function i(o,s){try{if(s&&("object"==typeof s||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,(function(t){i(o,t)}),n)}e[o]=s,0==--r&&t(e)}catch(t){n(t)}}if(0===e.length)return t([]);for(var r=e.length,o=0;oi;i++)t[i].then(e,n)}))},i._setImmediateFn=function(t){h=t},i._setUnhandledRejectionFn=function(t){p=t},t.exports?t.exports=i:e.Promise||(e.Promise=i)}(this),function(){var t="object"==typeof window.customElements,e="function"==typeof document.registerElement;t||e||("undefined"==typeof WeakMap&&function(){var t=Object.defineProperty,e=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+e+++"__"};n.prototype={set:function(e,n){var i=e[this.name];return i&&i[0]===e?i[1]=n:t(e,this.name,{value:[e,n],writable:!0}),this},get:function(t){var e;return(e=t[this.name])&&e[0]===t?e[1]:void 0},delete:function(t){var e=t[this.name];return!(!e||e[0]!==t)&&(e[0]=e[1]=void 0,!0)},has:function(t){var e=t[this.name];return!!e&&e[0]===t}},window.WeakMap=n}(),function(t){function e(t){y.push(t),m||(m=!0,l(n))}function n(){m=!1;var t=y;y=[],t.sort((function(t,e){return t.uid_-e.uid_}));var e=!1;t.forEach((function(t){var n=t.takeRecords();(function(t){t.nodes_.forEach((function(e){var n=h.get(e);n&&n.forEach((function(e){e.observer===t&&e.removeTransientObservers()}))}))})(t),n.length&&(t.callback_(n,t),e=!0)})),e&&n()}function i(t,e){for(var n=t;n;n=n.parentNode){var i=h.get(n);if(i)for(var r=0;r0){var r=u(n[i-1],t);if(r)return void(n[i-1]=r)}else e(this.observer);n[i]=t},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(t){var e=this.options;e.attributes&&t.addEventListener("DOMAttrModified",this,!0),e.characterData&&t.addEventListener("DOMCharacterDataModified",this,!0),e.childList&&t.addEventListener("DOMNodeInserted",this,!0),(e.childList||e.subtree)&&t.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(t){var e=this.options;e.attributes&&t.removeEventListener("DOMAttrModified",this,!0),e.characterData&&t.removeEventListener("DOMCharacterDataModified",this,!0),e.childList&&t.removeEventListener("DOMNodeInserted",this,!0),(e.childList||e.subtree)&&t.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(t){if(t!==this.target){this.addListeners_(t),this.transientObservedNodes.push(t);var e=h.get(t);e||h.set(t,e=[]),e.push(this)}},removeTransientObservers:function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach((function(t){this.removeListeners_(t);for(var e=h.get(t),n=0;n=0)){n.push(t);for(var i,s=t.querySelectorAll("link[rel="+o+"]"),a=0,u=s.length;u>a&&(i=s[a]);a++)i.import&&r(i.import,e,n);e(t)}}var o=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";t.forDocumentTree=function(t,e){r(t,e,[])},t.forSubtree=e})),window.CustomElements.addModule((function(t){function e(t,e){return n(t,e)||i(t,e)}function n(e,n){return!!t.upgrade(e,n)||void(n&&s(e))}function i(t,e){f(t,(function(t){return!!n(t,e)||void 0}))}function r(t){v.push(t),y||(y=!0,setTimeout(o))}function o(){y=!1;for(var t,e=v,n=0,i=e.length;i>n&&(t=e[n]);n++)t();v=[]}function s(t){m?r((function(){a(t)})):a(t)}function a(t){t.__upgraded__&&!t.__attached&&(t.__attached=!0,t.attachedCallback&&t.attachedCallback())}function u(t){m?r((function(){c(t)})):c(t)}function c(t){t.__upgraded__&&t.__attached&&(t.__attached=!1,t.detachedCallback&&t.detachedCallback())}function l(t,n){if(d.dom){var i=n[0];if(i&&"childList"===i.type&&i.addedNodes&&i.addedNodes){for(var r=i.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var o=r&&(r.URL||r._URL||r.host&&r.host.localName)||"";o=o.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",n.length,o||"")}var s=function(t){for(var e=t,n=window.wrap(document);e;){if(e==n)return!0;e=e.parentNode||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host}}(t);n.forEach((function(t){"childList"===t.type&&(b(t.addedNodes,(function(t){t.localName&&e(t,s)})),b(t.removedNodes,(function(t){t.localName&&function(t){u(t),f(t,(function(t){u(t)}))}(t)})))})),d.dom&&console.groupEnd()}function h(t){if(!t.__observer){var e=new MutationObserver(l.bind(this,t));e.observe(t,{childList:!0,subtree:!0}),t.__observer=e}}function p(t){t=window.wrap(t),d.dom&&console.group("upgradeDocument: ",t.baseURI.split("/").pop()),e(t,t===window.wrap(document)),h(t),d.dom&&console.groupEnd()}var d=t.flags,f=t.forSubtree,g=t.forDocumentTree,m=window.MutationObserver._isPolyfilled&&d["throttle-attached"];t.hasPolyfillMutations=m,t.hasThrottledAttached=m;var y=!1,v=[],b=Array.prototype.forEach.call.bind(Array.prototype.forEach),A=Element.prototype.createShadowRoot;A&&(Element.prototype.createShadowRoot=function(){var t=A.call(this);return window.CustomElements.watchShadow(this),t}),t.watchShadow=function(t){if(t.shadowRoot&&!t.shadowRoot.__watched){d.dom&&console.log("watching shadow-root for: ",t.localName);for(var e=t.shadowRoot;e;)h(e),e=e.olderShadowRoot}},t.upgradeDocumentTree=function(t){g(t,p)},t.upgradeDocument=p,t.upgradeSubtree=i,t.upgradeAll=e,t.attached=s,t.takeRecords=function(t){for((t=window.wrap(t))||(t=window.wrap(document));t.parentNode;)t=t.parentNode;var e=t.__observer;e&&(l(t,e.takeRecords()),o())}})),window.CustomElements.addModule((function(t){function e(e,r,o){return i.upgrade&&console.group("upgrade:",e.localName),r.is&&e.setAttribute("is",r.is),n(e,r),e.__upgraded__=!0,function(t){t.createdCallback&&t.createdCallback()}(e),o&&t.attached(e),t.upgradeSubtree(e,o),i.upgrade&&console.groupEnd(),e}function n(t,e){Object.__proto__||function(t,e,n){for(var i={},r=e;r!==n&&r!==HTMLElement.prototype;){for(var o,s=Object.getOwnPropertyNames(r),a=0;o=s[a];a++)i[o]||(Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o)),i[o]=1);r=Object.getPrototypeOf(r)}}(t,e.prototype,e.native),t.__proto__=e.prototype}var i=t.flags;t.upgrade=function(n,i){if("template"===n.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(n),!n.__upgraded__&&n.nodeType===Node.ELEMENT_NODE){var r=n.getAttribute("is"),o=t.getRegisteredDefinition(n.localName)||t.getRegisteredDefinition(r);if(o&&(r&&o.tag==n.localName||!r&&!o.extends))return e(n,o,i)}},t.upgradeWithDefinition=e,t.implementPrototype=n})),window.CustomElements.addModule((function(t){function e(t){if(!t.setAttribute._polyfilled){var e=t.setAttribute;t.setAttribute=function(t,i){n.call(this,t,i,e)};var i=t.removeAttribute;t.removeAttribute=function(t){n.call(this,t,null,i)},t.setAttribute._polyfilled=!0}}function n(t,e,n){t=t.toLowerCase();var i=this.getAttribute(t);n.apply(this,arguments);var r=this.getAttribute(t);this.attributeChangedCallback&&r!==i&&this.attributeChangedCallback(t,i,r)}function i(t){var e=r(t);return e?i(e.extends).concat([e]):[]}function r(t){return t?g[t.toLowerCase()]:void 0}function o(t){return function(){return function(t){return h(y(t.tag),t)}(t)}}function s(t,e){t&&(t=t.toLowerCase()),e&&(e=e.toLowerCase());var n,i=r(e||t);if(i){if(t==i.tag&&e==i.is)return new i.ctor;if(!e&&!i.is)return new i.ctor}return e?((n=s(t)).setAttribute("is",e),n):(n=y(t),t.indexOf("-")>=0&&p(n,HTMLElement),n)}function a(t,e){var n=t[e];t[e]=function(){var t=n.apply(this,arguments);return l(t),t}}var u,c=(t.isIE,t.upgradeDocumentTree),l=t.upgradeAll,h=t.upgradeWithDefinition,p=t.implementPrototype,d=t.useNative,f=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],g={},m="http://www.w3.org/1999/xhtml",y=document.createElement.bind(document),v=document.createElementNS.bind(document);u=Object.__proto__||d?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;for(var n=t;n;){if(n===e.prototype)return!0;n=n.__proto__}return!1},a(Node.prototype,"cloneNode"),a(document,"importNode"),document.registerElement=function(n,s){var a=s||{};if(!n)throw new Error("document.registerElement: first argument `name` must not be empty");if(n.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(n)+"'.");if(function(t){for(var e=0;et;t++)if(!(n[t]in InputEvent.prototype))return!1;return!0}()},config:{}}}).call(this)}).call(this);var o=this.Trix;(function(){(function(){o.BasicObject=function(){function t(){}var e,n,i;return t.proxyMethod=function(t){var i,r,o,s,a;return o=n(t),i=o.name,s=o.toMethod,a=o.toProperty,r=o.optional,this.prototype[i]=function(){var t,n;return t=null!=s?r?"function"==typeof this[s]?this[s]():void 0:this[s]():null!=a?this[a]:void 0,r?null!=(n=null!=t?t[i]:void 0)?e.call(n,t,arguments):void 0:(n=t[i],e.call(n,t,arguments))}},n=function(t){var e,n;if(!(n=t.match(i)))throw new Error("can't parse @proxyMethod expression: "+t);return e={name:n[4]},null!=n[2]?e.toMethod=n[1]:e.toProperty=n[1],null!=n[3]&&(e.optional=!0),e},e=Function.prototype.apply,i=/^(.+?)(\(\))?(\?)?\.(.+?)$/,t}()}).call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.Object=function(e){function n(){this.id=++i}var i;return t(n,e),i=0,n.fromJSONString=function(t){return this.fromJSON(JSON.parse(t))},n.prototype.hasSameConstructorAs=function(t){return this.constructor===(null!=t?t.constructor:void 0)},n.prototype.isEqualTo=function(t){return this===t},n.prototype.inspect=function(){var t,e,n;return t=function(){var t,i,r;for(e in r=[],i=null!=(t=this.contentsForInspection())?t:{})n=i[e],r.push(e+"="+n);return r}.call(this),"#<"+this.constructor.name+":"+this.id+(t.length?" "+t.join(", "):"")+">"},n.prototype.contentsForInspection=function(){},n.prototype.toJSONString=function(){return JSON.stringify(this)},n.prototype.toUTF16String=function(){return o.UTF16String.box(this)},n.prototype.getCacheKey=function(){return this.id.toString()},n}(o.BasicObject)}.call(this),function(){o.extend=function(t){var e,n;for(e in t)n=t[e],this[e]=n;return this}}.call(this),function(){o.extend({defer:function(t){return setTimeout(t,1)}})}.call(this),function(){var t,e;o.extend({normalizeSpaces:function(t){return t.replace(RegExp(""+o.ZERO_WIDTH_SPACE,"g"),"").replace(RegExp(""+o.NON_BREAKING_SPACE,"g")," ")},normalizeNewlines:function(t){return t.replace(/\r\n/g,"\n")},breakableWhitespacePattern:RegExp("[^\\S"+o.NON_BREAKING_SPACE+"]"),squishBreakableWhitespace:function(t){return t.replace(RegExp(""+o.breakableWhitespacePattern.source,"g")," ").replace(/\ {2,}/g," ")},summarizeStringChange:function(t,n){var i,r,s,a;return t=o.UTF16String.box(t),(n=o.UTF16String.box(n)).lengthn&&t.charAt(n).isEqualTo(e.charAt(n));)n++;for(;i>n+1&&t.charAt(i-1).isEqualTo(e.charAt(r-1));)i--,r--;return{utf16String:t.slice(n,i),offset:n}}}.call(this),function(){o.extend({copyObject:function(t){var e,n,i;for(e in null==t&&(t={}),n={},t)i=t[e],n[e]=i;return n},objectsAreEqual:function(t,e){var n;if(null==t&&(t={}),null==e&&(e={}),Object.keys(t).length!==Object.keys(e).length)return!1;for(n in t)if(t[n]!==e[n])return!1;return!0}})}.call(this),function(){var t=[].slice;o.extend({arraysAreEqual:function(t,e){var n,i,r;if(null==t&&(t=[]),null==e&&(e=[]),t.length!==e.length)return!1;for(i=n=0,r=t.length;r>n;i=++n)if(t[i]!==e[i])return!1;return!0},arrayStartsWith:function(t,e){return null==t&&(t=[]),null==e&&(e=[]),o.arraysAreEqual(t.slice(0,e.length),e)},spliceArray:function(){var e,n,i;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],(i=n.slice(0)).splice.apply(i,e),i},summarizeArrayChange:function(t,e){var n,i,r,o,s,a,u,c,l,h,p;for(null==t&&(t=[]),null==e&&(e=[]),n=[],h=[],r=new Set,o=0,u=t.length;u>o;o++)p=t[o],r.add(p);for(i=new Set,s=0,c=e.length;c>s;s++)p=e[s],i.add(p),r.has(p)||n.push(p);for(a=0,l=t.length;l>a;a++)p=t[a],i.has(p)||h.push(p);return{added:n,removed:h}}})}.call(this),function(){var t,e,n,i;t=null,e=null,i=null,n=null,o.extend({getAllAttributeNames:function(){return null!=t?t:t=o.getTextAttributeNames().concat(o.getBlockAttributeNames())},getBlockConfig:function(t){return o.config.blockAttributes[t]},getBlockAttributeNames:function(){return null!=e?e:e=Object.keys(o.config.blockAttributes)},getTextConfig:function(t){return o.config.textAttributes[t]},getTextAttributeNames:function(){return null!=i?i:i=Object.keys(o.config.textAttributes)},getListAttributeNames:function(){var t,e;return null!=n?n:n=function(){var n,i;for(t in i=[],n=o.config.blockAttributes)null!=(e=n[t].listAttribute)&&i.push(e);return i}()}})}.call(this),function(){var t,e,n,i,r,s=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=document.documentElement,e=null!=(n=null!=(i=null!=(r=t.matchesSelector)?r:t.webkitMatchesSelector)?i:t.msMatchesSelector)?n:t.mozMatchesSelector,o.extend({handleEvent:function(e,n){var i,r,s,a,u,c,l,h,p,d,f;return u=(l=null!=n?n:{}).onElement,a=l.matchingSelector,f=l.withCallback,s=l.inPhase,c=l.preventDefault,p=l.times,i=null!=u?u:t,h=a,f,d="capturing"===s,r=function(t){var e;return null!=p&&0==--p&&r.destroy(),null!=(e=o.findClosestElementFromNode(t.target,{matchingSelector:h}))&&(null!=f&&f.call(e,t,e),c)?t.preventDefault():void 0},r.destroy=function(){return i.removeEventListener(e,r,d)},i.addEventListener(e,r,d),r},handleEventOnce:function(t,e){return null==e&&(e={}),e.times=1,o.handleEvent(t,e)},triggerEvent:function(e,n){var i,r,s,a,u,c,l;return c=(l=null!=n?n:{}).onElement,r=l.bubbles,s=l.cancelable,i=l.attributes,a=null!=c?c:t,r=!1!==r,s=!1!==s,(u=document.createEvent("Events")).initEvent(e,r,s),null!=i&&o.extend.call(u,i),a.dispatchEvent(u)},elementMatchesSelector:function(t,n){return 1===(null!=t?t.nodeType:void 0)?e.call(t,n):void 0},findClosestElementFromNode:function(t,e){var n,i,r;for(n=(i=null!=e?e:{}).matchingSelector,r=i.untilNode;null!=t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.parentNode;if(null!=t){if(null==n)return t;if(t.closest&&null==r)return t.closest(n);for(;t&&t!==r;){if(o.elementMatchesSelector(t,n))return t;t=t.parentNode}}},findInnerElement:function(t){for(;null!=t?t.firstElementChild:void 0;)t=t.firstElementChild;return t},innerElementIsActive:function(t){return document.activeElement!==t&&o.elementContainsNode(t,document.activeElement)},elementContainsNode:function(t,e){if(t&&e)for(;e;){if(e===t)return!0;e=e.parentNode}},findNodeFromContainerAndOffset:function(t,e){var n;if(t)return t.nodeType===Node.TEXT_NODE?t:0===e?null!=(n=t.firstChild)?n:t:t.childNodes.item(e-1)},findElementFromContainerAndOffset:function(t,e){var n;return n=o.findNodeFromContainerAndOffset(t,e),o.findClosestElementFromNode(n)},findChildIndexOfNode:function(t){var e;if(null!=t?t.parentNode:void 0){for(e=0;t=t.previousSibling;)e++;return e}},removeNode:function(t){var e;return null!=t&&null!=(e=t.parentNode)?e.removeChild(t):void 0},walkTree:function(t,e){var n,i,r,o,s;return i=(r=null!=e?e:{}).onlyNodesOfType,o=r.usingFilter,n=r.expandEntityReferences,s=function(){switch(i){case"element":return NodeFilter.SHOW_ELEMENT;case"text":return NodeFilter.SHOW_TEXT;case"comment":return NodeFilter.SHOW_COMMENT;default:return NodeFilter.SHOW_ALL}}(),document.createTreeWalker(t,s,null!=o?o:null,!0===n)},tagName:function(t){var e;return null!=t&&null!=(e=t.tagName)?e.toLowerCase():void 0},makeElement:function(t,e){var n,i,r,o,s,a,u,c,l,h,p,d,f,g;if(null==e&&(e={}),"object"==typeof t?t=(e=t).tagName:e={attributes:e},r=document.createElement(t),null!=e.editable&&(null==e.attributes&&(e.attributes={}),e.attributes.contenteditable=e.editable),e.attributes)for(a in l=e.attributes)g=l[a],r.setAttribute(a,g);if(e.style)for(a in h=e.style)g=h[a],r.style[a]=g;if(e.data)for(a in p=e.data)g=p[a],r.dataset[a]=g;if(e.className)for(o=0,u=(d=e.className.split(" ")).length;u>o;o++)i=d[o],r.classList.add(i);if(e.textContent&&(r.textContent=e.textContent),e.childNodes)for(s=0,c=(f=[].concat(e.childNodes)).length;c>s;s++)n=f[s],r.appendChild(n);return r},getBlockTagNames:function(){var t,e;return null!=o.blockTagNames?o.blockTagNames:o.blockTagNames=function(){var n,i;for(t in i=[],n=o.config.blockAttributes)(e=n[t].tagName)&&i.push(e);return i}()},nodeIsBlockContainer:function(t){return o.nodeIsBlockStartComment(null!=t?t.firstChild:void 0)},nodeProbablyIsBlockContainer:function(t){var e,n;return e=o.tagName(t),s.call(o.getBlockTagNames(),e)>=0&&(n=o.tagName(t.firstChild),s.call(o.getBlockTagNames(),n)<0)},nodeIsBlockStart:function(t,e){return(null!=e?e:{strict:!0}).strict?o.nodeIsBlockStartComment(t):o.nodeIsBlockStartComment(t)||!o.nodeIsBlockStartComment(t.firstChild)&&o.nodeProbablyIsBlockContainer(t)},nodeIsBlockStartComment:function(t){return o.nodeIsCommentNode(t)&&"block"===(null!=t?t.data:void 0)},nodeIsCommentNode:function(t){return(null!=t?t.nodeType:void 0)===Node.COMMENT_NODE},nodeIsCursorTarget:function(t,e){var n;return n=(null!=e?e:{}).name,t?o.nodeIsTextNode(t)?t.data===o.ZERO_WIDTH_SPACE?!n||t.parentNode.dataset.trixCursorTarget===n:void 0:o.nodeIsCursorTarget(t.firstChild):void 0},nodeIsAttachmentElement:function(t){return o.elementMatchesSelector(t,o.AttachmentView.attachmentSelector)},nodeIsEmptyTextNode:function(t){return o.nodeIsTextNode(t)&&""===(null!=t?t.data:void 0)},nodeIsTextNode:function(t){return(null!=t?t.nodeType:void 0)===Node.TEXT_NODE}})}.call(this),function(){var t,e,n,i,r;t=o.copyObject,i=o.objectsAreEqual,o.extend({normalizeRange:n=function(t){var n;if(null!=t)return Array.isArray(t)||(t=[t,t]),[e(t[0]),e(null!=(n=t[1])?n:t[0])]},rangeIsCollapsed:function(t){var e,i,o;if(null!=t)return o=(i=n(t))[0],e=i[1],r(o,e)},rangesAreEqual:function(t,e){var i,o,s,a,u,c;if(null!=t&&null!=e)return o=(s=n(t))[0],i=s[1],c=(a=n(e))[0],u=a[1],r(o,c)&&r(i,u)}}),e=function(e){return"number"==typeof e?e:t(e)},r=function(t,e){return"number"==typeof t?t===e:i(t,e)}}.call(this),function(){var t,e,n,i,r,s,a;o.registerElement=function(t,e){var n,o;return null==e&&(e={}),t=t.toLowerCase(),e=a(e),(n=(o=s(e)).defaultCSS)&&(delete o.defaultCSS,i(n,t)),r(t,o)},i=function(t,e){return n(e).textContent=t.replace(/%t/g,e)},n=function(e){var n,i;return(n=document.createElement("style")).setAttribute("type","text/css"),n.setAttribute("data-tag-name",e.toLowerCase()),(i=t())&&n.setAttribute("nonce",i),document.head.insertBefore(n,document.head.firstChild),n},t=function(){var t;return(t=e("trix-csp-nonce")||e("csp-nonce"))?t.getAttribute("content"):void 0},e=function(t){return document.head.querySelector("meta[name="+t+"]")},s=function(t){var e,n,i;for(e in n={},t)i=t[e],n[e]="function"==typeof i?{value:i}:i;return n},a=function(){var t;return t=function(t){var e,n,i,r,o;for(e={},n=0,r=(o=["initialize","connect","disconnect"]).length;r>n;n++)e[i=o[n]]=t[i],delete t[i];return e},window.customElements?function(e){var n,i,r,o,s;return s=t(e),r=s.initialize,n=s.connect,i=s.disconnect,r&&(o=n,n=function(){return this.initialized||(this.initialized=!0,r.call(this)),null!=o?o.call(this):void 0}),n&&(e.connectedCallback=n),i&&(e.disconnectedCallback=i),e}:function(e){var n,i,r,o;return r=(o=t(e)).initialize,n=o.connect,i=o.disconnect,r&&(e.createdCallback=r),n&&(e.attachedCallback=n),i&&(e.detachedCallback=i),e}}(),r=window.customElements?function(t,e){var n;return n=function(){return"object"==typeof Reflect?Reflect.construct(HTMLElement,[],n):HTMLElement.apply(this)},Object.setPrototypeOf(n.prototype,HTMLElement.prototype),Object.setPrototypeOf(n,HTMLElement),Object.defineProperties(n.prototype,e),window.customElements.define(t,n),n}:function(t,e){var n,i;return i=Object.create(HTMLElement.prototype,e),n=document.registerElement(t,{prototype:i}),Object.defineProperty(i,"constructor",{value:n}),n}}.call(this),function(){var t,e;o.extend({getDOMSelection:function(){var t;return(t=window.getSelection()).rangeCount>0?t:void 0},getDOMRange:function(){var e,n;return(e=null!=(n=o.getDOMSelection())?n.getRangeAt(0):void 0)&&!t(e)?e:void 0},setDOMRange:function(t){var e;return(e=window.getSelection()).removeAllRanges(),e.addRange(t),o.selectionChangeObserver.update()}}),t=function(t){return e(t.startContainer)||e(t.endContainer)},e=function(t){return!Object.getPrototypeOf(t)}}.call(this),function(){var t;t={"application/x-trix-feature-detection":"test"},o.extend({dataTransferIsPlainText:function(t){var e,n,i;return i=t.getData("text/plain"),n=t.getData("text/html"),i&&n?(e=(new DOMParser).parseFromString(n,"text/html").body).textContent===i?!e.querySelector("*"):void 0:null!=i?i.length:void 0},dataTransferIsWritable:function(e){var n,i;if(null!=(null!=e?e.setData:void 0)){for(n in t)if(i=t[n],!function(){try{return e.setData(n,i),e.getData(n)===i}catch(t){}}())return;return!0}},keyEventIsKeyboardCommand:/Mac|^iP/.test(navigator.platform)?function(t){return t.metaKey}:function(t){return t.ctrlKey}})}.call(this),function(){o.extend({RTL_PATTERN:/[\u05BE\u05C0\u05C3\u05D0-\u05EA\u05F0-\u05F4\u061B\u061F\u0621-\u063A\u0640-\u064A\u066D\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D5\u06E5\u06E6\u200F\u202B\u202E\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE72\uFE74\uFE76-\uFEFC]/,getDirection:function(){var t,e,n,i;return e=o.makeElement("input",{dir:"auto",name:"x",dirName:"x.dir"}),(t=o.makeElement("form")).appendChild(e),n=function(){try{return new FormData(t).has(e.dirName)}catch(t){}}(),i=function(){try{return e.matches(":dir(ltr),:dir(rtl)")}catch(t){}}(),n?function(n){return e.value=n,new FormData(t).get(e.dirName)}:i?function(t){return e.value=t,e.matches(":dir(rtl)")?"rtl":"ltr"}:function(t){var e;return e=t.trim().charAt(0),o.RTL_PATTERN.test(e)?"rtl":"ltr"}}()})}.call(this),function(){}.call(this),function(){var t,e=function(t,e){function i(){this.constructor=t}for(var r in e)n.call(e,r)&&(t[r]=e[r]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;t=o.arraysAreEqual,o.Hash=function(n){function i(t){null==t&&(t={}),this.values=s(t),i.__super__.constructor.apply(this,arguments)}var r,s,a,u,c;return e(i,n),i.fromCommonAttributesOfObjects=function(t){var e,n,i,o,s,a;if(null==t&&(t=[]),!t.length)return new this;for(i=(e=r(t[0])).getKeys(),n=0,o=(a=t.slice(1)).length;o>n;n++)s=a[n],i=e.getKeysCommonToHash(r(s)),e=e.slice(i);return e},i.box=function(t){return r(t)},i.prototype.add=function(t,e){return this.merge(u(t,e))},i.prototype.remove=function(t){return new o.Hash(s(this.values,t))},i.prototype.get=function(t){return this.values[t]},i.prototype.has=function(t){return t in this.values},i.prototype.merge=function(t){return new o.Hash(a(this.values,c(t)))},i.prototype.slice=function(t){var e,n,i,r;for(r={},e=0,i=t.length;i>e;e++)n=t[e],this.has(n)&&(r[n]=this.values[n]);return new o.Hash(r)},i.prototype.getKeys=function(){return Object.keys(this.values)},i.prototype.getKeysCommonToHash=function(t){var e,n,i,o,s;for(t=r(t),s=[],e=0,i=(o=this.getKeys()).length;i>e;e++)n=o[e],this.values[n]===t.values[n]&&s.push(n);return s},i.prototype.isEqualTo=function(e){return t(this.toArray(),r(e).toArray())},i.prototype.isEmpty=function(){return 0===this.getKeys().length},i.prototype.toArray=function(){var t,e,n;return(null!=this.array?this.array:this.array=function(){var i;for(t in e=[],i=this.values)n=i[t],e.push(t,n);return e}.call(this)).slice(0)},i.prototype.toObject=function(){return s(this.values)},i.prototype.toJSON=function(){return this.toObject()},i.prototype.contentsForInspection=function(){return{values:JSON.stringify(this.values)}},u=function(t,e){var n;return(n={})[t]=e,n},a=function(t,e){var n,i,r;for(n in i=s(t),e)r=e[n],i[n]=r;return i},s=function(t,e){var n,i,r,o,s;for(o={},n=0,r=(s=Object.keys(t).sort()).length;r>n;n++)(i=s[n])!==e&&(o[i]=t[i]);return o},r=function(t){return t instanceof o.Hash?t:new o.Hash(t)},c=function(t){return t instanceof o.Hash?t.values:t},i}(o.Object)}.call(this),function(){o.ObjectGroup=function(){function t(t,e){var n,i;this.objects=null!=t?t:[],i=e.depth,(n=e.asTree)&&(this.depth=i,this.objects=this.constructor.groupObjects(this.objects,{asTree:n,depth:this.depth+1}))}return t.groupObjects=function(t,e){var n,i,r,o,s,a,u,c,l;for(null==t&&(t=[]),r=(l=null!=e?e:{}).depth,(n=l.asTree)&&null==r&&(r=0),c=[],s=0,a=t.length;a>s;s++){if(u=t[s],o){if(("function"==typeof u.canBeGrouped?u.canBeGrouped(r):void 0)&&("function"==typeof(i=o[o.length-1]).canBeGroupedWith?i.canBeGroupedWith(u,r):void 0)){o.push(u);continue}c.push(new this(o,{depth:r,asTree:n})),o=null}("function"==typeof u.canBeGrouped?u.canBeGrouped(r):void 0)?o=[u]:c.push(u)}return o&&c.push(new this(o,{depth:r,asTree:n})),c},t.prototype.getObjects=function(){return this.objects},t.prototype.getDepth=function(){return this.depth},t.prototype.getCacheKey=function(){var t,e,n,i,r;for(e=["objectGroup"],t=0,n=(r=this.getObjects()).length;n>t;t++)i=r[t],e.push(i.getCacheKey());return e.join("/")},t}()}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.ObjectMap=function(e){function n(t){var e,n,i,r,o;for(null==t&&(t=[]),this.objects={},i=0,r=t.length;r>i;i++)o=t[i],n=JSON.stringify(o),null==(e=this.objects)[n]&&(e[n]=o)}return t(n,e),n.prototype.find=function(t){var e;return e=JSON.stringify(t),this.objects[e]},n}(o.BasicObject)}.call(this),function(){o.ElementStore=function(){function t(t){this.reset(t)}var e;return t.prototype.add=function(t){var n;return n=e(t),this.elements[n]=t},t.prototype.remove=function(t){var n,i;return n=e(t),(i=this.elements[n])?(delete this.elements[n],i):void 0},t.prototype.reset=function(t){var e,n,i;for(null==t&&(t=[]),this.elements={},n=0,i=t.length;i>n;n++)e=t[n],this.add(e);return t},e=function(t){return t.dataset.trixStoreKey},t}()}.call(this),function(){}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.Operation=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,e),n.prototype.isPerforming=function(){return!0===this.performing},n.prototype.hasPerformed=function(){return!0===this.performed},n.prototype.hasSucceeded=function(){return this.performed&&this.succeeded},n.prototype.hasFailed=function(){return this.performed&&!this.succeeded},n.prototype.getPromise=function(){return null!=this.promise?this.promise:this.promise=new Promise(function(t){return function(e,n){return t.performing=!0,t.perform((function(i,r){return t.succeeded=i,t.performing=!1,t.performed=!0,t.succeeded?e(r):n(r)}))}}(this))},n.prototype.perform=function(t){return t(!1)},n.prototype.release=function(){var t;return null!=(t=this.promise)&&"function"==typeof t.cancel&&t.cancel(),this.promise=null,this.performing=null,this.performed=null,this.succeeded=null},n.proxyMethod("getPromise().then"),n.proxyMethod("getPromise().catch"),n}(o.BasicObject)}.call(this),function(){var t,e,n,i,r,s={}.hasOwnProperty;o.UTF16String=function(t){function e(t,e){this.ucs2String=t,this.codepoints=e,this.length=this.codepoints.length,this.ucs2Length=this.ucs2String.length}return function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.box=function(t){return null==t&&(t=""),t instanceof this?t:this.fromUCS2String(null!=t?t.toString():void 0)},e.fromUCS2String=function(t){return new this(t,i(t))},e.fromCodepoints=function(t){return new this(r(t),t)},e.prototype.offsetToUCS2Offset=function(t){return r(this.codepoints.slice(0,Math.max(0,t))).length},e.prototype.offsetFromUCS2Offset=function(t){return i(this.ucs2String.slice(0,Math.max(0,t))).length},e.prototype.slice=function(){var t;return this.constructor.fromCodepoints((t=this.codepoints).slice.apply(t,arguments))},e.prototype.charAt=function(t){return this.slice(t,t+1)},e.prototype.isEqualTo=function(t){return this.constructor.box(t).ucs2String===this.ucs2String},e.prototype.toJSON=function(){return this.ucs2String},e.prototype.getCacheKey=function(){return this.ucs2String},e.prototype.toString=function(){return this.ucs2String},e}(o.BasicObject),t=1===("function"==typeof Array.from?Array.from("👼").length:void 0),e=null!=("function"==typeof" ".codePointAt?" ".codePointAt(0):void 0),n=" 👼"===("function"==typeof String.fromCodePoint?String.fromCodePoint(32,128124):void 0),i=t&&e?function(t){return Array.from(t).map((function(t){return t.codePointAt(0)}))}:function(t){var e,n,i,r,o;for(r=[],e=0,i=t.length;i>e;)(o=t.charCodeAt(e++))>=55296&&56319>=o&&i>e&&(56320==(64512&(n=t.charCodeAt(e++)))?o=((1023&o)<<10)+(1023&n)+65536:e--),r.push(o);return r},r=n?function(t){return String.fromCodePoint.apply(String,t)}:function(t){var e,n,i;return e=function(){var e,r,o;for(o=[],e=0,r=t.length;r>e;e++)i=t[e],n="",i>65535&&(i-=65536,n+=String.fromCharCode(i>>>10&1023|55296),i=56320|1023&i),o.push(n+String.fromCharCode(i));return o}(),e.join("")}}.call(this),function(){}.call(this),function(){}.call(this),function(){o.config.lang={attachFiles:"Attach Files",bold:"Bold",bullets:"Bullets",byte:"Byte",bytes:"Bytes",captionPlaceholder:"Add a caption…",code:"Code",heading1:"Heading",indent:"Increase Level",italic:"Italic",link:"Link",numbers:"Numbers",outdent:"Decrease Level",quote:"Quote",redo:"Redo",remove:"Remove",strike:"Strikethrough",undo:"Undo",unlink:"Unlink",url:"URL",urlPlaceholder:"Enter a URL…",GB:"GB",KB:"KB",MB:"MB",PB:"PB",TB:"TB"}}.call(this),function(){o.config.css={attachment:"attachment",attachmentCaption:"attachment__caption",attachmentCaptionEditor:"attachment__caption-editor",attachmentMetadata:"attachment__metadata",attachmentMetadataContainer:"attachment__metadata-container",attachmentName:"attachment__name",attachmentProgress:"attachment__progress",attachmentSize:"attachment__size",attachmentToolbar:"attachment__toolbar",attachmentGallery:"attachment-gallery"}}.call(this),function(){var t;o.config.blockAttributes=t={default:{tagName:"div",parse:!1},quote:{tagName:"blockquote",nestable:!0},heading1:{tagName:"h1",terminal:!0,breakOnReturn:!0,group:!1},code:{tagName:"pre",terminal:!0,text:{plaintext:!0}},bulletList:{tagName:"ul",parse:!1},bullet:{tagName:"li",listAttribute:"bulletList",group:!1,nestable:!0,test:function(e){return o.tagName(e.parentNode)===t[this.listAttribute].tagName}},numberList:{tagName:"ol",parse:!1},number:{tagName:"li",listAttribute:"numberList",group:!1,nestable:!0,test:function(e){return o.tagName(e.parentNode)===t[this.listAttribute].tagName}},attachmentGallery:{tagName:"div",exclusive:!0,terminal:!0,parse:!1,group:!1}}}.call(this),function(){var t,e;t=o.config.lang,e=[t.bytes,t.KB,t.MB,t.GB,t.TB,t.PB],o.config.fileSize={prefix:"IEC",precision:2,formatter:function(n){var i,r;switch(n){case 0:return"0 "+t.bytes;case 1:return"1 "+t.byte;default:return i=function(){switch(this.prefix){case"SI":return 1e3;case"IEC":return 1024}}.call(this),r=Math.floor(Math.log(n)/Math.log(i)),(n/Math.pow(i,r)).toFixed(this.precision).replace(/0*$/,"").replace(/\.$/,"")+" "+e[r]}}}}.call(this),function(){o.config.textAttributes={bold:{tagName:"strong",inheritable:!0,parser:function(t){var e;return"bold"===(e=window.getComputedStyle(t)).fontWeight||e.fontWeight>=600}},italic:{tagName:"em",inheritable:!0,parser:function(t){return"italic"===window.getComputedStyle(t).fontStyle}},href:{groupTagName:"a",parser:function(t){var e,n;return n="a:not("+o.AttachmentView.attachmentSelector+")",(e=o.findClosestElementFromNode(t,{matchingSelector:n}))?e.getAttribute("href"):void 0}},strike:{tagName:"del",inheritable:!0},frozen:{style:{backgroundColor:"highlight"}}}}.call(this),function(){var t,e,n,i;i=["contenteditable","data-trix-id","data-trix-store-key","data-trix-mutable","data-trix-placeholder","tabindex"],n="["+(e="data-trix-serialized-attributes")+"]",t=new RegExp("\x3c!--block--\x3e","g"),o.extend({serializers:{"application/json":function(t){var e;if(t instanceof o.Document)e=t;else{if(!(t instanceof HTMLElement))throw new Error("unserializable object");e=o.Document.fromHTML(t.innerHTML)}return e.toSerializableDocument().toJSONString()},"text/html":function(r){var s,a,u,c,l,h,p,d,f,g,m,y,v,b,A,C,x;if(r instanceof o.Document)c=o.DocumentView.render(r);else{if(!(r instanceof HTMLElement))throw new Error("unserializable object");c=r.cloneNode(!0)}for(l=0,f=(b=c.querySelectorAll("[data-trix-serialize=false]")).length;f>l;l++)u=b[l],o.removeNode(u);for(h=0,g=i.length;g>h;h++)for(s=i[h],p=0,m=(A=c.querySelectorAll("["+s+"]")).length;m>p;p++)(u=A[p]).removeAttribute(s);for(d=0,y=(C=c.querySelectorAll(n)).length;y>d;d++){u=C[d];try{for(v in a=JSON.parse(u.getAttribute(e)),u.removeAttribute(e),a)x=a[v],u.setAttribute(v,x)}catch(t){}}return c.innerHTML.replace(t,"")}},deserializers:{"application/json":function(t){return o.Document.fromJSONString(t)},"text/html":function(t){return o.Document.fromHTML(t)}},serializeToContentType:function(t,e){var n;if(n=o.serializers[e])return n(t);throw new Error("unknown content type: "+e)},deserializeFromContentType:function(t,e){var n;if(n=o.deserializers[e])return n(t);throw new Error("unknown content type: "+e)}})}.call(this),function(){var t;t=o.config.lang,o.config.toolbar={getDefaultHTML:function(){return'
\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n\n \n \n \n\n \n\n \n \n \n \n
\n\n
\n \n
'}}}.call(this),function(){o.config.undoInterval=5e3}.call(this),function(){o.config.attachments={preview:{presentation:"gallery",caption:{name:!0,size:!0}},file:{caption:{size:!0}}}}.call(this),function(){o.config.keyNames={8:"backspace",9:"tab",13:"return",27:"escape",37:"left",39:"right",46:"delete",68:"d",72:"h",79:"o"}}.call(this),function(){o.config.input={level2Enabled:!0,getLevel:function(){return this.level2Enabled&&o.browser.supportsInputEvents?2:0},pickFiles:function(t){var e;return(e=o.makeElement("input",{type:"file",multiple:!0,hidden:!0,id:this.fileInputId})).addEventListener("change",(function(){return t(e.files),o.removeNode(e)})),o.removeNode(document.getElementById(this.fileInputId)),document.body.appendChild(e),e.click()},fileInputId:"trix-file-input-"+Date.now().toString(16)}}.call(this),function(){}.call(this),function(){o.registerElement("trix-toolbar",{defaultCSS:"%t {\n display: block;\n}\n\n%t {\n white-space: nowrap;\n}\n\n%t [data-trix-dialog] {\n display: none;\n}\n\n%t [data-trix-dialog][data-trix-active] {\n display: block;\n}\n\n%t [data-trix-dialog] [data-trix-validate]:invalid {\n background-color: #ffdddd;\n}",initialize:function(){return""===this.innerHTML?this.innerHTML=o.config.toolbar.getDefaultHTML():void 0}})}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty,n=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};o.ObjectView=function(e){function i(t,e){this.object=t,this.options=null!=e?e:{},this.childViews=[],this.rootView=this}return t(i,e),i.prototype.getNodes=function(){var t,e,n,i,r;for(null==this.nodes&&(this.nodes=this.createNodes()),r=[],t=0,e=(i=this.nodes).length;e>t;t++)n=i[t],r.push(n.cloneNode(!0));return r},i.prototype.invalidate=function(){var t;return this.nodes=null,this.childViews=[],null!=(t=this.parentView)?t.invalidate():void 0},i.prototype.invalidateViewForObject=function(t){var e;return null!=(e=this.findViewForObject(t))?e.invalidate():void 0},i.prototype.findOrCreateCachedChildView=function(t,e){var n;return(n=this.getCachedViewForObject(e))?this.recordChildView(n):(n=this.createChildView.apply(this,arguments),this.cacheViewForObject(n,e)),n},i.prototype.createChildView=function(t,e,n){var i;return null==n&&(n={}),e instanceof o.ObjectGroup&&(n.viewClass=t,t=o.ObjectGroupView),i=new t(e,n),this.recordChildView(i)},i.prototype.recordChildView=function(t){return t.parentView=this,t.rootView=this.rootView,this.childViews.push(t),t},i.prototype.getAllChildViews=function(){var t,e,n,i,r;for(r=[],e=0,n=(i=this.childViews).length;n>e;e++)t=i[e],r.push(t),r=r.concat(t.getAllChildViews());return r},i.prototype.findElement=function(){return this.findElementForObject(this.object)},i.prototype.findElementForObject=function(t){var e;return(e=null!=t?t.id:void 0)?this.rootView.element.querySelector("[data-trix-id='"+e+"']"):void 0},i.prototype.findViewForObject=function(t){var e,n,i,r;for(e=0,n=(i=this.getAllChildViews()).length;n>e;e++)if((r=i[e]).object===t)return r},i.prototype.getViewCache=function(){return this.rootView!==this?this.rootView.getViewCache():this.isViewCachingEnabled()?null!=this.viewCache?this.viewCache:this.viewCache={}:void 0},i.prototype.isViewCachingEnabled=function(){return!1!==this.shouldCacheViews},i.prototype.enableViewCaching=function(){return this.shouldCacheViews=!0},i.prototype.disableViewCaching=function(){return this.shouldCacheViews=!1},i.prototype.getCachedViewForObject=function(t){var e;return null!=(e=this.getViewCache())?e[t.getCacheKey()]:void 0},i.prototype.cacheViewForObject=function(t,e){var n;return null!=(n=this.getViewCache())?n[e.getCacheKey()]=t:void 0},i.prototype.garbageCollectCachedViews=function(){var t,e,i,r,o,s;if(t=this.getViewCache()){for(e in s=this.getAllChildViews().concat(this),i=function(){var t,e,n;for(n=[],t=0,e=s.length;e>t;t++)o=s[t],n.push(o.object.getCacheKey());return n}(),r=[],t)n.call(i,e)<0&&r.push(delete t[e]);return r}},i}(o.BasicObject)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.ObjectGroupView=function(e){function n(){n.__super__.constructor.apply(this,arguments),this.objectGroup=this.object,this.viewClass=this.options.viewClass,delete this.options.viewClass}return t(n,e),n.prototype.getChildViews=function(){var t,e,n,i;if(!this.childViews.length)for(t=0,e=(i=this.objectGroup.getObjects()).length;e>t;t++)n=i[t],this.findOrCreateCachedChildView(this.viewClass,n,this.options);return this.childViews},n.prototype.createNodes=function(){var t,e,n,i,r,o,s,a;for(t=this.createContainerElement(),e=0,i=(s=this.getChildViews()).length;i>e;e++)for(n=0,r=(a=s[e].getNodes()).length;r>n;n++)o=a[n],t.appendChild(o);return[t]},n.prototype.createContainerElement=function(t){return null==t&&(t=this.objectGroup.getDepth()),this.getChildViews()[0].createContainerElement(t)},n}(o.ObjectView)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.Controller=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,e),n}(o.BasicObject)}.call(this),function(){var t,e,n,i,r,s,a=function(t,e){function n(){this.constructor=t}for(var i in e)u.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty,c=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=o.findClosestElementFromNode,n=o.nodeIsEmptyTextNode,e=o.nodeIsBlockStartComment,i=o.normalizeSpaces,r=o.summarizeStringChange,s=o.tagName,o.MutationObserver=function(o){function u(t){this.element=t,this.didMutate=function(t,e){return function(){return t.apply(e,arguments)}}(this.didMutate,this),this.observer=new window.MutationObserver(this.didMutate),this.start()}var l,h,p,d;return a(u,o),p="["+(h="data-trix-mutable")+"]",d={attributes:!0,childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},u.prototype.start=function(){return this.reset(),this.observer.observe(this.element,d)},u.prototype.stop=function(){return this.observer.disconnect()},u.prototype.didMutate=function(t){var e,n;return(e=this.mutations).push.apply(e,this.findSignificantMutations(t)),this.mutations.length?(null!=(n=this.delegate)&&"function"==typeof n.elementDidMutate&&n.elementDidMutate(this.getMutationSummary()),this.reset()):void 0},u.prototype.reset=function(){return this.mutations=[]},u.prototype.findSignificantMutations=function(t){var e,n,i,r;for(r=[],e=0,n=t.length;n>e;e++)i=t[e],this.mutationIsSignificant(i)&&r.push(i);return r},u.prototype.mutationIsSignificant=function(t){var e,n,i,r;if(this.nodeIsMutable(t.target))return!1;for(e=0,n=(r=this.nodesModifiedByMutation(t)).length;n>e;e++)if(i=r[e],this.nodeIsSignificant(i))return!0;return!1},u.prototype.nodeIsSignificant=function(t){return t!==this.element&&!this.nodeIsMutable(t)&&!n(t)},u.prototype.nodeIsMutable=function(e){return t(e,{matchingSelector:p})},u.prototype.nodesModifiedByMutation=function(t){var e;switch(e=[],t.type){case"attributes":t.attributeName!==h&&e.push(t.target);break;case"characterData":e.push(t.target.parentNode),e.push(t.target);break;case"childList":e.push.apply(e,t.addedNodes),e.push.apply(e,t.removedNodes)}return e},u.prototype.getMutationSummary=function(){return this.getTextMutationSummary()},u.prototype.getTextMutationSummary=function(){var t,e,n,i,r,o,s,a,u,l,h;for(n=(a=this.getTextChangesFromCharacterData()).additions,r=a.deletions,o=0,s=(u=(h=this.getTextChangesFromChildList()).additions).length;s>o;o++)e=u[o],c.call(n,e)<0&&n.push(e);return r.push.apply(r,h.deletions),l={},(t=n.join(""))&&(l.textAdded=t),(i=r.join(""))&&(l.textDeleted=i),l},u.prototype.getMutationsByType=function(t){var e,n,i,r,o;for(o=[],e=0,n=(r=this.mutations).length;n>e;e++)(i=r[e]).type===t&&o.push(i);return o},u.prototype.getTextChangesFromChildList=function(){var t,n,r,o,s,a,u,c,h,p;for(t=[],u=[],n=0,o=(a=this.getMutationsByType("childList")).length;o>n;n++)s=a[n],t.push.apply(t,s.addedNodes),u.push.apply(u,s.removedNodes);return 0===t.length&&1===u.length&&e(u[0])?(h=[],p=["\n"]):(h=l(t),p=l(u)),{additions:function(){var t,e,n;for(n=[],r=t=0,e=h.length;e>t;r=++t)(c=h[r])!==p[r]&&n.push(i(c));return n}(),deletions:function(){var t,e,n;for(n=[],r=t=0,e=p.length;e>t;r=++t)(c=p[r])!==h[r]&&n.push(i(c));return n}()}},u.prototype.getTextChangesFromCharacterData=function(){var t,e,n,o,s,a,u,c;return(e=this.getMutationsByType("characterData")).length&&(c=e[0],n=e[e.length-1],s=i(c.oldValue),o=i(n.target.data),t=(a=r(s,o)).added,u=a.removed),{additions:t?[t]:[],deletions:u?[u]:[]}},l=function(t){var e,n,i,r;for(null==t&&(t=[]),r=[],e=0,n=t.length;n>e;e++)switch(i=t[e],i.nodeType){case Node.TEXT_NODE:r.push(i.data);break;case Node.ELEMENT_NODE:"br"===s(i)?r.push("\n"):r.push.apply(r,l(i.childNodes))}return r},u}(o.BasicObject)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.FileVerificationOperation=function(e){function n(t){this.file=t}return t(n,e),n.prototype.perform=function(t){var e;return(e=new FileReader).onerror=function(){return t(!1)},e.onload=function(n){return function(){e.onerror=null;try{e.abort()}catch(t){}return t(!0,n.file)}}(this),e.readAsArrayBuffer(this.file)},n}(o.Operation)}.call(this),function(){var t,e,n=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;t=o.handleEvent,e=o.innerElementIsActive,o.InputController=function(i){function r(e){var n;for(n in this.element=e,this.mutationObserver=new o.MutationObserver(this.element),this.mutationObserver.delegate=this,this.events)t(n,{onElement:this.element,withCallback:this.handlerFor(n)})}return n(r,i),r.prototype.events={},r.prototype.elementDidMutate=function(){},r.prototype.editorWillSyncDocumentView=function(){return this.mutationObserver.stop()},r.prototype.editorDidSyncDocumentView=function(){return this.mutationObserver.start()},r.prototype.requestRender=function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.inputControllerDidRequestRender?t.inputControllerDidRequestRender():void 0},r.prototype.requestReparse=function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.inputControllerDidRequestReparse&&t.inputControllerDidRequestReparse(),this.requestRender()},r.prototype.attachFiles=function(t){var e,n;return n=function(){var n,i,r;for(r=[],n=0,i=t.length;i>n;n++)e=t[n],r.push(new o.FileVerificationOperation(e));return r}(),Promise.all(n).then(function(t){return function(e){return t.handleInput((function(){var t,n;return null!=(t=this.delegate)&&t.inputControllerWillAttachFiles(),null!=(n=this.responder)&&n.insertFiles(e),this.requestRender()}))}}(this))},r.prototype.handlerFor=function(t){return function(n){return function(i){return i.defaultPrevented?void 0:n.handleInput((function(){return e(this.element)?void 0:(this.eventName=t,this.events[t].call(this,i))}))}}(this)},r.prototype.handleInput=function(t){var e,n;try{return null!=(e=this.delegate)&&e.inputControllerWillHandleInput(),t.call(this)}finally{null!=(n=this.delegate)&&n.inputControllerDidHandleInput()}},r.prototype.createLinkHTML=function(t,e){var n;return(n=document.createElement("a")).href=t,n.textContent=null!=e?e:t,n.outerHTML},r}(o.BasicObject)}.call(this),function(){var t,e,n,i,r,s,a,u,c,l,h,p,d=function(t,e){function n(){this.constructor=t}for(var i in e)f.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},f={}.hasOwnProperty,g=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};c=o.makeElement,l=o.objectsAreEqual,o.tagName,e=o.browser,a=o.keyEventIsKeyboardCommand,i=o.dataTransferIsWritable,n=o.dataTransferIsPlainText,u=o.config.keyNames,o.Level0InputController=function(e){function s(){s.__super__.constructor.apply(this,arguments),this.resetInputSummary()}var f;return d(s,e),f=0,s.prototype.setInputSummary=function(t){var e,n;for(e in null==t&&(t={}),this.inputSummary.eventName=this.eventName,t)n=t[e],this.inputSummary[e]=n;return this.inputSummary},s.prototype.resetInputSummary=function(){return this.inputSummary={}},s.prototype.reset=function(){return this.resetInputSummary(),o.selectionChangeObserver.reset()},s.prototype.elementDidMutate=function(t){var e;return this.isComposing()?null!=(e=this.delegate)&&"function"==typeof e.inputControllerDidAllowUnhandledInput?e.inputControllerDidAllowUnhandledInput():void 0:this.handleInput((function(){return this.mutationIsSignificant(t)&&(this.mutationIsExpected(t)?this.requestRender():this.requestReparse()),this.reset()}))},s.prototype.mutationIsExpected=function(t){var e,n,i,r,o,s,a,u,c;return s=t.textAdded,a=t.textDeleted,!!this.inputSummary.preferDocument||(e=null!=s?s===this.inputSummary.textAdded:!this.inputSummary.textAdded,n=null!=a?this.inputSummary.didDelete:!this.inputSummary.didDelete,c="\n"===a&&!n,!!(((u=("\n"===s||" \n"===s)&&!e)&&!c||c&&!u)&&(r=this.getSelectedRange())&&(i=u?s.replace(/\n$/,"").length||-1:(null!=s?s.length:void 0)||1,null!=(o=this.responder)?o.positionIsBlockBreak(r[1]+i):void 0))||e&&n)},s.prototype.mutationIsSignificant=function(t){var e,n,i;return i=Object.keys(t).length>0,e=""===(null!=(n=this.compositionInput)?n.getEndData():void 0),i||!e},s.prototype.events={keydown:function(t){var e,n,i,r,s,c,l,h,p;if(this.isComposing()||this.resetInputSummary(),this.inputSummary.didInput=!0,r=u[t.keyCode]){for(n=this.keys,i=0,c=(h=["ctrl","alt","shift","meta"]).length;c>i;i++)t[(l=h[i])+"Key"]&&("ctrl"===l&&(l="control"),n=null!=n?n[l]:void 0);null!=(null!=n?n[r]:void 0)&&(this.setInputSummary({keyName:r}),o.selectionChangeObserver.reset(),n[r].call(this,t))}return a(t)&&(e=String.fromCharCode(t.keyCode).toLowerCase())&&(s=function(){var e,n,i,r;for(r=[],e=0,n=(i=["alt","shift"]).length;n>e;e++)t[(l=i[e])+"Key"]&&r.push(l);return r}(),s.push(e),null!=(p=this.delegate)?p.inputControllerDidReceiveKeyboardCommand(s):void 0)?t.preventDefault():void 0},keypress:function(t){var e,n,i;if(null==this.inputSummary.eventName&&!t.metaKey&&(!t.ctrlKey||t.altKey))return(i=p(t))?(null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.insertString(i),this.setInputSummary({textAdded:i,didDelete:this.selectionIsExpanded()})):void 0},textInput:function(t){var e,n,i,r;return e=t.data,(r=this.inputSummary.textAdded)&&r!==e&&r.toUpperCase()===e?(n=this.getSelectedRange(),this.setSelectedRange([n[0],n[1]+r.length]),null!=(i=this.responder)&&i.insertString(e),this.setInputSummary({textAdded:e}),this.setSelectedRange(n)):void 0},dragenter:function(t){return t.preventDefault()},dragstart:function(t){var e;return t.target,this.serializeSelectionToDataTransfer(t.dataTransfer),this.draggedRange=this.getSelectedRange(),null!=(e=this.delegate)&&"function"==typeof e.inputControllerDidStartDrag?e.inputControllerDidStartDrag():void 0},dragover:function(t){var e,n;return!this.draggedRange&&!this.canAcceptDataTransfer(t.dataTransfer)||(t.preventDefault(),e={x:t.clientX,y:t.clientY},l(e,this.draggingPoint))?void 0:(this.draggingPoint=e,null!=(n=this.delegate)&&"function"==typeof n.inputControllerDidReceiveDragOverPoint?n.inputControllerDidReceiveDragOverPoint(this.draggingPoint):void 0)},dragend:function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.inputControllerDidCancelDrag&&t.inputControllerDidCancelDrag(),this.draggedRange=null,this.draggingPoint=null},drop:function(t){var e,n,i,r,s,a,u,c,l;return t.preventDefault(),i=null!=(s=t.dataTransfer)?s.files:void 0,r={x:t.clientX,y:t.clientY},null!=(a=this.responder)&&a.setLocationRangeFromPointRange(r),(null!=i?i.length:void 0)?this.attachFiles(i):this.draggedRange?(null!=(u=this.delegate)&&u.inputControllerWillMoveText(),null!=(c=this.responder)&&c.moveTextFromRange(this.draggedRange),this.draggedRange=null,this.requestRender()):(n=t.dataTransfer.getData("application/x-trix-document"))&&(e=o.Document.fromJSONString(n),null!=(l=this.responder)&&l.insertDocument(e),this.requestRender()),this.draggedRange=null,this.draggingPoint=null},cut:function(t){var e,n;return(null!=(e=this.responder)?e.selectionIsExpanded():void 0)&&(this.serializeSelectionToDataTransfer(t.clipboardData)&&t.preventDefault(),null!=(n=this.delegate)&&n.inputControllerWillCutText(),this.deleteInDirection("backward"),t.defaultPrevented)?this.requestRender():void 0},copy:function(t){var e;return(null!=(e=this.responder)?e.selectionIsExpanded():void 0)&&this.serializeSelectionToDataTransfer(t.clipboardData)?t.preventDefault():void 0},paste:function(t){var e,i,s,a,u,c,l,p,d,m,y,v,b,A,C,x,w,E,S,k,R,D,L;return e=null!=(p=t.clipboardData)?p:t.testClipboardData,l={clipboard:e},null==e||h(t)?void this.getPastedHTMLUsingHiddenElement(function(t){return function(e){var n,i,r;return l.type="text/html",l.html=e,null!=(n=t.delegate)&&n.inputControllerWillPaste(l),null!=(i=t.responder)&&i.insertHTML(l.html),t.requestRender(),null!=(r=t.delegate)?r.inputControllerDidPaste(l):void 0}}(this)):((a=e.getData("URL"))?(l.type="text/html",L=(c=e.getData("public.url-name"))?o.squishBreakableWhitespace(c).trim():a,l.html=this.createLinkHTML(a,L),null!=(d=this.delegate)&&d.inputControllerWillPaste(l),this.setInputSummary({textAdded:L,didDelete:this.selectionIsExpanded()}),null!=(C=this.responder)&&C.insertHTML(l.html),this.requestRender(),null!=(x=this.delegate)&&x.inputControllerDidPaste(l)):n(e)?(l.type="text/plain",l.string=e.getData("text/plain"),null!=(w=this.delegate)&&w.inputControllerWillPaste(l),this.setInputSummary({textAdded:l.string,didDelete:this.selectionIsExpanded()}),null!=(E=this.responder)&&E.insertString(l.string),this.requestRender(),null!=(S=this.delegate)&&S.inputControllerDidPaste(l)):(u=e.getData("text/html"))?(l.type="text/html",l.html=u,null!=(k=this.delegate)&&k.inputControllerWillPaste(l),null!=(R=this.responder)&&R.insertHTML(l.html),this.requestRender(),null!=(D=this.delegate)&&D.inputControllerDidPaste(l)):g.call(e.types,"Files")>=0&&(s=null!=(m=e.items)&&null!=(y=m[0])&&"function"==typeof y.getAsFile?y.getAsFile():void 0)&&(!s.name&&(i=r(s))&&(s.name="pasted-file-"+ ++f+"."+i),l.type="File",l.file=s,null!=(v=this.delegate)&&v.inputControllerWillAttachFiles(),null!=(b=this.responder)&&b.insertFile(l.file),this.requestRender(),null!=(A=this.delegate)&&A.inputControllerDidPaste(l)),t.preventDefault())},compositionstart:function(t){return this.getCompositionInput().start(t.data)},compositionupdate:function(t){return this.getCompositionInput().update(t.data)},compositionend:function(t){return this.getCompositionInput().end(t.data)},beforeinput:function(){return this.inputSummary.didInput=!0},input:function(t){return this.inputSummary.didInput=!0,t.stopPropagation()}},s.prototype.keys={backspace:function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("backward",t)},delete:function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("forward",t)},return:function(){var t,e;return this.setInputSummary({preferDocument:!0}),null!=(t=this.delegate)&&t.inputControllerWillPerformTyping(),null!=(e=this.responder)?e.insertLineBreak():void 0},tab:function(t){var e,n;return(null!=(e=this.responder)?e.canIncreaseNestingLevel():void 0)?(null!=(n=this.responder)&&n.increaseNestingLevel(),this.requestRender(),t.preventDefault()):void 0},left:function(t){var e;return this.selectionIsInCursorTarget()?(t.preventDefault(),null!=(e=this.responder)?e.moveCursorInDirection("backward"):void 0):void 0},right:function(t){var e;return this.selectionIsInCursorTarget()?(t.preventDefault(),null!=(e=this.responder)?e.moveCursorInDirection("forward"):void 0):void 0},control:{d:function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("forward",t)},h:function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("backward",t)},o:function(t){var e,n;return t.preventDefault(),null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.insertString("\n",{updatePosition:!1}),this.requestRender()}},shift:{return:function(t){var e,n;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.insertString("\n"),this.requestRender(),t.preventDefault()},tab:function(t){var e,n;return(null!=(e=this.responder)?e.canDecreaseNestingLevel():void 0)?(null!=(n=this.responder)&&n.decreaseNestingLevel(),this.requestRender(),t.preventDefault()):void 0},left:function(t){return this.selectionIsInCursorTarget()?(t.preventDefault(),this.expandSelectionInDirection("backward")):void 0},right:function(t){return this.selectionIsInCursorTarget()?(t.preventDefault(),this.expandSelectionInDirection("forward")):void 0}},alt:{backspace:function(){var t;return this.setInputSummary({preferDocument:!1}),null!=(t=this.delegate)?t.inputControllerWillPerformTyping():void 0}},meta:{backspace:function(){var t;return this.setInputSummary({preferDocument:!1}),null!=(t=this.delegate)?t.inputControllerWillPerformTyping():void 0}}},s.prototype.getCompositionInput=function(){return this.isComposing()?this.compositionInput:this.compositionInput=new t(this)},s.prototype.isComposing=function(){return null!=this.compositionInput&&!this.compositionInput.isEnded()},s.prototype.deleteInDirection=function(t,e){var n;return!1!==(null!=(n=this.responder)?n.deleteInDirection(t):void 0)?this.setInputSummary({didDelete:!0}):e?(e.preventDefault(),this.requestRender()):void 0},s.prototype.serializeSelectionToDataTransfer=function(t){var e,n;if(i(t))return e=null!=(n=this.responder)?n.getSelectedDocument().toSerializableDocument():void 0,t.setData("application/x-trix-document",JSON.stringify(e)),t.setData("text/html",o.DocumentView.render(e).innerHTML),t.setData("text/plain",e.toString().replace(/\n$/,"")),!0},s.prototype.canAcceptDataTransfer=function(t){var e,n,i,r,o;for(o={},e=0,n=(r=null!=(i=null!=t?t.types:void 0)?i:[]).length;n>e;e++)o[r[e]]=!0;return o.Files||o["application/x-trix-document"]||o["text/html"]||o["text/plain"]},s.prototype.getPastedHTMLUsingHiddenElement=function(t){var e,n,i;return n=this.getSelectedRange(),i={position:"absolute",left:window.pageXOffset+"px",top:window.pageYOffset+"px",opacity:0},e=c({style:i,tagName:"div",editable:!0}),document.body.appendChild(e),e.focus(),requestAnimationFrame(function(i){return function(){var r;return r=e.innerHTML,o.removeNode(e),i.setSelectedRange(n),t(r)}}(this))},s.proxyMethod("responder?.getSelectedRange"),s.proxyMethod("responder?.setSelectedRange"),s.proxyMethod("responder?.expandSelectionInDirection"),s.proxyMethod("responder?.selectionIsInCursorTarget"),s.proxyMethod("responder?.selectionIsExpanded"),s}(o.InputController),r=function(t){var e,n;return null!=(e=t.type)&&null!=(n=e.match(/\/(\w+)$/))?n[1]:void 0},s=null!=("function"==typeof" ".codePointAt?" ".codePointAt(0):void 0),p=function(t){var e;return t.key&&s&&t.key.codePointAt(0)===t.keyCode?t.key:(null===t.which?e=t.keyCode:0!==t.which&&0!==t.charCode&&(e=t.charCode),null!=e&&"escape"!==u[e]?o.UTF16String.fromCodepoints([e]).toString():void 0)},h=function(t){var e,n,i,r,o,s,a,u,c;if(a=t.clipboardData){if(g.call(a.types,"text/html")>=0){for(i=0,s=(u=a.types).length;s>i;i++)if(c=u[i],e=/^CorePasteboardFlavorType/.test(c),n=/^dyn\./.test(c)&&a.getData(c),e||n)return!0;return!1}return r=g.call(a.types,"com.apple.webarchive")>=0,o=g.call(a.types,"com.apple.flat-rtfd")>=0,r||o}},t=function(t){function n(t){var e;this.inputController=t,e=this.inputController,this.responder=e.responder,this.delegate=e.delegate,this.inputSummary=e.inputSummary,this.data={}}return d(n,t),n.prototype.start=function(t){var e,n;return this.data.start=t,this.isSignificant()?("keypress"===this.inputSummary.eventName&&this.inputSummary.textAdded&&null!=(e=this.responder)&&e.deleteInDirection("left"),this.selectionIsExpanded()||(this.insertPlaceholder(),this.requestRender()),this.range=null!=(n=this.responder)?n.getSelectedRange():void 0):void 0},n.prototype.update=function(t){var e;return this.data.update=t,this.isSignificant()&&(e=this.selectPlaceholder())?(this.forgetPlaceholder(),this.range=e):void 0},n.prototype.end=function(t){var e,n,i,r;return this.data.end=t,this.isSignificant()?(this.forgetPlaceholder(),this.canApplyToDocument()?(this.setInputSummary({preferDocument:!0,didInput:!1}),null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.setSelectedRange(this.range),null!=(i=this.responder)&&i.insertString(this.data.end),null!=(r=this.responder)?r.setSelectedRange(this.range[0]+this.data.end.length):void 0):null!=this.data.start||null!=this.data.update?(this.requestReparse(),this.inputController.reset()):void 0):this.inputController.reset()},n.prototype.getEndData=function(){return this.data.end},n.prototype.isEnded=function(){return null!=this.getEndData()},n.prototype.isSignificant=function(){return!e.composesExistingText||this.inputSummary.didInput},n.prototype.canApplyToDocument=function(){var t,e;return 0===(null!=(t=this.data.start)?t.length:void 0)&&(null!=(e=this.data.end)?e.length:void 0)>0&&null!=this.range},n.proxyMethod("inputController.setInputSummary"),n.proxyMethod("inputController.requestRender"),n.proxyMethod("inputController.requestReparse"),n.proxyMethod("responder?.selectionIsExpanded"),n.proxyMethod("responder?.insertPlaceholder"),n.proxyMethod("responder?.selectPlaceholder"),n.proxyMethod("responder?.forgetPlaceholder"),n}(o.BasicObject)}.call(this),function(){var t,e,n,i=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=o.dataTransferIsPlainText,e=o.keyEventIsKeyboardCommand,n=o.objectsAreEqual,o.Level2InputController=function(r){function a(){return this.render=function(t,e){return function(){return t.apply(e,arguments)}}(this.render,this),a.__super__.constructor.apply(this,arguments)}var u,c,l,h,p,d;return i(a,r),a.prototype.elementDidMutate=function(){var t;return this.scheduledRender?this.composing&&null!=(t=this.delegate)&&"function"==typeof t.inputControllerDidAllowUnhandledInput?t.inputControllerDidAllowUnhandledInput():void 0:this.reparse()},a.prototype.scheduleRender=function(){return null!=this.scheduledRender?this.scheduledRender:this.scheduledRender=requestAnimationFrame(this.render)},a.prototype.render=function(){var t;return cancelAnimationFrame(this.scheduledRender),this.scheduledRender=null,this.composing||null!=(t=this.delegate)&&t.render(),"function"==typeof this.afterRender&&this.afterRender(),this.afterRender=null},a.prototype.reparse=function(){var t;return null!=(t=this.delegate)?t.reparse():void 0},a.prototype.events={keydown:function(t){var n,i,r,o;if(e(t)){if(n=c(t),null!=(o=this.delegate)?o.inputControllerDidReceiveKeyboardCommand(n):void 0)return t.preventDefault()}else if(r=t.key,t.altKey&&(r+="+Alt"),t.shiftKey&&(r+="+Shift"),i=this.keys[r])return this.withEvent(t,i)},paste:function(t){var e,n,i,r,o,s,a,u,c;return l(t)?(t.preventDefault(),this.attachFiles(t.clipboardData.files)):h(t)?(t.preventDefault(),n={type:"text/plain",string:t.clipboardData.getData("text/plain")},null!=(i=this.delegate)&&i.inputControllerWillPaste(n),null!=(r=this.responder)&&r.insertString(n.string),this.render(),null!=(o=this.delegate)?o.inputControllerDidPaste(n):void 0):(e=null!=(s=t.clipboardData)?s.getData("URL"):void 0)?(t.preventDefault(),n={type:"text/html",html:this.createLinkHTML(e)},null!=(a=this.delegate)&&a.inputControllerWillPaste(n),null!=(u=this.responder)&&u.insertHTML(n.html),this.render(),null!=(c=this.delegate)?c.inputControllerDidPaste(n):void 0):void 0},beforeinput:function(t){var e;return(e=this.inputTypes[t.inputType])?(this.withEvent(t,e),this.scheduleRender()):void 0},input:function(){return o.selectionChangeObserver.reset()},dragstart:function(t){var e,n;return(null!=(e=this.responder)?e.selectionContainsAttachments():void 0)?(t.dataTransfer.setData("application/x-trix-dragging",!0),this.dragging={range:null!=(n=this.responder)?n.getSelectedRange():void 0,point:p(t)}):void 0},dragenter:function(t){return u(t)?t.preventDefault():void 0},dragover:function(t){var e,i;if(this.dragging){if(t.preventDefault(),e=p(t),!n(e,this.dragging.point))return this.dragging.point=e,null!=(i=this.responder)?i.setLocationRangeFromPointRange(e):void 0}else if(u(t))return t.preventDefault()},drop:function(t){var e,n,i,r;return this.dragging?(t.preventDefault(),null!=(n=this.delegate)&&n.inputControllerWillMoveText(),null!=(i=this.responder)&&i.moveTextFromRange(this.dragging.range),this.dragging=null,this.scheduleRender()):u(t)?(t.preventDefault(),e=p(t),null!=(r=this.responder)&&r.setLocationRangeFromPointRange(e),this.attachFiles(t.dataTransfer.files)):void 0},dragend:function(){var t;return this.dragging?(null!=(t=this.responder)&&t.setSelectedRange(this.dragging.range),this.dragging=null):void 0},compositionend:function(){return this.composing?(this.composing=!1,this.scheduleRender()):void 0}},a.prototype.keys={ArrowLeft:function(){var t,e;return(null!=(t=this.responder)?t.shouldManageMovingCursorInDirection("backward"):void 0)?(this.event.preventDefault(),null!=(e=this.responder)?e.moveCursorInDirection("backward"):void 0):void 0},ArrowRight:function(){var t,e;return(null!=(t=this.responder)?t.shouldManageMovingCursorInDirection("forward"):void 0)?(this.event.preventDefault(),null!=(e=this.responder)?e.moveCursorInDirection("forward"):void 0):void 0},Backspace:function(){var t,e,n;return(null!=(t=this.responder)?t.shouldManageDeletingInDirection("backward"):void 0)?(this.event.preventDefault(),null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.deleteInDirection("backward"),this.render()):void 0},Tab:function(){var t,e;return(null!=(t=this.responder)?t.canIncreaseNestingLevel():void 0)?(this.event.preventDefault(),null!=(e=this.responder)&&e.increaseNestingLevel(),this.render()):void 0},"Tab+Shift":function(){var t,e;return(null!=(t=this.responder)?t.canDecreaseNestingLevel():void 0)?(this.event.preventDefault(),null!=(e=this.responder)&&e.decreaseNestingLevel(),this.render()):void 0}},a.prototype.inputTypes={deleteByComposition:function(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteByCut:function(){return this.deleteInDirection("backward")},deleteByDrag:function(){return this.event.preventDefault(),this.withTargetDOMRange((function(){var t;return this.deleteByDragRange=null!=(t=this.responder)?t.getSelectedRange():void 0}))},deleteCompositionText:function(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteContent:function(){return this.deleteInDirection("backward")},deleteContentBackward:function(){return this.deleteInDirection("backward")},deleteContentForward:function(){return this.deleteInDirection("forward")},deleteEntireSoftLine:function(){return this.deleteInDirection("forward")},deleteHardLineBackward:function(){return this.deleteInDirection("backward")},deleteHardLineForward:function(){return this.deleteInDirection("forward")},deleteSoftLineBackward:function(){return this.deleteInDirection("backward")},deleteSoftLineForward:function(){return this.deleteInDirection("forward")},deleteWordBackward:function(){return this.deleteInDirection("backward")},deleteWordForward:function(){return this.deleteInDirection("forward")},formatBackColor:function(){return this.activateAttributeIfSupported("backgroundColor",this.event.data)},formatBold:function(){return this.toggleAttributeIfSupported("bold")},formatFontColor:function(){return this.activateAttributeIfSupported("color",this.event.data)},formatFontName:function(){return this.activateAttributeIfSupported("font",this.event.data)},formatIndent:function(){var t;return(null!=(t=this.responder)?t.canIncreaseNestingLevel():void 0)?this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.increaseNestingLevel():void 0})):void 0},formatItalic:function(){return this.toggleAttributeIfSupported("italic")},formatJustifyCenter:function(){return this.toggleAttributeIfSupported("justifyCenter")},formatJustifyFull:function(){return this.toggleAttributeIfSupported("justifyFull")},formatJustifyLeft:function(){return this.toggleAttributeIfSupported("justifyLeft")},formatJustifyRight:function(){return this.toggleAttributeIfSupported("justifyRight")},formatOutdent:function(){var t;return(null!=(t=this.responder)?t.canDecreaseNestingLevel():void 0)?this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.decreaseNestingLevel():void 0})):void 0},formatRemove:function(){return this.withTargetDOMRange((function(){var t,e,n,i;for(t in i=[],null!=(e=this.responder)?e.getCurrentAttributes():void 0)i.push(null!=(n=this.responder)?n.removeCurrentAttribute(t):void 0);return i}))},formatSetBlockTextDirection:function(){return this.activateAttributeIfSupported("blockDir",this.event.data)},formatSetInlineTextDirection:function(){return this.activateAttributeIfSupported("textDir",this.event.data)},formatStrikeThrough:function(){return this.toggleAttributeIfSupported("strike")},formatSubscript:function(){return this.toggleAttributeIfSupported("sub")},formatSuperscript:function(){return this.toggleAttributeIfSupported("sup")},formatUnderline:function(){return this.toggleAttributeIfSupported("underline")},historyRedo:function(){var t;return null!=(t=this.delegate)?t.inputControllerWillPerformRedo():void 0},historyUndo:function(){var t;return null!=(t=this.delegate)?t.inputControllerWillPerformUndo():void 0},insertCompositionText:function(){return this.composing=!0,this.insertString(this.event.data)},insertFromComposition:function(){return this.composing=!1,this.insertString(this.event.data)},insertFromDrop:function(){var t,e;return(t=this.deleteByDragRange)?(this.deleteByDragRange=null,null!=(e=this.delegate)&&e.inputControllerWillMoveText(),this.withTargetDOMRange((function(){var e;return null!=(e=this.responder)?e.moveTextFromRange(t):void 0}))):void 0},insertFromPaste:function(){var e,n,i,r,s,a,u,c,l,h,p;return e=this.event.dataTransfer,s={dataTransfer:e},(n=e.getData("URL"))?(this.event.preventDefault(),s.type="text/html",p=(r=e.getData("public.url-name"))?o.squishBreakableWhitespace(r).trim():n,s.html=this.createLinkHTML(n,p),null!=(a=this.delegate)&&a.inputControllerWillPaste(s),this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.insertHTML(s.html):void 0})),this.afterRender=function(t){return function(){var e;return null!=(e=t.delegate)?e.inputControllerDidPaste(s):void 0}}(this)):t(e)?(s.type="text/plain",s.string=e.getData("text/plain"),null!=(u=this.delegate)&&u.inputControllerWillPaste(s),this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.insertString(s.string):void 0})),this.afterRender=function(t){return function(){var e;return null!=(e=t.delegate)?e.inputControllerDidPaste(s):void 0}}(this)):(i=e.getData("text/html"))?(this.event.preventDefault(),s.type="text/html",s.html=i,null!=(c=this.delegate)&&c.inputControllerWillPaste(s),this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.insertHTML(s.html):void 0})),this.afterRender=function(t){return function(){var e;return null!=(e=t.delegate)?e.inputControllerDidPaste(s):void 0}}(this)):(null!=(l=e.files)?l.length:void 0)?(s.type="File",s.file=e.files[0],null!=(h=this.delegate)&&h.inputControllerWillPaste(s),this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.insertFile(s.file):void 0})),this.afterRender=function(t){return function(){var e;return null!=(e=t.delegate)?e.inputControllerDidPaste(s):void 0}}(this)):void 0},insertFromYank:function(){return this.insertString(this.event.data)},insertLineBreak:function(){return this.insertString("\n")},insertLink:function(){return this.activateAttributeIfSupported("href",this.event.data)},insertOrderedList:function(){return this.toggleAttributeIfSupported("number")},insertParagraph:function(){var t;return null!=(t=this.delegate)&&t.inputControllerWillPerformTyping(),this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.insertLineBreak():void 0}))},insertReplacementText:function(){return this.insertString(this.event.dataTransfer.getData("text/plain"),{updatePosition:!1})},insertText:function(){var t,e;return this.insertString(null!=(t=this.event.data)?t:null!=(e=this.event.dataTransfer)?e.getData("text/plain"):void 0)},insertTranspose:function(){return this.insertString(this.event.data)},insertUnorderedList:function(){return this.toggleAttributeIfSupported("bullet")}},a.prototype.insertString=function(t,e){var n;return null==t&&(t=""),null!=(n=this.delegate)&&n.inputControllerWillPerformTyping(),this.withTargetDOMRange((function(){var n;return null!=(n=this.responder)?n.insertString(t,e):void 0}))},a.prototype.toggleAttributeIfSupported=function(t){var e;return s.call(o.getAllAttributeNames(),t)>=0?(null!=(e=this.delegate)&&e.inputControllerWillPerformFormatting(t),this.withTargetDOMRange((function(){var e;return null!=(e=this.responder)?e.toggleCurrentAttribute(t):void 0}))):void 0},a.prototype.activateAttributeIfSupported=function(t,e){var n;return s.call(o.getAllAttributeNames(),t)>=0?(null!=(n=this.delegate)&&n.inputControllerWillPerformFormatting(t),this.withTargetDOMRange((function(){var n;return null!=(n=this.responder)?n.setCurrentAttribute(t,e):void 0}))):void 0},a.prototype.deleteInDirection=function(t,e){var n,i,r;return(null!=e?e:{recordUndoEntry:!0}).recordUndoEntry&&null!=(r=this.delegate)&&r.inputControllerWillPerformTyping(),i=function(e){return function(){var n;return null!=(n=e.responder)?n.deleteInDirection(t):void 0}}(this),(n=this.getTargetDOMRange({minLength:2}))?this.withTargetDOMRange(n,i):i()},a.prototype.withTargetDOMRange=function(t,e){var n;return"function"==typeof t&&(e=t,t=this.getTargetDOMRange()),t?null!=(n=this.responder)?n.withTargetDOMRange(t,e.bind(this)):void 0:(o.selectionChangeObserver.reset(),e.call(this))},a.prototype.getTargetDOMRange=function(t){var e,n,i,r;return i=(null!=t?t:{minLength:0}).minLength,(r="function"==typeof(e=this.event).getTargetRanges?e.getTargetRanges():void 0)&&r.length&&(n=d(r[0]),0===i||n.toString().length>=i)?n:void 0},d=function(t){var e;return(e=document.createRange()).setStart(t.startContainer,t.startOffset),e.setEnd(t.endContainer,t.endOffset),e},a.prototype.withEvent=function(t,e){var n;this.event=t;try{n=e.call(this)}finally{this.event=null}return n},u=function(t){var e,n;return s.call(null!=(e=null!=(n=t.dataTransfer)?n.types:void 0)?e:[],"Files")>=0},l=function(t){var e;return(e=t.clipboardData)?s.call(e.types,"Files")>=0&&1===e.types.length&&e.files.length>=1:void 0},h=function(t){var e;return(e=t.clipboardData)?s.call(e.types,"text/plain")>=0&&1===e.types.length:void 0},c=function(t){var e;return e=[],t.altKey&&e.push("alt"),t.shiftKey&&e.push("shift"),e.push(t.key),e},p=function(t){return{x:t.clientX,y:t.clientY}},a}(o.InputController)}.call(this),function(){var t,e,n,i,r,s,a,u,c=function(t,e){return function(){return t.apply(e,arguments)}},l=function(t,e){function n(){this.constructor=t}for(var i in e)h.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;e=o.defer,n=o.handleEvent,s=o.makeElement,u=o.tagName,a=o.config,r=a.lang,t=a.css,i=a.keyNames,o.AttachmentEditorController=function(a){function h(t,e,n,i){this.attachmentPiece=t,this.element=e,this.container=n,this.options=null!=i?i:{},this.didBlurCaption=c(this.didBlurCaption,this),this.didChangeCaption=c(this.didChangeCaption,this),this.didInputCaption=c(this.didInputCaption,this),this.didKeyDownCaption=c(this.didKeyDownCaption,this),this.didClickActionButton=c(this.didClickActionButton,this),this.didClickToolbar=c(this.didClickToolbar,this),this.attachment=this.attachmentPiece.attachment,"a"===u(this.element)&&(this.element=this.element.firstChild),this.install()}var p;return l(h,a),p=function(t){return function(){var e;return(e=t.apply(this,arguments)).do(),null==this.undos&&(this.undos=[]),this.undos.push(e.undo)}},h.prototype.install=function(){return this.makeElementMutable(),this.addToolbar(),this.attachment.isPreviewable()?this.installCaptionEditor():void 0},h.prototype.uninstall=function(){var t,e;for(this.savePendingCaption();e=this.undos.pop();)e();return null!=(t=this.delegate)?t.didUninstallAttachmentEditor(this):void 0},h.prototype.savePendingCaption=function(){var t,e,n;return null!=this.pendingCaption?(t=this.pendingCaption,this.pendingCaption=null,t?null!=(e=this.delegate)&&"function"==typeof e.attachmentEditorDidRequestUpdatingAttributesForAttachment?e.attachmentEditorDidRequestUpdatingAttributesForAttachment({caption:t},this.attachment):void 0:null!=(n=this.delegate)&&"function"==typeof n.attachmentEditorDidRequestRemovingAttributeForAttachment?n.attachmentEditorDidRequestRemovingAttributeForAttachment("caption",this.attachment):void 0):void 0},h.prototype.makeElementMutable=p((function(){return{do:function(t){return function(){return t.element.dataset.trixMutable=!0}}(this),undo:function(t){return function(){return delete t.element.dataset.trixMutable}}(this)}})),h.prototype.addToolbar=p((function(){var e;return e=s({tagName:"div",className:t.attachmentToolbar,data:{trixMutable:!0},childNodes:s({tagName:"div",className:"trix-button-row",childNodes:s({tagName:"span",className:"trix-button-group trix-button-group--actions",childNodes:s({tagName:"button",className:"trix-button trix-button--remove",textContent:r.remove,attributes:{title:r.remove},data:{trixAction:"remove"}})})})}),this.attachment.isPreviewable()&&e.appendChild(s({tagName:"div",className:t.attachmentMetadataContainer,childNodes:s({tagName:"span",className:t.attachmentMetadata,childNodes:[s({tagName:"span",className:t.attachmentName,textContent:this.attachment.getFilename(),attributes:{title:this.attachment.getFilename()}}),s({tagName:"span",className:t.attachmentSize,textContent:this.attachment.getFormattedFilesize()})]})})),n("click",{onElement:e,withCallback:this.didClickToolbar}),n("click",{onElement:e,matchingSelector:"[data-trix-action]",withCallback:this.didClickActionButton}),{do:function(t){return function(){return t.element.appendChild(e)}}(this),undo:function(){return o.removeNode(e)}}})),h.prototype.installCaptionEditor=p((function(){var i,a,u,c,l;return(c=s({tagName:"textarea",className:t.attachmentCaptionEditor,attributes:{placeholder:r.captionPlaceholder},data:{trixMutable:!0}})).value=this.attachmentPiece.getCaption(),(l=c.cloneNode()).classList.add("trix-autoresize-clone"),l.tabIndex=-1,i=function(){return l.value=c.value,c.style.height=l.scrollHeight+"px"},n("input",{onElement:c,withCallback:i}),n("input",{onElement:c,withCallback:this.didInputCaption}),n("keydown",{onElement:c,withCallback:this.didKeyDownCaption}),n("change",{onElement:c,withCallback:this.didChangeCaption}),n("blur",{onElement:c,withCallback:this.didBlurCaption}),u=this.element.querySelector("figcaption"),a=u.cloneNode(),{do:function(n){return function(){return u.style.display="none",a.appendChild(c),a.appendChild(l),a.classList.add(t.attachmentCaption+"--editing"),u.parentElement.insertBefore(a,u),i(),n.options.editCaption?e((function(){return c.focus()})):void 0}}(this),undo:function(){return o.removeNode(a),u.style.display=null}}})),h.prototype.didClickToolbar=function(t){return t.preventDefault(),t.stopPropagation()},h.prototype.didClickActionButton=function(t){var e;if("remove"===t.target.getAttribute("data-trix-action"))return null!=(e=this.delegate)?e.attachmentEditorDidRequestRemovalOfAttachment(this.attachment):void 0},h.prototype.didKeyDownCaption=function(t){var e;return"return"===i[t.keyCode]?(t.preventDefault(),this.savePendingCaption(),null!=(e=this.delegate)&&"function"==typeof e.attachmentEditorDidRequestDeselectingAttachment?e.attachmentEditorDidRequestDeselectingAttachment(this.attachment):void 0):void 0},h.prototype.didInputCaption=function(t){return this.pendingCaption=t.target.value.replace(/\s/g," ").trim()},h.prototype.didChangeCaption=function(){return this.savePendingCaption()},h.prototype.didBlurCaption=function(){return this.savePendingCaption()},h}(o.BasicObject)}.call(this),function(){var t,e,n,i=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;n=o.makeElement,t=o.config.css,o.AttachmentView=function(r){function s(){s.__super__.constructor.apply(this,arguments),this.attachment=this.object,this.attachment.uploadProgressDelegate=this,this.attachmentPiece=this.options.piece}var a;return i(s,r),s.attachmentSelector="[data-trix-attachment]",s.prototype.createContentNodes=function(){return[]},s.prototype.createNodes=function(){var e,i,r,o,s,u,c;if(e=o=n({tagName:"figure",className:this.getClassName(),data:this.getData(),editable:!1}),(i=this.getHref())&&(o=n({tagName:"a",editable:!1,attributes:{href:i,tabindex:-1}}),e.appendChild(o)),this.attachment.hasContent())o.innerHTML=this.attachment.getContent();else for(r=0,s=(c=this.createContentNodes()).length;s>r;r++)u=c[r],o.appendChild(u);return o.appendChild(this.createCaptionElement()),this.attachment.isPending()&&(this.progressElement=n({tagName:"progress",attributes:{class:t.attachmentProgress,value:this.attachment.getUploadProgress(),max:100},data:{trixMutable:!0,trixStoreKey:["progressElement",this.attachment.id].join("/")}}),e.appendChild(this.progressElement)),[a("left"),e,a("right")]},s.prototype.createCaptionElement=function(){var e,i,r,o,s,a,u;return r=n({tagName:"figcaption",className:t.attachmentCaption}),(e=this.attachmentPiece.getCaption())?(r.classList.add(t.attachmentCaption+"--edited"),r.textContent=e):((i=this.getCaptionConfig()).name&&(o=this.attachment.getFilename()),i.size&&(a=this.attachment.getFormattedFilesize()),o&&(s=n({tagName:"span",className:t.attachmentName,textContent:o}),r.appendChild(s)),a&&(o&&r.appendChild(document.createTextNode(" ")),u=n({tagName:"span",className:t.attachmentSize,textContent:a}),r.appendChild(u))),r},s.prototype.getClassName=function(){var e,n;return n=[t.attachment,t.attachment+"--"+this.attachment.getType()],(e=this.attachment.getExtension())&&n.push(t.attachment+"--"+e),n.join(" ")},s.prototype.getData=function(){var t,e;return e={trixAttachment:JSON.stringify(this.attachment),trixContentType:this.attachment.getContentType(),trixId:this.attachment.id},(t=this.attachmentPiece.attributes).isEmpty()||(e.trixAttributes=JSON.stringify(t)),this.attachment.isPending()&&(e.trixSerialize=!1),e},s.prototype.getHref=function(){return e(this.attachment.getContent(),"a")?void 0:this.attachment.getHref()},s.prototype.getCaptionConfig=function(){var t,e,n;return n=this.attachment.getType(),t=o.copyObject(null!=(e=o.config.attachments[n])?e.caption:void 0),"file"===n&&(t.name=!0),t},s.prototype.findProgressElement=function(){var t;return null!=(t=this.findElement())?t.querySelector("progress"):void 0},a=function(t){return n({tagName:"span",textContent:o.ZERO_WIDTH_SPACE,data:{trixCursorTarget:t,trixSerialize:!1}})},s.prototype.attachmentDidChangeUploadProgress=function(){var t,e;return e=this.attachment.getUploadProgress(),null!=(t=this.findProgressElement())?t.value=e:void 0},s}(o.ObjectView),e=function(t,e){var i;return(i=n("div")).innerHTML=null!=t?t:"",i.querySelector(e)}}.call(this),function(){var t,e=function(t,e){function i(){this.constructor=t}for(var r in e)n.call(e,r)&&(t[r]=e[r]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;t=o.makeElement,o.PreviewableAttachmentView=function(n){function i(){i.__super__.constructor.apply(this,arguments),this.attachment.previewDelegate=this}return e(i,n),i.prototype.createContentNodes=function(){return this.image=t({tagName:"img",attributes:{src:""},data:{trixMutable:!0}}),this.refresh(this.image),[this.image]},i.prototype.createCaptionElement=function(){var t;return(t=i.__super__.createCaptionElement.apply(this,arguments)).textContent||t.setAttribute("data-trix-placeholder",o.config.lang.captionPlaceholder),t},i.prototype.refresh=function(t){var e;return null==t&&(t=null!=(e=this.findElement())?e.querySelector("img"):void 0),t?this.updateAttributesForImage(t):void 0},i.prototype.updateAttributesForImage=function(t){var e,n,i,r,o,s;return o=this.attachment.getURL(),n=this.attachment.getPreviewURL(),t.src=n||o,n===o?t.removeAttribute("data-trix-serialized-attributes"):(i=JSON.stringify({src:o}),t.setAttribute("data-trix-serialized-attributes",i)),s=this.attachment.getWidth(),e=this.attachment.getHeight(),null!=s&&(t.width=s),null!=e&&(t.height=e),r=["imageElement",this.attachment.id,t.src,t.width,t.height].join("/"),t.dataset.trixStoreKey=r},i.prototype.attachmentDidChangeAttributes=function(){return this.refresh(this.image),this.refresh()},i}(o.AttachmentView)}.call(this),function(){var t,e,n,i=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;n=o.makeElement,t=o.findInnerElement,e=o.getTextConfig,o.PieceView=function(r){function s(){var t;s.__super__.constructor.apply(this,arguments),this.piece=this.object,this.attributes=this.piece.getAttributes(),t=this.options,this.textConfig=t.textConfig,this.context=t.context,this.piece.attachment?this.attachment=this.piece.attachment:this.string=this.piece.toString()}var a;return i(s,r),s.prototype.createNodes=function(){var e,n,i,r,o,s;if(s=this.attachment?this.createAttachmentNodes():this.createStringNodes(),e=this.createElement()){for(i=t(e),n=0,r=s.length;r>n;n++)o=s[n],i.appendChild(o);s=[e]}return s},s.prototype.createAttachmentNodes=function(){var t;return t=this.attachment.isPreviewable()?o.PreviewableAttachmentView:o.AttachmentView,this.createChildView(t,this.piece.attachment,{piece:this.piece}).getNodes()},s.prototype.createStringNodes=function(){var t,e,i,r,o,s,a,u,c;if(null!=(a=this.textConfig)?a.plaintext:void 0)return[document.createTextNode(this.string)];for(s=[],i=e=0,r=(u=this.string.split("\n")).length;r>e;i=++e)c=u[i],i>0&&(t=n("br"),s.push(t)),c.length&&(o=document.createTextNode(this.preserveSpaces(c)),s.push(o));return s},s.prototype.createElement=function(){var t,i,r,o,s,a,u,c,l;for(o in c={},a=this.attributes)if(l=a[o],(t=e(o))&&(t.tagName&&(s=n(t.tagName),r?(r.appendChild(s),r=s):i=r=s),t.styleProperty&&(c[t.styleProperty]=l),t.style))for(o in u=t.style)l=u[o],c[o]=l;if(Object.keys(c).length)for(o in null==i&&(i=n("span")),c)l=c[o],i.style[o]=l;return i},s.prototype.createContainerElement=function(){var t,i,r,o,s;for(r in o=this.attributes)if(s=o[r],(i=e(r))&&i.groupTagName)return(t={})[r]=s,n(i.groupTagName,t)},a=o.NON_BREAKING_SPACE,s.prototype.preserveSpaces=function(t){return this.context.isLast&&(t=t.replace(/\ $/,a)),t=t.replace(/(\S)\ {3}(\S)/g,"$1 "+a+" $2").replace(/\ {2}/g,a+" ").replace(/\ {2}/g," "+a),(this.context.isFirst||this.context.followsWhitespace)&&(t=t.replace(/^\ /,a)),t},s}(o.ObjectView)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.TextView=function(e){function n(){n.__super__.constructor.apply(this,arguments),this.text=this.object,this.textConfig=this.options.textConfig}var i;return t(n,e),n.prototype.createNodes=function(){var t,e,n,r,s,a,u,c,l,h;for(a=[],r=(c=o.ObjectGroup.groupObjects(this.getPieces())).length-1,n=e=0,s=c.length;s>e;n=++e)u=c[n],t={},0===n&&(t.isFirst=!0),n===r&&(t.isLast=!0),i(l)&&(t.followsWhitespace=!0),h=this.findOrCreateCachedChildView(o.PieceView,u,{textConfig:this.textConfig,context:t}),a.push.apply(a,h.getNodes()),l=u;return a},n.prototype.getPieces=function(){var t,e,n,i,r;for(r=[],t=0,e=(i=this.text.getPieces()).length;e>t;t++)(n=i[t]).hasAttribute("blockBreak")||r.push(n);return r},i=function(t){return/\s$/.test(null!=t?t.toString():void 0)},n}(o.ObjectView)}.call(this),function(){var t,e,n,i=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;n=o.makeElement,e=o.getBlockConfig,t=o.config.css,o.BlockView=function(r){function s(){s.__super__.constructor.apply(this,arguments),this.block=this.object,this.attributes=this.block.getAttributes()}return i(s,r),s.prototype.createNodes=function(){var t,i,r,s,a,u,c,l,h,p;if(u=[document.createComment("block")],this.block.isEmpty()?u.push(n("br")):(h=null!=(c=e(this.block.getLastAttribute()))?c.text:void 0,p=this.findOrCreateCachedChildView(o.TextView,this.block.text,{textConfig:h}),u.push.apply(u,p.getNodes()),this.shouldAddExtraNewlineElement()&&u.push(n("br"))),this.attributes.length)return u;for(l=o.config.blockAttributes.default.tagName,this.block.isRTL()&&(t={dir:"rtl"}),i=n({tagName:l,attributes:t}),r=0,s=u.length;s>r;r++)a=u[r],i.appendChild(a);return[i]},s.prototype.createContainerElement=function(i){var r,o,s,a,u;return r=this.attributes[i],u=e(r).tagName,0===i&&this.block.isRTL()&&(o={dir:"rtl"}),"attachmentGallery"===r&&(a=this.block.getBlockBreakPosition(),s=t.attachmentGallery+" "+t.attachmentGallery+"--"+a),n({tagName:u,className:s,attributes:o})},s.prototype.shouldAddExtraNewlineElement=function(){return/\n\n$/.test(this.block.toString())},s}(o.ObjectView)}.call(this),function(){var t,e,n=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;t=o.defer,e=o.makeElement,o.DocumentView=function(i){function r(){r.__super__.constructor.apply(this,arguments),this.element=this.options.element,this.elementStore=new o.ElementStore,this.setDocument(this.object)}var s,a,u;return n(r,i),r.render=function(t){var n,i;return(i=new this(t,{element:n=e("div")})).render(),i.sync(),n},r.prototype.setDocument=function(t){return t.isEqualTo(this.document)?void 0:this.document=this.object=t},r.prototype.render=function(){var t,n,i,r,s,a,u;if(this.childViews=[],this.shadowElement=e("div"),!this.document.isEmpty()){for(a=[],t=0,n=(s=o.ObjectGroup.groupObjects(this.document.getBlocks(),{asTree:!0})).length;n>t;t++)r=s[t],u=this.findOrCreateCachedChildView(o.BlockView,r),a.push(function(){var t,e,n,r;for(r=[],t=0,e=(n=u.getNodes()).length;e>t;t++)i=n[t],r.push(this.shadowElement.appendChild(i));return r}.call(this));return a}},r.prototype.isSynced=function(){return s(this.shadowElement,this.element)},r.prototype.sync=function(){var t;for(t=this.createDocumentFragmentForSync();this.element.lastChild;)this.element.removeChild(this.element.lastChild);return this.element.appendChild(t),this.didSync()},r.prototype.didSync=function(){return this.elementStore.reset(a(this.element)),t(function(t){return function(){return t.garbageCollectCachedViews()}}(this))},r.prototype.createDocumentFragmentForSync=function(){var t,e,n,i,r,o,s,u,c,l;for(e=document.createDocumentFragment(),n=0,r=(u=this.shadowElement.childNodes).length;r>n;n++)s=u[n],e.appendChild(s.cloneNode(!0));for(i=0,o=(c=a(e)).length;o>i;i++)t=c[i],(l=this.elementStore.remove(t))&&t.parentNode.replaceChild(l,t);return e},a=function(t){return t.querySelectorAll("[data-trix-store-key]")},s=function(t,e){return u(t.innerHTML)===u(e.innerHTML)},u=function(t){return t.replace(/ /g," ")},r}(o.ObjectView)}.call(this),function(){var t,e,n,i,r,s=function(t,e){return function(){return t.apply(e,arguments)}},a=function(t,e){function n(){this.constructor=t}for(var i in e)u.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;n=o.findClosestElementFromNode,i=o.handleEvent,r=o.innerElementIsActive,e=o.defer,t=o.AttachmentView.attachmentSelector,o.CompositionController=function(u){function c(e,n){this.element=e,this.composition=n,this.didClickAttachment=s(this.didClickAttachment,this),this.didBlur=s(this.didBlur,this),this.didFocus=s(this.didFocus,this),this.documentView=new o.DocumentView(this.composition.document,{element:this.element}),i("focus",{onElement:this.element,withCallback:this.didFocus}),i("blur",{onElement:this.element,withCallback:this.didBlur}),i("click",{onElement:this.element,matchingSelector:"a[contenteditable=false]",preventDefault:!0}),i("mousedown",{onElement:this.element,matchingSelector:t,withCallback:this.didClickAttachment}),i("click",{onElement:this.element,matchingSelector:"a"+t,preventDefault:!0})}return a(c,u),c.prototype.didFocus=function(){var t,e,n;return t=function(t){return function(){var e;return t.focused?void 0:(t.focused=!0,null!=(e=t.delegate)&&"function"==typeof e.compositionControllerDidFocus?e.compositionControllerDidFocus():void 0)}}(this),null!=(e=null!=(n=this.blurPromise)?n.then(t):void 0)?e:t()},c.prototype.didBlur=function(){return this.blurPromise=new Promise(function(t){return function(n){return e((function(){var e;return r(t.element)||(t.focused=null,null!=(e=t.delegate)&&"function"==typeof e.compositionControllerDidBlur&&e.compositionControllerDidBlur()),t.blurPromise=null,n()}))}}(this))},c.prototype.didClickAttachment=function(t,e){var i,r,o;return i=this.findAttachmentForElement(e),r=null!=n(t.target,{matchingSelector:"figcaption"}),null!=(o=this.delegate)&&"function"==typeof o.compositionControllerDidSelectAttachment?o.compositionControllerDidSelectAttachment(i,{editCaption:r}):void 0},c.prototype.getSerializableElement=function(){return this.isEditingAttachment()?this.documentView.shadowElement:this.element},c.prototype.render=function(){var t,e,n;return this.revision!==this.composition.revision&&(this.documentView.setDocument(this.composition.document),this.documentView.render(),this.revision=this.composition.revision),this.canSyncDocumentView()&&!this.documentView.isSynced()&&(null!=(t=this.delegate)&&"function"==typeof t.compositionControllerWillSyncDocumentView&&t.compositionControllerWillSyncDocumentView(),this.documentView.sync(),null!=(e=this.delegate)&&"function"==typeof e.compositionControllerDidSyncDocumentView&&e.compositionControllerDidSyncDocumentView()),null!=(n=this.delegate)&&"function"==typeof n.compositionControllerDidRender?n.compositionControllerDidRender():void 0},c.prototype.rerenderViewForObject=function(t){return this.invalidateViewForObject(t),this.render()},c.prototype.invalidateViewForObject=function(t){return this.documentView.invalidateViewForObject(t)},c.prototype.isViewCachingEnabled=function(){return this.documentView.isViewCachingEnabled()},c.prototype.enableViewCaching=function(){return this.documentView.enableViewCaching()},c.prototype.disableViewCaching=function(){return this.documentView.disableViewCaching()},c.prototype.refreshViewCache=function(){return this.documentView.garbageCollectCachedViews()},c.prototype.isEditingAttachment=function(){return null!=this.attachmentEditor},c.prototype.installAttachmentEditorForAttachment=function(t,e){var n,i,r;if((null!=(r=this.attachmentEditor)?r.attachment:void 0)!==t&&(i=this.documentView.findElementForObject(t)))return this.uninstallAttachmentEditor(),n=this.composition.document.getAttachmentPieceForAttachment(t),this.attachmentEditor=new o.AttachmentEditorController(n,i,this.element,e),this.attachmentEditor.delegate=this},c.prototype.uninstallAttachmentEditor=function(){var t;return null!=(t=this.attachmentEditor)?t.uninstall():void 0},c.prototype.didUninstallAttachmentEditor=function(){return this.attachmentEditor=null,this.render()},c.prototype.attachmentEditorDidRequestUpdatingAttributesForAttachment=function(t,e){var n;return null!=(n=this.delegate)&&"function"==typeof n.compositionControllerWillUpdateAttachment&&n.compositionControllerWillUpdateAttachment(e),this.composition.updateAttributesForAttachment(t,e)},c.prototype.attachmentEditorDidRequestRemovingAttributeForAttachment=function(t,e){var n;return null!=(n=this.delegate)&&"function"==typeof n.compositionControllerWillUpdateAttachment&&n.compositionControllerWillUpdateAttachment(e),this.composition.removeAttributeForAttachment(t,e)},c.prototype.attachmentEditorDidRequestRemovalOfAttachment=function(t){var e;return null!=(e=this.delegate)&&"function"==typeof e.compositionControllerDidRequestRemovalOfAttachment?e.compositionControllerDidRequestRemovalOfAttachment(t):void 0},c.prototype.attachmentEditorDidRequestDeselectingAttachment=function(t){var e;return null!=(e=this.delegate)&&"function"==typeof e.compositionControllerDidRequestDeselectingAttachment?e.compositionControllerDidRequestDeselectingAttachment(t):void 0},c.prototype.canSyncDocumentView=function(){return!this.isEditingAttachment()},c.prototype.findAttachmentForElement=function(t){return this.composition.document.getAttachmentById(parseInt(t.dataset.trixId,10))},c}(o.BasicObject)}.call(this),function(){var t,e,n,i=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;e=o.handleEvent,n=o.triggerEvent,t=o.findClosestElementFromNode,o.ToolbarController=function(o){function s(t){this.element=t,this.didKeyDownDialogInput=i(this.didKeyDownDialogInput,this),this.didClickDialogButton=i(this.didClickDialogButton,this),this.didClickAttributeButton=i(this.didClickAttributeButton,this),this.didClickActionButton=i(this.didClickActionButton,this),this.attributes={},this.actions={},this.resetDialogInputs(),e("mousedown",{onElement:this.element,matchingSelector:a,withCallback:this.didClickActionButton}),e("mousedown",{onElement:this.element,matchingSelector:c,withCallback:this.didClickAttributeButton}),e("click",{onElement:this.element,matchingSelector:y,preventDefault:!0}),e("click",{onElement:this.element,matchingSelector:l,withCallback:this.didClickDialogButton}),e("keydown",{onElement:this.element,matchingSelector:h,withCallback:this.didKeyDownDialogInput})}var a,u,c,l,h,p,d,f,g,m,y;return r(s,o),y=(c="[data-trix-attribute]")+", "+(a="[data-trix-action]"),u=(p="[data-trix-dialog]")+"[data-trix-active]",l=p+" [data-trix-method]",h=p+" [data-trix-input]",s.prototype.didClickActionButton=function(t,e){var n,i,r;return null!=(i=this.delegate)&&i.toolbarDidClickButton(),t.preventDefault(),n=d(e),this.getDialog(n)?this.toggleDialog(n):null!=(r=this.delegate)?r.toolbarDidInvokeAction(n):void 0},s.prototype.didClickAttributeButton=function(t,e){var n,i,r;return null!=(i=this.delegate)&&i.toolbarDidClickButton(),t.preventDefault(),n=f(e),this.getDialog(n)?this.toggleDialog(n):null!=(r=this.delegate)&&r.toolbarDidToggleAttribute(n),this.refreshAttributeButtons()},s.prototype.didClickDialogButton=function(e,n){var i;return i=t(n,{matchingSelector:p}),this[n.getAttribute("data-trix-method")].call(this,i)},s.prototype.didKeyDownDialogInput=function(t,e){var n,i;return 13===t.keyCode&&(t.preventDefault(),n=e.getAttribute("name"),i=this.getDialog(n),this.setAttribute(i)),27===t.keyCode?(t.preventDefault(),this.hideDialog()):void 0},s.prototype.updateActions=function(t){return this.actions=t,this.refreshActionButtons()},s.prototype.refreshActionButtons=function(){return this.eachActionButton(function(t){return function(e,n){return e.disabled=!1===t.actions[n]}}(this))},s.prototype.eachActionButton=function(t){var e,n,i,r,o;for(o=[],n=0,i=(r=this.element.querySelectorAll(a)).length;i>n;n++)e=r[n],o.push(t(e,d(e)));return o},s.prototype.updateAttributes=function(t){return this.attributes=t,this.refreshAttributeButtons()},s.prototype.refreshAttributeButtons=function(){return this.eachAttributeButton(function(t){return function(e,n){return e.disabled=!1===t.attributes[n],t.attributes[n]||t.dialogIsVisible(n)?(e.setAttribute("data-trix-active",""),e.classList.add("trix-active")):(e.removeAttribute("data-trix-active"),e.classList.remove("trix-active"))}}(this))},s.prototype.eachAttributeButton=function(t){var e,n,i,r,o;for(o=[],n=0,i=(r=this.element.querySelectorAll(c)).length;i>n;n++)e=r[n],o.push(t(e,f(e)));return o},s.prototype.applyKeyboardCommand=function(t){var e,i,r,o,s,a;for(o=JSON.stringify(t.sort()),r=0,s=(a=this.element.querySelectorAll("[data-trix-key]")).length;s>r;r++)if(i=(e=a[r]).getAttribute("data-trix-key").split("+"),JSON.stringify(i.sort())===o)return n("mousedown",{onElement:e}),!0;return!1},s.prototype.dialogIsVisible=function(t){var e;return(e=this.getDialog(t))?e.hasAttribute("data-trix-active"):void 0},s.prototype.toggleDialog=function(t){return this.dialogIsVisible(t)?this.hideDialog():this.showDialog(t)},s.prototype.showDialog=function(t){var e,n,i,r,o,s,a,u,c;for(this.hideDialog(),null!=(s=this.delegate)&&s.toolbarWillShowDialog(),(n=this.getDialog(t)).setAttribute("data-trix-active",""),n.classList.add("trix-active"),i=0,o=(a=n.querySelectorAll("input[disabled]")).length;o>i;i++)a[i].removeAttribute("disabled");return(e=f(n))&&(r=m(n,t))&&(r.value=null!=(u=this.attributes[e])?u:"",r.select()),null!=(c=this.delegate)?c.toolbarDidShowDialog(t):void 0},s.prototype.setAttribute=function(t){var e,n,i;return e=f(t),(n=m(t,e)).willValidate&&!n.checkValidity()?(n.setAttribute("data-trix-validate",""),n.classList.add("trix-validate"),n.focus()):(null!=(i=this.delegate)&&i.toolbarDidUpdateAttribute(e,n.value),this.hideDialog())},s.prototype.removeAttribute=function(t){var e,n;return e=f(t),null!=(n=this.delegate)&&n.toolbarDidRemoveAttribute(e),this.hideDialog()},s.prototype.hideDialog=function(){var t,e;return(t=this.element.querySelector(u))?(t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"),this.resetDialogInputs(),null!=(e=this.delegate)?e.toolbarDidHideDialog(g(t)):void 0):void 0},s.prototype.resetDialogInputs=function(){var t,e,n,i,r;for(r=[],t=0,n=(i=this.element.querySelectorAll(h)).length;n>t;t++)(e=i[t]).setAttribute("disabled","disabled"),e.removeAttribute("data-trix-validate"),r.push(e.classList.remove("trix-validate"));return r},s.prototype.getDialog=function(t){return this.element.querySelector("[data-trix-dialog="+t+"]")},m=function(t,e){return null==e&&(e=f(t)),t.querySelector("[data-trix-input][name='"+e+"']")},d=function(t){return t.getAttribute("data-trix-action")},f=function(t){var e;return null!=(e=t.getAttribute("data-trix-attribute"))?e:t.getAttribute("data-trix-dialog-attribute")},g=function(t){return t.getAttribute("data-trix-dialog")},s}(o.BasicObject)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.ImagePreloadOperation=function(e){function n(t){this.url=t}return t(n,e),n.prototype.perform=function(t){var e;return(e=new Image).onload=function(n){return function(){return e.width=n.width=e.naturalWidth,e.height=n.height=e.naturalHeight,t(!0,e)}}(this),e.onerror=function(){return t(!1)},e.src=this.url},n}(o.Operation)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.Attachment=function(e){function n(t){null==t&&(t={}),this.releaseFile=function(t,e){return function(){return t.apply(e,arguments)}}(this.releaseFile,this),n.__super__.constructor.apply(this,arguments),this.attributes=o.Hash.box(t),this.didChangeAttributes()}return t(n,e),n.previewablePattern=/^image(\/(gif|png|jpe?g)|$)/,n.attachmentForFile=function(t){var e;return(e=new this(this.attributesForFile(t))).setFile(t),e},n.attributesForFile=function(t){return new o.Hash({filename:t.name,filesize:t.size,contentType:t.type})},n.fromJSON=function(t){return new this(t)},n.prototype.getAttribute=function(t){return this.attributes.get(t)},n.prototype.hasAttribute=function(t){return this.attributes.has(t)},n.prototype.getAttributes=function(){return this.attributes.toObject()},n.prototype.setAttributes=function(t){var e,n,i;return null==t&&(t={}),e=this.attributes.merge(t),this.attributes.isEqualTo(e)?void 0:(this.attributes=e,this.didChangeAttributes(),null!=(n=this.previewDelegate)&&"function"==typeof n.attachmentDidChangeAttributes&&n.attachmentDidChangeAttributes(this),null!=(i=this.delegate)&&"function"==typeof i.attachmentDidChangeAttributes?i.attachmentDidChangeAttributes(this):void 0)},n.prototype.didChangeAttributes=function(){return this.isPreviewable()?this.preloadURL():void 0},n.prototype.isPending=function(){return null!=this.file&&!(this.getURL()||this.getHref())},n.prototype.isPreviewable=function(){return this.attributes.has("previewable")?this.attributes.get("previewable"):this.constructor.previewablePattern.test(this.getContentType())},n.prototype.getType=function(){return this.hasContent()?"content":this.isPreviewable()?"preview":"file"},n.prototype.getURL=function(){return this.attributes.get("url")},n.prototype.getHref=function(){return this.attributes.get("href")},n.prototype.getFilename=function(){var t;return null!=(t=this.attributes.get("filename"))?t:""},n.prototype.getFilesize=function(){return this.attributes.get("filesize")},n.prototype.getFormattedFilesize=function(){var t;return"number"==typeof(t=this.attributes.get("filesize"))?o.config.fileSize.formatter(t):""},n.prototype.getExtension=function(){var t;return null!=(t=this.getFilename().match(/\.(\w+)$/))?t[1].toLowerCase():void 0},n.prototype.getContentType=function(){return this.attributes.get("contentType")},n.prototype.hasContent=function(){return this.attributes.has("content")},n.prototype.getContent=function(){return this.attributes.get("content")},n.prototype.getWidth=function(){return this.attributes.get("width")},n.prototype.getHeight=function(){return this.attributes.get("height")},n.prototype.getFile=function(){return this.file},n.prototype.setFile=function(t){return this.file=t,this.isPreviewable()?this.preloadFile():void 0},n.prototype.releaseFile=function(){return this.releasePreloadedFile(),this.file=null},n.prototype.getUploadProgress=function(){var t;return null!=(t=this.uploadProgress)?t:0},n.prototype.setUploadProgress=function(t){var e;return this.uploadProgress!==t?(this.uploadProgress=t,null!=(e=this.uploadProgressDelegate)&&"function"==typeof e.attachmentDidChangeUploadProgress?e.attachmentDidChangeUploadProgress(this):void 0):void 0},n.prototype.toJSON=function(){return this.getAttributes()},n.prototype.getCacheKey=function(){return[n.__super__.getCacheKey.apply(this,arguments),this.attributes.getCacheKey(),this.getPreviewURL()].join("/")},n.prototype.getPreviewURL=function(){return this.previewURL||this.preloadingURL},n.prototype.setPreviewURL=function(t){var e,n;return t!==this.getPreviewURL()?(this.previewURL=t,null!=(e=this.previewDelegate)&&"function"==typeof e.attachmentDidChangeAttributes&&e.attachmentDidChangeAttributes(this),null!=(n=this.delegate)&&"function"==typeof n.attachmentDidChangePreviewURL?n.attachmentDidChangePreviewURL(this):void 0):void 0},n.prototype.preloadURL=function(){return this.preload(this.getURL(),this.releaseFile)},n.prototype.preloadFile=function(){return this.file?(this.fileObjectURL=URL.createObjectURL(this.file),this.preload(this.fileObjectURL)):void 0},n.prototype.releasePreloadedFile=function(){return this.fileObjectURL?(URL.revokeObjectURL(this.fileObjectURL),this.fileObjectURL=null):void 0},n.prototype.preload=function(t,e){return t&&t!==this.getPreviewURL()?(this.preloadingURL=t,new o.ImagePreloadOperation(t).then(function(n){return function(i){var r,o;return o=i.width,r=i.height,n.getWidth()&&n.getHeight()||n.setAttributes({width:o,height:r}),n.preloadingURL=null,n.setPreviewURL(t),"function"==typeof e?e():void 0}}(this)).catch(function(t){return function(){return t.preloadingURL=null,"function"==typeof e?e():void 0}}(this))):void 0},n}(o.Object)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.Piece=function(e){function n(t,e){null==e&&(e={}),n.__super__.constructor.apply(this,arguments),this.attributes=o.Hash.box(e)}return t(n,e),n.types={},n.registerType=function(t,e){return e.type=t,this.types[t]=e},n.fromJSON=function(t){var e;return(e=this.types[t.type])?e.fromJSON(t):void 0},n.prototype.copyWithAttributes=function(t){return new this.constructor(this.getValue(),t)},n.prototype.copyWithAdditionalAttributes=function(t){return this.copyWithAttributes(this.attributes.merge(t))},n.prototype.copyWithoutAttribute=function(t){return this.copyWithAttributes(this.attributes.remove(t))},n.prototype.copy=function(){return this.copyWithAttributes(this.attributes)},n.prototype.getAttribute=function(t){return this.attributes.get(t)},n.prototype.getAttributesHash=function(){return this.attributes},n.prototype.getAttributes=function(){return this.attributes.toObject()},n.prototype.getCommonAttributes=function(){var t,e,n;return(n=pieceList.getPieceAtIndex(0))?(t=n.attributes,e=t.getKeys(),pieceList.eachPiece((function(n){return e=t.getKeysCommonToHash(n.attributes),t=t.slice(e)})),t.toObject()):{}},n.prototype.hasAttribute=function(t){return this.attributes.has(t)},n.prototype.hasSameStringValueAsPiece=function(t){return null!=t&&this.toString()===t.toString()},n.prototype.hasSameAttributesAsPiece=function(t){return null!=t&&(this.attributes===t.attributes||this.attributes.isEqualTo(t.attributes))},n.prototype.isBlockBreak=function(){return!1},n.prototype.isEqualTo=function(t){return n.__super__.isEqualTo.apply(this,arguments)||this.hasSameConstructorAs(t)&&this.hasSameStringValueAsPiece(t)&&this.hasSameAttributesAsPiece(t)},n.prototype.isEmpty=function(){return 0===this.length},n.prototype.isSerializable=function(){return!0},n.prototype.toJSON=function(){return{type:this.constructor.type,attributes:this.getAttributes()}},n.prototype.contentsForInspection=function(){return{type:this.constructor.type,attributes:this.attributes.inspect()}},n.prototype.canBeGrouped=function(){return this.hasAttribute("href")},n.prototype.canBeGroupedWith=function(t){return this.getAttribute("href")===t.getAttribute("href")},n.prototype.getLength=function(){return this.length},n.prototype.canBeConsolidatedWith=function(){return!1},n}(o.Object)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.Piece.registerType("attachment",o.AttachmentPiece=function(e){function n(t){this.attachment=t,n.__super__.constructor.apply(this,arguments),this.length=1,this.ensureAttachmentExclusivelyHasAttribute("href"),this.attachment.hasContent()||this.removeProhibitedAttributes()}return t(n,e),n.fromJSON=function(t){return new this(o.Attachment.fromJSON(t.attachment),t.attributes)},n.permittedAttributes=["caption","presentation"],n.prototype.ensureAttachmentExclusivelyHasAttribute=function(t){return this.hasAttribute(t)?(this.attachment.hasAttribute(t)||this.attachment.setAttributes(this.attributes.slice(t)),this.attributes=this.attributes.remove(t)):void 0},n.prototype.removeProhibitedAttributes=function(){var t;return(t=this.attributes.slice(this.constructor.permittedAttributes)).isEqualTo(this.attributes)?void 0:this.attributes=t},n.prototype.getValue=function(){return this.attachment},n.prototype.isSerializable=function(){return!this.attachment.isPending()},n.prototype.getCaption=function(){var t;return null!=(t=this.attributes.get("caption"))?t:""},n.prototype.isEqualTo=function(t){var e;return n.__super__.isEqualTo.apply(this,arguments)&&this.attachment.id===(null!=t&&null!=(e=t.attachment)?e.id:void 0)},n.prototype.toString=function(){return o.OBJECT_REPLACEMENT_CHARACTER},n.prototype.toJSON=function(){var t;return(t=n.__super__.toJSON.apply(this,arguments)).attachment=this.attachment,t},n.prototype.getCacheKey=function(){return[n.__super__.getCacheKey.apply(this,arguments),this.attachment.getCacheKey()].join("/")},n.prototype.toConsole=function(){return JSON.stringify(this.toString())},n}(o.Piece))}.call(this),function(){var t,e=function(t,e){function i(){this.constructor=t}for(var r in e)n.call(e,r)&&(t[r]=e[r]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;t=o.normalizeNewlines,o.Piece.registerType("string",o.StringPiece=function(n){function i(e){i.__super__.constructor.apply(this,arguments),this.string=t(e),this.length=this.string.length}return e(i,n),i.fromJSON=function(t){return new this(t.string,t.attributes)},i.prototype.getValue=function(){return this.string},i.prototype.toString=function(){return this.string.toString()},i.prototype.isBlockBreak=function(){return"\n"===this.toString()&&!0===this.getAttribute("blockBreak")},i.prototype.toJSON=function(){var t;return(t=i.__super__.toJSON.apply(this,arguments)).string=this.string,t},i.prototype.canBeConsolidatedWith=function(t){return null!=t&&this.hasSameConstructorAs(t)&&this.hasSameAttributesAsPiece(t)},i.prototype.consolidateWith=function(t){return new this.constructor(this.toString()+t.toString(),this.attributes)},i.prototype.splitAtOffset=function(t){var e,n;return 0===t?(e=null,n=this):t===this.length?(e=this,n=null):(e=new this.constructor(this.string.slice(0,t),this.attributes),n=new this.constructor(this.string.slice(t),this.attributes)),[e,n]},i.prototype.toConsole=function(){var t;return(t=this.string).length>15&&(t=t.slice(0,14)+"…"),JSON.stringify(t.toString())},i}(o.Piece))}.call(this),function(){var t,e=function(t,e){function i(){this.constructor=t}for(var r in e)n.call(e,r)&&(t[r]=e[r]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty,i=[].slice;t=o.spliceArray,o.SplittableList=function(n){function r(t){null==t&&(t=[]),r.__super__.constructor.apply(this,arguments),this.objects=t.slice(0),this.length=this.objects.length}var o,s,a;return e(r,n),r.box=function(t){return t instanceof this?t:new this(t)},r.prototype.indexOf=function(t){return this.objects.indexOf(t)},r.prototype.splice=function(){var e;return e=1<=arguments.length?i.call(arguments,0):[],new this.constructor(t.apply(null,[this.objects].concat(i.call(e))))},r.prototype.eachObject=function(t){var e,n,i,r,o,s;for(s=[],n=e=0,i=(o=this.objects).length;i>e;n=++e)r=o[n],s.push(t(r,n));return s},r.prototype.insertObjectAtIndex=function(t,e){return this.splice(e,0,t)},r.prototype.insertSplittableListAtIndex=function(t,e){return this.splice.apply(this,[e,0].concat(i.call(t.objects)))},r.prototype.insertSplittableListAtPosition=function(t,e){var n,i,r;return i=(r=this.splitObjectAtPosition(e))[0],n=r[1],new this.constructor(i).insertSplittableListAtIndex(t,n)},r.prototype.editObjectAtIndex=function(t,e){return this.replaceObjectAtIndex(e(this.objects[t]),t)},r.prototype.replaceObjectAtIndex=function(t,e){return this.splice(e,1,t)},r.prototype.removeObjectAtIndex=function(t){return this.splice(t,1)},r.prototype.getObjectAtIndex=function(t){return this.objects[t]},r.prototype.getSplittableListInRange=function(t){var e,n,i,r;return n=(i=this.splitObjectsAtRange(t))[0],e=i[1],r=i[2],new this.constructor(n.slice(e,r+1))},r.prototype.selectSplittableList=function(t){var e,n;return n=function(){var n,i,r,o;for(o=[],n=0,i=(r=this.objects).length;i>n;n++)e=r[n],t(e)&&o.push(e);return o}.call(this),new this.constructor(n)},r.prototype.removeObjectsInRange=function(t){var e,n,i,r;return n=(i=this.splitObjectsAtRange(t))[0],e=i[1],r=i[2],new this.constructor(n).splice(e,r-e+1)},r.prototype.transformObjectsInRange=function(t,e){var n,i,r,o,s,a,u;return s=this.splitObjectsAtRange(t),o=s[0],i=s[1],a=s[2],u=function(){var t,s,u;for(u=[],n=t=0,s=o.length;s>t;n=++t)r=o[n],u.push(n>=i&&a>=n?e(r):r);return u}(),new this.constructor(u)},r.prototype.splitObjectsAtRange=function(t){var e,n,i,r,s;return n=(r=this.splitObjectAtPosition(a(t)))[0],e=r[1],i=r[2],[n=(s=new this.constructor(n).splitObjectAtPosition(o(t)+i))[0],e,s[1]-1]},r.prototype.getObjectAtPosition=function(t){var e,n;return e=(n=this.findIndexAndOffsetAtPosition(t)).index,n.offset,this.objects[e]},r.prototype.splitObjectAtPosition=function(t){var e,n,i,r,o,s,a,u,c;return e=(o=this.findIndexAndOffsetAtPosition(t)).index,r=o.offset,i=this.objects.slice(0),null!=e?0===r?(u=e,c=0):(n=(s=this.getObjectAtIndex(e).splitAtOffset(r))[0],a=s[1],i.splice(e,1,n,a),u=e+1,c=n.getLength()-r):(u=i.length,c=0),[i,u,c]},r.prototype.consolidate=function(){var t,e,n,i,r,o;for(i=[],r=this.objects[0],t=0,e=(o=this.objects.slice(1)).length;e>t;t++)n=o[t],("function"==typeof r.canBeConsolidatedWith?r.canBeConsolidatedWith(n):void 0)?r=r.consolidateWith(n):(i.push(r),r=n);return null!=r&&i.push(r),new this.constructor(i)},r.prototype.consolidateFromIndexToIndex=function(t,e){var n,r;return r=this.objects.slice(0).slice(t,e+1),n=new this.constructor(r).consolidate().toArray(),this.splice.apply(this,[t,r.length].concat(i.call(n)))},r.prototype.findIndexAndOffsetAtPosition=function(t){var e,n,i,r,o,s;for(e=0,i=n=0,r=(s=this.objects).length;r>n;i=++n){if(o=e+s[i].getLength(),t>=e&&o>t)return{index:i,offset:t-e};e=o}return{index:null,offset:null}},r.prototype.findPositionAtIndexAndOffset=function(t,e){var n,i,r,o,s,a;for(s=0,n=i=0,r=(a=this.objects).length;r>i;n=++i)if(o=a[n],t>n)s+=o.getLength();else if(n===t){s+=e;break}return s},r.prototype.getEndPosition=function(){var t,e;return null!=this.endPosition?this.endPosition:this.endPosition=function(){var n,i,r;for(e=0,n=0,i=(r=this.objects).length;i>n;n++)t=r[n],e+=t.getLength();return e}.call(this)},r.prototype.toString=function(){return this.objects.join("")},r.prototype.toArray=function(){return this.objects.slice(0)},r.prototype.toJSON=function(){return this.toArray()},r.prototype.isEqualTo=function(t){return r.__super__.isEqualTo.apply(this,arguments)||s(this.objects,null!=t?t.objects:void 0)},s=function(t,e){var n,i,r,o,s;if(null==e&&(e=[]),t.length!==e.length)return!1;for(s=!0,i=n=0,r=t.length;r>n;i=++n)o=t[i],s&&!o.isEqualTo(e[i])&&(s=!1);return s},r.prototype.contentsForInspection=function(){var t;return{objects:"["+function(){var e,n,i,r;for(r=[],e=0,n=(i=this.objects).length;n>e;e++)t=i[e],r.push(t.inspect());return r}.call(this).join(", ")+"]"}},a=function(t){return t[0]},o=function(t){return t[1]},r}(o.Object)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.Text=function(e){function n(t){var e;null==t&&(t=[]),n.__super__.constructor.apply(this,arguments),this.pieceList=new o.SplittableList(function(){var n,i,r;for(r=[],n=0,i=t.length;i>n;n++)(e=t[n]).isEmpty()||r.push(e);return r}())}return t(n,e),n.textForAttachmentWithAttributes=function(t,e){return new this([new o.AttachmentPiece(t,e)])},n.textForStringWithAttributes=function(t,e){return new this([new o.StringPiece(t,e)])},n.fromJSON=function(t){var e;return new this(function(){var n,i,r;for(r=[],n=0,i=t.length;i>n;n++)e=t[n],r.push(o.Piece.fromJSON(e));return r}())},n.prototype.copy=function(){return this.copyWithPieceList(this.pieceList)},n.prototype.copyWithPieceList=function(t){return new this.constructor(t.consolidate().toArray())},n.prototype.copyUsingObjectMap=function(t){var e,n;return n=function(){var n,i,r,o,s;for(s=[],n=0,i=(r=this.getPieces()).length;i>n;n++)e=r[n],s.push(null!=(o=t.find(e))?o:e);return s}.call(this),new this.constructor(n)},n.prototype.appendText=function(t){return this.insertTextAtPosition(t,this.getLength())},n.prototype.insertTextAtPosition=function(t,e){return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(t.pieceList,e))},n.prototype.removeTextAtRange=function(t){return this.copyWithPieceList(this.pieceList.removeObjectsInRange(t))},n.prototype.replaceTextAtRange=function(t,e){return this.removeTextAtRange(e).insertTextAtPosition(t,e[0])},n.prototype.moveTextFromRangeToPosition=function(t,e){var n,i;if(!(t[0]<=e&&e<=t[1]))return n=(i=this.getTextAtRange(t)).getLength(),t[0]t;t++)e=i[t],r.push(e.getAttributes());return r}.call(this),o.Hash.fromCommonAttributesOfObjects(t).toObject()},n.prototype.getCommonAttributesAtRange=function(t){var e;return null!=(e=this.getTextAtRange(t).getCommonAttributes())?e:{}},n.prototype.getExpandedRangeForAttributeAtOffset=function(t,e){var n,i,r;for(n=r=e,i=this.getLength();n>0&&this.getCommonAttributesAtRange([n-1,r])[t];)n--;for(;i>r&&this.getCommonAttributesAtRange([e,r+1])[t];)r++;return[n,r]},n.prototype.getTextAtRange=function(t){return this.copyWithPieceList(this.pieceList.getSplittableListInRange(t))},n.prototype.getStringAtRange=function(t){return this.pieceList.getSplittableListInRange(t).toString()},n.prototype.getStringAtPosition=function(t){return this.getStringAtRange([t,t+1])},n.prototype.startsWithString=function(t){return this.getStringAtRange([0,t.length])===t},n.prototype.endsWithString=function(t){var e;return e=this.getLength(),this.getStringAtRange([e-t.length,e])===t},n.prototype.getAttachmentPieces=function(){var t,e,n,i,r;for(r=[],t=0,e=(i=this.pieceList.toArray()).length;e>t;t++)null!=(n=i[t]).attachment&&r.push(n);return r},n.prototype.getAttachments=function(){var t,e,n,i,r;for(r=[],t=0,e=(i=this.getAttachmentPieces()).length;e>t;t++)n=i[t],r.push(n.attachment);return r},n.prototype.getAttachmentAndPositionById=function(t){var e,n,i,r,o,s;for(r=0,e=0,n=(o=this.pieceList.toArray()).length;n>e;e++){if((null!=(s=(i=o[e]).attachment)?s.id:void 0)===t)return{attachment:i.attachment,position:r};r+=i.length}return{attachment:null,position:null}},n.prototype.getAttachmentById=function(t){var e,n;return e=(n=this.getAttachmentAndPositionById(t)).attachment,n.position,e},n.prototype.getRangeOfAttachment=function(t){var e,n;return t=(n=this.getAttachmentAndPositionById(t.id)).attachment,e=n.position,null!=t?[e,e+1]:void 0},n.prototype.updateAttributesForAttachment=function(t,e){var n;return(n=this.getRangeOfAttachment(e))?this.addAttributesAtRange(t,n):this},n.prototype.getLength=function(){return this.pieceList.getEndPosition()},n.prototype.isEmpty=function(){return 0===this.getLength()},n.prototype.isEqualTo=function(t){var e;return n.__super__.isEqualTo.apply(this,arguments)||(null!=t&&null!=(e=t.pieceList)?e.isEqualTo(this.pieceList):void 0)},n.prototype.isBlockBreak=function(){return 1===this.getLength()&&this.pieceList.getObjectAtIndex(0).isBlockBreak()},n.prototype.eachPiece=function(t){return this.pieceList.eachObject(t)},n.prototype.getPieces=function(){return this.pieceList.toArray()},n.prototype.getPieceAtPosition=function(t){return this.pieceList.getObjectAtPosition(t)},n.prototype.contentsForInspection=function(){return{pieceList:this.pieceList.inspect()}},n.prototype.toSerializableText=function(){var t;return t=this.pieceList.selectSplittableList((function(t){return t.isSerializable()})),this.copyWithPieceList(t)},n.prototype.toString=function(){return this.pieceList.toString()},n.prototype.toJSON=function(){return this.pieceList.toJSON()},n.prototype.toConsole=function(){var t;return JSON.stringify(function(){var e,n,i,r;for(r=[],e=0,n=(i=this.pieceList.toArray()).length;n>e;e++)t=i[e],r.push(JSON.parse(t.toConsole()));return r}.call(this))},n.prototype.getDirection=function(){return o.getDirection(this.toString())},n.prototype.isRTL=function(){return"rtl"===this.getDirection()},n}(o.Object)}.call(this),function(){var t,e,n,i,r=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty,a=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},u=[].slice;t=o.arraysAreEqual,i=o.spliceArray,e=o.getBlockConfig,o.getBlockAttributeNames,n=o.getListAttributeNames,o.Block=function(s){function c(t,e){null==t&&(t=new o.Text),null==e&&(e=[]),c.__super__.constructor.apply(this,arguments),this.text=h(t),this.attributes=e}var l,h,p,d,f,g,m,y,v;return r(c,s),c.fromJSON=function(t){return new this(o.Text.fromJSON(t.text),t.attributes)},c.prototype.isEmpty=function(){return this.text.isBlockBreak()},c.prototype.isEqualTo=function(e){return c.__super__.isEqualTo.apply(this,arguments)||this.text.isEqualTo(null!=e?e.text:void 0)&&t(this.attributes,null!=e?e.attributes:void 0)},c.prototype.copyWithText=function(t){return new this.constructor(t,this.attributes)},c.prototype.copyWithoutText=function(){return this.copyWithText(null)},c.prototype.copyWithAttributes=function(t){return new this.constructor(this.text,t)},c.prototype.copyWithoutAttributes=function(){return this.copyWithAttributes(null)},c.prototype.copyUsingObjectMap=function(t){var e;return this.copyWithText((e=t.find(this.text))?e:this.text.copyUsingObjectMap(t))},c.prototype.addAttribute=function(t){var e;return e=this.attributes.concat(d(t)),this.copyWithAttributes(e)},c.prototype.removeAttribute=function(t){var n,i;return i=e(t).listAttribute,n=g(g(this.attributes,t),i),this.copyWithAttributes(n)},c.prototype.removeLastAttribute=function(){return this.removeAttribute(this.getLastAttribute())},c.prototype.getLastAttribute=function(){return f(this.attributes)},c.prototype.getAttributes=function(){return this.attributes.slice(0)},c.prototype.getAttributeLevel=function(){return this.attributes.length},c.prototype.getAttributeAtLevel=function(t){return this.attributes[t-1]},c.prototype.hasAttribute=function(t){return a.call(this.attributes,t)>=0},c.prototype.hasAttributes=function(){return this.getAttributeLevel()>0},c.prototype.getLastNestableAttribute=function(){return f(this.getNestableAttributes())},c.prototype.getNestableAttributes=function(){var t,n,i,r,o;for(o=[],n=0,i=(r=this.attributes).length;i>n;n++)t=r[n],e(t).nestable&&o.push(t);return o},c.prototype.getNestingLevel=function(){return this.getNestableAttributes().length},c.prototype.decreaseNestingLevel=function(){var t;return(t=this.getLastNestableAttribute())?this.removeAttribute(t):this},c.prototype.increaseNestingLevel=function(){var t,e,n;return(t=this.getLastNestableAttribute())?(n=this.attributes.lastIndexOf(t),e=i.apply(null,[this.attributes,n+1,0].concat(u.call(d(t)))),this.copyWithAttributes(e)):this},c.prototype.getListItemAttributes=function(){var t,n,i,r,o;for(o=[],n=0,i=(r=this.attributes).length;i>n;n++)t=r[n],e(t).listAttribute&&o.push(t);return o},c.prototype.isListItem=function(){var t;return null!=(t=e(this.getLastAttribute()))?t.listAttribute:void 0},c.prototype.isTerminalBlock=function(){var t;return null!=(t=e(this.getLastAttribute()))?t.terminal:void 0},c.prototype.breaksOnReturn=function(){var t;return null!=(t=e(this.getLastAttribute()))?t.breakOnReturn:void 0},c.prototype.findLineBreakInDirectionFromPosition=function(t,e){var n,i;return i=this.toString(),-1!==(n=function(){switch(t){case"forward":return i.indexOf("\n",e);case"backward":return i.slice(0,e).lastIndexOf("\n")}}())?n:void 0},c.prototype.contentsForInspection=function(){return{text:this.text.inspect(),attributes:this.attributes}},c.prototype.toString=function(){return this.text.toString()},c.prototype.toJSON=function(){return{text:this.text,attributes:this.attributes}},c.prototype.getDirection=function(){return this.text.getDirection()},c.prototype.isRTL=function(){return this.text.isRTL()},c.prototype.getLength=function(){return this.text.getLength()},c.prototype.canBeConsolidatedWith=function(t){return!this.hasAttributes()&&!t.hasAttributes()&&this.getDirection()===t.getDirection()},c.prototype.consolidateWith=function(t){var e,n;return e=o.Text.textForStringWithAttributes("\n"),n=this.getTextWithoutBlockBreak().appendText(e),this.copyWithText(n.appendText(t.text))},c.prototype.splitAtOffset=function(t){var e,n;return 0===t?(e=null,n=this):t===this.getLength()?(e=this,n=null):(e=this.copyWithText(this.text.getTextAtRange([0,t])),n=this.copyWithText(this.text.getTextAtRange([t,this.getLength()]))),[e,n]},c.prototype.getBlockBreakPosition=function(){return this.text.getLength()-1},c.prototype.getTextWithoutBlockBreak=function(){return m(this.text)?this.text.getTextAtRange([0,this.getBlockBreakPosition()]):this.text.copy()},c.prototype.canBeGrouped=function(t){return this.attributes[t]},c.prototype.canBeGroupedWith=function(t,i){var r,o,s,u;return o=(s=t.getAttributes())[i],!((r=this.attributes[i])!==o||!1===e(r).group&&(u=s[i+1],a.call(n(),u)<0)||this.getDirection()!==t.getDirection()&&!t.isEmpty())},h=function(t){return t=v(t),l(t)},v=function(t){var e,n,i,r,s,a;return r=!1,a=t.getPieces(),n=2<=a.length?u.call(a,0,e=a.length-1):(e=0,[]),null==(i=a[e++])?t:(n=function(){var t,e,i;for(i=[],t=0,e=n.length;e>t;t++)(s=n[t]).isBlockBreak()?(r=!0,i.push(y(s))):i.push(s);return i}(),r?new o.Text(u.call(n).concat([i])):t)},p=o.Text.textForStringWithAttributes("\n",{blockBreak:!0}),l=function(t){return m(t)?t:t.appendText(p)},m=function(t){var e;return 0!==(e=t.getLength())&&t.getTextAtRange([e-1,e]).isBlockBreak()},y=function(t){return t.copyWithoutAttribute("blockBreak")},d=function(t){var n;return null!=(n=e(t).listAttribute)?[n,t]:[t]},f=function(t){return t.slice(-1)[0]},g=function(t,e){var n;return-1===(n=t.lastIndexOf(e))?t:i(t,n,1)},c}(o.Object)}.call(this),function(){var t,e,n,i=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},a=[].slice;e=o.tagName,n=o.walkTree,t=o.nodeIsAttachmentElement,o.HTMLSanitizer=function(r){function u(t,e){var n;n=null!=e?e:{},this.allowedAttributes=n.allowedAttributes,this.forbiddenProtocols=n.forbiddenProtocols,this.forbiddenElements=n.forbiddenElements,null==this.allowedAttributes&&(this.allowedAttributes=c),null==this.forbiddenProtocols&&(this.forbiddenProtocols=h),null==this.forbiddenElements&&(this.forbiddenElements=l),this.body=p(t)}var c,l,h,p;return i(u,r),c="style href src width height class".split(" "),h="javascript:".split(" "),l="script iframe".split(" "),u.sanitize=function(t,e){var n;return(n=new this(t,e)).sanitize(),n},u.prototype.sanitize=function(){return this.sanitizeElements(),this.normalizeListElementNesting()},u.prototype.getHTML=function(){return this.body.innerHTML},u.prototype.getBody=function(){return this.body},u.prototype.sanitizeElements=function(){var t,e,i,r,s;for(s=n(this.body),r=[];s.nextNode();)switch(i=s.currentNode,i.nodeType){case Node.ELEMENT_NODE:this.elementIsRemovable(i)?r.push(i):this.sanitizeElement(i);break;case Node.COMMENT_NODE:r.push(i)}for(t=0,e=r.length;e>t;t++)i=r[t],o.removeNode(i);return this.body},u.prototype.sanitizeElement=function(t){var e,n,i,r,o;for(t.hasAttribute("href")&&(r=t.protocol,s.call(this.forbiddenProtocols,r)>=0&&t.removeAttribute("href")),e=0,n=(o=a.call(t.attributes)).length;n>e;e++)i=o[e].name,s.call(this.allowedAttributes,i)>=0||0===i.indexOf("data-trix")||t.removeAttribute(i);return t},u.prototype.normalizeListElementNesting=function(){var t,n,i,r,o;for(t=0,n=(o=a.call(this.body.querySelectorAll("ul,ol"))).length;n>t;t++)(r=(i=o[t]).previousElementSibling)&&"li"===e(r)&&r.appendChild(i);return this.body},u.prototype.elementIsRemovable=function(t){return(null!=t?t.nodeType:void 0)===Node.ELEMENT_NODE?this.elementIsForbidden(t)||this.elementIsntSerializable(t):void 0},u.prototype.elementIsForbidden=function(t){var n;return n=e(t),s.call(this.forbiddenElements,n)>=0},u.prototype.elementIsntSerializable=function(e){return"false"===e.getAttribute("data-trix-serialize")&&!t(e)},p=function(t){var e,n,i,r,o;for(null==t&&(t=""),t=t.replace(/<\/html[^>]*>[^]*$/i,""),(e=document.implementation.createHTMLDocument("")).documentElement.innerHTML=t,i=0,r=(o=e.head.querySelectorAll("style")).length;r>i;i++)n=o[i],e.body.appendChild(n);return e.body},u}(o.BasicObject)}.call(this),function(){var t,e,n,i,r,s,a,u,c,l,h,p=function(t,e){function n(){this.constructor=t}for(var i in e)d.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},d={}.hasOwnProperty,f=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=o.arraysAreEqual,s=o.makeElement,l=o.tagName,r=o.getBlockTagNames,h=o.walkTree,i=o.findClosestElementFromNode,n=o.elementContainsNode,a=o.nodeIsAttachmentElement,u=o.normalizeSpaces,e=o.breakableWhitespacePattern,c=o.squishBreakableWhitespace,o.HTMLParser=function(d){function g(t,e){this.html=t,this.referenceElement=(null!=e?e:{}).referenceElement,this.blocks=[],this.blockElements=[],this.processedElements=[]}var m,y,v,b,A,C,x,w,E,S,k,R;return p(g,d),g.parse=function(t,e){var n;return(n=new this(t,e)).parse(),n},g.prototype.getDocument=function(){return o.Document.fromJSON(this.blocks)},g.prototype.parse=function(){var t,e;try{for(this.createHiddenContainer(),t=o.HTMLSanitizer.sanitize(this.html).getHTML(),this.containerElement.innerHTML=t,e=h(this.containerElement,{usingFilter:x});e.nextNode();)this.processNode(e.currentNode);return this.translateBlockElementMarginsToNewlines()}finally{this.removeHiddenContainer()}},g.prototype.createHiddenContainer=function(){return this.referenceElement?(this.containerElement=this.referenceElement.cloneNode(!1),this.containerElement.removeAttribute("id"),this.containerElement.setAttribute("data-trix-internal",""),this.containerElement.style.display="none",this.referenceElement.parentNode.insertBefore(this.containerElement,this.referenceElement.nextSibling)):(this.containerElement=s({tagName:"div",style:{display:"none"}}),document.body.appendChild(this.containerElement))},g.prototype.removeHiddenContainer=function(){return o.removeNode(this.containerElement)},x=function(t){return"style"===l(t)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},g.prototype.processNode=function(t){switch(t.nodeType){case Node.TEXT_NODE:if(!this.isInsignificantTextNode(t))return this.appendBlockForTextNode(t),this.processTextNode(t);break;case Node.ELEMENT_NODE:return this.appendBlockForElement(t),this.processElement(t)}},g.prototype.appendBlockForTextNode=function(e){var n,i,r;return(i=e.parentNode)===this.currentBlockElement&&this.isBlockElement(e.previousSibling)?this.appendStringWithAttributes("\n"):i!==this.containerElement&&!this.isBlockElement(i)||(n=this.getBlockAttributes(i),t(n,null!=(r=this.currentBlock)?r.attributes:void 0))?void 0:(this.currentBlock=this.appendBlockForAttributesWithElement(n,i),this.currentBlockElement=i)},g.prototype.appendBlockForElement=function(e){var i,r,o,s;if(o=this.isBlockElement(e),r=n(this.currentBlockElement,e),o&&!this.isBlockElement(e.firstChild)){if((!this.isInsignificantTextNode(e.firstChild)||!this.isBlockElement(e.firstElementChild))&&(i=this.getBlockAttributes(e),e.firstChild))return r&&t(i,this.currentBlock.attributes)?this.appendStringWithAttributes("\n"):(this.currentBlock=this.appendBlockForAttributesWithElement(i,e),this.currentBlockElement=e)}else if(this.currentBlockElement&&!r&&!o)return(s=this.findParentBlockElement(e))?this.appendBlockForElement(s):(this.currentBlock=this.appendEmptyBlock(),this.currentBlockElement=null)},g.prototype.findParentBlockElement=function(t){var e;for(e=t.parentElement;e&&e!==this.containerElement;){if(this.isBlockElement(e)&&f.call(this.blockElements,e)>=0)return e;e=e.parentElement}return null},g.prototype.processTextNode=function(t){var e,n;return n=t.data,y(t.parentNode)||(n=c(n),k(null!=(e=t.previousSibling)?e.textContent:void 0)&&(n=A(n))),this.appendStringWithAttributes(n,this.getTextAttributes(t.parentNode))},g.prototype.processElement=function(t){var e,n,i,r,o;if(a(t))return e=w(t,"attachment"),Object.keys(e).length&&(r=this.getTextAttributes(t),this.appendAttachmentWithAttributes(e,r),t.innerHTML=""),this.processedElements.push(t);switch(l(t)){case"br":return this.isExtraBR(t)||this.isBlockElement(t.nextSibling)||this.appendStringWithAttributes("\n",this.getTextAttributes(t)),this.processedElements.push(t);case"img":for(n in e={url:t.getAttribute("src"),contentType:"image"},i=b(t))o=i[n],e[n]=o;return this.appendAttachmentWithAttributes(e,this.getTextAttributes(t)),this.processedElements.push(t);case"tr":if(t.parentNode.firstChild!==t)return this.appendStringWithAttributes("\n");break;case"td":if(t.parentNode.firstChild!==t)return this.appendStringWithAttributes(" | ")}},g.prototype.appendBlockForAttributesWithElement=function(t,e){var n;return this.blockElements.push(e),n=m(t),this.blocks.push(n),n},g.prototype.appendEmptyBlock=function(){return this.appendBlockForAttributesWithElement([],null)},g.prototype.appendStringWithAttributes=function(t,e){return this.appendPiece(S(t,e))},g.prototype.appendAttachmentWithAttributes=function(t,e){return this.appendPiece(E(t,e))},g.prototype.appendPiece=function(t){return 0===this.blocks.length&&this.appendEmptyBlock(),this.blocks[this.blocks.length-1].text.push(t)},g.prototype.appendStringToTextAtIndex=function(t,e){var n,i;return"string"===(null!=(n=(i=this.blocks[e].text)[i.length-1])?n.type:void 0)?n.string+=t:i.push(S(t))},g.prototype.prependStringToTextAtIndex=function(t,e){var n,i;return"string"===(null!=(n=(i=this.blocks[e].text)[0])?n.type:void 0)?n.string=t+n.string:i.unshift(S(t))},S=function(t,e){return null==e&&(e={}),"string",{string:t=u(t),attributes:e,type:"string"}},E=function(t,e){return null==e&&(e={}),"attachment",{attachment:t,attributes:e,type:"attachment"}},m=function(t){return null==t&&(t={}),{text:[],attributes:t}},g.prototype.getTextAttributes=function(t){var e,n,r,s,u,c,l,h,p,d,f,g;for(e in r={},p=o.config.textAttributes)if((u=p[e]).tagName&&i(t,{matchingSelector:u.tagName,untilNode:this.containerElement}))r[e]=!0;else if(u.parser){if(g=u.parser(t)){for(n=!1,c=0,h=(d=this.findBlockElementAncestors(t)).length;h>c;c++)if(s=d[c],u.parser(s)===g){n=!0;break}n||(r[e]=g)}}else u.styleProperty&&(g=t.style[u.styleProperty])&&(r[e]=g);if(a(t))for(l in f=w(t,"attributes"))g=f[l],r[l]=g;return r},g.prototype.getBlockAttributes=function(t){var e,n,i,r;for(n=[];t&&t!==this.containerElement;){for(e in r=o.config.blockAttributes)!1!==(i=r[e]).parse&&l(t)===i.tagName&&(("function"==typeof i.test?i.test(t):void 0)||!i.test)&&(n.push(e),i.listAttribute&&n.push(i.listAttribute));t=t.parentNode}return n.reverse()},g.prototype.findBlockElementAncestors=function(t){var e,n;for(e=[];t&&t!==this.containerElement;)n=l(t),f.call(r(),n)>=0&&e.push(t),t=t.parentNode;return e},w=function(t,e){try{return JSON.parse(t.getAttribute("data-trix-"+e))}catch(t){return{}}},b=function(t){var e,n,i;return i=t.getAttribute("width"),n=t.getAttribute("height"),e={},i&&(e.width=parseInt(i,10)),n&&(e.height=parseInt(n,10)),e},g.prototype.isBlockElement=function(t){var e;if((null!=t?t.nodeType:void 0)===Node.ELEMENT_NODE&&!a(t)&&!i(t,{matchingSelector:"td",untilNode:this.containerElement}))return e=l(t),f.call(r(),e)>=0||"block"===window.getComputedStyle(t).display},g.prototype.isInsignificantTextNode=function(t){var e,n,i;if((null!=t?t.nodeType:void 0)===Node.TEXT_NODE&&R(t.data)&&(n=t.parentNode,i=t.previousSibling,e=t.nextSibling,(!C(n.previousSibling)||this.isBlockElement(n.previousSibling))&&!y(n)))return!i||this.isBlockElement(i)||!e||this.isBlockElement(e)},g.prototype.isExtraBR=function(t){return"br"===l(t)&&this.isBlockElement(t.parentNode)&&t.parentNode.lastChild===t},y=function(t){var e;return"pre"===(e=window.getComputedStyle(t).whiteSpace)||"pre-wrap"===e||"pre-line"===e},C=function(t){return t&&!k(t.textContent)},g.prototype.translateBlockElementMarginsToNewlines=function(){var t,e,n,i,r,o,s;for(t=this.getMarginOfDefaultBlockElement(),s=[],n=e=0,i=(o=this.blocks).length;i>e;n=++e)o[n],(r=this.getMarginOfBlockElementAtIndex(n))&&(r.top>2*t.top&&this.prependStringToTextAtIndex("\n",n),s.push(r.bottom>2*t.bottom?this.appendStringToTextAtIndex("\n",n):void 0));return s},g.prototype.getMarginOfBlockElementAtIndex=function(t){var e,n;return!(e=this.blockElements[t])||!e.textContent||(n=l(e),f.call(r(),n)>=0||f.call(this.processedElements,e)>=0)?void 0:v(e)},g.prototype.getMarginOfDefaultBlockElement=function(){var t;return t=s(o.config.blockAttributes.default.tagName),this.containerElement.appendChild(t),v(t)},v=function(t){var e;return"block"===(e=window.getComputedStyle(t)).display?{top:parseInt(e.marginTop),bottom:parseInt(e.marginBottom)}:void 0},A=function(t){return t.replace(RegExp("^"+e.source+"+"),"")},R=function(t){return RegExp("^"+e.source+"*$").test(t)},k=function(t){return/\s$/.test(t)},g}(o.BasicObject)}.call(this),function(){var t,e,n,i,r=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty,a=[].slice,u=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=o.arraysAreEqual,n=o.normalizeRange,i=o.rangeIsCollapsed,e=o.getBlockConfig,o.Document=function(s){function c(t){null==t&&(t=[]),c.__super__.constructor.apply(this,arguments),0===t.length&&(t=[new o.Block]),this.blockList=o.SplittableList.box(t)}var l;return r(c,s),c.fromJSON=function(t){var e,n;return n=function(){var n,i,r;for(r=[],n=0,i=t.length;i>n;n++)e=t[n],r.push(o.Block.fromJSON(e));return r}(),new this(n)},c.fromHTML=function(t,e){return o.HTMLParser.parse(t,e).getDocument()},c.fromString=function(t,e){var n;return n=o.Text.textForStringWithAttributes(t,e),new this([new o.Block(n)])},c.prototype.isEmpty=function(){var t;return 1===this.blockList.length&&((t=this.getBlockAtIndex(0)).isEmpty()&&!t.hasAttributes())},c.prototype.copy=function(t){var e;return null==t&&(t={}),e=t.consolidateBlocks?this.blockList.consolidate().toArray():this.blockList.toArray(),new this.constructor(e)},c.prototype.copyUsingObjectsFromDocument=function(t){var e;return e=new o.ObjectMap(t.getObjects()),this.copyUsingObjectMap(e)},c.prototype.copyUsingObjectMap=function(t){var e,n,i;return n=function(){var n,r,o,s;for(s=[],n=0,r=(o=this.getBlocks()).length;r>n;n++)e=o[n],s.push((i=t.find(e))?i:e.copyUsingObjectMap(t));return s}.call(this),new this.constructor(n)},c.prototype.copyWithBaseBlockAttributes=function(t){var e,n,i;return null==t&&(t=[]),i=function(){var i,r,o,s;for(s=[],i=0,r=(o=this.getBlocks()).length;r>i;i++)n=o[i],e=t.concat(n.getAttributes()),s.push(n.copyWithAttributes(e));return s}.call(this),new this.constructor(i)},c.prototype.replaceBlock=function(t,e){var n;return-1===(n=this.blockList.indexOf(t))?this:new this.constructor(this.blockList.replaceObjectAtIndex(e,n))},c.prototype.insertDocumentAtRange=function(t,e){var r,o,s,a,u,c,l;return o=t.blockList,u=(e=n(e))[0],s=(c=this.locationFromPosition(u)).index,a=c.offset,l=this,r=this.getBlockAtPosition(u),i(e)&&r.isEmpty()&&!r.hasAttributes()?l=new this.constructor(l.blockList.removeObjectAtIndex(s)):r.getBlockBreakPosition()===a&&u++,l=l.removeTextAtRange(e),new this.constructor(l.blockList.insertSplittableListAtPosition(o,u))},c.prototype.mergeDocumentAtRange=function(e,i){var r,o,s,a,u,c,l,h,p,d,f,g;return f=(i=n(i))[0],d=this.locationFromPosition(f),o=this.getBlockAtIndex(d.index).getAttributes(),r=e.getBaseBlockAttributes(),g=o.slice(-r.length),t(r,g)?(l=o.slice(0,-r.length),c=e.copyWithBaseBlockAttributes(l)):c=e.copy({consolidateBlocks:!0}).copyWithBaseBlockAttributes(o),s=c.getBlockCount(),a=c.getBlockAtIndex(0),t(o,a.getAttributes())?(u=a.getTextWithoutBlockBreak(),p=this.insertTextAtRange(u,i),s>1&&(c=new this.constructor(c.getBlocks().slice(1)),h=f+u.getLength(),p=p.insertDocumentAtRange(c,h))):p=this.insertDocumentAtRange(c,i),p},c.prototype.insertTextAtRange=function(t,e){var i,r,o,s,a;return a=(e=n(e))[0],r=(s=this.locationFromPosition(a)).index,o=s.offset,i=this.removeTextAtRange(e),new this.constructor(i.blockList.editObjectAtIndex(r,(function(e){return e.copyWithText(e.text.insertTextAtPosition(t,o))})))},c.prototype.removeTextAtRange=function(t){var e,r,o,s,a,u,c,l,h,p,d,f,g,m,y,v,b,A;return l=(p=t=n(t))[0],v=p[1],i(t)?this:(u=(d=this.locationRangeFromRange(t))[0],m=d[1],a=u.index,c=u.offset,s=this.getBlockAtIndex(a),g=m.index,y=m.offset,f=this.getBlockAtIndex(g),v-l==1&&s.getBlockBreakPosition()===c&&f.getBlockBreakPosition()!==y&&"\n"===f.text.getStringAtPosition(y)?o=this.blockList.editObjectAtIndex(g,(function(t){return t.copyWithText(t.text.removeTextAtRange([y,y+1]))})):(h=s.text.getTextAtRange([0,c]),b=f.text.getTextAtRange([y,f.getLength()]),A=h.appendText(b),r=a!==g&&0===c&&s.getAttributeLevel()>=f.getAttributeLevel()?f.copyWithText(A):s.copyWithText(A),e=g+1-a,o=this.blockList.splice(a,e,r)),new this.constructor(o))},c.prototype.moveTextFromRangeToPosition=function(t,e){var i,r,o,s,u,c,l,h,p,d;return p=(c=t=n(t))[0],o=c[1],e>=p&&o>=e?this:(r=this.getDocumentAtRange(t),h=this.removeTextAtRange(t),(u=e>p)&&(e-=r.getLength()),s=(l=r.getBlocks())[0],0===(i=2<=l.length?a.call(l,1):[]).length?(d=s.getTextWithoutBlockBreak(),u&&(e+=1)):d=s.text,h=h.insertTextAtRange(d,e),0===i.length?h:(r=new this.constructor(i),e+=d.getLength(),h.insertDocumentAtRange(r,e)))},c.prototype.addAttributeAtRange=function(t,n,i){var r;return r=this.blockList,this.eachBlockAtRange(i,(function(i,o,s){return r=r.editObjectAtIndex(s,(function(){return e(t)?i.addAttribute(t,n):o[0]===o[1]?i:i.copyWithText(i.text.addAttributeAtRange(t,n,o))}))})),new this.constructor(r)},c.prototype.addAttribute=function(t,e){var n;return n=this.blockList,this.eachBlock((function(i,r){return n=n.editObjectAtIndex(r,(function(){return i.addAttribute(t,e)}))})),new this.constructor(n)},c.prototype.removeAttributeAtRange=function(t,n){var i;return i=this.blockList,this.eachBlockAtRange(n,(function(n,r,o){return e(t)?i=i.editObjectAtIndex(o,(function(){return n.removeAttribute(t)})):r[0]!==r[1]?i=i.editObjectAtIndex(o,(function(){return n.copyWithText(n.text.removeAttributeAtRange(t,r))})):void 0})),new this.constructor(i)},c.prototype.updateAttributesForAttachment=function(t,e){var n,i,r;return i=this.getRangeOfAttachment(e)[0],n=this.locationFromPosition(i).index,r=this.getTextAtIndex(n),new this.constructor(this.blockList.editObjectAtIndex(n,(function(n){return n.copyWithText(r.updateAttributesForAttachment(t,e))})))},c.prototype.removeAttributeForAttachment=function(t,e){var n;return n=this.getRangeOfAttachment(e),this.removeAttributeAtRange(t,n)},c.prototype.insertBlockBreakAtRange=function(t){var e,i,r,s;return s=(t=n(t))[0],r=this.locationFromPosition(s).offset,i=this.removeTextAtRange(t),0===r&&(e=[new o.Block]),new this.constructor(i.blockList.insertSplittableListAtPosition(new o.SplittableList(e),s))},c.prototype.applyBlockAttributeAtRange=function(t,n,i){var r,o,s,a;return o=(s=this.expandRangeToLineBreaksAndSplitBlocks(i)).document,i=s.range,(r=e(t)).listAttribute?(a=(o=o.removeLastListAttributeAtRange(i,{exceptAttributeName:t})).convertLineBreaksToBlockBreaksInRange(i),o=a.document,i=a.range):o=r.exclusive?o.removeBlockAttributesAtRange(i):r.terminal?o.removeLastTerminalAttributeAtRange(i):o.consolidateBlocksAtRange(i),o.addAttributeAtRange(t,n,i)},c.prototype.removeLastListAttributeAtRange=function(t,n){var i;return null==n&&(n={}),i=this.blockList,this.eachBlockAtRange(t,(function(t,r,o){var s;if((s=t.getLastAttribute())&&e(s).listAttribute&&s!==n.exceptAttributeName)return i=i.editObjectAtIndex(o,(function(){return t.removeAttribute(s)}))})),new this.constructor(i)},c.prototype.removeLastTerminalAttributeAtRange=function(t){var n;return n=this.blockList,this.eachBlockAtRange(t,(function(t,i,r){var o;if((o=t.getLastAttribute())&&e(o).terminal)return n=n.editObjectAtIndex(r,(function(){return t.removeAttribute(o)}))})),new this.constructor(n)},c.prototype.removeBlockAttributesAtRange=function(t){var e;return e=this.blockList,this.eachBlockAtRange(t,(function(t,n,i){return t.hasAttributes()?e=e.editObjectAtIndex(i,(function(){return t.copyWithoutAttributes()})):void 0})),new this.constructor(e)},c.prototype.expandRangeToLineBreaksAndSplitBlocks=function(t){var e,i,r,o,s,a,u,c,l;return l=(a=t=n(t))[0],o=a[1],c=this.locationFromPosition(l),r=this.locationFromPosition(o),u=(e=this).getBlockAtIndex(c.index),null!=(c.offset=u.findLineBreakInDirectionFromPosition("backward",c.offset))&&(s=e.positionFromLocation(c),e=e.insertBlockBreakAtRange([s,s+1]),r.index+=1,r.offset-=e.getBlockAtIndex(c.index).getLength(),c.index+=1),c.offset=0,0===r.offset&&r.index>c.index?(r.index-=1,r.offset=e.getBlockAtIndex(r.index).getBlockBreakPosition()):("\n"===(i=e.getBlockAtIndex(r.index)).text.getStringAtRange([r.offset-1,r.offset])?r.offset-=1:r.offset=i.findLineBreakInDirectionFromPosition("forward",r.offset),r.offset!==i.getBlockBreakPosition()&&(s=e.positionFromLocation(r),e=e.insertBlockBreakAtRange([s,s+1]))),l=e.positionFromLocation(c),o=e.positionFromLocation(r),{document:e,range:t=n([l,o])}},c.prototype.convertLineBreaksToBlockBreaksInRange=function(t){var e,i,r;return i=(t=n(t))[0],r=this.getStringAtRange(t).slice(0,-1),e=this,r.replace(/.*?\n/g,(function(t){return i+=t.length,e=e.insertBlockBreakAtRange([i-1,i])})),{document:e,range:t}},c.prototype.consolidateBlocksAtRange=function(t){var e,i,r,o,s;return s=(r=t=n(t))[0],i=r[1],o=this.locationFromPosition(s).index,e=this.locationFromPosition(i).index,new this.constructor(this.blockList.consolidateFromIndexToIndex(o,e))},c.prototype.getDocumentAtRange=function(t){var e;return t=n(t),e=this.blockList.getSplittableListInRange(t).toArray(),new this.constructor(e)},c.prototype.getStringAtRange=function(t){var e,i;return(i=t=n(t))[i.length-1]!==this.getLength()&&(e=-1),this.getDocumentAtRange(t).toString().slice(0,e)},c.prototype.getBlockAtIndex=function(t){return this.blockList.getObjectAtIndex(t)},c.prototype.getBlockAtPosition=function(t){var e;return e=this.locationFromPosition(t).index,this.getBlockAtIndex(e)},c.prototype.getTextAtIndex=function(t){var e;return null!=(e=this.getBlockAtIndex(t))?e.text:void 0},c.prototype.getTextAtPosition=function(t){var e;return e=this.locationFromPosition(t).index,this.getTextAtIndex(e)},c.prototype.getPieceAtPosition=function(t){var e,n,i;return e=(i=this.locationFromPosition(t)).index,n=i.offset,this.getTextAtIndex(e).getPieceAtPosition(n)},c.prototype.getCharacterAtPosition=function(t){var e,n,i;return e=(i=this.locationFromPosition(t)).index,n=i.offset,this.getTextAtIndex(e).getStringAtRange([n,n+1])},c.prototype.getLength=function(){return this.blockList.getEndPosition()},c.prototype.getBlocks=function(){return this.blockList.toArray()},c.prototype.getBlockCount=function(){return this.blockList.length},c.prototype.getEditCount=function(){return this.editCount},c.prototype.eachBlock=function(t){return this.blockList.eachObject(t)},c.prototype.eachBlockAtRange=function(t,e){var i,r,o,s,a,u,c,l,h,p,d,f;if(d=(u=t=n(t))[0],o=u[1],p=this.locationFromPosition(d),r=this.locationFromPosition(o),p.index===r.index)return i=this.getBlockAtIndex(p.index),f=[p.offset,r.offset],e(i,f,p.index);for(h=[],a=s=c=p.index,l=r.index;l>=c?l>=s:s>=l;a=l>=c?++s:--s)(i=this.getBlockAtIndex(a))?(f=function(){switch(a){case p.index:return[p.offset,i.text.getLength()];case r.index:return[0,r.offset];default:return[0,i.text.getLength()]}}(),h.push(e(i,f,a))):h.push(void 0);return h},c.prototype.getCommonAttributesAtRange=function(t){var e,r,s;return r=(t=n(t))[0],i(t)?this.getCommonAttributesAtPosition(r):(s=[],e=[],this.eachBlockAtRange(t,(function(t,n){return n[0]!==n[1]?(s.push(t.text.getCommonAttributesAtRange(n)),e.push(l(t))):void 0})),o.Hash.fromCommonAttributesOfObjects(s).merge(o.Hash.fromCommonAttributesOfObjects(e)).toObject())},c.prototype.getCommonAttributesAtPosition=function(t){var e,n,i,r,s,a,c,h,p,d;if(s=(p=this.locationFromPosition(t)).index,h=p.offset,!(i=this.getBlockAtIndex(s)))return{};for(c in r=l(i),e=i.text.getAttributesAtPosition(h),n=i.text.getAttributesAtPosition(h-1),a=function(){var t,e;for(c in e=[],t=o.config.textAttributes)(d=t[c]).inheritable&&e.push(c);return e}(),n)((d=n[c])===e[c]||u.call(a,c)>=0)&&(r[c]=d);return r},c.prototype.getRangeOfCommonAttributeAtPosition=function(t,e){var i,r,o,s,a,u,c,l;return o=(a=this.locationFromPosition(e)).index,s=a.offset,l=(u=this.getTextAtIndex(o).getExpandedRangeForAttributeAtOffset(t,s))[0],r=u[1],c=this.positionFromLocation({index:o,offset:l}),i=this.positionFromLocation({index:o,offset:r}),n([c,i])},c.prototype.getBaseBlockAttributes=function(){var t,e,n,i,r,o,s;for(t=this.getBlockAtIndex(0).getAttributes(),n=i=1,s=this.getBlockCount();s>=1?s>i:i>s;n=s>=1?++i:--i)e=this.getBlockAtIndex(n).getAttributes(),o=Math.min(t.length,e.length),t=function(){var n,i,s;for(s=[],r=n=0,i=o;(i>=0?i>n:n>i)&&e[r]===t[r];r=i>=0?++n:--n)s.push(e[r]);return s}();return t},l=function(t){var e,n;return n={},(e=t.getLastAttribute())&&(n[e]=!0),n},c.prototype.getAttachmentById=function(t){var e,n,i,r;for(n=0,i=(r=this.getAttachments()).length;i>n;n++)if((e=r[n]).id===t)return e},c.prototype.getAttachmentPieces=function(){var t;return t=[],this.blockList.eachObject((function(e){var n;return n=e.text,t=t.concat(n.getAttachmentPieces())})),t},c.prototype.getAttachments=function(){var t,e,n,i,r;for(r=[],t=0,e=(i=this.getAttachmentPieces()).length;e>t;t++)n=i[t],r.push(n.attachment);return r},c.prototype.getRangeOfAttachment=function(t){var e,i,r,o,s,a,u;for(o=0,i=e=0,r=(s=this.blockList.toArray()).length;r>e;i=++e){if(u=(a=s[i].text).getRangeOfAttachment(t))return n([o+u[0],o+u[1]]);o+=a.getLength()}},c.prototype.getLocationRangeOfAttachment=function(t){var e;return e=this.getRangeOfAttachment(t),this.locationRangeFromRange(e)},c.prototype.getAttachmentPieceForAttachment=function(t){var e,n,i,r;for(e=0,n=(r=this.getAttachmentPieces()).length;n>e;e++)if((i=r[e]).attachment===t)return i},c.prototype.findRangesForBlockAttribute=function(t){var e,n,i,r,o,s,a;for(o=0,s=[],n=0,i=(a=this.getBlocks()).length;i>n;n++)r=(e=a[n]).getLength(),e.hasAttribute(t)&&s.push([o,o+r]),o+=r;return s},c.prototype.findRangesForTextAttribute=function(t,e){var n,i,r,o,s,a,u,c,l,h;for(h=(null!=e?e:{}).withValue,a=0,u=[],c=[],o=function(e){return null!=h?e.getAttribute(t)===h:e.hasAttribute(t)},n=0,i=(l=this.getPieces()).length;i>n;n++)r=(s=l[n]).getLength(),o(s)&&(u[1]===a?u[1]=a+r:c.push(u=[a,a+r])),a+=r;return c},c.prototype.locationFromPosition=function(t){var e,n;return null!=(n=this.blockList.findIndexAndOffsetAtPosition(Math.max(0,t))).index?n:{index:(e=this.getBlocks()).length-1,offset:e[e.length-1].getLength()}},c.prototype.positionFromLocation=function(t){return this.blockList.findPositionAtIndexAndOffset(t.index,t.offset)},c.prototype.locationRangeFromPosition=function(t){return n(this.locationFromPosition(t))},c.prototype.locationRangeFromRange=function(t){var e,i,r,o;if(t=n(t))return o=t[0],i=t[1],r=this.locationFromPosition(o),e=this.locationFromPosition(i),n([r,e])},c.prototype.rangeFromLocationRange=function(t){var e,r;return t=n(t),e=this.positionFromLocation(t[0]),i(t)||(r=this.positionFromLocation(t[1])),n([e,r])},c.prototype.isEqualTo=function(t){return this.blockList.isEqualTo(null!=t?t.blockList:void 0)},c.prototype.getTexts=function(){var t,e,n,i,r;for(r=[],e=0,n=(i=this.getBlocks()).length;n>e;e++)t=i[e],r.push(t.text);return r},c.prototype.getPieces=function(){var t,e,n,i,r;for(n=[],t=0,e=(i=this.getTexts()).length;e>t;t++)r=i[t],n.push.apply(n,r.getPieces());return n},c.prototype.getObjects=function(){return this.getBlocks().concat(this.getTexts()).concat(this.getPieces())},c.prototype.toSerializableDocument=function(){var t;return t=[],this.blockList.eachObject((function(e){return t.push(e.copyWithText(e.text.toSerializableText()))})),new this.constructor(t)},c.prototype.toString=function(){return this.blockList.toString()},c.prototype.toJSON=function(){return this.blockList.toJSON()},c.prototype.toConsole=function(){var t;return JSON.stringify(function(){var e,n,i,r;for(r=[],e=0,n=(i=this.blockList.toArray()).length;n>e;e++)t=i[e],r.push(JSON.parse(t.text.toConsole()));return r}.call(this))},c}(o.Object)}.call(this),function(){o.LineBreakInsertion=function(){function t(t){var e;this.composition=t,this.document=this.composition.document,e=this.composition.getSelectedRange(),this.startPosition=e[0],this.endPosition=e[1],this.startLocation=this.document.locationFromPosition(this.startPosition),this.endLocation=this.document.locationFromPosition(this.endPosition),this.block=this.document.getBlockAtIndex(this.endLocation.index),this.breaksOnReturn=this.block.breaksOnReturn(),this.previousCharacter=this.block.text.getStringAtPosition(this.endLocation.offset-1),this.nextCharacter=this.block.text.getStringAtPosition(this.endLocation.offset)}return t.prototype.shouldInsertBlockBreak=function(){return this.block.hasAttributes()&&this.block.isListItem()&&!this.block.isEmpty()?0!==this.startLocation.offset:this.breaksOnReturn&&"\n"!==this.nextCharacter},t.prototype.shouldBreakFormattedBlock=function(){return this.block.hasAttributes()&&!this.block.isListItem()&&(this.breaksOnReturn&&"\n"===this.nextCharacter||"\n"===this.previousCharacter)},t.prototype.shouldDecreaseListLevel=function(){return this.block.hasAttributes()&&this.block.isListItem()&&this.block.isEmpty()},t.prototype.shouldPrependListItem=function(){return this.block.isListItem()&&0===this.startLocation.offset&&!this.block.isEmpty()},t.prototype.shouldRemoveLastBlockAttribute=function(){return this.block.hasAttributes()&&!this.block.isListItem()&&this.block.isEmpty()},t}()}.call(this),function(){var t,e,n,i,r,s,a,u,c,l,h=function(t,e){function n(){this.constructor=t}for(var i in e)p.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},p={}.hasOwnProperty;s=o.normalizeRange,c=o.rangesAreEqual,u=o.rangeIsCollapsed,a=o.objectsAreEqual,t=o.arrayStartsWith,l=o.summarizeArrayChange,n=o.getAllAttributeNames,i=o.getBlockConfig,r=o.getTextConfig,e=o.extend,o.Composition=function(p){function d(){this.document=new o.Document,this.attachments=[],this.currentAttributes={},this.revision=0}return h(d,p),d.prototype.setDocument=function(t){var e;return t.isEqualTo(this.document)?void 0:(this.document=t,this.refreshAttachments(),this.revision++,null!=(e=this.delegate)&&"function"==typeof e.compositionDidChangeDocument?e.compositionDidChangeDocument(t):void 0)},d.prototype.getSnapshot=function(){return{document:this.document,selectedRange:this.getSelectedRange()}},d.prototype.loadSnapshot=function(t){var e,n,i,r;return e=t.document,r=t.selectedRange,null!=(n=this.delegate)&&"function"==typeof n.compositionWillLoadSnapshot&&n.compositionWillLoadSnapshot(),this.setDocument(null!=e?e:new o.Document),this.setSelection(null!=r?r:[0,0]),null!=(i=this.delegate)&&"function"==typeof i.compositionDidLoadSnapshot?i.compositionDidLoadSnapshot():void 0},d.prototype.insertText=function(t,e){var n,i,r,o;return o=(null!=e?e:{updatePosition:!0}).updatePosition,i=this.getSelectedRange(),this.setDocument(this.document.insertTextAtRange(t,i)),n=(r=i[0])+t.getLength(),o&&this.setSelection(n),this.notifyDelegateOfInsertionAtRange([r,n])},d.prototype.insertBlock=function(t){var e;return null==t&&(t=new o.Block),e=new o.Document([t]),this.insertDocument(e)},d.prototype.insertDocument=function(t){var e,n,i;return null==t&&(t=new o.Document),n=this.getSelectedRange(),this.setDocument(this.document.insertDocumentAtRange(t,n)),e=(i=n[0])+t.getLength(),this.setSelection(e),this.notifyDelegateOfInsertionAtRange([i,e])},d.prototype.insertString=function(t,e){var n,i;return n=this.getCurrentTextAttributes(),i=o.Text.textForStringWithAttributes(t,n),this.insertText(i,e)},d.prototype.insertBlockBreak=function(){var t,e,n;return e=this.getSelectedRange(),this.setDocument(this.document.insertBlockBreakAtRange(e)),t=(n=e[0])+1,this.setSelection(t),this.notifyDelegateOfInsertionAtRange([n,t])},d.prototype.insertLineBreak=function(){var t,e;return(e=new o.LineBreakInsertion(this)).shouldDecreaseListLevel()?(this.decreaseListLevel(),this.setSelection(e.startPosition)):e.shouldPrependListItem()?(t=new o.Document([e.block.copyWithoutText()]),this.insertDocument(t)):e.shouldInsertBlockBreak()?this.insertBlockBreak():e.shouldRemoveLastBlockAttribute()?this.removeLastBlockAttribute():e.shouldBreakFormattedBlock()?this.breakFormattedBlock(e):this.insertString("\n")},d.prototype.insertHTML=function(t){var e,n,i,r;return e=o.Document.fromHTML(t),i=this.getSelectedRange(),this.setDocument(this.document.mergeDocumentAtRange(e,i)),n=(r=i[0])+e.getLength()-1,this.setSelection(n),this.notifyDelegateOfInsertionAtRange([r,n])},d.prototype.replaceHTML=function(t){var e,n,i;return e=o.Document.fromHTML(t).copyUsingObjectsFromDocument(this.document),n=this.getLocationRange({strict:!1}),i=this.document.rangeFromLocationRange(n),this.setDocument(e),this.setSelection(i)},d.prototype.insertFile=function(t){return this.insertFiles([t])},d.prototype.insertFiles=function(t){var e,n,i,r,s,a;for(n=[],r=0,s=t.length;s>r;r++)i=t[r],(null!=(a=this.delegate)?a.compositionShouldAcceptFile(i):void 0)&&(e=o.Attachment.attachmentForFile(i),n.push(e));return this.insertAttachments(n)},d.prototype.insertAttachment=function(t){return this.insertAttachments([t])},d.prototype.insertAttachments=function(t){var e,n,i,r,s,a,u,c,l;for(c=new o.Text,r=0,s=t.length;s>r;r++)l=(e=t[r]).getType(),a=null!=(u=o.config.attachments[l])?u.presentation:void 0,i=this.getCurrentTextAttributes(),a&&(i.presentation=a),n=o.Text.textForAttachmentWithAttributes(e,i),c=c.appendText(n);return this.insertText(c)},d.prototype.shouldManageDeletingInDirection=function(t){var e;if(e=this.getLocationRange(),u(e)){if("backward"===t&&0===e[0].offset)return!0;if(this.shouldManageMovingCursorInDirection(t))return!0}else if(e[0].index!==e[1].index)return!0;return!1},d.prototype.deleteInDirection=function(t,e){var n,i,r,o,s,a,c,l;return o=(null!=e?e:{}).length,s=this.getLocationRange(),a=this.getSelectedRange(),(c=u(a))?r="backward"===t&&0===s[0].offset:l=s[0].index!==s[1].index,!(r&&this.canDecreaseBlockAttributeLevel()&&(i=this.getBlock(),i.isListItem()?this.decreaseListLevel():this.decreaseBlockAttributeLevel(),this.setSelection(a[0]),i.isEmpty()))&&(c&&(a=this.getExpandedRangeInDirection(t,{length:o}),"backward"===t&&(n=this.getAttachmentAtRange(a))),n?(this.editAttachment(n),!1):(this.setDocument(this.document.removeTextAtRange(a)),this.setSelection(a[0]),!r&&!l&&void 0))},d.prototype.moveTextFromRange=function(t){var e;return e=this.getSelectedRange()[0],this.setDocument(this.document.moveTextFromRangeToPosition(t,e)),this.setSelection(e)},d.prototype.removeAttachment=function(t){var e;return(e=this.document.getRangeOfAttachment(t))?(this.stopEditingAttachment(),this.setDocument(this.document.removeTextAtRange(e)),this.setSelection(e[0])):void 0},d.prototype.removeLastBlockAttribute=function(){var t,e,n,i;return i=(n=this.getSelectedRange())[0],e=n[1],t=this.document.getBlockAtPosition(e),this.removeCurrentAttribute(t.getLastAttribute()),this.setSelection(i)}," ",d.prototype.insertPlaceholder=function(){return this.placeholderPosition=this.getPosition(),this.insertString(" ")},d.prototype.selectPlaceholder=function(){return null!=this.placeholderPosition?(this.setSelectedRange([this.placeholderPosition,this.placeholderPosition+1]),this.getSelectedRange()):void 0},d.prototype.forgetPlaceholder=function(){return this.placeholderPosition=null},d.prototype.hasCurrentAttribute=function(t){var e;return null!=(e=this.currentAttributes[t])&&!1!==e},d.prototype.toggleCurrentAttribute=function(t){var e;return(e=!this.currentAttributes[t])?this.setCurrentAttribute(t,e):this.removeCurrentAttribute(t)},d.prototype.canSetCurrentAttribute=function(t){return i(t)?this.canSetCurrentBlockAttribute(t):this.canSetCurrentTextAttribute(t)},d.prototype.canSetCurrentTextAttribute=function(){var t,e,n,i;if(t=this.getSelectedDocument()){for(e=0,n=(i=t.getAttachments()).length;n>e;e++)if(!i[e].hasContent())return!1;return!0}},d.prototype.canSetCurrentBlockAttribute=function(){var t;if(t=this.getBlock())return!t.isTerminalBlock()},d.prototype.setCurrentAttribute=function(t,e){return i(t)?this.setBlockAttribute(t,e):(this.setTextAttribute(t,e),this.currentAttributes[t]=e,this.notifyDelegateOfCurrentAttributesChange())},d.prototype.setTextAttribute=function(t,e){var n,i;if(n=this.getSelectedRange())return n[0]!==n[1]?this.setDocument(this.document.addAttributeAtRange(t,e,n)):"href"===t?(i=o.Text.textForStringWithAttributes(e,{href:e}),this.insertText(i)):void 0},d.prototype.setBlockAttribute=function(t,e){var n;if(n=this.getSelectedRange())return this.canSetCurrentAttribute(t)?(this.getBlock(),this.setDocument(this.document.applyBlockAttributeAtRange(t,e,n)),this.setSelection(n)):void 0},d.prototype.removeCurrentAttribute=function(t){return i(t)?(this.removeBlockAttribute(t),this.updateCurrentAttributes()):(this.removeTextAttribute(t),delete this.currentAttributes[t],this.notifyDelegateOfCurrentAttributesChange())},d.prototype.removeTextAttribute=function(t){var e;if(e=this.getSelectedRange())return this.setDocument(this.document.removeAttributeAtRange(t,e))},d.prototype.removeBlockAttribute=function(t){var e;if(e=this.getSelectedRange())return this.setDocument(this.document.removeAttributeAtRange(t,e))},d.prototype.canDecreaseNestingLevel=function(){var t;return(null!=(t=this.getBlock())?t.getNestingLevel():void 0)>0},d.prototype.canIncreaseNestingLevel=function(){var e,n,r;if(e=this.getBlock())return null!=(r=i(e.getLastNestableAttribute()))&&r.listAttribute?(n=this.getPreviousBlock())?t(n.getListItemAttributes(),e.getListItemAttributes()):void 0:e.getNestingLevel()>0},d.prototype.decreaseNestingLevel=function(){var t;if(t=this.getBlock())return this.setDocument(this.document.replaceBlock(t,t.decreaseNestingLevel()))},d.prototype.increaseNestingLevel=function(){var t;if(t=this.getBlock())return this.setDocument(this.document.replaceBlock(t,t.increaseNestingLevel()))},d.prototype.canDecreaseBlockAttributeLevel=function(){var t;return(null!=(t=this.getBlock())?t.getAttributeLevel():void 0)>0},d.prototype.decreaseBlockAttributeLevel=function(){var t,e;return(t=null!=(e=this.getBlock())?e.getLastAttribute():void 0)?this.removeCurrentAttribute(t):void 0},d.prototype.decreaseListLevel=function(){var t,e,n,i,r,o;for(o=this.getSelectedRange()[0],n=r=this.document.locationFromPosition(o).index,t=this.getBlock().getAttributeLevel();(e=this.document.getBlockAtIndex(n+1))&&e.isListItem()&&e.getAttributeLevel()>t;)n++;return o=this.document.positionFromLocation({index:r,offset:0}),i=this.document.positionFromLocation({index:n,offset:0}),this.setDocument(this.document.removeLastListAttributeAtRange([o,i]))},d.prototype.updateCurrentAttributes=function(){var t,e,i,r,o,s;if(s=this.getSelectedRange({ignoreLock:!0})){for(e=this.document.getCommonAttributesAtRange(s),i=0,r=(o=n()).length;r>i;i++)e[t=o[i]]||this.canSetCurrentAttribute(t)||(e[t]=!1);if(!a(e,this.currentAttributes))return this.currentAttributes=e,this.notifyDelegateOfCurrentAttributesChange()}},d.prototype.getCurrentAttributes=function(){return e.call({},this.currentAttributes)},d.prototype.getCurrentTextAttributes=function(){var t,e,n,i;for(e in t={},n=this.currentAttributes)!1!==(i=n[e])&&r(e)&&(t[e]=i);return t},d.prototype.freezeSelection=function(){return this.setCurrentAttribute("frozen",!0)},d.prototype.thawSelection=function(){return this.removeCurrentAttribute("frozen")},d.prototype.hasFrozenSelection=function(){return this.hasCurrentAttribute("frozen")},d.proxyMethod("getSelectionManager().getPointRange"),d.proxyMethod("getSelectionManager().setLocationRangeFromPointRange"),d.proxyMethod("getSelectionManager().createLocationRangeFromDOMRange"),d.proxyMethod("getSelectionManager().locationIsCursorTarget"),d.proxyMethod("getSelectionManager().selectionIsExpanded"),d.proxyMethod("delegate?.getSelectionManager"),d.prototype.setSelection=function(t){var e,n;return e=this.document.locationRangeFromRange(t),null!=(n=this.delegate)?n.compositionDidRequestChangingSelectionToLocationRange(e):void 0},d.prototype.getSelectedRange=function(){var t;return(t=this.getLocationRange())?this.document.rangeFromLocationRange(t):void 0},d.prototype.setSelectedRange=function(t){var e;return e=this.document.locationRangeFromRange(t),this.getSelectionManager().setLocationRange(e)},d.prototype.getPosition=function(){var t;return(t=this.getLocationRange())?this.document.positionFromLocation(t[0]):void 0},d.prototype.getLocationRange=function(t){var e,n;return null!=(e=null!=(n=this.targetLocationRange)?n:this.getSelectionManager().getLocationRange(t))?e:s({index:0,offset:0})},d.prototype.withTargetLocationRange=function(t,e){var n;this.targetLocationRange=t;try{n=e()}finally{this.targetLocationRange=null}return n},d.prototype.withTargetRange=function(t,e){var n;return n=this.document.locationRangeFromRange(t),this.withTargetLocationRange(n,e)},d.prototype.withTargetDOMRange=function(t,e){var n;return n=this.createLocationRangeFromDOMRange(t,{strict:!1}),this.withTargetLocationRange(n,e)},d.prototype.getExpandedRangeInDirection=function(t,e){var n,i,r,o;return i=(null!=e?e:{}).length,o=(r=this.getSelectedRange())[0],n=r[1],"backward"===t?i?o-=i:o=this.translateUTF16PositionFromOffset(o,-1):i?n+=i:n=this.translateUTF16PositionFromOffset(n,1),s([o,n])},d.prototype.shouldManageMovingCursorInDirection=function(t){var e;return!!this.editingAttachment||(e=this.getExpandedRangeInDirection(t),null!=this.getAttachmentAtRange(e))},d.prototype.moveCursorInDirection=function(t){var e,n,i,r;return this.editingAttachment?i=this.document.getRangeOfAttachment(this.editingAttachment):(r=this.getSelectedRange(),i=this.getExpandedRangeInDirection(t),n=!c(r,i)),this.setSelectedRange("backward"===t?i[0]:i[1]),n&&(e=this.getAttachmentAtRange(i))?this.editAttachment(e):void 0},d.prototype.expandSelectionInDirection=function(t,e){var n,i;return n=(null!=e?e:{}).length,i=this.getExpandedRangeInDirection(t,{length:n}),this.setSelectedRange(i)},d.prototype.expandSelectionForEditing=function(){return this.hasCurrentAttribute("href")?this.expandSelectionAroundCommonAttribute("href"):void 0},d.prototype.expandSelectionAroundCommonAttribute=function(t){var e,n;return e=this.getPosition(),n=this.document.getRangeOfCommonAttributeAtPosition(t,e),this.setSelectedRange(n)},d.prototype.selectionContainsAttachments=function(){var t;return(null!=(t=this.getSelectedAttachments())?t.length:void 0)>0},d.prototype.selectionIsInCursorTarget=function(){return this.editingAttachment||this.positionIsCursorTarget(this.getPosition())},d.prototype.positionIsCursorTarget=function(t){var e;return(e=this.document.locationFromPosition(t))?this.locationIsCursorTarget(e):void 0},d.prototype.positionIsBlockBreak=function(t){var e;return null!=(e=this.document.getPieceAtPosition(t))?e.isBlockBreak():void 0},d.prototype.getSelectedDocument=function(){var t;return(t=this.getSelectedRange())?this.document.getDocumentAtRange(t):void 0},d.prototype.getSelectedAttachments=function(){var t;return null!=(t=this.getSelectedDocument())?t.getAttachments():void 0},d.prototype.getAttachments=function(){return this.attachments.slice(0)},d.prototype.refreshAttachments=function(){var t,e,n,i,r,o,s,a,u,c,h,p;for(n=this.document.getAttachments(),t=(a=l(this.attachments,n)).added,h=a.removed,this.attachments=n,i=0,o=h.length;o>i;i++)(e=h[i]).delegate=null,null!=(u=this.delegate)&&"function"==typeof u.compositionDidRemoveAttachment&&u.compositionDidRemoveAttachment(e);for(p=[],r=0,s=t.length;s>r;r++)(e=t[r]).delegate=this,p.push(null!=(c=this.delegate)&&"function"==typeof c.compositionDidAddAttachment?c.compositionDidAddAttachment(e):void 0);return p},d.prototype.attachmentDidChangeAttributes=function(t){var e;return this.revision++,null!=(e=this.delegate)&&"function"==typeof e.compositionDidEditAttachment?e.compositionDidEditAttachment(t):void 0},d.prototype.attachmentDidChangePreviewURL=function(t){var e;return this.revision++,null!=(e=this.delegate)&&"function"==typeof e.compositionDidChangeAttachmentPreviewURL?e.compositionDidChangeAttachmentPreviewURL(t):void 0},d.prototype.editAttachment=function(t,e){var n;if(t!==this.editingAttachment)return this.stopEditingAttachment(),this.editingAttachment=t,null!=(n=this.delegate)&&"function"==typeof n.compositionDidStartEditingAttachment?n.compositionDidStartEditingAttachment(this.editingAttachment,e):void 0},d.prototype.stopEditingAttachment=function(){var t;if(this.editingAttachment)return null!=(t=this.delegate)&&"function"==typeof t.compositionDidStopEditingAttachment&&t.compositionDidStopEditingAttachment(this.editingAttachment),this.editingAttachment=null},d.prototype.updateAttributesForAttachment=function(t,e){return this.setDocument(this.document.updateAttributesForAttachment(t,e))},d.prototype.removeAttributeForAttachment=function(t,e){return this.setDocument(this.document.removeAttributeForAttachment(t,e))},d.prototype.breakFormattedBlock=function(t){var e,n,i,r,s;return n=t.document,e=t.block,s=[(r=t.startPosition)-1,r],e.getBlockBreakPosition()===t.startLocation.offset?(e.breaksOnReturn()&&"\n"===t.nextCharacter?r+=1:n=n.removeTextAtRange(s),s=[r,r]):"\n"===t.nextCharacter?"\n"===t.previousCharacter?s=[r-1,r+1]:(s=[r,r+1],r+=1):t.startLocation.offset-1!=0&&(r+=1),i=new o.Document([e.removeLastAttribute().copyWithoutText()]),this.setDocument(n.insertDocumentAtRange(i,s)),this.setSelection(r)},d.prototype.getPreviousBlock=function(){var t,e;return(e=this.getLocationRange())&&(t=e[0].index)>0?this.document.getBlockAtIndex(t-1):void 0},d.prototype.getBlock=function(){var t;return(t=this.getLocationRange())?this.document.getBlockAtIndex(t[0].index):void 0},d.prototype.getAttachmentAtRange=function(t){var e;return(e=this.document.getDocumentAtRange(t)).toString()===o.OBJECT_REPLACEMENT_CHARACTER+"\n"?e.getAttachments()[0]:void 0},d.prototype.notifyDelegateOfCurrentAttributesChange=function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.compositionDidChangeCurrentAttributes?t.compositionDidChangeCurrentAttributes(this.currentAttributes):void 0},d.prototype.notifyDelegateOfInsertionAtRange=function(t){var e;return null!=(e=this.delegate)&&"function"==typeof e.compositionDidPerformInsertionAtRange?e.compositionDidPerformInsertionAtRange(t):void 0},d.prototype.translateUTF16PositionFromOffset=function(t,e){var n,i;return n=(i=this.document.toUTF16String()).offsetFromUCS2Offset(t),i.offsetToUCS2Offset(n+e)},d}(o.BasicObject)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.UndoManager=function(e){function n(t){this.composition=t,this.undoEntries=[],this.redoEntries=[]}var i;return t(n,e),n.prototype.recordUndoEntry=function(t,e){var n,r,o,s,a;return r=(s=null!=e?e:{}).context,n=s.consolidatable,o=this.undoEntries.slice(-1)[0],n&&i(o,t,r)?void 0:(a=this.createEntry({description:t,context:r}),this.undoEntries.push(a),this.redoEntries=[])},n.prototype.undo=function(){var t,e;return(e=this.undoEntries.pop())?(t=this.createEntry(e),this.redoEntries.push(t),this.composition.loadSnapshot(e.snapshot)):void 0},n.prototype.redo=function(){var t,e;return(t=this.redoEntries.pop())?(e=this.createEntry(t),this.undoEntries.push(e),this.composition.loadSnapshot(t.snapshot)):void 0},n.prototype.canUndo=function(){return this.undoEntries.length>0},n.prototype.canRedo=function(){return this.redoEntries.length>0},n.prototype.createEntry=function(t){var e,n,i;return n=(i=null!=t?t:{}).description,e=i.context,{description:null!=n?n.toString():void 0,context:JSON.stringify(e),snapshot:this.composition.getSnapshot()}},i=function(t,e,n){return(null!=t?t.description:void 0)===(null!=e?e.toString():void 0)&&(null!=t?t.context:void 0)===JSON.stringify(n)},n}(o.BasicObject)}.call(this),function(){var t;o.attachmentGalleryFilter=function(e){var n;return(n=new t(e)).perform(),n.getSnapshot()},t=function(){function t(t){this.document=t.document,this.selectedRange=t.selectedRange}var e;return e="attachmentGallery","presentation","gallery",t.prototype.perform=function(){return this.removeBlockAttribute(),this.applyBlockAttribute()},t.prototype.getSnapshot=function(){return{document:this.document,selectedRange:this.selectedRange}},t.prototype.removeBlockAttribute=function(){var t,n,i,r,o;for(o=[],t=0,n=(r=this.findRangesOfBlocks()).length;n>t;t++)i=r[t],o.push(this.document=this.document.removeAttributeAtRange(e,i));return o},t.prototype.applyBlockAttribute=function(){var t,n,i,r,o,s;for(i=0,s=[],t=0,n=(o=this.findRangesOfPieces()).length;n>t;t++)(r=o[t])[1]-r[0]>1&&(r[0]+=i,r[1]+=i,"\n"!==this.document.getCharacterAtPosition(r[1])&&(this.document=this.document.insertBlockBreakAtRange(r[1]),r[1]n;n++)e=t[n],this.manageAttachment(e)}return t(n,e),n.prototype.getAttachments=function(){var t,e,n,i;for(e in i=[],n=this.managedAttachments)t=n[e],i.push(t);return i},n.prototype.manageAttachment=function(t){var e,n;return null!=(e=this.managedAttachments)[n=t.id]?e[n]:e[n]=new o.ManagedAttachment(this,t)},n.prototype.attachmentIsManaged=function(t){return t.id in this.managedAttachments},n.prototype.requestRemovalOfAttachment=function(t){var e;return this.attachmentIsManaged(t)&&null!=(e=this.delegate)&&"function"==typeof e.attachmentManagerDidRequestRemovalOfAttachment?e.attachmentManagerDidRequestRemovalOfAttachment(t):void 0},n.prototype.unmanageAttachment=function(t){var e;return e=this.managedAttachments[t.id],delete this.managedAttachments[t.id],e},n}(o.BasicObject)}.call(this),function(){var t,e,n,i,r,s,a,u,c,l,h;t=o.elementContainsNode,e=o.findChildIndexOfNode,r=o.nodeIsBlockStart,s=o.nodeIsBlockStartComment,i=o.nodeIsBlockContainer,a=o.nodeIsCursorTarget,u=o.nodeIsEmptyTextNode,c=o.nodeIsTextNode,n=o.nodeIsAttachmentElement,l=o.tagName,h=o.walkTree,o.LocationMapper=function(){function o(t){this.element=t}var p,d,f,g;return o.prototype.findLocationFromContainerAndOffset=function(n,i,o){var s,u,l,p,g,m,y;for(m=(null!=o?o:{strict:!0}).strict,u=0,l=!1,p={index:0,offset:0},(s=this.findAttachmentElementParentForNode(n))&&(n=s.parentNode,i=e(s)),y=h(this.element,{usingFilter:f});y.nextNode();){if((g=y.currentNode)===n&&c(n)){a(g)||(p.offset+=i);break}if(g.parentNode===n){if(u++===i)break}else if(!t(n,g)&&u>0)break;r(g,{strict:m})?(l&&p.index++,p.offset=0,l=!0):p.offset+=d(g)}return p},o.prototype.findContainerAndOffsetFromLocation=function(t){var n,o,s,u,l;if(0===t.index&&0===t.offset){for(n=this.element,u=0;n.firstChild;)if(n=n.firstChild,i(n)){u=1;break}return[n,u]}if(o=(l=this.findNodeAndOffsetFromLocation(t))[0],s=l[1],o){if(c(o))0===d(o)?(n=o.parentNode.parentNode,u=e(o.parentNode),a(o,{name:"right"})&&u++):(n=o,u=t.offset-s);else{if(n=o.parentNode,!r(o.previousSibling)&&!i(n))for(;o===n.lastChild&&(o=n,n=n.parentNode,!i(n)););u=e(o),0!==t.offset&&u++}return[n,u]}},o.prototype.findNodeAndOffsetFromLocation=function(t){var e,n,i,r,o,s,u,l;for(u=0,n=0,i=(l=this.getSignificantNodesForIndex(t.index)).length;i>n;n++){if(e=l[n],r=d(e),t.offset<=u+r)if(c(e)){if(o=e,s=u,t.offset===s&&a(o))break}else o||(o=e,s=u);if((u+=r)>t.offset)break}return[o,s]},o.prototype.findAttachmentElementParentForNode=function(t){for(;t&&t!==this.element;){if(n(t))return t;t=t.parentNode}},o.prototype.getSignificantNodesForIndex=function(t){var e,n,i,r,o;for(i=[],o=h(this.element,{usingFilter:p}),r=!1;o.nextNode();)if(n=o.currentNode,s(n)){if(null!=e?e++:e=0,e===t)r=!0;else if(r)break}else r&&i.push(n);return i},d=function(t){return t.nodeType===Node.TEXT_NODE?a(t)?0:t.textContent.length:"br"===l(t)||n(t)?1:0},p=function(t){return g(t)===NodeFilter.FILTER_ACCEPT?f(t):NodeFilter.FILTER_REJECT},g=function(t){return u(t)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},f=function(t){return n(t.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},o}()}.call(this),function(){var t,e,n=[].slice;t=o.getDOMRange,e=o.setDOMRange,o.PointMapper=function(){function i(){}return i.prototype.createDOMRangeFromPoint=function(n){var i,r,o,s,a,u,c,l;if(c=n.x,l=n.y,document.caretPositionFromPoint)return o=(a=document.caretPositionFromPoint(c,l)).offsetNode,r=a.offset,(i=document.createRange()).setStart(o,r),i;if(document.caretRangeFromPoint)return document.caretRangeFromPoint(c,l);if(document.body.createTextRange){s=t();try{(u=document.body.createTextRange()).moveToPoint(c,l),u.select()}catch(t){}return i=t(),e(s),i}},i.prototype.getClientRectsForDOMRange=function(t){var e;return[(e=n.call(t.getClientRects()))[0],e[e.length-1]]},i}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,r=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=o.getDOMRange,o.SelectionChangeObserver=function(i){function o(){this.run=e(this.run,this),this.update=e(this.update,this),this.selectionManagers=[]}var s;return n(o,i),o.prototype.start=function(){return this.started?void 0:(this.started=!0,"onselectionchange"in document?document.addEventListener("selectionchange",this.update,!0):this.run())},o.prototype.stop=function(){return this.started?(this.started=!1,document.removeEventListener("selectionchange",this.update,!0)):void 0},o.prototype.registerSelectionManager=function(t){return r.call(this.selectionManagers,t)<0?(this.selectionManagers.push(t),this.start()):void 0},o.prototype.unregisterSelectionManager=function(t){var e;return this.selectionManagers=function(){var n,i,r,o;for(o=[],n=0,i=(r=this.selectionManagers).length;i>n;n++)(e=r[n])!==t&&o.push(e);return o}.call(this),0===this.selectionManagers.length?this.stop():void 0},o.prototype.notifySelectionManagersOfSelectionChange=function(){var t,e,n,i,r;for(i=[],t=0,e=(n=this.selectionManagers).length;e>t;t++)r=n[t],i.push(r.selectionDidChange());return i},o.prototype.update=function(){var e;return e=t(),s(e,this.domRange)?void 0:(this.domRange=e,this.notifySelectionManagersOfSelectionChange())},o.prototype.reset=function(){return this.domRange=null,this.update()},o.prototype.run=function(){return this.started?(this.update(),requestAnimationFrame(this.run)):void 0},s=function(t,e){return(null!=t?t.startContainer:void 0)===(null!=e?e.startContainer:void 0)&&(null!=t?t.startOffset:void 0)===(null!=e?e.startOffset:void 0)&&(null!=t?t.endContainer:void 0)===(null!=e?e.endContainer:void 0)&&(null!=t?t.endOffset:void 0)===(null!=e?e.endOffset:void 0)},o}(o.BasicObject),null==o.selectionChangeObserver&&(o.selectionChangeObserver=new o.SelectionChangeObserver)}.call(this),function(){var t,e,n,i,r,s,a,u,c,l,h=function(t,e){return function(){return t.apply(e,arguments)}},p=function(t,e){function n(){this.constructor=t}for(var i in e)d.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},d={}.hasOwnProperty;n=o.getDOMSelection,e=o.getDOMRange,l=o.setDOMRange,t=o.elementContainsNode,s=o.nodeIsCursorTarget,r=o.innerElementIsActive,i=o.handleEvent,a=o.normalizeRange,u=o.rangeIsCollapsed,c=o.rangesAreEqual,o.SelectionManager=function(d){function f(t){this.element=t,this.selectionDidChange=h(this.selectionDidChange,this),this.didMouseDown=h(this.didMouseDown,this),this.locationMapper=new o.LocationMapper(this.element),this.pointMapper=new o.PointMapper,this.lockCount=0,i("mousedown",{onElement:this.element,withCallback:this.didMouseDown})}return p(f,d),f.prototype.getLocationRange=function(t){var n;return null==t&&(t={}),!1===t.strict?this.createLocationRangeFromDOMRange(e(),{strict:!1}):t.ignoreLock?this.currentLocationRange:null!=(n=this.lockedLocationRange)?n:this.currentLocationRange},f.prototype.setLocationRange=function(t){var e;if(!this.lockedLocationRange)return t=a(t),(e=this.createDOMRangeFromLocationRange(t))?(l(e),this.updateCurrentLocationRange(t)):void 0},f.prototype.setLocationRangeFromPointRange=function(t){var e,n;return t=a(t),n=this.getLocationAtPoint(t[0]),e=this.getLocationAtPoint(t[1]),this.setLocationRange([n,e])},f.prototype.getClientRectAtLocationRange=function(t){var e;return(e=this.createDOMRangeFromLocationRange(t))?this.getClientRectsForDOMRange(e)[1]:void 0},f.prototype.locationIsCursorTarget=function(t){var e,n;return e=(n=this.findNodeAndOffsetFromLocation(t))[0],n[1],s(e)},f.prototype.lock=function(){return 0==this.lockCount++?(this.updateCurrentLocationRange(),this.lockedLocationRange=this.getLocationRange()):void 0},f.prototype.unlock=function(){var t;return 0==--this.lockCount&&(t=this.lockedLocationRange,this.lockedLocationRange=null,null!=t)?this.setLocationRange(t):void 0},f.prototype.clearSelection=function(){var t;return null!=(t=n())?t.removeAllRanges():void 0},f.prototype.selectionIsCollapsed=function(){var t;return!0===(null!=(t=e())?t.collapsed:void 0)},f.prototype.selectionIsExpanded=function(){return!this.selectionIsCollapsed()},f.prototype.createLocationRangeFromDOMRange=function(t,e){var n,i;if(null!=t&&this.domRangeWithinElement(t)&&(i=this.findLocationFromContainerAndOffset(t.startContainer,t.startOffset,e)))return t.collapsed||(n=this.findLocationFromContainerAndOffset(t.endContainer,t.endOffset,e)),a([i,n])},f.proxyMethod("locationMapper.findLocationFromContainerAndOffset"),f.proxyMethod("locationMapper.findContainerAndOffsetFromLocation"),f.proxyMethod("locationMapper.findNodeAndOffsetFromLocation"),f.proxyMethod("pointMapper.createDOMRangeFromPoint"),f.proxyMethod("pointMapper.getClientRectsForDOMRange"),f.prototype.didMouseDown=function(){return this.pauseTemporarily()},f.prototype.pauseTemporarily=function(){var e,n,r,o;return this.paused=!0,n=function(e){return function(){var n,i;for(e.paused=!1,clearTimeout(o),n=0,i=r.length;i>n;n++)r[n].destroy();return t(document,e.element)?e.selectionDidChange():void 0}}(this),o=setTimeout(n,200),r=function(){var t,r,o,s;for(s=[],t=0,r=(o=["mousemove","keydown"]).length;r>t;t++)e=o[t],s.push(i(e,{onElement:document,withCallback:n}));return s}()},f.prototype.selectionDidChange=function(){return this.paused||r(this.element)?void 0:this.updateCurrentLocationRange()},f.prototype.updateCurrentLocationRange=function(t){var n;return(null!=t?t:t=this.createLocationRangeFromDOMRange(e()))&&!c(t,this.currentLocationRange)?(this.currentLocationRange=t,null!=(n=this.delegate)&&"function"==typeof n.locationRangeDidChange?n.locationRangeDidChange(this.currentLocationRange.slice(0)):void 0):void 0},f.prototype.createDOMRangeFromLocationRange=function(t){var e,n,i,r;return i=this.findContainerAndOffsetFromLocation(t[0]),n=u(t)?i:null!=(r=this.findContainerAndOffsetFromLocation(t[1]))?r:i,null!=i&&null!=n?((e=document.createRange()).setStart.apply(e,i),e.setEnd.apply(e,n),e):void 0},f.prototype.getLocationAtPoint=function(t){var e,n;return(e=this.createDOMRangeFromPoint(t))&&null!=(n=this.createLocationRangeFromDOMRange(e))?n[0]:void 0},f.prototype.domRangeWithinElement=function(e){return e.collapsed?t(this.element,e.startContainer):t(this.element,e.startContainer)&&t(this.element,e.endContainer)},f}(o.BasicObject)}.call(this),function(){var t,e,n,i,r=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty,a=[].slice;n=o.rangeIsCollapsed,i=o.rangesAreEqual,e=o.objectsAreEqual,t=o.getBlockConfig,o.EditorController=function(s){function u(t){var e,n;this.editorElement=t.editorElement,e=t.document,n=t.html,this.selectionManager=new o.SelectionManager(this.editorElement),this.selectionManager.delegate=this,this.composition=new o.Composition,this.composition.delegate=this,this.attachmentManager=new o.AttachmentManager(this.composition.getAttachments()),this.attachmentManager.delegate=this,this.inputController=new(o["Level"+o.config.input.getLevel()+"InputController"])(this.editorElement),this.inputController.delegate=this,this.inputController.responder=this.composition,this.compositionController=new o.CompositionController(this.editorElement,this.composition),this.compositionController.delegate=this,this.toolbarController=new o.ToolbarController(this.editorElement.toolbarElement),this.toolbarController.delegate=this,this.editor=new o.Editor(this.composition,this.selectionManager,this.editorElement),null!=e?this.editor.loadDocument(e):this.editor.loadHTML(n)}var c;return r(u,s),u.prototype.registerSelectionManager=function(){return o.selectionChangeObserver.registerSelectionManager(this.selectionManager)},u.prototype.unregisterSelectionManager=function(){return o.selectionChangeObserver.unregisterSelectionManager(this.selectionManager)},u.prototype.render=function(){return this.compositionController.render()},u.prototype.reparse=function(){return this.composition.replaceHTML(this.editorElement.innerHTML)},u.prototype.compositionDidChangeDocument=function(){return this.notifyEditorElement("document-change"),this.handlingInput?void 0:this.render()},u.prototype.compositionDidChangeCurrentAttributes=function(t){return this.currentAttributes=t,this.toolbarController.updateAttributes(this.currentAttributes),this.updateCurrentActions(),this.notifyEditorElement("attributes-change",{attributes:this.currentAttributes})},u.prototype.compositionDidPerformInsertionAtRange=function(t){return this.pasting?this.pastedRange=t:void 0},u.prototype.compositionShouldAcceptFile=function(t){return this.notifyEditorElement("file-accept",{file:t})},u.prototype.compositionDidAddAttachment=function(t){var e;return e=this.attachmentManager.manageAttachment(t),this.notifyEditorElement("attachment-add",{attachment:e})},u.prototype.compositionDidEditAttachment=function(t){var e;return this.compositionController.rerenderViewForObject(t),e=this.attachmentManager.manageAttachment(t),this.notifyEditorElement("attachment-edit",{attachment:e}),this.notifyEditorElement("change")},u.prototype.compositionDidChangeAttachmentPreviewURL=function(t){return this.compositionController.invalidateViewForObject(t),this.notifyEditorElement("change")},u.prototype.compositionDidRemoveAttachment=function(t){var e;return e=this.attachmentManager.unmanageAttachment(t),this.notifyEditorElement("attachment-remove",{attachment:e})},u.prototype.compositionDidStartEditingAttachment=function(t,e){return this.attachmentLocationRange=this.composition.document.getLocationRangeOfAttachment(t),this.compositionController.installAttachmentEditorForAttachment(t,e),this.selectionManager.setLocationRange(this.attachmentLocationRange)},u.prototype.compositionDidStopEditingAttachment=function(){return this.compositionController.uninstallAttachmentEditor(),this.attachmentLocationRange=null},u.prototype.compositionDidRequestChangingSelectionToLocationRange=function(t){return!this.loadingSnapshot||this.isFocused()?(this.requestedLocationRange=t,this.compositionRevisionWhenLocationRangeRequested=this.composition.revision,this.handlingInput?void 0:this.render()):void 0},u.prototype.compositionWillLoadSnapshot=function(){return this.loadingSnapshot=!0},u.prototype.compositionDidLoadSnapshot=function(){return this.compositionController.refreshViewCache(),this.render(),this.loadingSnapshot=!1},u.prototype.getSelectionManager=function(){return this.selectionManager},u.proxyMethod("getSelectionManager().setLocationRange"),u.proxyMethod("getSelectionManager().getLocationRange"),u.prototype.attachmentManagerDidRequestRemovalOfAttachment=function(t){return this.removeAttachment(t)},u.prototype.compositionControllerWillSyncDocumentView=function(){return this.inputController.editorWillSyncDocumentView(),this.selectionManager.lock(),this.selectionManager.clearSelection()},u.prototype.compositionControllerDidSyncDocumentView=function(){return this.inputController.editorDidSyncDocumentView(),this.selectionManager.unlock(),this.updateCurrentActions(),this.notifyEditorElement("sync")},u.prototype.compositionControllerDidRender=function(){return null!=this.requestedLocationRange&&(this.compositionRevisionWhenLocationRangeRequested===this.composition.revision&&this.selectionManager.setLocationRange(this.requestedLocationRange),this.requestedLocationRange=null,this.compositionRevisionWhenLocationRangeRequested=null),this.renderedCompositionRevision!==this.composition.revision&&(this.runEditorFilters(),this.composition.updateCurrentAttributes(),this.notifyEditorElement("render")),this.renderedCompositionRevision=this.composition.revision},u.prototype.compositionControllerDidFocus=function(){return this.isFocusedInvisibly()&&this.setLocationRange({index:0,offset:0}),this.toolbarController.hideDialog(),this.notifyEditorElement("focus")},u.prototype.compositionControllerDidBlur=function(){return this.notifyEditorElement("blur")},u.prototype.compositionControllerDidSelectAttachment=function(t,e){return this.toolbarController.hideDialog(),this.composition.editAttachment(t,e)},u.prototype.compositionControllerDidRequestDeselectingAttachment=function(t){var e,n;return e=null!=(n=this.attachmentLocationRange)?n:this.composition.document.getLocationRangeOfAttachment(t),this.selectionManager.setLocationRange(e[1])},u.prototype.compositionControllerWillUpdateAttachment=function(t){return this.editor.recordUndoEntry("Edit Attachment",{context:t.id,consolidatable:!0})},u.prototype.compositionControllerDidRequestRemovalOfAttachment=function(t){return this.removeAttachment(t)},u.prototype.inputControllerWillHandleInput=function(){return this.handlingInput=!0,this.requestedRender=!1},u.prototype.inputControllerDidRequestRender=function(){return this.requestedRender=!0},u.prototype.inputControllerDidHandleInput=function(){return this.handlingInput=!1,this.requestedRender?(this.requestedRender=!1,this.render()):void 0},u.prototype.inputControllerDidAllowUnhandledInput=function(){return this.notifyEditorElement("change")},u.prototype.inputControllerDidRequestReparse=function(){return this.reparse()},u.prototype.inputControllerWillPerformTyping=function(){return this.recordTypingUndoEntry()},u.prototype.inputControllerWillPerformFormatting=function(t){return this.recordFormattingUndoEntry(t)},u.prototype.inputControllerWillCutText=function(){return this.editor.recordUndoEntry("Cut")},u.prototype.inputControllerWillPaste=function(t){return this.editor.recordUndoEntry("Paste"),this.pasting=!0,this.notifyEditorElement("before-paste",{paste:t})},u.prototype.inputControllerDidPaste=function(t){return t.range=this.pastedRange,this.pastedRange=null,this.pasting=null,this.notifyEditorElement("paste",{paste:t})},u.prototype.inputControllerWillMoveText=function(){return this.editor.recordUndoEntry("Move")},u.prototype.inputControllerWillAttachFiles=function(){return this.editor.recordUndoEntry("Drop Files")},u.prototype.inputControllerWillPerformUndo=function(){return this.editor.undo()},u.prototype.inputControllerWillPerformRedo=function(){return this.editor.redo()},u.prototype.inputControllerDidReceiveKeyboardCommand=function(t){return this.toolbarController.applyKeyboardCommand(t)},u.prototype.inputControllerDidStartDrag=function(){return this.locationRangeBeforeDrag=this.selectionManager.getLocationRange()},u.prototype.inputControllerDidReceiveDragOverPoint=function(t){return this.selectionManager.setLocationRangeFromPointRange(t)},u.prototype.inputControllerDidCancelDrag=function(){return this.selectionManager.setLocationRange(this.locationRangeBeforeDrag),this.locationRangeBeforeDrag=null},u.prototype.locationRangeDidChange=function(t){return this.composition.updateCurrentAttributes(),this.updateCurrentActions(),this.attachmentLocationRange&&!i(this.attachmentLocationRange,t)&&this.composition.stopEditingAttachment(),this.notifyEditorElement("selection-change")},u.prototype.toolbarDidClickButton=function(){return this.getLocationRange()?void 0:this.setLocationRange({index:0,offset:0})},u.prototype.toolbarDidInvokeAction=function(t){return this.invokeAction(t)},u.prototype.toolbarDidToggleAttribute=function(t){return this.recordFormattingUndoEntry(t),this.composition.toggleCurrentAttribute(t),this.render(),this.selectionFrozen?void 0:this.editorElement.focus()},u.prototype.toolbarDidUpdateAttribute=function(t,e){return this.recordFormattingUndoEntry(t),this.composition.setCurrentAttribute(t,e),this.render(),this.selectionFrozen?void 0:this.editorElement.focus()},u.prototype.toolbarDidRemoveAttribute=function(t){return this.recordFormattingUndoEntry(t),this.composition.removeCurrentAttribute(t),this.render(),this.selectionFrozen?void 0:this.editorElement.focus()},u.prototype.toolbarWillShowDialog=function(){return this.composition.expandSelectionForEditing(),this.freezeSelection()},u.prototype.toolbarDidShowDialog=function(t){return this.notifyEditorElement("toolbar-dialog-show",{dialogName:t})},u.prototype.toolbarDidHideDialog=function(t){return this.thawSelection(),this.editorElement.focus(),this.notifyEditorElement("toolbar-dialog-hide",{dialogName:t})},u.prototype.freezeSelection=function(){return this.selectionFrozen?void 0:(this.selectionManager.lock(),this.composition.freezeSelection(),this.selectionFrozen=!0,this.render())},u.prototype.thawSelection=function(){return this.selectionFrozen?(this.composition.thawSelection(),this.selectionManager.unlock(),this.selectionFrozen=!1,this.render()):void 0},u.prototype.actions={undo:{test:function(){return this.editor.canUndo()},perform:function(){return this.editor.undo()}},redo:{test:function(){return this.editor.canRedo()},perform:function(){return this.editor.redo()}},link:{test:function(){return this.editor.canActivateAttribute("href")}},increaseNestingLevel:{test:function(){return this.editor.canIncreaseNestingLevel()},perform:function(){return this.editor.increaseNestingLevel()&&this.render()}},decreaseNestingLevel:{test:function(){return this.editor.canDecreaseNestingLevel()},perform:function(){return this.editor.decreaseNestingLevel()&&this.render()}},attachFiles:{test:function(){return!0},perform:function(){return o.config.input.pickFiles(this.editor.insertFiles)}}},u.prototype.canInvokeAction=function(t){var e,n;return!!this.actionIsExternal(t)||!!(null!=(e=this.actions[t])&&null!=(n=e.test)?n.call(this):void 0)},u.prototype.invokeAction=function(t){var e,n;return this.actionIsExternal(t)?this.notifyEditorElement("action-invoke",{actionName:t}):null!=(e=this.actions[t])&&null!=(n=e.perform)?n.call(this):void 0},u.prototype.actionIsExternal=function(t){return/^x-./.test(t)},u.prototype.getCurrentActions=function(){var t,e;for(t in e={},this.actions)e[t]=this.canInvokeAction(t);return e},u.prototype.updateCurrentActions=function(){var t;return t=this.getCurrentActions(),e(t,this.currentActions)?void 0:(this.currentActions=t,this.toolbarController.updateActions(this.currentActions),this.notifyEditorElement("actions-change",{actions:this.currentActions}))},u.prototype.runEditorFilters=function(){var t,e,n,i,r,o,s,a;for(a=this.composition.getSnapshot(),n=0,i=(r=this.editor.filters).length;i>n;n++)e=r[n],t=a.document,s=a.selectedRange,null==(a=null!=(o=e.call(this.editor,a))?o:{}).document&&(a.document=t),null==a.selectedRange&&(a.selectedRange=s);return c(a,this.composition.getSnapshot())?void 0:this.composition.loadSnapshot(a)},c=function(t,e){return i(t.selectedRange,e.selectedRange)&&t.document.isEqualTo(e.document)},u.prototype.updateInputElement=function(){var t,e;return t=this.compositionController.getSerializableElement(),e=o.serializeToContentType(t,"text/html"),this.editorElement.setInputElementValue(e)},u.prototype.notifyEditorElement=function(t,e){switch(t){case"document-change":this.documentChangedSinceLastRender=!0;break;case"render":this.documentChangedSinceLastRender&&(this.documentChangedSinceLastRender=!1,this.notifyEditorElement("change"));break;case"change":case"attachment-add":case"attachment-edit":case"attachment-remove":this.updateInputElement()}return this.editorElement.notify(t,e)},u.prototype.removeAttachment=function(t){return this.editor.recordUndoEntry("Delete Attachment"),this.composition.removeAttachment(t),this.render()},u.prototype.recordFormattingUndoEntry=function(e){var i,r;return i=t(e),r=this.selectionManager.getLocationRange(),i||!n(r)?this.editor.recordUndoEntry("Formatting",{context:this.getUndoContext(),consolidatable:!0}):void 0},u.prototype.recordTypingUndoEntry=function(){return this.editor.recordUndoEntry("Typing",{context:this.getUndoContext(this.currentAttributes),consolidatable:!0})},u.prototype.getUndoContext=function(){var t;return t=1<=arguments.length?a.call(arguments,0):[],[this.getLocationContext(),this.getTimeContext()].concat(a.call(t))},u.prototype.getLocationContext=function(){var t;return t=this.selectionManager.getLocationRange(),n(t)?t[0].index:t},u.prototype.getTimeContext=function(){return o.config.undoInterval>0?Math.floor((new Date).getTime()/o.config.undoInterval):0},u.prototype.isFocused=function(){var t;return this.editorElement===(null!=(t=this.editorElement.ownerDocument)?t.activeElement:void 0)},u.prototype.isFocusedInvisibly=function(){return this.isFocused()&&!this.getLocationRange()},u}(o.Controller)}.call(this),function(){var t,e,n,i,r,s,a,u,c,l,h,p,d,f,g,m,y=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};e=o.browser,s=o.makeElement,a=o.triggerEvent,i=o.handleEvent,r=o.handleEventOnce,n=o.findClosestElementFromNode,t=o.AttachmentView.attachmentSelector,o.registerElement("trix-editor",(f=0,c=function(t){return!document.querySelector(":focus")&&t.hasAttribute("autofocus")&&document.querySelector("[autofocus]")===t?t.focus():void 0},g=function(t){return t.hasAttribute("contenteditable")?void 0:(t.setAttribute("contenteditable",""),r("focus",{onElement:t,withCallback:function(){return l(t)}}))},l=function(t){return p(t),m(t)},p=function(t){return("function"==typeof document.queryCommandSupported?document.queryCommandSupported("enableObjectResizing"):void 0)?(document.execCommand("enableObjectResizing",!1,!1),i("mscontrolselect",{onElement:t,preventDefault:!0})):void 0},m=function(){var t;return!("function"==typeof document.queryCommandSupported?document.queryCommandSupported("DefaultParagraphSeparator"):void 0)||"div"!==(t=o.config.blockAttributes.default.tagName)&&"p"!==t?void 0:document.execCommand("DefaultParagraphSeparator",!1,t)},u=function(t){return t.hasAttribute("role")?void 0:t.setAttribute("role","textbox")},d=function(t){var e;if(!t.hasAttribute("aria-label")&&!t.hasAttribute("aria-labelledby"))return(e=function(){var e,n,i;return i=function(){var n,i,r,o;for(o=[],n=0,i=(r=t.labels).length;i>n;n++)(e=r[n]).contains(t)||o.push(e.textContent);return o}(),(n=i.join(" "))?t.setAttribute("aria-label",n):t.removeAttribute("aria-label")})(),i("focus",{onElement:t,withCallback:e})},h=e.forcesObjectResizing?{display:"inline",width:"auto"}:{display:"inline-block",width:"1px"},{defaultCSS:"%t {\n display: block;\n}\n\n%t:empty:not(:focus)::before {\n content: attr(placeholder);\n color: graytext;\n cursor: text;\n pointer-events: none;\n}\n\n%t a[contenteditable=false] {\n cursor: text;\n}\n\n%t img {\n max-width: 100%;\n height: auto;\n}\n\n%t "+t+" figcaption textarea {\n resize: none;\n}\n\n%t "+t+" figcaption textarea.trix-autoresize-clone {\n position: absolute;\n left: -9999px;\n max-height: 0px;\n}\n\n%t "+t+" figcaption[data-trix-placeholder]:empty::before {\n content: attr(data-trix-placeholder);\n color: graytext;\n}\n\n%t [data-trix-cursor-target] {\n display: "+h.display+" !important;\n width: "+h.width+" !important;\n padding: 0 !important;\n margin: 0 !important;\n border: none !important;\n}\n\n%t [data-trix-cursor-target=left] {\n vertical-align: top !important;\n margin-left: -1px !important;\n}\n\n%t [data-trix-cursor-target=right] {\n vertical-align: bottom !important;\n margin-right: -1px !important;\n}",trixId:{get:function(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++f),this.trixId)}},labels:{get:function(){var t,e,i;return e=[],this.id&&this.ownerDocument&&e.push.apply(e,this.ownerDocument.querySelectorAll("label[for='"+this.id+"']")),(t=n(this,{matchingSelector:"label"}))&&((i=t.control)===this||null===i)&&e.push(t),e}},toolbarElement:{get:function(){var t,e,n;return this.hasAttribute("toolbar")?null!=(e=this.ownerDocument)?e.getElementById(this.getAttribute("toolbar")):void 0:this.parentNode?(n="trix-toolbar-"+this.trixId,this.setAttribute("toolbar",n),t=s("trix-toolbar",{id:n}),this.parentNode.insertBefore(t,this),t):void 0}},inputElement:{get:function(){var t,e,n;return this.hasAttribute("input")?null!=(n=this.ownerDocument)?n.getElementById(this.getAttribute("input")):void 0:this.parentNode?(e="trix-input-"+this.trixId,this.setAttribute("input",e),t=s("input",{type:"hidden",id:e}),this.parentNode.insertBefore(t,this.nextElementSibling),t):void 0}},editor:{get:function(){var t;return null!=(t=this.editorController)?t.editor:void 0}},name:{get:function(){var t;return null!=(t=this.inputElement)?t.name:void 0}},value:{get:function(){var t;return null!=(t=this.inputElement)?t.value:void 0},set:function(t){var e;return this.defaultValue=t,null!=(e=this.editor)?e.loadHTML(this.defaultValue):void 0}},notify:function(t,e){return this.editorController?a("trix-"+t,{onElement:this,attributes:e}):void 0},setInputElementValue:function(t){var e;return null!=(e=this.inputElement)?e.value=t:void 0},initialize:function(){return this.hasAttribute("data-trix-internal")?void 0:(g(this),u(this),d(this))},connect:function(){return this.hasAttribute("data-trix-internal")?void 0:(this.editorController||(a("trix-before-initialize",{onElement:this}),this.editorController=new o.EditorController({editorElement:this,html:this.defaultValue=this.value}),requestAnimationFrame(function(t){return function(){return a("trix-initialize",{onElement:t})}}(this))),this.editorController.registerSelectionManager(),this.registerResetListener(),this.registerClickListener(),c(this))},disconnect:function(){var t;return null!=(t=this.editorController)&&t.unregisterSelectionManager(),this.unregisterResetListener(),this.unregisterClickListener()},registerResetListener:function(){return this.resetListener=this.resetBubbled.bind(this),window.addEventListener("reset",this.resetListener,!1)},unregisterResetListener:function(){return window.removeEventListener("reset",this.resetListener,!1)},registerClickListener:function(){return this.clickListener=this.clickBubbled.bind(this),window.addEventListener("click",this.clickListener,!1)},unregisterClickListener:function(){return window.removeEventListener("click",this.clickListener,!1)},resetBubbled:function(t){var e;if(!t.defaultPrevented&&t.target===(null!=(e=this.inputElement)?e.form:void 0))return this.reset()},clickBubbled:function(t){var e;if(!(t.defaultPrevented||this.contains(t.target)||!(e=n(t.target,{matchingSelector:"label"}))||y.call(this.labels,e)<0))return this.focus()},reset:function(){return this.value=this.defaultValue}}))}.call(this),function(){}.call(this)}).call(this),t.exports?t.exports=o:void 0===(r="function"==typeof(i=o)?i.call(e,n,e,t):i)||(t.exports=r)}.call(this)}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t=n(6035),e=n.n(t),i=n(6250),r=n.n(i);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o,s,a=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);u=!0);}catch(t){c=!0,r=t}finally{try{if(!u&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n'.concat(a,""),n.closest(".form-widget").append(u),t.preventDefault()}}))}))}function x(){[".ea-new-form",".ea-edit-form"].forEach((function(t){var e=document.querySelector(t);null!==e&&e.querySelectorAll("input,select,textarea").forEach((function(t){t.hasAttribute("data-ea-trix-is-required")&&"true"===t.getAttribute("data-ea-trix-is-required")&&""===t.value?t.setCustomValidity("invalid"):t.setCustomValidity("")}))}))}function w(){return{ar:"يُرجى ملء هذا الحقل.",bg:"Моля, попълнете това поле",ca:"Empleneu aquest camp",cs:"Vyplňte prosím toto pole",da:"Udfyld dette felt",de:"Füllen Sie dieses Feld aus",el:"Συμπληρώστε αυτό το πεδίο",en:"Please fill in this field",es:"Completa este campo",eu:"Bete eremu hau",fa:"لطفاً این قسمت را تکمیل کنید.",fi:"Täytä tämä kenttä",fr:"Veuillez renseigner ce champ",gl:"Completa este campo",hr:"Ispunite ovo polje",hu:"Kérjük, töltse ki ezt a mezőt",it:"Compila questo campo",lt:"Užpildykite šį lauką",nl:"Vul dit veld in",no:"Vennligst fyll ut dette feltet",pl:"Wypełnij to pole",pt:"Preencha este campo",pt_BR:"Preencha este campo",ro:"Completează acest câmp",ru:"Заполните это поле",sl:"Izpolnite to polje",sr_RS:"Попуните ово поље",sv:"Fyll i det här fältet",tr:"Lütfen bu alanı doldurun",uk:"Заповніть це поле",zh_CN:"请填写此字段"}[document.querySelector("html").getAttribute("lang")]||"Please fill in this field"}function E(t,e){for(var n=0,i=Object.entries(t);n{var t={6035:function(t){var e;e=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e){function n(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.form=e,this.isDirty=!1,this.initialValues={},this.fields=[].concat(n(this.form.elements),n(this.form.querySelectorAll("trix-editor"))),this.message=i.message||"You have unsaved changes!",this.setupFields(),this.setFormHandlers()}var e,r,o;return e=t,(r=[{key:"setupFields",value:function(){var t=this;this.fields.forEach((function(e){e.name&&"submit"!=e.type&&"button"!=e.type&&"hidden"!=e.type&&(t.initialValues[e.name]=e.value,"TRIX-EDITOR"==e.nodeName?e.addEventListener("trix-change",t.checkValue.bind(t)):(e.addEventListener("change",t.checkValue.bind(t)),e.addEventListener("input",t.checkValue.bind(t))))}))}},{key:"setFormHandlers",value:function(){var t=this;window.addEventListener("submit",this.handleSubmit.bind(this)),this.form.addEventListener("submit",this.handleSubmit.bind(this)),window.onbeforeunload=function(){if(t.isDirty)return t.message},"undefined"!=typeof Turbolinks&&document.addEventListener("turbolinks:before-visit",(function(e){t.isDirty&&!confirm(t.message)?e.preventDefault():t.isDirty=!1}))}},{key:"checkValue",value:function(t){var e=t.target;this.initialValues[e.name]!=e.value&&(this.isDirty=!0)}},{key:"handleSubmit",value:function(){this.isDirty=!1}}])&&i(e.prototype,r),o&&i(e,o),t}();t.exports=r}])},t.exports=e()},728:(t,e,n)=>{"use strict";n.r(e)},6250:function(t,e,n){var i,r;(function(){}).call(this),function(){null==window.Set&&(window.Set=function(){function t(){this.clear()}return t.prototype.clear=function(){return this.values=[]},t.prototype.has=function(t){return-1!==this.values.indexOf(t)},t.prototype.add=function(t){return this.has(t)||this.values.push(t),this},t.prototype.delete=function(t){var e;return-1!==(e=this.values.indexOf(t))&&(this.values.splice(e,1),!0)},t.prototype.forEach=function(){var t;return(t=this.values).forEach.apply(t,arguments)},t}())}.call(this),function(e){function n(){}function i(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(t,this)}function r(t,e){for(;3===t._state;)t=t._value;return 0===t._state?void t._deferreds.push(e):(t._handled=!0,void h((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var i;try{i=n(t._value)}catch(t){return void s(e.promise,t)}o(e.promise,i)}else(1===t._state?o:s)(e.promise,t._value)})))}function o(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void a(t);if("function"==typeof n)return void c(function(t,e){return function(){t.apply(e,arguments)}}(n,e),t)}t._state=1,t._value=e,a(t)}catch(e){s(t,e)}}function s(t,e){t._state=2,t._value=e,a(t)}function a(t){2===t._state&&0===t._deferreds.length&&setTimeout((function(){t._handled||p(t._value)}),1);for(var e=0,n=t._deferreds.length;n>e;e++)r(t,t._deferreds[e]);t._deferreds=null}function u(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function c(t,e){var n=!1;try{t((function(t){n||(n=!0,o(e,t))}),(function(t){n||(n=!0,s(e,t))}))}catch(t){if(n)return;n=!0,s(e,t)}}var l=setTimeout,h="function"==typeof setImmediate&&setImmediate||function(t){l(t,1)},p=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};i.prototype.catch=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var o=new i(n);return r(this,new u(t,e,o)),o},i.all=function(t){var e=Array.prototype.slice.call(t);return new i((function(t,n){function i(o,s){try{if(s&&("object"==typeof s||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,(function(t){i(o,t)}),n)}e[o]=s,0==--r&&t(e)}catch(t){n(t)}}if(0===e.length)return t([]);for(var r=e.length,o=0;oi;i++)t[i].then(e,n)}))},i._setImmediateFn=function(t){h=t},i._setUnhandledRejectionFn=function(t){p=t},t.exports?t.exports=i:e.Promise||(e.Promise=i)}(this),function(){var t="object"==typeof window.customElements,e="function"==typeof document.registerElement;t||e||("undefined"==typeof WeakMap&&function(){var t=Object.defineProperty,e=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+e+++"__"};n.prototype={set:function(e,n){var i=e[this.name];return i&&i[0]===e?i[1]=n:t(e,this.name,{value:[e,n],writable:!0}),this},get:function(t){var e;return(e=t[this.name])&&e[0]===t?e[1]:void 0},delete:function(t){var e=t[this.name];return!(!e||e[0]!==t)&&(e[0]=e[1]=void 0,!0)},has:function(t){var e=t[this.name];return!!e&&e[0]===t}},window.WeakMap=n}(),function(t){function e(t){y.push(t),m||(m=!0,l(n))}function n(){m=!1;var t=y;y=[],t.sort((function(t,e){return t.uid_-e.uid_}));var e=!1;t.forEach((function(t){var n=t.takeRecords();(function(t){t.nodes_.forEach((function(e){var n=h.get(e);n&&n.forEach((function(e){e.observer===t&&e.removeTransientObservers()}))}))})(t),n.length&&(t.callback_(n,t),e=!0)})),e&&n()}function i(t,e){for(var n=t;n;n=n.parentNode){var i=h.get(n);if(i)for(var r=0;r0){var r=u(n[i-1],t);if(r)return void(n[i-1]=r)}else e(this.observer);n[i]=t},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(t){var e=this.options;e.attributes&&t.addEventListener("DOMAttrModified",this,!0),e.characterData&&t.addEventListener("DOMCharacterDataModified",this,!0),e.childList&&t.addEventListener("DOMNodeInserted",this,!0),(e.childList||e.subtree)&&t.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(t){var e=this.options;e.attributes&&t.removeEventListener("DOMAttrModified",this,!0),e.characterData&&t.removeEventListener("DOMCharacterDataModified",this,!0),e.childList&&t.removeEventListener("DOMNodeInserted",this,!0),(e.childList||e.subtree)&&t.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(t){if(t!==this.target){this.addListeners_(t),this.transientObservedNodes.push(t);var e=h.get(t);e||h.set(t,e=[]),e.push(this)}},removeTransientObservers:function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach((function(t){this.removeListeners_(t);for(var e=h.get(t),n=0;n=0)){n.push(t);for(var i,s=t.querySelectorAll("link[rel="+o+"]"),a=0,u=s.length;u>a&&(i=s[a]);a++)i.import&&r(i.import,e,n);e(t)}}var o=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";t.forDocumentTree=function(t,e){r(t,e,[])},t.forSubtree=e})),window.CustomElements.addModule((function(t){function e(t,e){return n(t,e)||i(t,e)}function n(e,n){return!!t.upgrade(e,n)||void(n&&s(e))}function i(t,e){f(t,(function(t){return!!n(t,e)||void 0}))}function r(t){v.push(t),y||(y=!0,setTimeout(o))}function o(){y=!1;for(var t,e=v,n=0,i=e.length;i>n&&(t=e[n]);n++)t();v=[]}function s(t){m?r((function(){a(t)})):a(t)}function a(t){t.__upgraded__&&!t.__attached&&(t.__attached=!0,t.attachedCallback&&t.attachedCallback())}function u(t){m?r((function(){c(t)})):c(t)}function c(t){t.__upgraded__&&t.__attached&&(t.__attached=!1,t.detachedCallback&&t.detachedCallback())}function l(t,n){if(d.dom){var i=n[0];if(i&&"childList"===i.type&&i.addedNodes&&i.addedNodes){for(var r=i.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var o=r&&(r.URL||r._URL||r.host&&r.host.localName)||"";o=o.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",n.length,o||"")}var s=function(t){for(var e=t,n=window.wrap(document);e;){if(e==n)return!0;e=e.parentNode||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host}}(t);n.forEach((function(t){"childList"===t.type&&(b(t.addedNodes,(function(t){t.localName&&e(t,s)})),b(t.removedNodes,(function(t){t.localName&&function(t){u(t),f(t,(function(t){u(t)}))}(t)})))})),d.dom&&console.groupEnd()}function h(t){if(!t.__observer){var e=new MutationObserver(l.bind(this,t));e.observe(t,{childList:!0,subtree:!0}),t.__observer=e}}function p(t){t=window.wrap(t),d.dom&&console.group("upgradeDocument: ",t.baseURI.split("/").pop()),e(t,t===window.wrap(document)),h(t),d.dom&&console.groupEnd()}var d=t.flags,f=t.forSubtree,g=t.forDocumentTree,m=window.MutationObserver._isPolyfilled&&d["throttle-attached"];t.hasPolyfillMutations=m,t.hasThrottledAttached=m;var y=!1,v=[],b=Array.prototype.forEach.call.bind(Array.prototype.forEach),A=Element.prototype.createShadowRoot;A&&(Element.prototype.createShadowRoot=function(){var t=A.call(this);return window.CustomElements.watchShadow(this),t}),t.watchShadow=function(t){if(t.shadowRoot&&!t.shadowRoot.__watched){d.dom&&console.log("watching shadow-root for: ",t.localName);for(var e=t.shadowRoot;e;)h(e),e=e.olderShadowRoot}},t.upgradeDocumentTree=function(t){g(t,p)},t.upgradeDocument=p,t.upgradeSubtree=i,t.upgradeAll=e,t.attached=s,t.takeRecords=function(t){for((t=window.wrap(t))||(t=window.wrap(document));t.parentNode;)t=t.parentNode;var e=t.__observer;e&&(l(t,e.takeRecords()),o())}})),window.CustomElements.addModule((function(t){function e(e,r,o){return i.upgrade&&console.group("upgrade:",e.localName),r.is&&e.setAttribute("is",r.is),n(e,r),e.__upgraded__=!0,function(t){t.createdCallback&&t.createdCallback()}(e),o&&t.attached(e),t.upgradeSubtree(e,o),i.upgrade&&console.groupEnd(),e}function n(t,e){Object.__proto__||function(t,e,n){for(var i={},r=e;r!==n&&r!==HTMLElement.prototype;){for(var o,s=Object.getOwnPropertyNames(r),a=0;o=s[a];a++)i[o]||(Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o)),i[o]=1);r=Object.getPrototypeOf(r)}}(t,e.prototype,e.native),t.__proto__=e.prototype}var i=t.flags;t.upgrade=function(n,i){if("template"===n.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(n),!n.__upgraded__&&n.nodeType===Node.ELEMENT_NODE){var r=n.getAttribute("is"),o=t.getRegisteredDefinition(n.localName)||t.getRegisteredDefinition(r);if(o&&(r&&o.tag==n.localName||!r&&!o.extends))return e(n,o,i)}},t.upgradeWithDefinition=e,t.implementPrototype=n})),window.CustomElements.addModule((function(t){function e(t){if(!t.setAttribute._polyfilled){var e=t.setAttribute;t.setAttribute=function(t,i){n.call(this,t,i,e)};var i=t.removeAttribute;t.removeAttribute=function(t){n.call(this,t,null,i)},t.setAttribute._polyfilled=!0}}function n(t,e,n){t=t.toLowerCase();var i=this.getAttribute(t);n.apply(this,arguments);var r=this.getAttribute(t);this.attributeChangedCallback&&r!==i&&this.attributeChangedCallback(t,i,r)}function i(t){var e=r(t);return e?i(e.extends).concat([e]):[]}function r(t){return t?g[t.toLowerCase()]:void 0}function o(t){return function(){return function(t){return h(y(t.tag),t)}(t)}}function s(t,e){t&&(t=t.toLowerCase()),e&&(e=e.toLowerCase());var n,i=r(e||t);if(i){if(t==i.tag&&e==i.is)return new i.ctor;if(!e&&!i.is)return new i.ctor}return e?((n=s(t)).setAttribute("is",e),n):(n=y(t),t.indexOf("-")>=0&&p(n,HTMLElement),n)}function a(t,e){var n=t[e];t[e]=function(){var t=n.apply(this,arguments);return l(t),t}}var u,c=(t.isIE,t.upgradeDocumentTree),l=t.upgradeAll,h=t.upgradeWithDefinition,p=t.implementPrototype,d=t.useNative,f=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],g={},m="http://www.w3.org/1999/xhtml",y=document.createElement.bind(document),v=document.createElementNS.bind(document);u=Object.__proto__||d?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;for(var n=t;n;){if(n===e.prototype)return!0;n=n.__proto__}return!1},a(Node.prototype,"cloneNode"),a(document,"importNode"),document.registerElement=function(n,s){var a=s||{};if(!n)throw new Error("document.registerElement: first argument `name` must not be empty");if(n.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(n)+"'.");if(function(t){for(var e=0;et;t++)if(!(n[t]in InputEvent.prototype))return!1;return!0}()},config:{}}}).call(this)}).call(this);var o=this.Trix;(function(){(function(){o.BasicObject=function(){function t(){}var e,n,i;return t.proxyMethod=function(t){var i,r,o,s,a;return o=n(t),i=o.name,s=o.toMethod,a=o.toProperty,r=o.optional,this.prototype[i]=function(){var t,n;return t=null!=s?r?"function"==typeof this[s]?this[s]():void 0:this[s]():null!=a?this[a]:void 0,r?null!=(n=null!=t?t[i]:void 0)?e.call(n,t,arguments):void 0:(n=t[i],e.call(n,t,arguments))}},n=function(t){var e,n;if(!(n=t.match(i)))throw new Error("can't parse @proxyMethod expression: "+t);return e={name:n[4]},null!=n[2]?e.toMethod=n[1]:e.toProperty=n[1],null!=n[3]&&(e.optional=!0),e},e=Function.prototype.apply,i=/^(.+?)(\(\))?(\?)?\.(.+?)$/,t}()}).call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.Object=function(e){function n(){this.id=++i}var i;return t(n,e),i=0,n.fromJSONString=function(t){return this.fromJSON(JSON.parse(t))},n.prototype.hasSameConstructorAs=function(t){return this.constructor===(null!=t?t.constructor:void 0)},n.prototype.isEqualTo=function(t){return this===t},n.prototype.inspect=function(){var t,e,n;return t=function(){var t,i,r;for(e in r=[],i=null!=(t=this.contentsForInspection())?t:{})n=i[e],r.push(e+"="+n);return r}.call(this),"#<"+this.constructor.name+":"+this.id+(t.length?" "+t.join(", "):"")+">"},n.prototype.contentsForInspection=function(){},n.prototype.toJSONString=function(){return JSON.stringify(this)},n.prototype.toUTF16String=function(){return o.UTF16String.box(this)},n.prototype.getCacheKey=function(){return this.id.toString()},n}(o.BasicObject)}.call(this),function(){o.extend=function(t){var e,n;for(e in t)n=t[e],this[e]=n;return this}}.call(this),function(){o.extend({defer:function(t){return setTimeout(t,1)}})}.call(this),function(){var t,e;o.extend({normalizeSpaces:function(t){return t.replace(RegExp(""+o.ZERO_WIDTH_SPACE,"g"),"").replace(RegExp(""+o.NON_BREAKING_SPACE,"g")," ")},normalizeNewlines:function(t){return t.replace(/\r\n/g,"\n")},breakableWhitespacePattern:RegExp("[^\\S"+o.NON_BREAKING_SPACE+"]"),squishBreakableWhitespace:function(t){return t.replace(RegExp(""+o.breakableWhitespacePattern.source,"g")," ").replace(/\ {2,}/g," ")},summarizeStringChange:function(t,n){var i,r,s,a;return t=o.UTF16String.box(t),(n=o.UTF16String.box(n)).lengthn&&t.charAt(n).isEqualTo(e.charAt(n));)n++;for(;i>n+1&&t.charAt(i-1).isEqualTo(e.charAt(r-1));)i--,r--;return{utf16String:t.slice(n,i),offset:n}}}.call(this),function(){o.extend({copyObject:function(t){var e,n,i;for(e in null==t&&(t={}),n={},t)i=t[e],n[e]=i;return n},objectsAreEqual:function(t,e){var n;if(null==t&&(t={}),null==e&&(e={}),Object.keys(t).length!==Object.keys(e).length)return!1;for(n in t)if(t[n]!==e[n])return!1;return!0}})}.call(this),function(){var t=[].slice;o.extend({arraysAreEqual:function(t,e){var n,i,r;if(null==t&&(t=[]),null==e&&(e=[]),t.length!==e.length)return!1;for(i=n=0,r=t.length;r>n;i=++n)if(t[i]!==e[i])return!1;return!0},arrayStartsWith:function(t,e){return null==t&&(t=[]),null==e&&(e=[]),o.arraysAreEqual(t.slice(0,e.length),e)},spliceArray:function(){var e,n,i;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],(i=n.slice(0)).splice.apply(i,e),i},summarizeArrayChange:function(t,e){var n,i,r,o,s,a,u,c,l,h,p;for(null==t&&(t=[]),null==e&&(e=[]),n=[],h=[],r=new Set,o=0,u=t.length;u>o;o++)p=t[o],r.add(p);for(i=new Set,s=0,c=e.length;c>s;s++)p=e[s],i.add(p),r.has(p)||n.push(p);for(a=0,l=t.length;l>a;a++)p=t[a],i.has(p)||h.push(p);return{added:n,removed:h}}})}.call(this),function(){var t,e,n,i;t=null,e=null,i=null,n=null,o.extend({getAllAttributeNames:function(){return null!=t?t:t=o.getTextAttributeNames().concat(o.getBlockAttributeNames())},getBlockConfig:function(t){return o.config.blockAttributes[t]},getBlockAttributeNames:function(){return null!=e?e:e=Object.keys(o.config.blockAttributes)},getTextConfig:function(t){return o.config.textAttributes[t]},getTextAttributeNames:function(){return null!=i?i:i=Object.keys(o.config.textAttributes)},getListAttributeNames:function(){var t,e;return null!=n?n:n=function(){var n,i;for(t in i=[],n=o.config.blockAttributes)null!=(e=n[t].listAttribute)&&i.push(e);return i}()}})}.call(this),function(){var t,e,n,i,r,s=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=document.documentElement,e=null!=(n=null!=(i=null!=(r=t.matchesSelector)?r:t.webkitMatchesSelector)?i:t.msMatchesSelector)?n:t.mozMatchesSelector,o.extend({handleEvent:function(e,n){var i,r,s,a,u,c,l,h,p,d,f;return u=(l=null!=n?n:{}).onElement,a=l.matchingSelector,f=l.withCallback,s=l.inPhase,c=l.preventDefault,p=l.times,i=null!=u?u:t,h=a,f,d="capturing"===s,r=function(t){var e;return null!=p&&0==--p&&r.destroy(),null!=(e=o.findClosestElementFromNode(t.target,{matchingSelector:h}))&&(null!=f&&f.call(e,t,e),c)?t.preventDefault():void 0},r.destroy=function(){return i.removeEventListener(e,r,d)},i.addEventListener(e,r,d),r},handleEventOnce:function(t,e){return null==e&&(e={}),e.times=1,o.handleEvent(t,e)},triggerEvent:function(e,n){var i,r,s,a,u,c,l;return c=(l=null!=n?n:{}).onElement,r=l.bubbles,s=l.cancelable,i=l.attributes,a=null!=c?c:t,r=!1!==r,s=!1!==s,(u=document.createEvent("Events")).initEvent(e,r,s),null!=i&&o.extend.call(u,i),a.dispatchEvent(u)},elementMatchesSelector:function(t,n){return 1===(null!=t?t.nodeType:void 0)?e.call(t,n):void 0},findClosestElementFromNode:function(t,e){var n,i,r;for(n=(i=null!=e?e:{}).matchingSelector,r=i.untilNode;null!=t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.parentNode;if(null!=t){if(null==n)return t;if(t.closest&&null==r)return t.closest(n);for(;t&&t!==r;){if(o.elementMatchesSelector(t,n))return t;t=t.parentNode}}},findInnerElement:function(t){for(;null!=t?t.firstElementChild:void 0;)t=t.firstElementChild;return t},innerElementIsActive:function(t){return document.activeElement!==t&&o.elementContainsNode(t,document.activeElement)},elementContainsNode:function(t,e){if(t&&e)for(;e;){if(e===t)return!0;e=e.parentNode}},findNodeFromContainerAndOffset:function(t,e){var n;if(t)return t.nodeType===Node.TEXT_NODE?t:0===e?null!=(n=t.firstChild)?n:t:t.childNodes.item(e-1)},findElementFromContainerAndOffset:function(t,e){var n;return n=o.findNodeFromContainerAndOffset(t,e),o.findClosestElementFromNode(n)},findChildIndexOfNode:function(t){var e;if(null!=t?t.parentNode:void 0){for(e=0;t=t.previousSibling;)e++;return e}},removeNode:function(t){var e;return null!=t&&null!=(e=t.parentNode)?e.removeChild(t):void 0},walkTree:function(t,e){var n,i,r,o,s;return i=(r=null!=e?e:{}).onlyNodesOfType,o=r.usingFilter,n=r.expandEntityReferences,s=function(){switch(i){case"element":return NodeFilter.SHOW_ELEMENT;case"text":return NodeFilter.SHOW_TEXT;case"comment":return NodeFilter.SHOW_COMMENT;default:return NodeFilter.SHOW_ALL}}(),document.createTreeWalker(t,s,null!=o?o:null,!0===n)},tagName:function(t){var e;return null!=t&&null!=(e=t.tagName)?e.toLowerCase():void 0},makeElement:function(t,e){var n,i,r,o,s,a,u,c,l,h,p,d,f,g;if(null==e&&(e={}),"object"==typeof t?t=(e=t).tagName:e={attributes:e},r=document.createElement(t),null!=e.editable&&(null==e.attributes&&(e.attributes={}),e.attributes.contenteditable=e.editable),e.attributes)for(a in l=e.attributes)g=l[a],r.setAttribute(a,g);if(e.style)for(a in h=e.style)g=h[a],r.style[a]=g;if(e.data)for(a in p=e.data)g=p[a],r.dataset[a]=g;if(e.className)for(o=0,u=(d=e.className.split(" ")).length;u>o;o++)i=d[o],r.classList.add(i);if(e.textContent&&(r.textContent=e.textContent),e.childNodes)for(s=0,c=(f=[].concat(e.childNodes)).length;c>s;s++)n=f[s],r.appendChild(n);return r},getBlockTagNames:function(){var t,e;return null!=o.blockTagNames?o.blockTagNames:o.blockTagNames=function(){var n,i;for(t in i=[],n=o.config.blockAttributes)(e=n[t].tagName)&&i.push(e);return i}()},nodeIsBlockContainer:function(t){return o.nodeIsBlockStartComment(null!=t?t.firstChild:void 0)},nodeProbablyIsBlockContainer:function(t){var e,n;return e=o.tagName(t),s.call(o.getBlockTagNames(),e)>=0&&(n=o.tagName(t.firstChild),s.call(o.getBlockTagNames(),n)<0)},nodeIsBlockStart:function(t,e){return(null!=e?e:{strict:!0}).strict?o.nodeIsBlockStartComment(t):o.nodeIsBlockStartComment(t)||!o.nodeIsBlockStartComment(t.firstChild)&&o.nodeProbablyIsBlockContainer(t)},nodeIsBlockStartComment:function(t){return o.nodeIsCommentNode(t)&&"block"===(null!=t?t.data:void 0)},nodeIsCommentNode:function(t){return(null!=t?t.nodeType:void 0)===Node.COMMENT_NODE},nodeIsCursorTarget:function(t,e){var n;return n=(null!=e?e:{}).name,t?o.nodeIsTextNode(t)?t.data===o.ZERO_WIDTH_SPACE?!n||t.parentNode.dataset.trixCursorTarget===n:void 0:o.nodeIsCursorTarget(t.firstChild):void 0},nodeIsAttachmentElement:function(t){return o.elementMatchesSelector(t,o.AttachmentView.attachmentSelector)},nodeIsEmptyTextNode:function(t){return o.nodeIsTextNode(t)&&""===(null!=t?t.data:void 0)},nodeIsTextNode:function(t){return(null!=t?t.nodeType:void 0)===Node.TEXT_NODE}})}.call(this),function(){var t,e,n,i,r;t=o.copyObject,i=o.objectsAreEqual,o.extend({normalizeRange:n=function(t){var n;if(null!=t)return Array.isArray(t)||(t=[t,t]),[e(t[0]),e(null!=(n=t[1])?n:t[0])]},rangeIsCollapsed:function(t){var e,i,o;if(null!=t)return o=(i=n(t))[0],e=i[1],r(o,e)},rangesAreEqual:function(t,e){var i,o,s,a,u,c;if(null!=t&&null!=e)return o=(s=n(t))[0],i=s[1],c=(a=n(e))[0],u=a[1],r(o,c)&&r(i,u)}}),e=function(e){return"number"==typeof e?e:t(e)},r=function(t,e){return"number"==typeof t?t===e:i(t,e)}}.call(this),function(){var t,e,n,i,r,s,a;o.registerElement=function(t,e){var n,o;return null==e&&(e={}),t=t.toLowerCase(),e=a(e),(n=(o=s(e)).defaultCSS)&&(delete o.defaultCSS,i(n,t)),r(t,o)},i=function(t,e){return n(e).textContent=t.replace(/%t/g,e)},n=function(e){var n,i;return(n=document.createElement("style")).setAttribute("type","text/css"),n.setAttribute("data-tag-name",e.toLowerCase()),(i=t())&&n.setAttribute("nonce",i),document.head.insertBefore(n,document.head.firstChild),n},t=function(){var t;return(t=e("trix-csp-nonce")||e("csp-nonce"))?t.getAttribute("content"):void 0},e=function(t){return document.head.querySelector("meta[name="+t+"]")},s=function(t){var e,n,i;for(e in n={},t)i=t[e],n[e]="function"==typeof i?{value:i}:i;return n},a=function(){var t;return t=function(t){var e,n,i,r,o;for(e={},n=0,r=(o=["initialize","connect","disconnect"]).length;r>n;n++)e[i=o[n]]=t[i],delete t[i];return e},window.customElements?function(e){var n,i,r,o,s;return s=t(e),r=s.initialize,n=s.connect,i=s.disconnect,r&&(o=n,n=function(){return this.initialized||(this.initialized=!0,r.call(this)),null!=o?o.call(this):void 0}),n&&(e.connectedCallback=n),i&&(e.disconnectedCallback=i),e}:function(e){var n,i,r,o;return r=(o=t(e)).initialize,n=o.connect,i=o.disconnect,r&&(e.createdCallback=r),n&&(e.attachedCallback=n),i&&(e.detachedCallback=i),e}}(),r=window.customElements?function(t,e){var n;return n=function(){return"object"==typeof Reflect?Reflect.construct(HTMLElement,[],n):HTMLElement.apply(this)},Object.setPrototypeOf(n.prototype,HTMLElement.prototype),Object.setPrototypeOf(n,HTMLElement),Object.defineProperties(n.prototype,e),window.customElements.define(t,n),n}:function(t,e){var n,i;return i=Object.create(HTMLElement.prototype,e),n=document.registerElement(t,{prototype:i}),Object.defineProperty(i,"constructor",{value:n}),n}}.call(this),function(){var t,e;o.extend({getDOMSelection:function(){var t;return(t=window.getSelection()).rangeCount>0?t:void 0},getDOMRange:function(){var e,n;return(e=null!=(n=o.getDOMSelection())?n.getRangeAt(0):void 0)&&!t(e)?e:void 0},setDOMRange:function(t){var e;return(e=window.getSelection()).removeAllRanges(),e.addRange(t),o.selectionChangeObserver.update()}}),t=function(t){return e(t.startContainer)||e(t.endContainer)},e=function(t){return!Object.getPrototypeOf(t)}}.call(this),function(){var t;t={"application/x-trix-feature-detection":"test"},o.extend({dataTransferIsPlainText:function(t){var e,n,i;return i=t.getData("text/plain"),n=t.getData("text/html"),i&&n?(e=(new DOMParser).parseFromString(n,"text/html").body).textContent===i?!e.querySelector("*"):void 0:null!=i?i.length:void 0},dataTransferIsWritable:function(e){var n,i;if(null!=(null!=e?e.setData:void 0)){for(n in t)if(i=t[n],!function(){try{return e.setData(n,i),e.getData(n)===i}catch(t){}}())return;return!0}},keyEventIsKeyboardCommand:/Mac|^iP/.test(navigator.platform)?function(t){return t.metaKey}:function(t){return t.ctrlKey}})}.call(this),function(){o.extend({RTL_PATTERN:/[\u05BE\u05C0\u05C3\u05D0-\u05EA\u05F0-\u05F4\u061B\u061F\u0621-\u063A\u0640-\u064A\u066D\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D5\u06E5\u06E6\u200F\u202B\u202E\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE72\uFE74\uFE76-\uFEFC]/,getDirection:function(){var t,e,n,i;return e=o.makeElement("input",{dir:"auto",name:"x",dirName:"x.dir"}),(t=o.makeElement("form")).appendChild(e),n=function(){try{return new FormData(t).has(e.dirName)}catch(t){}}(),i=function(){try{return e.matches(":dir(ltr),:dir(rtl)")}catch(t){}}(),n?function(n){return e.value=n,new FormData(t).get(e.dirName)}:i?function(t){return e.value=t,e.matches(":dir(rtl)")?"rtl":"ltr"}:function(t){var e;return e=t.trim().charAt(0),o.RTL_PATTERN.test(e)?"rtl":"ltr"}}()})}.call(this),function(){}.call(this),function(){var t,e=function(t,e){function i(){this.constructor=t}for(var r in e)n.call(e,r)&&(t[r]=e[r]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;t=o.arraysAreEqual,o.Hash=function(n){function i(t){null==t&&(t={}),this.values=s(t),i.__super__.constructor.apply(this,arguments)}var r,s,a,u,c;return e(i,n),i.fromCommonAttributesOfObjects=function(t){var e,n,i,o,s,a;if(null==t&&(t=[]),!t.length)return new this;for(i=(e=r(t[0])).getKeys(),n=0,o=(a=t.slice(1)).length;o>n;n++)s=a[n],i=e.getKeysCommonToHash(r(s)),e=e.slice(i);return e},i.box=function(t){return r(t)},i.prototype.add=function(t,e){return this.merge(u(t,e))},i.prototype.remove=function(t){return new o.Hash(s(this.values,t))},i.prototype.get=function(t){return this.values[t]},i.prototype.has=function(t){return t in this.values},i.prototype.merge=function(t){return new o.Hash(a(this.values,c(t)))},i.prototype.slice=function(t){var e,n,i,r;for(r={},e=0,i=t.length;i>e;e++)n=t[e],this.has(n)&&(r[n]=this.values[n]);return new o.Hash(r)},i.prototype.getKeys=function(){return Object.keys(this.values)},i.prototype.getKeysCommonToHash=function(t){var e,n,i,o,s;for(t=r(t),s=[],e=0,i=(o=this.getKeys()).length;i>e;e++)n=o[e],this.values[n]===t.values[n]&&s.push(n);return s},i.prototype.isEqualTo=function(e){return t(this.toArray(),r(e).toArray())},i.prototype.isEmpty=function(){return 0===this.getKeys().length},i.prototype.toArray=function(){var t,e,n;return(null!=this.array?this.array:this.array=function(){var i;for(t in e=[],i=this.values)n=i[t],e.push(t,n);return e}.call(this)).slice(0)},i.prototype.toObject=function(){return s(this.values)},i.prototype.toJSON=function(){return this.toObject()},i.prototype.contentsForInspection=function(){return{values:JSON.stringify(this.values)}},u=function(t,e){var n;return(n={})[t]=e,n},a=function(t,e){var n,i,r;for(n in i=s(t),e)r=e[n],i[n]=r;return i},s=function(t,e){var n,i,r,o,s;for(o={},n=0,r=(s=Object.keys(t).sort()).length;r>n;n++)(i=s[n])!==e&&(o[i]=t[i]);return o},r=function(t){return t instanceof o.Hash?t:new o.Hash(t)},c=function(t){return t instanceof o.Hash?t.values:t},i}(o.Object)}.call(this),function(){o.ObjectGroup=function(){function t(t,e){var n,i;this.objects=null!=t?t:[],i=e.depth,(n=e.asTree)&&(this.depth=i,this.objects=this.constructor.groupObjects(this.objects,{asTree:n,depth:this.depth+1}))}return t.groupObjects=function(t,e){var n,i,r,o,s,a,u,c,l;for(null==t&&(t=[]),r=(l=null!=e?e:{}).depth,(n=l.asTree)&&null==r&&(r=0),c=[],s=0,a=t.length;a>s;s++){if(u=t[s],o){if(("function"==typeof u.canBeGrouped?u.canBeGrouped(r):void 0)&&("function"==typeof(i=o[o.length-1]).canBeGroupedWith?i.canBeGroupedWith(u,r):void 0)){o.push(u);continue}c.push(new this(o,{depth:r,asTree:n})),o=null}("function"==typeof u.canBeGrouped?u.canBeGrouped(r):void 0)?o=[u]:c.push(u)}return o&&c.push(new this(o,{depth:r,asTree:n})),c},t.prototype.getObjects=function(){return this.objects},t.prototype.getDepth=function(){return this.depth},t.prototype.getCacheKey=function(){var t,e,n,i,r;for(e=["objectGroup"],t=0,n=(r=this.getObjects()).length;n>t;t++)i=r[t],e.push(i.getCacheKey());return e.join("/")},t}()}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.ObjectMap=function(e){function n(t){var e,n,i,r,o;for(null==t&&(t=[]),this.objects={},i=0,r=t.length;r>i;i++)o=t[i],n=JSON.stringify(o),null==(e=this.objects)[n]&&(e[n]=o)}return t(n,e),n.prototype.find=function(t){var e;return e=JSON.stringify(t),this.objects[e]},n}(o.BasicObject)}.call(this),function(){o.ElementStore=function(){function t(t){this.reset(t)}var e;return t.prototype.add=function(t){var n;return n=e(t),this.elements[n]=t},t.prototype.remove=function(t){var n,i;return n=e(t),(i=this.elements[n])?(delete this.elements[n],i):void 0},t.prototype.reset=function(t){var e,n,i;for(null==t&&(t=[]),this.elements={},n=0,i=t.length;i>n;n++)e=t[n],this.add(e);return t},e=function(t){return t.dataset.trixStoreKey},t}()}.call(this),function(){}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.Operation=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,e),n.prototype.isPerforming=function(){return!0===this.performing},n.prototype.hasPerformed=function(){return!0===this.performed},n.prototype.hasSucceeded=function(){return this.performed&&this.succeeded},n.prototype.hasFailed=function(){return this.performed&&!this.succeeded},n.prototype.getPromise=function(){return null!=this.promise?this.promise:this.promise=new Promise(function(t){return function(e,n){return t.performing=!0,t.perform((function(i,r){return t.succeeded=i,t.performing=!1,t.performed=!0,t.succeeded?e(r):n(r)}))}}(this))},n.prototype.perform=function(t){return t(!1)},n.prototype.release=function(){var t;return null!=(t=this.promise)&&"function"==typeof t.cancel&&t.cancel(),this.promise=null,this.performing=null,this.performed=null,this.succeeded=null},n.proxyMethod("getPromise().then"),n.proxyMethod("getPromise().catch"),n}(o.BasicObject)}.call(this),function(){var t,e,n,i,r,s={}.hasOwnProperty;o.UTF16String=function(t){function e(t,e){this.ucs2String=t,this.codepoints=e,this.length=this.codepoints.length,this.ucs2Length=this.ucs2String.length}return function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.box=function(t){return null==t&&(t=""),t instanceof this?t:this.fromUCS2String(null!=t?t.toString():void 0)},e.fromUCS2String=function(t){return new this(t,i(t))},e.fromCodepoints=function(t){return new this(r(t),t)},e.prototype.offsetToUCS2Offset=function(t){return r(this.codepoints.slice(0,Math.max(0,t))).length},e.prototype.offsetFromUCS2Offset=function(t){return i(this.ucs2String.slice(0,Math.max(0,t))).length},e.prototype.slice=function(){var t;return this.constructor.fromCodepoints((t=this.codepoints).slice.apply(t,arguments))},e.prototype.charAt=function(t){return this.slice(t,t+1)},e.prototype.isEqualTo=function(t){return this.constructor.box(t).ucs2String===this.ucs2String},e.prototype.toJSON=function(){return this.ucs2String},e.prototype.getCacheKey=function(){return this.ucs2String},e.prototype.toString=function(){return this.ucs2String},e}(o.BasicObject),t=1===("function"==typeof Array.from?Array.from("👼").length:void 0),e=null!=("function"==typeof" ".codePointAt?" ".codePointAt(0):void 0),n=" 👼"===("function"==typeof String.fromCodePoint?String.fromCodePoint(32,128124):void 0),i=t&&e?function(t){return Array.from(t).map((function(t){return t.codePointAt(0)}))}:function(t){var e,n,i,r,o;for(r=[],e=0,i=t.length;i>e;)(o=t.charCodeAt(e++))>=55296&&56319>=o&&i>e&&(56320==(64512&(n=t.charCodeAt(e++)))?o=((1023&o)<<10)+(1023&n)+65536:e--),r.push(o);return r},r=n?function(t){return String.fromCodePoint.apply(String,t)}:function(t){var e,n,i;return e=function(){var e,r,o;for(o=[],e=0,r=t.length;r>e;e++)i=t[e],n="",i>65535&&(i-=65536,n+=String.fromCharCode(i>>>10&1023|55296),i=56320|1023&i),o.push(n+String.fromCharCode(i));return o}(),e.join("")}}.call(this),function(){}.call(this),function(){}.call(this),function(){o.config.lang={attachFiles:"Attach Files",bold:"Bold",bullets:"Bullets",byte:"Byte",bytes:"Bytes",captionPlaceholder:"Add a caption…",code:"Code",heading1:"Heading",indent:"Increase Level",italic:"Italic",link:"Link",numbers:"Numbers",outdent:"Decrease Level",quote:"Quote",redo:"Redo",remove:"Remove",strike:"Strikethrough",undo:"Undo",unlink:"Unlink",url:"URL",urlPlaceholder:"Enter a URL…",GB:"GB",KB:"KB",MB:"MB",PB:"PB",TB:"TB"}}.call(this),function(){o.config.css={attachment:"attachment",attachmentCaption:"attachment__caption",attachmentCaptionEditor:"attachment__caption-editor",attachmentMetadata:"attachment__metadata",attachmentMetadataContainer:"attachment__metadata-container",attachmentName:"attachment__name",attachmentProgress:"attachment__progress",attachmentSize:"attachment__size",attachmentToolbar:"attachment__toolbar",attachmentGallery:"attachment-gallery"}}.call(this),function(){var t;o.config.blockAttributes=t={default:{tagName:"div",parse:!1},quote:{tagName:"blockquote",nestable:!0},heading1:{tagName:"h1",terminal:!0,breakOnReturn:!0,group:!1},code:{tagName:"pre",terminal:!0,text:{plaintext:!0}},bulletList:{tagName:"ul",parse:!1},bullet:{tagName:"li",listAttribute:"bulletList",group:!1,nestable:!0,test:function(e){return o.tagName(e.parentNode)===t[this.listAttribute].tagName}},numberList:{tagName:"ol",parse:!1},number:{tagName:"li",listAttribute:"numberList",group:!1,nestable:!0,test:function(e){return o.tagName(e.parentNode)===t[this.listAttribute].tagName}},attachmentGallery:{tagName:"div",exclusive:!0,terminal:!0,parse:!1,group:!1}}}.call(this),function(){var t,e;t=o.config.lang,e=[t.bytes,t.KB,t.MB,t.GB,t.TB,t.PB],o.config.fileSize={prefix:"IEC",precision:2,formatter:function(n){var i,r;switch(n){case 0:return"0 "+t.bytes;case 1:return"1 "+t.byte;default:return i=function(){switch(this.prefix){case"SI":return 1e3;case"IEC":return 1024}}.call(this),r=Math.floor(Math.log(n)/Math.log(i)),(n/Math.pow(i,r)).toFixed(this.precision).replace(/0*$/,"").replace(/\.$/,"")+" "+e[r]}}}}.call(this),function(){o.config.textAttributes={bold:{tagName:"strong",inheritable:!0,parser:function(t){var e;return"bold"===(e=window.getComputedStyle(t)).fontWeight||e.fontWeight>=600}},italic:{tagName:"em",inheritable:!0,parser:function(t){return"italic"===window.getComputedStyle(t).fontStyle}},href:{groupTagName:"a",parser:function(t){var e,n;return n="a:not("+o.AttachmentView.attachmentSelector+")",(e=o.findClosestElementFromNode(t,{matchingSelector:n}))?e.getAttribute("href"):void 0}},strike:{tagName:"del",inheritable:!0},frozen:{style:{backgroundColor:"highlight"}}}}.call(this),function(){var t,e,n,i;i=["contenteditable","data-trix-id","data-trix-store-key","data-trix-mutable","data-trix-placeholder","tabindex"],n="["+(e="data-trix-serialized-attributes")+"]",t=new RegExp("\x3c!--block--\x3e","g"),o.extend({serializers:{"application/json":function(t){var e;if(t instanceof o.Document)e=t;else{if(!(t instanceof HTMLElement))throw new Error("unserializable object");e=o.Document.fromHTML(t.innerHTML)}return e.toSerializableDocument().toJSONString()},"text/html":function(r){var s,a,u,c,l,h,p,d,f,g,m,y,v,b,A,C,x;if(r instanceof o.Document)c=o.DocumentView.render(r);else{if(!(r instanceof HTMLElement))throw new Error("unserializable object");c=r.cloneNode(!0)}for(l=0,f=(b=c.querySelectorAll("[data-trix-serialize=false]")).length;f>l;l++)u=b[l],o.removeNode(u);for(h=0,g=i.length;g>h;h++)for(s=i[h],p=0,m=(A=c.querySelectorAll("["+s+"]")).length;m>p;p++)(u=A[p]).removeAttribute(s);for(d=0,y=(C=c.querySelectorAll(n)).length;y>d;d++){u=C[d];try{for(v in a=JSON.parse(u.getAttribute(e)),u.removeAttribute(e),a)x=a[v],u.setAttribute(v,x)}catch(t){}}return c.innerHTML.replace(t,"")}},deserializers:{"application/json":function(t){return o.Document.fromJSONString(t)},"text/html":function(t){return o.Document.fromHTML(t)}},serializeToContentType:function(t,e){var n;if(n=o.serializers[e])return n(t);throw new Error("unknown content type: "+e)},deserializeFromContentType:function(t,e){var n;if(n=o.deserializers[e])return n(t);throw new Error("unknown content type: "+e)}})}.call(this),function(){var t;t=o.config.lang,o.config.toolbar={getDefaultHTML:function(){return'
\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n\n \n \n \n\n \n\n \n \n \n \n
\n\n
\n \n
'}}}.call(this),function(){o.config.undoInterval=5e3}.call(this),function(){o.config.attachments={preview:{presentation:"gallery",caption:{name:!0,size:!0}},file:{caption:{size:!0}}}}.call(this),function(){o.config.keyNames={8:"backspace",9:"tab",13:"return",27:"escape",37:"left",39:"right",46:"delete",68:"d",72:"h",79:"o"}}.call(this),function(){o.config.input={level2Enabled:!0,getLevel:function(){return this.level2Enabled&&o.browser.supportsInputEvents?2:0},pickFiles:function(t){var e;return(e=o.makeElement("input",{type:"file",multiple:!0,hidden:!0,id:this.fileInputId})).addEventListener("change",(function(){return t(e.files),o.removeNode(e)})),o.removeNode(document.getElementById(this.fileInputId)),document.body.appendChild(e),e.click()},fileInputId:"trix-file-input-"+Date.now().toString(16)}}.call(this),function(){}.call(this),function(){o.registerElement("trix-toolbar",{defaultCSS:"%t {\n display: block;\n}\n\n%t {\n white-space: nowrap;\n}\n\n%t [data-trix-dialog] {\n display: none;\n}\n\n%t [data-trix-dialog][data-trix-active] {\n display: block;\n}\n\n%t [data-trix-dialog] [data-trix-validate]:invalid {\n background-color: #ffdddd;\n}",initialize:function(){return""===this.innerHTML?this.innerHTML=o.config.toolbar.getDefaultHTML():void 0}})}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty,n=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};o.ObjectView=function(e){function i(t,e){this.object=t,this.options=null!=e?e:{},this.childViews=[],this.rootView=this}return t(i,e),i.prototype.getNodes=function(){var t,e,n,i,r;for(null==this.nodes&&(this.nodes=this.createNodes()),r=[],t=0,e=(i=this.nodes).length;e>t;t++)n=i[t],r.push(n.cloneNode(!0));return r},i.prototype.invalidate=function(){var t;return this.nodes=null,this.childViews=[],null!=(t=this.parentView)?t.invalidate():void 0},i.prototype.invalidateViewForObject=function(t){var e;return null!=(e=this.findViewForObject(t))?e.invalidate():void 0},i.prototype.findOrCreateCachedChildView=function(t,e){var n;return(n=this.getCachedViewForObject(e))?this.recordChildView(n):(n=this.createChildView.apply(this,arguments),this.cacheViewForObject(n,e)),n},i.prototype.createChildView=function(t,e,n){var i;return null==n&&(n={}),e instanceof o.ObjectGroup&&(n.viewClass=t,t=o.ObjectGroupView),i=new t(e,n),this.recordChildView(i)},i.prototype.recordChildView=function(t){return t.parentView=this,t.rootView=this.rootView,this.childViews.push(t),t},i.prototype.getAllChildViews=function(){var t,e,n,i,r;for(r=[],e=0,n=(i=this.childViews).length;n>e;e++)t=i[e],r.push(t),r=r.concat(t.getAllChildViews());return r},i.prototype.findElement=function(){return this.findElementForObject(this.object)},i.prototype.findElementForObject=function(t){var e;return(e=null!=t?t.id:void 0)?this.rootView.element.querySelector("[data-trix-id='"+e+"']"):void 0},i.prototype.findViewForObject=function(t){var e,n,i,r;for(e=0,n=(i=this.getAllChildViews()).length;n>e;e++)if((r=i[e]).object===t)return r},i.prototype.getViewCache=function(){return this.rootView!==this?this.rootView.getViewCache():this.isViewCachingEnabled()?null!=this.viewCache?this.viewCache:this.viewCache={}:void 0},i.prototype.isViewCachingEnabled=function(){return!1!==this.shouldCacheViews},i.prototype.enableViewCaching=function(){return this.shouldCacheViews=!0},i.prototype.disableViewCaching=function(){return this.shouldCacheViews=!1},i.prototype.getCachedViewForObject=function(t){var e;return null!=(e=this.getViewCache())?e[t.getCacheKey()]:void 0},i.prototype.cacheViewForObject=function(t,e){var n;return null!=(n=this.getViewCache())?n[e.getCacheKey()]=t:void 0},i.prototype.garbageCollectCachedViews=function(){var t,e,i,r,o,s;if(t=this.getViewCache()){for(e in s=this.getAllChildViews().concat(this),i=function(){var t,e,n;for(n=[],t=0,e=s.length;e>t;t++)o=s[t],n.push(o.object.getCacheKey());return n}(),r=[],t)n.call(i,e)<0&&r.push(delete t[e]);return r}},i}(o.BasicObject)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.ObjectGroupView=function(e){function n(){n.__super__.constructor.apply(this,arguments),this.objectGroup=this.object,this.viewClass=this.options.viewClass,delete this.options.viewClass}return t(n,e),n.prototype.getChildViews=function(){var t,e,n,i;if(!this.childViews.length)for(t=0,e=(i=this.objectGroup.getObjects()).length;e>t;t++)n=i[t],this.findOrCreateCachedChildView(this.viewClass,n,this.options);return this.childViews},n.prototype.createNodes=function(){var t,e,n,i,r,o,s,a;for(t=this.createContainerElement(),e=0,i=(s=this.getChildViews()).length;i>e;e++)for(n=0,r=(a=s[e].getNodes()).length;r>n;n++)o=a[n],t.appendChild(o);return[t]},n.prototype.createContainerElement=function(t){return null==t&&(t=this.objectGroup.getDepth()),this.getChildViews()[0].createContainerElement(t)},n}(o.ObjectView)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.Controller=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,e),n}(o.BasicObject)}.call(this),function(){var t,e,n,i,r,s,a=function(t,e){function n(){this.constructor=t}for(var i in e)u.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty,c=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=o.findClosestElementFromNode,n=o.nodeIsEmptyTextNode,e=o.nodeIsBlockStartComment,i=o.normalizeSpaces,r=o.summarizeStringChange,s=o.tagName,o.MutationObserver=function(o){function u(t){this.element=t,this.didMutate=function(t,e){return function(){return t.apply(e,arguments)}}(this.didMutate,this),this.observer=new window.MutationObserver(this.didMutate),this.start()}var l,h,p,d;return a(u,o),p="["+(h="data-trix-mutable")+"]",d={attributes:!0,childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},u.prototype.start=function(){return this.reset(),this.observer.observe(this.element,d)},u.prototype.stop=function(){return this.observer.disconnect()},u.prototype.didMutate=function(t){var e,n;return(e=this.mutations).push.apply(e,this.findSignificantMutations(t)),this.mutations.length?(null!=(n=this.delegate)&&"function"==typeof n.elementDidMutate&&n.elementDidMutate(this.getMutationSummary()),this.reset()):void 0},u.prototype.reset=function(){return this.mutations=[]},u.prototype.findSignificantMutations=function(t){var e,n,i,r;for(r=[],e=0,n=t.length;n>e;e++)i=t[e],this.mutationIsSignificant(i)&&r.push(i);return r},u.prototype.mutationIsSignificant=function(t){var e,n,i,r;if(this.nodeIsMutable(t.target))return!1;for(e=0,n=(r=this.nodesModifiedByMutation(t)).length;n>e;e++)if(i=r[e],this.nodeIsSignificant(i))return!0;return!1},u.prototype.nodeIsSignificant=function(t){return t!==this.element&&!this.nodeIsMutable(t)&&!n(t)},u.prototype.nodeIsMutable=function(e){return t(e,{matchingSelector:p})},u.prototype.nodesModifiedByMutation=function(t){var e;switch(e=[],t.type){case"attributes":t.attributeName!==h&&e.push(t.target);break;case"characterData":e.push(t.target.parentNode),e.push(t.target);break;case"childList":e.push.apply(e,t.addedNodes),e.push.apply(e,t.removedNodes)}return e},u.prototype.getMutationSummary=function(){return this.getTextMutationSummary()},u.prototype.getTextMutationSummary=function(){var t,e,n,i,r,o,s,a,u,l,h;for(n=(a=this.getTextChangesFromCharacterData()).additions,r=a.deletions,o=0,s=(u=(h=this.getTextChangesFromChildList()).additions).length;s>o;o++)e=u[o],c.call(n,e)<0&&n.push(e);return r.push.apply(r,h.deletions),l={},(t=n.join(""))&&(l.textAdded=t),(i=r.join(""))&&(l.textDeleted=i),l},u.prototype.getMutationsByType=function(t){var e,n,i,r,o;for(o=[],e=0,n=(r=this.mutations).length;n>e;e++)(i=r[e]).type===t&&o.push(i);return o},u.prototype.getTextChangesFromChildList=function(){var t,n,r,o,s,a,u,c,h,p;for(t=[],u=[],n=0,o=(a=this.getMutationsByType("childList")).length;o>n;n++)s=a[n],t.push.apply(t,s.addedNodes),u.push.apply(u,s.removedNodes);return 0===t.length&&1===u.length&&e(u[0])?(h=[],p=["\n"]):(h=l(t),p=l(u)),{additions:function(){var t,e,n;for(n=[],r=t=0,e=h.length;e>t;r=++t)(c=h[r])!==p[r]&&n.push(i(c));return n}(),deletions:function(){var t,e,n;for(n=[],r=t=0,e=p.length;e>t;r=++t)(c=p[r])!==h[r]&&n.push(i(c));return n}()}},u.prototype.getTextChangesFromCharacterData=function(){var t,e,n,o,s,a,u,c;return(e=this.getMutationsByType("characterData")).length&&(c=e[0],n=e[e.length-1],s=i(c.oldValue),o=i(n.target.data),t=(a=r(s,o)).added,u=a.removed),{additions:t?[t]:[],deletions:u?[u]:[]}},l=function(t){var e,n,i,r;for(null==t&&(t=[]),r=[],e=0,n=t.length;n>e;e++)switch(i=t[e],i.nodeType){case Node.TEXT_NODE:r.push(i.data);break;case Node.ELEMENT_NODE:"br"===s(i)?r.push("\n"):r.push.apply(r,l(i.childNodes))}return r},u}(o.BasicObject)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.FileVerificationOperation=function(e){function n(t){this.file=t}return t(n,e),n.prototype.perform=function(t){var e;return(e=new FileReader).onerror=function(){return t(!1)},e.onload=function(n){return function(){e.onerror=null;try{e.abort()}catch(t){}return t(!0,n.file)}}(this),e.readAsArrayBuffer(this.file)},n}(o.Operation)}.call(this),function(){var t,e,n=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;t=o.handleEvent,e=o.innerElementIsActive,o.InputController=function(i){function r(e){var n;for(n in this.element=e,this.mutationObserver=new o.MutationObserver(this.element),this.mutationObserver.delegate=this,this.events)t(n,{onElement:this.element,withCallback:this.handlerFor(n)})}return n(r,i),r.prototype.events={},r.prototype.elementDidMutate=function(){},r.prototype.editorWillSyncDocumentView=function(){return this.mutationObserver.stop()},r.prototype.editorDidSyncDocumentView=function(){return this.mutationObserver.start()},r.prototype.requestRender=function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.inputControllerDidRequestRender?t.inputControllerDidRequestRender():void 0},r.prototype.requestReparse=function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.inputControllerDidRequestReparse&&t.inputControllerDidRequestReparse(),this.requestRender()},r.prototype.attachFiles=function(t){var e,n;return n=function(){var n,i,r;for(r=[],n=0,i=t.length;i>n;n++)e=t[n],r.push(new o.FileVerificationOperation(e));return r}(),Promise.all(n).then(function(t){return function(e){return t.handleInput((function(){var t,n;return null!=(t=this.delegate)&&t.inputControllerWillAttachFiles(),null!=(n=this.responder)&&n.insertFiles(e),this.requestRender()}))}}(this))},r.prototype.handlerFor=function(t){return function(n){return function(i){return i.defaultPrevented?void 0:n.handleInput((function(){return e(this.element)?void 0:(this.eventName=t,this.events[t].call(this,i))}))}}(this)},r.prototype.handleInput=function(t){var e,n;try{return null!=(e=this.delegate)&&e.inputControllerWillHandleInput(),t.call(this)}finally{null!=(n=this.delegate)&&n.inputControllerDidHandleInput()}},r.prototype.createLinkHTML=function(t,e){var n;return(n=document.createElement("a")).href=t,n.textContent=null!=e?e:t,n.outerHTML},r}(o.BasicObject)}.call(this),function(){var t,e,n,i,r,s,a,u,c,l,h,p,d=function(t,e){function n(){this.constructor=t}for(var i in e)f.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},f={}.hasOwnProperty,g=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};c=o.makeElement,l=o.objectsAreEqual,o.tagName,e=o.browser,a=o.keyEventIsKeyboardCommand,i=o.dataTransferIsWritable,n=o.dataTransferIsPlainText,u=o.config.keyNames,o.Level0InputController=function(e){function s(){s.__super__.constructor.apply(this,arguments),this.resetInputSummary()}var f;return d(s,e),f=0,s.prototype.setInputSummary=function(t){var e,n;for(e in null==t&&(t={}),this.inputSummary.eventName=this.eventName,t)n=t[e],this.inputSummary[e]=n;return this.inputSummary},s.prototype.resetInputSummary=function(){return this.inputSummary={}},s.prototype.reset=function(){return this.resetInputSummary(),o.selectionChangeObserver.reset()},s.prototype.elementDidMutate=function(t){var e;return this.isComposing()?null!=(e=this.delegate)&&"function"==typeof e.inputControllerDidAllowUnhandledInput?e.inputControllerDidAllowUnhandledInput():void 0:this.handleInput((function(){return this.mutationIsSignificant(t)&&(this.mutationIsExpected(t)?this.requestRender():this.requestReparse()),this.reset()}))},s.prototype.mutationIsExpected=function(t){var e,n,i,r,o,s,a,u,c;return s=t.textAdded,a=t.textDeleted,!!this.inputSummary.preferDocument||(e=null!=s?s===this.inputSummary.textAdded:!this.inputSummary.textAdded,n=null!=a?this.inputSummary.didDelete:!this.inputSummary.didDelete,c="\n"===a&&!n,!!(((u=("\n"===s||" \n"===s)&&!e)&&!c||c&&!u)&&(r=this.getSelectedRange())&&(i=u?s.replace(/\n$/,"").length||-1:(null!=s?s.length:void 0)||1,null!=(o=this.responder)?o.positionIsBlockBreak(r[1]+i):void 0))||e&&n)},s.prototype.mutationIsSignificant=function(t){var e,n,i;return i=Object.keys(t).length>0,e=""===(null!=(n=this.compositionInput)?n.getEndData():void 0),i||!e},s.prototype.events={keydown:function(t){var e,n,i,r,s,c,l,h,p;if(this.isComposing()||this.resetInputSummary(),this.inputSummary.didInput=!0,r=u[t.keyCode]){for(n=this.keys,i=0,c=(h=["ctrl","alt","shift","meta"]).length;c>i;i++)t[(l=h[i])+"Key"]&&("ctrl"===l&&(l="control"),n=null!=n?n[l]:void 0);null!=(null!=n?n[r]:void 0)&&(this.setInputSummary({keyName:r}),o.selectionChangeObserver.reset(),n[r].call(this,t))}return a(t)&&(e=String.fromCharCode(t.keyCode).toLowerCase())&&(s=function(){var e,n,i,r;for(r=[],e=0,n=(i=["alt","shift"]).length;n>e;e++)t[(l=i[e])+"Key"]&&r.push(l);return r}(),s.push(e),null!=(p=this.delegate)?p.inputControllerDidReceiveKeyboardCommand(s):void 0)?t.preventDefault():void 0},keypress:function(t){var e,n,i;if(null==this.inputSummary.eventName&&!t.metaKey&&(!t.ctrlKey||t.altKey))return(i=p(t))?(null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.insertString(i),this.setInputSummary({textAdded:i,didDelete:this.selectionIsExpanded()})):void 0},textInput:function(t){var e,n,i,r;return e=t.data,(r=this.inputSummary.textAdded)&&r!==e&&r.toUpperCase()===e?(n=this.getSelectedRange(),this.setSelectedRange([n[0],n[1]+r.length]),null!=(i=this.responder)&&i.insertString(e),this.setInputSummary({textAdded:e}),this.setSelectedRange(n)):void 0},dragenter:function(t){return t.preventDefault()},dragstart:function(t){var e;return t.target,this.serializeSelectionToDataTransfer(t.dataTransfer),this.draggedRange=this.getSelectedRange(),null!=(e=this.delegate)&&"function"==typeof e.inputControllerDidStartDrag?e.inputControllerDidStartDrag():void 0},dragover:function(t){var e,n;return!this.draggedRange&&!this.canAcceptDataTransfer(t.dataTransfer)||(t.preventDefault(),e={x:t.clientX,y:t.clientY},l(e,this.draggingPoint))?void 0:(this.draggingPoint=e,null!=(n=this.delegate)&&"function"==typeof n.inputControllerDidReceiveDragOverPoint?n.inputControllerDidReceiveDragOverPoint(this.draggingPoint):void 0)},dragend:function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.inputControllerDidCancelDrag&&t.inputControllerDidCancelDrag(),this.draggedRange=null,this.draggingPoint=null},drop:function(t){var e,n,i,r,s,a,u,c,l;return t.preventDefault(),i=null!=(s=t.dataTransfer)?s.files:void 0,r={x:t.clientX,y:t.clientY},null!=(a=this.responder)&&a.setLocationRangeFromPointRange(r),(null!=i?i.length:void 0)?this.attachFiles(i):this.draggedRange?(null!=(u=this.delegate)&&u.inputControllerWillMoveText(),null!=(c=this.responder)&&c.moveTextFromRange(this.draggedRange),this.draggedRange=null,this.requestRender()):(n=t.dataTransfer.getData("application/x-trix-document"))&&(e=o.Document.fromJSONString(n),null!=(l=this.responder)&&l.insertDocument(e),this.requestRender()),this.draggedRange=null,this.draggingPoint=null},cut:function(t){var e,n;return(null!=(e=this.responder)?e.selectionIsExpanded():void 0)&&(this.serializeSelectionToDataTransfer(t.clipboardData)&&t.preventDefault(),null!=(n=this.delegate)&&n.inputControllerWillCutText(),this.deleteInDirection("backward"),t.defaultPrevented)?this.requestRender():void 0},copy:function(t){var e;return(null!=(e=this.responder)?e.selectionIsExpanded():void 0)&&this.serializeSelectionToDataTransfer(t.clipboardData)?t.preventDefault():void 0},paste:function(t){var e,i,s,a,u,c,l,p,d,m,y,v,b,A,C,x,w,E,S,k,R,D,L;return e=null!=(p=t.clipboardData)?p:t.testClipboardData,l={clipboard:e},null==e||h(t)?void this.getPastedHTMLUsingHiddenElement(function(t){return function(e){var n,i,r;return l.type="text/html",l.html=e,null!=(n=t.delegate)&&n.inputControllerWillPaste(l),null!=(i=t.responder)&&i.insertHTML(l.html),t.requestRender(),null!=(r=t.delegate)?r.inputControllerDidPaste(l):void 0}}(this)):((a=e.getData("URL"))?(l.type="text/html",L=(c=e.getData("public.url-name"))?o.squishBreakableWhitespace(c).trim():a,l.html=this.createLinkHTML(a,L),null!=(d=this.delegate)&&d.inputControllerWillPaste(l),this.setInputSummary({textAdded:L,didDelete:this.selectionIsExpanded()}),null!=(C=this.responder)&&C.insertHTML(l.html),this.requestRender(),null!=(x=this.delegate)&&x.inputControllerDidPaste(l)):n(e)?(l.type="text/plain",l.string=e.getData("text/plain"),null!=(w=this.delegate)&&w.inputControllerWillPaste(l),this.setInputSummary({textAdded:l.string,didDelete:this.selectionIsExpanded()}),null!=(E=this.responder)&&E.insertString(l.string),this.requestRender(),null!=(S=this.delegate)&&S.inputControllerDidPaste(l)):(u=e.getData("text/html"))?(l.type="text/html",l.html=u,null!=(k=this.delegate)&&k.inputControllerWillPaste(l),null!=(R=this.responder)&&R.insertHTML(l.html),this.requestRender(),null!=(D=this.delegate)&&D.inputControllerDidPaste(l)):g.call(e.types,"Files")>=0&&(s=null!=(m=e.items)&&null!=(y=m[0])&&"function"==typeof y.getAsFile?y.getAsFile():void 0)&&(!s.name&&(i=r(s))&&(s.name="pasted-file-"+ ++f+"."+i),l.type="File",l.file=s,null!=(v=this.delegate)&&v.inputControllerWillAttachFiles(),null!=(b=this.responder)&&b.insertFile(l.file),this.requestRender(),null!=(A=this.delegate)&&A.inputControllerDidPaste(l)),t.preventDefault())},compositionstart:function(t){return this.getCompositionInput().start(t.data)},compositionupdate:function(t){return this.getCompositionInput().update(t.data)},compositionend:function(t){return this.getCompositionInput().end(t.data)},beforeinput:function(){return this.inputSummary.didInput=!0},input:function(t){return this.inputSummary.didInput=!0,t.stopPropagation()}},s.prototype.keys={backspace:function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("backward",t)},delete:function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("forward",t)},return:function(){var t,e;return this.setInputSummary({preferDocument:!0}),null!=(t=this.delegate)&&t.inputControllerWillPerformTyping(),null!=(e=this.responder)?e.insertLineBreak():void 0},tab:function(t){var e,n;return(null!=(e=this.responder)?e.canIncreaseNestingLevel():void 0)?(null!=(n=this.responder)&&n.increaseNestingLevel(),this.requestRender(),t.preventDefault()):void 0},left:function(t){var e;return this.selectionIsInCursorTarget()?(t.preventDefault(),null!=(e=this.responder)?e.moveCursorInDirection("backward"):void 0):void 0},right:function(t){var e;return this.selectionIsInCursorTarget()?(t.preventDefault(),null!=(e=this.responder)?e.moveCursorInDirection("forward"):void 0):void 0},control:{d:function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("forward",t)},h:function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("backward",t)},o:function(t){var e,n;return t.preventDefault(),null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.insertString("\n",{updatePosition:!1}),this.requestRender()}},shift:{return:function(t){var e,n;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.insertString("\n"),this.requestRender(),t.preventDefault()},tab:function(t){var e,n;return(null!=(e=this.responder)?e.canDecreaseNestingLevel():void 0)?(null!=(n=this.responder)&&n.decreaseNestingLevel(),this.requestRender(),t.preventDefault()):void 0},left:function(t){return this.selectionIsInCursorTarget()?(t.preventDefault(),this.expandSelectionInDirection("backward")):void 0},right:function(t){return this.selectionIsInCursorTarget()?(t.preventDefault(),this.expandSelectionInDirection("forward")):void 0}},alt:{backspace:function(){var t;return this.setInputSummary({preferDocument:!1}),null!=(t=this.delegate)?t.inputControllerWillPerformTyping():void 0}},meta:{backspace:function(){var t;return this.setInputSummary({preferDocument:!1}),null!=(t=this.delegate)?t.inputControllerWillPerformTyping():void 0}}},s.prototype.getCompositionInput=function(){return this.isComposing()?this.compositionInput:this.compositionInput=new t(this)},s.prototype.isComposing=function(){return null!=this.compositionInput&&!this.compositionInput.isEnded()},s.prototype.deleteInDirection=function(t,e){var n;return!1!==(null!=(n=this.responder)?n.deleteInDirection(t):void 0)?this.setInputSummary({didDelete:!0}):e?(e.preventDefault(),this.requestRender()):void 0},s.prototype.serializeSelectionToDataTransfer=function(t){var e,n;if(i(t))return e=null!=(n=this.responder)?n.getSelectedDocument().toSerializableDocument():void 0,t.setData("application/x-trix-document",JSON.stringify(e)),t.setData("text/html",o.DocumentView.render(e).innerHTML),t.setData("text/plain",e.toString().replace(/\n$/,"")),!0},s.prototype.canAcceptDataTransfer=function(t){var e,n,i,r,o;for(o={},e=0,n=(r=null!=(i=null!=t?t.types:void 0)?i:[]).length;n>e;e++)o[r[e]]=!0;return o.Files||o["application/x-trix-document"]||o["text/html"]||o["text/plain"]},s.prototype.getPastedHTMLUsingHiddenElement=function(t){var e,n,i;return n=this.getSelectedRange(),i={position:"absolute",left:window.pageXOffset+"px",top:window.pageYOffset+"px",opacity:0},e=c({style:i,tagName:"div",editable:!0}),document.body.appendChild(e),e.focus(),requestAnimationFrame(function(i){return function(){var r;return r=e.innerHTML,o.removeNode(e),i.setSelectedRange(n),t(r)}}(this))},s.proxyMethod("responder?.getSelectedRange"),s.proxyMethod("responder?.setSelectedRange"),s.proxyMethod("responder?.expandSelectionInDirection"),s.proxyMethod("responder?.selectionIsInCursorTarget"),s.proxyMethod("responder?.selectionIsExpanded"),s}(o.InputController),r=function(t){var e,n;return null!=(e=t.type)&&null!=(n=e.match(/\/(\w+)$/))?n[1]:void 0},s=null!=("function"==typeof" ".codePointAt?" ".codePointAt(0):void 0),p=function(t){var e;return t.key&&s&&t.key.codePointAt(0)===t.keyCode?t.key:(null===t.which?e=t.keyCode:0!==t.which&&0!==t.charCode&&(e=t.charCode),null!=e&&"escape"!==u[e]?o.UTF16String.fromCodepoints([e]).toString():void 0)},h=function(t){var e,n,i,r,o,s,a,u,c;if(a=t.clipboardData){if(g.call(a.types,"text/html")>=0){for(i=0,s=(u=a.types).length;s>i;i++)if(c=u[i],e=/^CorePasteboardFlavorType/.test(c),n=/^dyn\./.test(c)&&a.getData(c),e||n)return!0;return!1}return r=g.call(a.types,"com.apple.webarchive")>=0,o=g.call(a.types,"com.apple.flat-rtfd")>=0,r||o}},t=function(t){function n(t){var e;this.inputController=t,e=this.inputController,this.responder=e.responder,this.delegate=e.delegate,this.inputSummary=e.inputSummary,this.data={}}return d(n,t),n.prototype.start=function(t){var e,n;return this.data.start=t,this.isSignificant()?("keypress"===this.inputSummary.eventName&&this.inputSummary.textAdded&&null!=(e=this.responder)&&e.deleteInDirection("left"),this.selectionIsExpanded()||(this.insertPlaceholder(),this.requestRender()),this.range=null!=(n=this.responder)?n.getSelectedRange():void 0):void 0},n.prototype.update=function(t){var e;return this.data.update=t,this.isSignificant()&&(e=this.selectPlaceholder())?(this.forgetPlaceholder(),this.range=e):void 0},n.prototype.end=function(t){var e,n,i,r;return this.data.end=t,this.isSignificant()?(this.forgetPlaceholder(),this.canApplyToDocument()?(this.setInputSummary({preferDocument:!0,didInput:!1}),null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.setSelectedRange(this.range),null!=(i=this.responder)&&i.insertString(this.data.end),null!=(r=this.responder)?r.setSelectedRange(this.range[0]+this.data.end.length):void 0):null!=this.data.start||null!=this.data.update?(this.requestReparse(),this.inputController.reset()):void 0):this.inputController.reset()},n.prototype.getEndData=function(){return this.data.end},n.prototype.isEnded=function(){return null!=this.getEndData()},n.prototype.isSignificant=function(){return!e.composesExistingText||this.inputSummary.didInput},n.prototype.canApplyToDocument=function(){var t,e;return 0===(null!=(t=this.data.start)?t.length:void 0)&&(null!=(e=this.data.end)?e.length:void 0)>0&&null!=this.range},n.proxyMethod("inputController.setInputSummary"),n.proxyMethod("inputController.requestRender"),n.proxyMethod("inputController.requestReparse"),n.proxyMethod("responder?.selectionIsExpanded"),n.proxyMethod("responder?.insertPlaceholder"),n.proxyMethod("responder?.selectPlaceholder"),n.proxyMethod("responder?.forgetPlaceholder"),n}(o.BasicObject)}.call(this),function(){var t,e,n,i=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=o.dataTransferIsPlainText,e=o.keyEventIsKeyboardCommand,n=o.objectsAreEqual,o.Level2InputController=function(r){function a(){return this.render=function(t,e){return function(){return t.apply(e,arguments)}}(this.render,this),a.__super__.constructor.apply(this,arguments)}var u,c,l,h,p,d;return i(a,r),a.prototype.elementDidMutate=function(){var t;return this.scheduledRender?this.composing&&null!=(t=this.delegate)&&"function"==typeof t.inputControllerDidAllowUnhandledInput?t.inputControllerDidAllowUnhandledInput():void 0:this.reparse()},a.prototype.scheduleRender=function(){return null!=this.scheduledRender?this.scheduledRender:this.scheduledRender=requestAnimationFrame(this.render)},a.prototype.render=function(){var t;return cancelAnimationFrame(this.scheduledRender),this.scheduledRender=null,this.composing||null!=(t=this.delegate)&&t.render(),"function"==typeof this.afterRender&&this.afterRender(),this.afterRender=null},a.prototype.reparse=function(){var t;return null!=(t=this.delegate)?t.reparse():void 0},a.prototype.events={keydown:function(t){var n,i,r,o;if(e(t)){if(n=c(t),null!=(o=this.delegate)?o.inputControllerDidReceiveKeyboardCommand(n):void 0)return t.preventDefault()}else if(r=t.key,t.altKey&&(r+="+Alt"),t.shiftKey&&(r+="+Shift"),i=this.keys[r])return this.withEvent(t,i)},paste:function(t){var e,n,i,r,o,s,a,u,c;return l(t)?(t.preventDefault(),this.attachFiles(t.clipboardData.files)):h(t)?(t.preventDefault(),n={type:"text/plain",string:t.clipboardData.getData("text/plain")},null!=(i=this.delegate)&&i.inputControllerWillPaste(n),null!=(r=this.responder)&&r.insertString(n.string),this.render(),null!=(o=this.delegate)?o.inputControllerDidPaste(n):void 0):(e=null!=(s=t.clipboardData)?s.getData("URL"):void 0)?(t.preventDefault(),n={type:"text/html",html:this.createLinkHTML(e)},null!=(a=this.delegate)&&a.inputControllerWillPaste(n),null!=(u=this.responder)&&u.insertHTML(n.html),this.render(),null!=(c=this.delegate)?c.inputControllerDidPaste(n):void 0):void 0},beforeinput:function(t){var e;return(e=this.inputTypes[t.inputType])?(this.withEvent(t,e),this.scheduleRender()):void 0},input:function(){return o.selectionChangeObserver.reset()},dragstart:function(t){var e,n;return(null!=(e=this.responder)?e.selectionContainsAttachments():void 0)?(t.dataTransfer.setData("application/x-trix-dragging",!0),this.dragging={range:null!=(n=this.responder)?n.getSelectedRange():void 0,point:p(t)}):void 0},dragenter:function(t){return u(t)?t.preventDefault():void 0},dragover:function(t){var e,i;if(this.dragging){if(t.preventDefault(),e=p(t),!n(e,this.dragging.point))return this.dragging.point=e,null!=(i=this.responder)?i.setLocationRangeFromPointRange(e):void 0}else if(u(t))return t.preventDefault()},drop:function(t){var e,n,i,r;return this.dragging?(t.preventDefault(),null!=(n=this.delegate)&&n.inputControllerWillMoveText(),null!=(i=this.responder)&&i.moveTextFromRange(this.dragging.range),this.dragging=null,this.scheduleRender()):u(t)?(t.preventDefault(),e=p(t),null!=(r=this.responder)&&r.setLocationRangeFromPointRange(e),this.attachFiles(t.dataTransfer.files)):void 0},dragend:function(){var t;return this.dragging?(null!=(t=this.responder)&&t.setSelectedRange(this.dragging.range),this.dragging=null):void 0},compositionend:function(){return this.composing?(this.composing=!1,this.scheduleRender()):void 0}},a.prototype.keys={ArrowLeft:function(){var t,e;return(null!=(t=this.responder)?t.shouldManageMovingCursorInDirection("backward"):void 0)?(this.event.preventDefault(),null!=(e=this.responder)?e.moveCursorInDirection("backward"):void 0):void 0},ArrowRight:function(){var t,e;return(null!=(t=this.responder)?t.shouldManageMovingCursorInDirection("forward"):void 0)?(this.event.preventDefault(),null!=(e=this.responder)?e.moveCursorInDirection("forward"):void 0):void 0},Backspace:function(){var t,e,n;return(null!=(t=this.responder)?t.shouldManageDeletingInDirection("backward"):void 0)?(this.event.preventDefault(),null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.deleteInDirection("backward"),this.render()):void 0},Tab:function(){var t,e;return(null!=(t=this.responder)?t.canIncreaseNestingLevel():void 0)?(this.event.preventDefault(),null!=(e=this.responder)&&e.increaseNestingLevel(),this.render()):void 0},"Tab+Shift":function(){var t,e;return(null!=(t=this.responder)?t.canDecreaseNestingLevel():void 0)?(this.event.preventDefault(),null!=(e=this.responder)&&e.decreaseNestingLevel(),this.render()):void 0}},a.prototype.inputTypes={deleteByComposition:function(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteByCut:function(){return this.deleteInDirection("backward")},deleteByDrag:function(){return this.event.preventDefault(),this.withTargetDOMRange((function(){var t;return this.deleteByDragRange=null!=(t=this.responder)?t.getSelectedRange():void 0}))},deleteCompositionText:function(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteContent:function(){return this.deleteInDirection("backward")},deleteContentBackward:function(){return this.deleteInDirection("backward")},deleteContentForward:function(){return this.deleteInDirection("forward")},deleteEntireSoftLine:function(){return this.deleteInDirection("forward")},deleteHardLineBackward:function(){return this.deleteInDirection("backward")},deleteHardLineForward:function(){return this.deleteInDirection("forward")},deleteSoftLineBackward:function(){return this.deleteInDirection("backward")},deleteSoftLineForward:function(){return this.deleteInDirection("forward")},deleteWordBackward:function(){return this.deleteInDirection("backward")},deleteWordForward:function(){return this.deleteInDirection("forward")},formatBackColor:function(){return this.activateAttributeIfSupported("backgroundColor",this.event.data)},formatBold:function(){return this.toggleAttributeIfSupported("bold")},formatFontColor:function(){return this.activateAttributeIfSupported("color",this.event.data)},formatFontName:function(){return this.activateAttributeIfSupported("font",this.event.data)},formatIndent:function(){var t;return(null!=(t=this.responder)?t.canIncreaseNestingLevel():void 0)?this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.increaseNestingLevel():void 0})):void 0},formatItalic:function(){return this.toggleAttributeIfSupported("italic")},formatJustifyCenter:function(){return this.toggleAttributeIfSupported("justifyCenter")},formatJustifyFull:function(){return this.toggleAttributeIfSupported("justifyFull")},formatJustifyLeft:function(){return this.toggleAttributeIfSupported("justifyLeft")},formatJustifyRight:function(){return this.toggleAttributeIfSupported("justifyRight")},formatOutdent:function(){var t;return(null!=(t=this.responder)?t.canDecreaseNestingLevel():void 0)?this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.decreaseNestingLevel():void 0})):void 0},formatRemove:function(){return this.withTargetDOMRange((function(){var t,e,n,i;for(t in i=[],null!=(e=this.responder)?e.getCurrentAttributes():void 0)i.push(null!=(n=this.responder)?n.removeCurrentAttribute(t):void 0);return i}))},formatSetBlockTextDirection:function(){return this.activateAttributeIfSupported("blockDir",this.event.data)},formatSetInlineTextDirection:function(){return this.activateAttributeIfSupported("textDir",this.event.data)},formatStrikeThrough:function(){return this.toggleAttributeIfSupported("strike")},formatSubscript:function(){return this.toggleAttributeIfSupported("sub")},formatSuperscript:function(){return this.toggleAttributeIfSupported("sup")},formatUnderline:function(){return this.toggleAttributeIfSupported("underline")},historyRedo:function(){var t;return null!=(t=this.delegate)?t.inputControllerWillPerformRedo():void 0},historyUndo:function(){var t;return null!=(t=this.delegate)?t.inputControllerWillPerformUndo():void 0},insertCompositionText:function(){return this.composing=!0,this.insertString(this.event.data)},insertFromComposition:function(){return this.composing=!1,this.insertString(this.event.data)},insertFromDrop:function(){var t,e;return(t=this.deleteByDragRange)?(this.deleteByDragRange=null,null!=(e=this.delegate)&&e.inputControllerWillMoveText(),this.withTargetDOMRange((function(){var e;return null!=(e=this.responder)?e.moveTextFromRange(t):void 0}))):void 0},insertFromPaste:function(){var e,n,i,r,s,a,u,c,l,h,p;return e=this.event.dataTransfer,s={dataTransfer:e},(n=e.getData("URL"))?(this.event.preventDefault(),s.type="text/html",p=(r=e.getData("public.url-name"))?o.squishBreakableWhitespace(r).trim():n,s.html=this.createLinkHTML(n,p),null!=(a=this.delegate)&&a.inputControllerWillPaste(s),this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.insertHTML(s.html):void 0})),this.afterRender=function(t){return function(){var e;return null!=(e=t.delegate)?e.inputControllerDidPaste(s):void 0}}(this)):t(e)?(s.type="text/plain",s.string=e.getData("text/plain"),null!=(u=this.delegate)&&u.inputControllerWillPaste(s),this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.insertString(s.string):void 0})),this.afterRender=function(t){return function(){var e;return null!=(e=t.delegate)?e.inputControllerDidPaste(s):void 0}}(this)):(i=e.getData("text/html"))?(this.event.preventDefault(),s.type="text/html",s.html=i,null!=(c=this.delegate)&&c.inputControllerWillPaste(s),this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.insertHTML(s.html):void 0})),this.afterRender=function(t){return function(){var e;return null!=(e=t.delegate)?e.inputControllerDidPaste(s):void 0}}(this)):(null!=(l=e.files)?l.length:void 0)?(s.type="File",s.file=e.files[0],null!=(h=this.delegate)&&h.inputControllerWillPaste(s),this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.insertFile(s.file):void 0})),this.afterRender=function(t){return function(){var e;return null!=(e=t.delegate)?e.inputControllerDidPaste(s):void 0}}(this)):void 0},insertFromYank:function(){return this.insertString(this.event.data)},insertLineBreak:function(){return this.insertString("\n")},insertLink:function(){return this.activateAttributeIfSupported("href",this.event.data)},insertOrderedList:function(){return this.toggleAttributeIfSupported("number")},insertParagraph:function(){var t;return null!=(t=this.delegate)&&t.inputControllerWillPerformTyping(),this.withTargetDOMRange((function(){var t;return null!=(t=this.responder)?t.insertLineBreak():void 0}))},insertReplacementText:function(){return this.insertString(this.event.dataTransfer.getData("text/plain"),{updatePosition:!1})},insertText:function(){var t,e;return this.insertString(null!=(t=this.event.data)?t:null!=(e=this.event.dataTransfer)?e.getData("text/plain"):void 0)},insertTranspose:function(){return this.insertString(this.event.data)},insertUnorderedList:function(){return this.toggleAttributeIfSupported("bullet")}},a.prototype.insertString=function(t,e){var n;return null==t&&(t=""),null!=(n=this.delegate)&&n.inputControllerWillPerformTyping(),this.withTargetDOMRange((function(){var n;return null!=(n=this.responder)?n.insertString(t,e):void 0}))},a.prototype.toggleAttributeIfSupported=function(t){var e;return s.call(o.getAllAttributeNames(),t)>=0?(null!=(e=this.delegate)&&e.inputControllerWillPerformFormatting(t),this.withTargetDOMRange((function(){var e;return null!=(e=this.responder)?e.toggleCurrentAttribute(t):void 0}))):void 0},a.prototype.activateAttributeIfSupported=function(t,e){var n;return s.call(o.getAllAttributeNames(),t)>=0?(null!=(n=this.delegate)&&n.inputControllerWillPerformFormatting(t),this.withTargetDOMRange((function(){var n;return null!=(n=this.responder)?n.setCurrentAttribute(t,e):void 0}))):void 0},a.prototype.deleteInDirection=function(t,e){var n,i,r;return(null!=e?e:{recordUndoEntry:!0}).recordUndoEntry&&null!=(r=this.delegate)&&r.inputControllerWillPerformTyping(),i=function(e){return function(){var n;return null!=(n=e.responder)?n.deleteInDirection(t):void 0}}(this),(n=this.getTargetDOMRange({minLength:2}))?this.withTargetDOMRange(n,i):i()},a.prototype.withTargetDOMRange=function(t,e){var n;return"function"==typeof t&&(e=t,t=this.getTargetDOMRange()),t?null!=(n=this.responder)?n.withTargetDOMRange(t,e.bind(this)):void 0:(o.selectionChangeObserver.reset(),e.call(this))},a.prototype.getTargetDOMRange=function(t){var e,n,i,r;return i=(null!=t?t:{minLength:0}).minLength,(r="function"==typeof(e=this.event).getTargetRanges?e.getTargetRanges():void 0)&&r.length&&(n=d(r[0]),0===i||n.toString().length>=i)?n:void 0},d=function(t){var e;return(e=document.createRange()).setStart(t.startContainer,t.startOffset),e.setEnd(t.endContainer,t.endOffset),e},a.prototype.withEvent=function(t,e){var n;this.event=t;try{n=e.call(this)}finally{this.event=null}return n},u=function(t){var e,n;return s.call(null!=(e=null!=(n=t.dataTransfer)?n.types:void 0)?e:[],"Files")>=0},l=function(t){var e;return(e=t.clipboardData)?s.call(e.types,"Files")>=0&&1===e.types.length&&e.files.length>=1:void 0},h=function(t){var e;return(e=t.clipboardData)?s.call(e.types,"text/plain")>=0&&1===e.types.length:void 0},c=function(t){var e;return e=[],t.altKey&&e.push("alt"),t.shiftKey&&e.push("shift"),e.push(t.key),e},p=function(t){return{x:t.clientX,y:t.clientY}},a}(o.InputController)}.call(this),function(){var t,e,n,i,r,s,a,u,c=function(t,e){return function(){return t.apply(e,arguments)}},l=function(t,e){function n(){this.constructor=t}for(var i in e)h.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;e=o.defer,n=o.handleEvent,s=o.makeElement,u=o.tagName,a=o.config,r=a.lang,t=a.css,i=a.keyNames,o.AttachmentEditorController=function(a){function h(t,e,n,i){this.attachmentPiece=t,this.element=e,this.container=n,this.options=null!=i?i:{},this.didBlurCaption=c(this.didBlurCaption,this),this.didChangeCaption=c(this.didChangeCaption,this),this.didInputCaption=c(this.didInputCaption,this),this.didKeyDownCaption=c(this.didKeyDownCaption,this),this.didClickActionButton=c(this.didClickActionButton,this),this.didClickToolbar=c(this.didClickToolbar,this),this.attachment=this.attachmentPiece.attachment,"a"===u(this.element)&&(this.element=this.element.firstChild),this.install()}var p;return l(h,a),p=function(t){return function(){var e;return(e=t.apply(this,arguments)).do(),null==this.undos&&(this.undos=[]),this.undos.push(e.undo)}},h.prototype.install=function(){return this.makeElementMutable(),this.addToolbar(),this.attachment.isPreviewable()?this.installCaptionEditor():void 0},h.prototype.uninstall=function(){var t,e;for(this.savePendingCaption();e=this.undos.pop();)e();return null!=(t=this.delegate)?t.didUninstallAttachmentEditor(this):void 0},h.prototype.savePendingCaption=function(){var t,e,n;return null!=this.pendingCaption?(t=this.pendingCaption,this.pendingCaption=null,t?null!=(e=this.delegate)&&"function"==typeof e.attachmentEditorDidRequestUpdatingAttributesForAttachment?e.attachmentEditorDidRequestUpdatingAttributesForAttachment({caption:t},this.attachment):void 0:null!=(n=this.delegate)&&"function"==typeof n.attachmentEditorDidRequestRemovingAttributeForAttachment?n.attachmentEditorDidRequestRemovingAttributeForAttachment("caption",this.attachment):void 0):void 0},h.prototype.makeElementMutable=p((function(){return{do:function(t){return function(){return t.element.dataset.trixMutable=!0}}(this),undo:function(t){return function(){return delete t.element.dataset.trixMutable}}(this)}})),h.prototype.addToolbar=p((function(){var e;return e=s({tagName:"div",className:t.attachmentToolbar,data:{trixMutable:!0},childNodes:s({tagName:"div",className:"trix-button-row",childNodes:s({tagName:"span",className:"trix-button-group trix-button-group--actions",childNodes:s({tagName:"button",className:"trix-button trix-button--remove",textContent:r.remove,attributes:{title:r.remove},data:{trixAction:"remove"}})})})}),this.attachment.isPreviewable()&&e.appendChild(s({tagName:"div",className:t.attachmentMetadataContainer,childNodes:s({tagName:"span",className:t.attachmentMetadata,childNodes:[s({tagName:"span",className:t.attachmentName,textContent:this.attachment.getFilename(),attributes:{title:this.attachment.getFilename()}}),s({tagName:"span",className:t.attachmentSize,textContent:this.attachment.getFormattedFilesize()})]})})),n("click",{onElement:e,withCallback:this.didClickToolbar}),n("click",{onElement:e,matchingSelector:"[data-trix-action]",withCallback:this.didClickActionButton}),{do:function(t){return function(){return t.element.appendChild(e)}}(this),undo:function(){return o.removeNode(e)}}})),h.prototype.installCaptionEditor=p((function(){var i,a,u,c,l;return(c=s({tagName:"textarea",className:t.attachmentCaptionEditor,attributes:{placeholder:r.captionPlaceholder},data:{trixMutable:!0}})).value=this.attachmentPiece.getCaption(),(l=c.cloneNode()).classList.add("trix-autoresize-clone"),l.tabIndex=-1,i=function(){return l.value=c.value,c.style.height=l.scrollHeight+"px"},n("input",{onElement:c,withCallback:i}),n("input",{onElement:c,withCallback:this.didInputCaption}),n("keydown",{onElement:c,withCallback:this.didKeyDownCaption}),n("change",{onElement:c,withCallback:this.didChangeCaption}),n("blur",{onElement:c,withCallback:this.didBlurCaption}),u=this.element.querySelector("figcaption"),a=u.cloneNode(),{do:function(n){return function(){return u.style.display="none",a.appendChild(c),a.appendChild(l),a.classList.add(t.attachmentCaption+"--editing"),u.parentElement.insertBefore(a,u),i(),n.options.editCaption?e((function(){return c.focus()})):void 0}}(this),undo:function(){return o.removeNode(a),u.style.display=null}}})),h.prototype.didClickToolbar=function(t){return t.preventDefault(),t.stopPropagation()},h.prototype.didClickActionButton=function(t){var e;if("remove"===t.target.getAttribute("data-trix-action"))return null!=(e=this.delegate)?e.attachmentEditorDidRequestRemovalOfAttachment(this.attachment):void 0},h.prototype.didKeyDownCaption=function(t){var e;return"return"===i[t.keyCode]?(t.preventDefault(),this.savePendingCaption(),null!=(e=this.delegate)&&"function"==typeof e.attachmentEditorDidRequestDeselectingAttachment?e.attachmentEditorDidRequestDeselectingAttachment(this.attachment):void 0):void 0},h.prototype.didInputCaption=function(t){return this.pendingCaption=t.target.value.replace(/\s/g," ").trim()},h.prototype.didChangeCaption=function(){return this.savePendingCaption()},h.prototype.didBlurCaption=function(){return this.savePendingCaption()},h}(o.BasicObject)}.call(this),function(){var t,e,n,i=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;n=o.makeElement,t=o.config.css,o.AttachmentView=function(r){function s(){s.__super__.constructor.apply(this,arguments),this.attachment=this.object,this.attachment.uploadProgressDelegate=this,this.attachmentPiece=this.options.piece}var a;return i(s,r),s.attachmentSelector="[data-trix-attachment]",s.prototype.createContentNodes=function(){return[]},s.prototype.createNodes=function(){var e,i,r,o,s,u,c;if(e=o=n({tagName:"figure",className:this.getClassName(),data:this.getData(),editable:!1}),(i=this.getHref())&&(o=n({tagName:"a",editable:!1,attributes:{href:i,tabindex:-1}}),e.appendChild(o)),this.attachment.hasContent())o.innerHTML=this.attachment.getContent();else for(r=0,s=(c=this.createContentNodes()).length;s>r;r++)u=c[r],o.appendChild(u);return o.appendChild(this.createCaptionElement()),this.attachment.isPending()&&(this.progressElement=n({tagName:"progress",attributes:{class:t.attachmentProgress,value:this.attachment.getUploadProgress(),max:100},data:{trixMutable:!0,trixStoreKey:["progressElement",this.attachment.id].join("/")}}),e.appendChild(this.progressElement)),[a("left"),e,a("right")]},s.prototype.createCaptionElement=function(){var e,i,r,o,s,a,u;return r=n({tagName:"figcaption",className:t.attachmentCaption}),(e=this.attachmentPiece.getCaption())?(r.classList.add(t.attachmentCaption+"--edited"),r.textContent=e):((i=this.getCaptionConfig()).name&&(o=this.attachment.getFilename()),i.size&&(a=this.attachment.getFormattedFilesize()),o&&(s=n({tagName:"span",className:t.attachmentName,textContent:o}),r.appendChild(s)),a&&(o&&r.appendChild(document.createTextNode(" ")),u=n({tagName:"span",className:t.attachmentSize,textContent:a}),r.appendChild(u))),r},s.prototype.getClassName=function(){var e,n;return n=[t.attachment,t.attachment+"--"+this.attachment.getType()],(e=this.attachment.getExtension())&&n.push(t.attachment+"--"+e),n.join(" ")},s.prototype.getData=function(){var t,e;return e={trixAttachment:JSON.stringify(this.attachment),trixContentType:this.attachment.getContentType(),trixId:this.attachment.id},(t=this.attachmentPiece.attributes).isEmpty()||(e.trixAttributes=JSON.stringify(t)),this.attachment.isPending()&&(e.trixSerialize=!1),e},s.prototype.getHref=function(){return e(this.attachment.getContent(),"a")?void 0:this.attachment.getHref()},s.prototype.getCaptionConfig=function(){var t,e,n;return n=this.attachment.getType(),t=o.copyObject(null!=(e=o.config.attachments[n])?e.caption:void 0),"file"===n&&(t.name=!0),t},s.prototype.findProgressElement=function(){var t;return null!=(t=this.findElement())?t.querySelector("progress"):void 0},a=function(t){return n({tagName:"span",textContent:o.ZERO_WIDTH_SPACE,data:{trixCursorTarget:t,trixSerialize:!1}})},s.prototype.attachmentDidChangeUploadProgress=function(){var t,e;return e=this.attachment.getUploadProgress(),null!=(t=this.findProgressElement())?t.value=e:void 0},s}(o.ObjectView),e=function(t,e){var i;return(i=n("div")).innerHTML=null!=t?t:"",i.querySelector(e)}}.call(this),function(){var t,e=function(t,e){function i(){this.constructor=t}for(var r in e)n.call(e,r)&&(t[r]=e[r]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;t=o.makeElement,o.PreviewableAttachmentView=function(n){function i(){i.__super__.constructor.apply(this,arguments),this.attachment.previewDelegate=this}return e(i,n),i.prototype.createContentNodes=function(){return this.image=t({tagName:"img",attributes:{src:""},data:{trixMutable:!0}}),this.refresh(this.image),[this.image]},i.prototype.createCaptionElement=function(){var t;return(t=i.__super__.createCaptionElement.apply(this,arguments)).textContent||t.setAttribute("data-trix-placeholder",o.config.lang.captionPlaceholder),t},i.prototype.refresh=function(t){var e;return null==t&&(t=null!=(e=this.findElement())?e.querySelector("img"):void 0),t?this.updateAttributesForImage(t):void 0},i.prototype.updateAttributesForImage=function(t){var e,n,i,r,o,s;return o=this.attachment.getURL(),n=this.attachment.getPreviewURL(),t.src=n||o,n===o?t.removeAttribute("data-trix-serialized-attributes"):(i=JSON.stringify({src:o}),t.setAttribute("data-trix-serialized-attributes",i)),s=this.attachment.getWidth(),e=this.attachment.getHeight(),null!=s&&(t.width=s),null!=e&&(t.height=e),r=["imageElement",this.attachment.id,t.src,t.width,t.height].join("/"),t.dataset.trixStoreKey=r},i.prototype.attachmentDidChangeAttributes=function(){return this.refresh(this.image),this.refresh()},i}(o.AttachmentView)}.call(this),function(){var t,e,n,i=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;n=o.makeElement,t=o.findInnerElement,e=o.getTextConfig,o.PieceView=function(r){function s(){var t;s.__super__.constructor.apply(this,arguments),this.piece=this.object,this.attributes=this.piece.getAttributes(),t=this.options,this.textConfig=t.textConfig,this.context=t.context,this.piece.attachment?this.attachment=this.piece.attachment:this.string=this.piece.toString()}var a;return i(s,r),s.prototype.createNodes=function(){var e,n,i,r,o,s;if(s=this.attachment?this.createAttachmentNodes():this.createStringNodes(),e=this.createElement()){for(i=t(e),n=0,r=s.length;r>n;n++)o=s[n],i.appendChild(o);s=[e]}return s},s.prototype.createAttachmentNodes=function(){var t;return t=this.attachment.isPreviewable()?o.PreviewableAttachmentView:o.AttachmentView,this.createChildView(t,this.piece.attachment,{piece:this.piece}).getNodes()},s.prototype.createStringNodes=function(){var t,e,i,r,o,s,a,u,c;if(null!=(a=this.textConfig)?a.plaintext:void 0)return[document.createTextNode(this.string)];for(s=[],i=e=0,r=(u=this.string.split("\n")).length;r>e;i=++e)c=u[i],i>0&&(t=n("br"),s.push(t)),c.length&&(o=document.createTextNode(this.preserveSpaces(c)),s.push(o));return s},s.prototype.createElement=function(){var t,i,r,o,s,a,u,c,l;for(o in c={},a=this.attributes)if(l=a[o],(t=e(o))&&(t.tagName&&(s=n(t.tagName),r?(r.appendChild(s),r=s):i=r=s),t.styleProperty&&(c[t.styleProperty]=l),t.style))for(o in u=t.style)l=u[o],c[o]=l;if(Object.keys(c).length)for(o in null==i&&(i=n("span")),c)l=c[o],i.style[o]=l;return i},s.prototype.createContainerElement=function(){var t,i,r,o,s;for(r in o=this.attributes)if(s=o[r],(i=e(r))&&i.groupTagName)return(t={})[r]=s,n(i.groupTagName,t)},a=o.NON_BREAKING_SPACE,s.prototype.preserveSpaces=function(t){return this.context.isLast&&(t=t.replace(/\ $/,a)),t=t.replace(/(\S)\ {3}(\S)/g,"$1 "+a+" $2").replace(/\ {2}/g,a+" ").replace(/\ {2}/g," "+a),(this.context.isFirst||this.context.followsWhitespace)&&(t=t.replace(/^\ /,a)),t},s}(o.ObjectView)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.TextView=function(e){function n(){n.__super__.constructor.apply(this,arguments),this.text=this.object,this.textConfig=this.options.textConfig}var i;return t(n,e),n.prototype.createNodes=function(){var t,e,n,r,s,a,u,c,l,h;for(a=[],r=(c=o.ObjectGroup.groupObjects(this.getPieces())).length-1,n=e=0,s=c.length;s>e;n=++e)u=c[n],t={},0===n&&(t.isFirst=!0),n===r&&(t.isLast=!0),i(l)&&(t.followsWhitespace=!0),h=this.findOrCreateCachedChildView(o.PieceView,u,{textConfig:this.textConfig,context:t}),a.push.apply(a,h.getNodes()),l=u;return a},n.prototype.getPieces=function(){var t,e,n,i,r;for(r=[],t=0,e=(i=this.text.getPieces()).length;e>t;t++)(n=i[t]).hasAttribute("blockBreak")||r.push(n);return r},i=function(t){return/\s$/.test(null!=t?t.toString():void 0)},n}(o.ObjectView)}.call(this),function(){var t,e,n,i=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;n=o.makeElement,e=o.getBlockConfig,t=o.config.css,o.BlockView=function(r){function s(){s.__super__.constructor.apply(this,arguments),this.block=this.object,this.attributes=this.block.getAttributes()}return i(s,r),s.prototype.createNodes=function(){var t,i,r,s,a,u,c,l,h,p;if(u=[document.createComment("block")],this.block.isEmpty()?u.push(n("br")):(h=null!=(c=e(this.block.getLastAttribute()))?c.text:void 0,p=this.findOrCreateCachedChildView(o.TextView,this.block.text,{textConfig:h}),u.push.apply(u,p.getNodes()),this.shouldAddExtraNewlineElement()&&u.push(n("br"))),this.attributes.length)return u;for(l=o.config.blockAttributes.default.tagName,this.block.isRTL()&&(t={dir:"rtl"}),i=n({tagName:l,attributes:t}),r=0,s=u.length;s>r;r++)a=u[r],i.appendChild(a);return[i]},s.prototype.createContainerElement=function(i){var r,o,s,a,u;return r=this.attributes[i],u=e(r).tagName,0===i&&this.block.isRTL()&&(o={dir:"rtl"}),"attachmentGallery"===r&&(a=this.block.getBlockBreakPosition(),s=t.attachmentGallery+" "+t.attachmentGallery+"--"+a),n({tagName:u,className:s,attributes:o})},s.prototype.shouldAddExtraNewlineElement=function(){return/\n\n$/.test(this.block.toString())},s}(o.ObjectView)}.call(this),function(){var t,e,n=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;t=o.defer,e=o.makeElement,o.DocumentView=function(i){function r(){r.__super__.constructor.apply(this,arguments),this.element=this.options.element,this.elementStore=new o.ElementStore,this.setDocument(this.object)}var s,a,u;return n(r,i),r.render=function(t){var n,i;return(i=new this(t,{element:n=e("div")})).render(),i.sync(),n},r.prototype.setDocument=function(t){return t.isEqualTo(this.document)?void 0:this.document=this.object=t},r.prototype.render=function(){var t,n,i,r,s,a,u;if(this.childViews=[],this.shadowElement=e("div"),!this.document.isEmpty()){for(a=[],t=0,n=(s=o.ObjectGroup.groupObjects(this.document.getBlocks(),{asTree:!0})).length;n>t;t++)r=s[t],u=this.findOrCreateCachedChildView(o.BlockView,r),a.push(function(){var t,e,n,r;for(r=[],t=0,e=(n=u.getNodes()).length;e>t;t++)i=n[t],r.push(this.shadowElement.appendChild(i));return r}.call(this));return a}},r.prototype.isSynced=function(){return s(this.shadowElement,this.element)},r.prototype.sync=function(){var t;for(t=this.createDocumentFragmentForSync();this.element.lastChild;)this.element.removeChild(this.element.lastChild);return this.element.appendChild(t),this.didSync()},r.prototype.didSync=function(){return this.elementStore.reset(a(this.element)),t(function(t){return function(){return t.garbageCollectCachedViews()}}(this))},r.prototype.createDocumentFragmentForSync=function(){var t,e,n,i,r,o,s,u,c,l;for(e=document.createDocumentFragment(),n=0,r=(u=this.shadowElement.childNodes).length;r>n;n++)s=u[n],e.appendChild(s.cloneNode(!0));for(i=0,o=(c=a(e)).length;o>i;i++)t=c[i],(l=this.elementStore.remove(t))&&t.parentNode.replaceChild(l,t);return e},a=function(t){return t.querySelectorAll("[data-trix-store-key]")},s=function(t,e){return u(t.innerHTML)===u(e.innerHTML)},u=function(t){return t.replace(/ /g," ")},r}(o.ObjectView)}.call(this),function(){var t,e,n,i,r,s=function(t,e){return function(){return t.apply(e,arguments)}},a=function(t,e){function n(){this.constructor=t}for(var i in e)u.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;n=o.findClosestElementFromNode,i=o.handleEvent,r=o.innerElementIsActive,e=o.defer,t=o.AttachmentView.attachmentSelector,o.CompositionController=function(u){function c(e,n){this.element=e,this.composition=n,this.didClickAttachment=s(this.didClickAttachment,this),this.didBlur=s(this.didBlur,this),this.didFocus=s(this.didFocus,this),this.documentView=new o.DocumentView(this.composition.document,{element:this.element}),i("focus",{onElement:this.element,withCallback:this.didFocus}),i("blur",{onElement:this.element,withCallback:this.didBlur}),i("click",{onElement:this.element,matchingSelector:"a[contenteditable=false]",preventDefault:!0}),i("mousedown",{onElement:this.element,matchingSelector:t,withCallback:this.didClickAttachment}),i("click",{onElement:this.element,matchingSelector:"a"+t,preventDefault:!0})}return a(c,u),c.prototype.didFocus=function(){var t,e,n;return t=function(t){return function(){var e;return t.focused?void 0:(t.focused=!0,null!=(e=t.delegate)&&"function"==typeof e.compositionControllerDidFocus?e.compositionControllerDidFocus():void 0)}}(this),null!=(e=null!=(n=this.blurPromise)?n.then(t):void 0)?e:t()},c.prototype.didBlur=function(){return this.blurPromise=new Promise(function(t){return function(n){return e((function(){var e;return r(t.element)||(t.focused=null,null!=(e=t.delegate)&&"function"==typeof e.compositionControllerDidBlur&&e.compositionControllerDidBlur()),t.blurPromise=null,n()}))}}(this))},c.prototype.didClickAttachment=function(t,e){var i,r,o;return i=this.findAttachmentForElement(e),r=null!=n(t.target,{matchingSelector:"figcaption"}),null!=(o=this.delegate)&&"function"==typeof o.compositionControllerDidSelectAttachment?o.compositionControllerDidSelectAttachment(i,{editCaption:r}):void 0},c.prototype.getSerializableElement=function(){return this.isEditingAttachment()?this.documentView.shadowElement:this.element},c.prototype.render=function(){var t,e,n;return this.revision!==this.composition.revision&&(this.documentView.setDocument(this.composition.document),this.documentView.render(),this.revision=this.composition.revision),this.canSyncDocumentView()&&!this.documentView.isSynced()&&(null!=(t=this.delegate)&&"function"==typeof t.compositionControllerWillSyncDocumentView&&t.compositionControllerWillSyncDocumentView(),this.documentView.sync(),null!=(e=this.delegate)&&"function"==typeof e.compositionControllerDidSyncDocumentView&&e.compositionControllerDidSyncDocumentView()),null!=(n=this.delegate)&&"function"==typeof n.compositionControllerDidRender?n.compositionControllerDidRender():void 0},c.prototype.rerenderViewForObject=function(t){return this.invalidateViewForObject(t),this.render()},c.prototype.invalidateViewForObject=function(t){return this.documentView.invalidateViewForObject(t)},c.prototype.isViewCachingEnabled=function(){return this.documentView.isViewCachingEnabled()},c.prototype.enableViewCaching=function(){return this.documentView.enableViewCaching()},c.prototype.disableViewCaching=function(){return this.documentView.disableViewCaching()},c.prototype.refreshViewCache=function(){return this.documentView.garbageCollectCachedViews()},c.prototype.isEditingAttachment=function(){return null!=this.attachmentEditor},c.prototype.installAttachmentEditorForAttachment=function(t,e){var n,i,r;if((null!=(r=this.attachmentEditor)?r.attachment:void 0)!==t&&(i=this.documentView.findElementForObject(t)))return this.uninstallAttachmentEditor(),n=this.composition.document.getAttachmentPieceForAttachment(t),this.attachmentEditor=new o.AttachmentEditorController(n,i,this.element,e),this.attachmentEditor.delegate=this},c.prototype.uninstallAttachmentEditor=function(){var t;return null!=(t=this.attachmentEditor)?t.uninstall():void 0},c.prototype.didUninstallAttachmentEditor=function(){return this.attachmentEditor=null,this.render()},c.prototype.attachmentEditorDidRequestUpdatingAttributesForAttachment=function(t,e){var n;return null!=(n=this.delegate)&&"function"==typeof n.compositionControllerWillUpdateAttachment&&n.compositionControllerWillUpdateAttachment(e),this.composition.updateAttributesForAttachment(t,e)},c.prototype.attachmentEditorDidRequestRemovingAttributeForAttachment=function(t,e){var n;return null!=(n=this.delegate)&&"function"==typeof n.compositionControllerWillUpdateAttachment&&n.compositionControllerWillUpdateAttachment(e),this.composition.removeAttributeForAttachment(t,e)},c.prototype.attachmentEditorDidRequestRemovalOfAttachment=function(t){var e;return null!=(e=this.delegate)&&"function"==typeof e.compositionControllerDidRequestRemovalOfAttachment?e.compositionControllerDidRequestRemovalOfAttachment(t):void 0},c.prototype.attachmentEditorDidRequestDeselectingAttachment=function(t){var e;return null!=(e=this.delegate)&&"function"==typeof e.compositionControllerDidRequestDeselectingAttachment?e.compositionControllerDidRequestDeselectingAttachment(t):void 0},c.prototype.canSyncDocumentView=function(){return!this.isEditingAttachment()},c.prototype.findAttachmentForElement=function(t){return this.composition.document.getAttachmentById(parseInt(t.dataset.trixId,10))},c}(o.BasicObject)}.call(this),function(){var t,e,n,i=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;e=o.handleEvent,n=o.triggerEvent,t=o.findClosestElementFromNode,o.ToolbarController=function(o){function s(t){this.element=t,this.didKeyDownDialogInput=i(this.didKeyDownDialogInput,this),this.didClickDialogButton=i(this.didClickDialogButton,this),this.didClickAttributeButton=i(this.didClickAttributeButton,this),this.didClickActionButton=i(this.didClickActionButton,this),this.attributes={},this.actions={},this.resetDialogInputs(),e("mousedown",{onElement:this.element,matchingSelector:a,withCallback:this.didClickActionButton}),e("mousedown",{onElement:this.element,matchingSelector:c,withCallback:this.didClickAttributeButton}),e("click",{onElement:this.element,matchingSelector:y,preventDefault:!0}),e("click",{onElement:this.element,matchingSelector:l,withCallback:this.didClickDialogButton}),e("keydown",{onElement:this.element,matchingSelector:h,withCallback:this.didKeyDownDialogInput})}var a,u,c,l,h,p,d,f,g,m,y;return r(s,o),y=(c="[data-trix-attribute]")+", "+(a="[data-trix-action]"),u=(p="[data-trix-dialog]")+"[data-trix-active]",l=p+" [data-trix-method]",h=p+" [data-trix-input]",s.prototype.didClickActionButton=function(t,e){var n,i,r;return null!=(i=this.delegate)&&i.toolbarDidClickButton(),t.preventDefault(),n=d(e),this.getDialog(n)?this.toggleDialog(n):null!=(r=this.delegate)?r.toolbarDidInvokeAction(n):void 0},s.prototype.didClickAttributeButton=function(t,e){var n,i,r;return null!=(i=this.delegate)&&i.toolbarDidClickButton(),t.preventDefault(),n=f(e),this.getDialog(n)?this.toggleDialog(n):null!=(r=this.delegate)&&r.toolbarDidToggleAttribute(n),this.refreshAttributeButtons()},s.prototype.didClickDialogButton=function(e,n){var i;return i=t(n,{matchingSelector:p}),this[n.getAttribute("data-trix-method")].call(this,i)},s.prototype.didKeyDownDialogInput=function(t,e){var n,i;return 13===t.keyCode&&(t.preventDefault(),n=e.getAttribute("name"),i=this.getDialog(n),this.setAttribute(i)),27===t.keyCode?(t.preventDefault(),this.hideDialog()):void 0},s.prototype.updateActions=function(t){return this.actions=t,this.refreshActionButtons()},s.prototype.refreshActionButtons=function(){return this.eachActionButton(function(t){return function(e,n){return e.disabled=!1===t.actions[n]}}(this))},s.prototype.eachActionButton=function(t){var e,n,i,r,o;for(o=[],n=0,i=(r=this.element.querySelectorAll(a)).length;i>n;n++)e=r[n],o.push(t(e,d(e)));return o},s.prototype.updateAttributes=function(t){return this.attributes=t,this.refreshAttributeButtons()},s.prototype.refreshAttributeButtons=function(){return this.eachAttributeButton(function(t){return function(e,n){return e.disabled=!1===t.attributes[n],t.attributes[n]||t.dialogIsVisible(n)?(e.setAttribute("data-trix-active",""),e.classList.add("trix-active")):(e.removeAttribute("data-trix-active"),e.classList.remove("trix-active"))}}(this))},s.prototype.eachAttributeButton=function(t){var e,n,i,r,o;for(o=[],n=0,i=(r=this.element.querySelectorAll(c)).length;i>n;n++)e=r[n],o.push(t(e,f(e)));return o},s.prototype.applyKeyboardCommand=function(t){var e,i,r,o,s,a;for(o=JSON.stringify(t.sort()),r=0,s=(a=this.element.querySelectorAll("[data-trix-key]")).length;s>r;r++)if(i=(e=a[r]).getAttribute("data-trix-key").split("+"),JSON.stringify(i.sort())===o)return n("mousedown",{onElement:e}),!0;return!1},s.prototype.dialogIsVisible=function(t){var e;return(e=this.getDialog(t))?e.hasAttribute("data-trix-active"):void 0},s.prototype.toggleDialog=function(t){return this.dialogIsVisible(t)?this.hideDialog():this.showDialog(t)},s.prototype.showDialog=function(t){var e,n,i,r,o,s,a,u,c;for(this.hideDialog(),null!=(s=this.delegate)&&s.toolbarWillShowDialog(),(n=this.getDialog(t)).setAttribute("data-trix-active",""),n.classList.add("trix-active"),i=0,o=(a=n.querySelectorAll("input[disabled]")).length;o>i;i++)a[i].removeAttribute("disabled");return(e=f(n))&&(r=m(n,t))&&(r.value=null!=(u=this.attributes[e])?u:"",r.select()),null!=(c=this.delegate)?c.toolbarDidShowDialog(t):void 0},s.prototype.setAttribute=function(t){var e,n,i;return e=f(t),(n=m(t,e)).willValidate&&!n.checkValidity()?(n.setAttribute("data-trix-validate",""),n.classList.add("trix-validate"),n.focus()):(null!=(i=this.delegate)&&i.toolbarDidUpdateAttribute(e,n.value),this.hideDialog())},s.prototype.removeAttribute=function(t){var e,n;return e=f(t),null!=(n=this.delegate)&&n.toolbarDidRemoveAttribute(e),this.hideDialog()},s.prototype.hideDialog=function(){var t,e;return(t=this.element.querySelector(u))?(t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"),this.resetDialogInputs(),null!=(e=this.delegate)?e.toolbarDidHideDialog(g(t)):void 0):void 0},s.prototype.resetDialogInputs=function(){var t,e,n,i,r;for(r=[],t=0,n=(i=this.element.querySelectorAll(h)).length;n>t;t++)(e=i[t]).setAttribute("disabled","disabled"),e.removeAttribute("data-trix-validate"),r.push(e.classList.remove("trix-validate"));return r},s.prototype.getDialog=function(t){return this.element.querySelector("[data-trix-dialog="+t+"]")},m=function(t,e){return null==e&&(e=f(t)),t.querySelector("[data-trix-input][name='"+e+"']")},d=function(t){return t.getAttribute("data-trix-action")},f=function(t){var e;return null!=(e=t.getAttribute("data-trix-attribute"))?e:t.getAttribute("data-trix-dialog-attribute")},g=function(t){return t.getAttribute("data-trix-dialog")},s}(o.BasicObject)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.ImagePreloadOperation=function(e){function n(t){this.url=t}return t(n,e),n.prototype.perform=function(t){var e;return(e=new Image).onload=function(n){return function(){return e.width=n.width=e.naturalWidth,e.height=n.height=e.naturalHeight,t(!0,e)}}(this),e.onerror=function(){return t(!1)},e.src=this.url},n}(o.Operation)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.Attachment=function(e){function n(t){null==t&&(t={}),this.releaseFile=function(t,e){return function(){return t.apply(e,arguments)}}(this.releaseFile,this),n.__super__.constructor.apply(this,arguments),this.attributes=o.Hash.box(t),this.didChangeAttributes()}return t(n,e),n.previewablePattern=/^image(\/(gif|png|jpe?g)|$)/,n.attachmentForFile=function(t){var e;return(e=new this(this.attributesForFile(t))).setFile(t),e},n.attributesForFile=function(t){return new o.Hash({filename:t.name,filesize:t.size,contentType:t.type})},n.fromJSON=function(t){return new this(t)},n.prototype.getAttribute=function(t){return this.attributes.get(t)},n.prototype.hasAttribute=function(t){return this.attributes.has(t)},n.prototype.getAttributes=function(){return this.attributes.toObject()},n.prototype.setAttributes=function(t){var e,n,i;return null==t&&(t={}),e=this.attributes.merge(t),this.attributes.isEqualTo(e)?void 0:(this.attributes=e,this.didChangeAttributes(),null!=(n=this.previewDelegate)&&"function"==typeof n.attachmentDidChangeAttributes&&n.attachmentDidChangeAttributes(this),null!=(i=this.delegate)&&"function"==typeof i.attachmentDidChangeAttributes?i.attachmentDidChangeAttributes(this):void 0)},n.prototype.didChangeAttributes=function(){return this.isPreviewable()?this.preloadURL():void 0},n.prototype.isPending=function(){return null!=this.file&&!(this.getURL()||this.getHref())},n.prototype.isPreviewable=function(){return this.attributes.has("previewable")?this.attributes.get("previewable"):this.constructor.previewablePattern.test(this.getContentType())},n.prototype.getType=function(){return this.hasContent()?"content":this.isPreviewable()?"preview":"file"},n.prototype.getURL=function(){return this.attributes.get("url")},n.prototype.getHref=function(){return this.attributes.get("href")},n.prototype.getFilename=function(){var t;return null!=(t=this.attributes.get("filename"))?t:""},n.prototype.getFilesize=function(){return this.attributes.get("filesize")},n.prototype.getFormattedFilesize=function(){var t;return"number"==typeof(t=this.attributes.get("filesize"))?o.config.fileSize.formatter(t):""},n.prototype.getExtension=function(){var t;return null!=(t=this.getFilename().match(/\.(\w+)$/))?t[1].toLowerCase():void 0},n.prototype.getContentType=function(){return this.attributes.get("contentType")},n.prototype.hasContent=function(){return this.attributes.has("content")},n.prototype.getContent=function(){return this.attributes.get("content")},n.prototype.getWidth=function(){return this.attributes.get("width")},n.prototype.getHeight=function(){return this.attributes.get("height")},n.prototype.getFile=function(){return this.file},n.prototype.setFile=function(t){return this.file=t,this.isPreviewable()?this.preloadFile():void 0},n.prototype.releaseFile=function(){return this.releasePreloadedFile(),this.file=null},n.prototype.getUploadProgress=function(){var t;return null!=(t=this.uploadProgress)?t:0},n.prototype.setUploadProgress=function(t){var e;return this.uploadProgress!==t?(this.uploadProgress=t,null!=(e=this.uploadProgressDelegate)&&"function"==typeof e.attachmentDidChangeUploadProgress?e.attachmentDidChangeUploadProgress(this):void 0):void 0},n.prototype.toJSON=function(){return this.getAttributes()},n.prototype.getCacheKey=function(){return[n.__super__.getCacheKey.apply(this,arguments),this.attributes.getCacheKey(),this.getPreviewURL()].join("/")},n.prototype.getPreviewURL=function(){return this.previewURL||this.preloadingURL},n.prototype.setPreviewURL=function(t){var e,n;return t!==this.getPreviewURL()?(this.previewURL=t,null!=(e=this.previewDelegate)&&"function"==typeof e.attachmentDidChangeAttributes&&e.attachmentDidChangeAttributes(this),null!=(n=this.delegate)&&"function"==typeof n.attachmentDidChangePreviewURL?n.attachmentDidChangePreviewURL(this):void 0):void 0},n.prototype.preloadURL=function(){return this.preload(this.getURL(),this.releaseFile)},n.prototype.preloadFile=function(){return this.file?(this.fileObjectURL=URL.createObjectURL(this.file),this.preload(this.fileObjectURL)):void 0},n.prototype.releasePreloadedFile=function(){return this.fileObjectURL?(URL.revokeObjectURL(this.fileObjectURL),this.fileObjectURL=null):void 0},n.prototype.preload=function(t,e){return t&&t!==this.getPreviewURL()?(this.preloadingURL=t,new o.ImagePreloadOperation(t).then(function(n){return function(i){var r,o;return o=i.width,r=i.height,n.getWidth()&&n.getHeight()||n.setAttributes({width:o,height:r}),n.preloadingURL=null,n.setPreviewURL(t),"function"==typeof e?e():void 0}}(this)).catch(function(t){return function(){return t.preloadingURL=null,"function"==typeof e?e():void 0}}(this))):void 0},n}(o.Object)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.Piece=function(e){function n(t,e){null==e&&(e={}),n.__super__.constructor.apply(this,arguments),this.attributes=o.Hash.box(e)}return t(n,e),n.types={},n.registerType=function(t,e){return e.type=t,this.types[t]=e},n.fromJSON=function(t){var e;return(e=this.types[t.type])?e.fromJSON(t):void 0},n.prototype.copyWithAttributes=function(t){return new this.constructor(this.getValue(),t)},n.prototype.copyWithAdditionalAttributes=function(t){return this.copyWithAttributes(this.attributes.merge(t))},n.prototype.copyWithoutAttribute=function(t){return this.copyWithAttributes(this.attributes.remove(t))},n.prototype.copy=function(){return this.copyWithAttributes(this.attributes)},n.prototype.getAttribute=function(t){return this.attributes.get(t)},n.prototype.getAttributesHash=function(){return this.attributes},n.prototype.getAttributes=function(){return this.attributes.toObject()},n.prototype.getCommonAttributes=function(){var t,e,n;return(n=pieceList.getPieceAtIndex(0))?(t=n.attributes,e=t.getKeys(),pieceList.eachPiece((function(n){return e=t.getKeysCommonToHash(n.attributes),t=t.slice(e)})),t.toObject()):{}},n.prototype.hasAttribute=function(t){return this.attributes.has(t)},n.prototype.hasSameStringValueAsPiece=function(t){return null!=t&&this.toString()===t.toString()},n.prototype.hasSameAttributesAsPiece=function(t){return null!=t&&(this.attributes===t.attributes||this.attributes.isEqualTo(t.attributes))},n.prototype.isBlockBreak=function(){return!1},n.prototype.isEqualTo=function(t){return n.__super__.isEqualTo.apply(this,arguments)||this.hasSameConstructorAs(t)&&this.hasSameStringValueAsPiece(t)&&this.hasSameAttributesAsPiece(t)},n.prototype.isEmpty=function(){return 0===this.length},n.prototype.isSerializable=function(){return!0},n.prototype.toJSON=function(){return{type:this.constructor.type,attributes:this.getAttributes()}},n.prototype.contentsForInspection=function(){return{type:this.constructor.type,attributes:this.attributes.inspect()}},n.prototype.canBeGrouped=function(){return this.hasAttribute("href")},n.prototype.canBeGroupedWith=function(t){return this.getAttribute("href")===t.getAttribute("href")},n.prototype.getLength=function(){return this.length},n.prototype.canBeConsolidatedWith=function(){return!1},n}(o.Object)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.Piece.registerType("attachment",o.AttachmentPiece=function(e){function n(t){this.attachment=t,n.__super__.constructor.apply(this,arguments),this.length=1,this.ensureAttachmentExclusivelyHasAttribute("href"),this.attachment.hasContent()||this.removeProhibitedAttributes()}return t(n,e),n.fromJSON=function(t){return new this(o.Attachment.fromJSON(t.attachment),t.attributes)},n.permittedAttributes=["caption","presentation"],n.prototype.ensureAttachmentExclusivelyHasAttribute=function(t){return this.hasAttribute(t)?(this.attachment.hasAttribute(t)||this.attachment.setAttributes(this.attributes.slice(t)),this.attributes=this.attributes.remove(t)):void 0},n.prototype.removeProhibitedAttributes=function(){var t;return(t=this.attributes.slice(this.constructor.permittedAttributes)).isEqualTo(this.attributes)?void 0:this.attributes=t},n.prototype.getValue=function(){return this.attachment},n.prototype.isSerializable=function(){return!this.attachment.isPending()},n.prototype.getCaption=function(){var t;return null!=(t=this.attributes.get("caption"))?t:""},n.prototype.isEqualTo=function(t){var e;return n.__super__.isEqualTo.apply(this,arguments)&&this.attachment.id===(null!=t&&null!=(e=t.attachment)?e.id:void 0)},n.prototype.toString=function(){return o.OBJECT_REPLACEMENT_CHARACTER},n.prototype.toJSON=function(){var t;return(t=n.__super__.toJSON.apply(this,arguments)).attachment=this.attachment,t},n.prototype.getCacheKey=function(){return[n.__super__.getCacheKey.apply(this,arguments),this.attachment.getCacheKey()].join("/")},n.prototype.toConsole=function(){return JSON.stringify(this.toString())},n}(o.Piece))}.call(this),function(){var t,e=function(t,e){function i(){this.constructor=t}for(var r in e)n.call(e,r)&&(t[r]=e[r]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;t=o.normalizeNewlines,o.Piece.registerType("string",o.StringPiece=function(n){function i(e){i.__super__.constructor.apply(this,arguments),this.string=t(e),this.length=this.string.length}return e(i,n),i.fromJSON=function(t){return new this(t.string,t.attributes)},i.prototype.getValue=function(){return this.string},i.prototype.toString=function(){return this.string.toString()},i.prototype.isBlockBreak=function(){return"\n"===this.toString()&&!0===this.getAttribute("blockBreak")},i.prototype.toJSON=function(){var t;return(t=i.__super__.toJSON.apply(this,arguments)).string=this.string,t},i.prototype.canBeConsolidatedWith=function(t){return null!=t&&this.hasSameConstructorAs(t)&&this.hasSameAttributesAsPiece(t)},i.prototype.consolidateWith=function(t){return new this.constructor(this.toString()+t.toString(),this.attributes)},i.prototype.splitAtOffset=function(t){var e,n;return 0===t?(e=null,n=this):t===this.length?(e=this,n=null):(e=new this.constructor(this.string.slice(0,t),this.attributes),n=new this.constructor(this.string.slice(t),this.attributes)),[e,n]},i.prototype.toConsole=function(){var t;return(t=this.string).length>15&&(t=t.slice(0,14)+"…"),JSON.stringify(t.toString())},i}(o.Piece))}.call(this),function(){var t,e=function(t,e){function i(){this.constructor=t}for(var r in e)n.call(e,r)&&(t[r]=e[r]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty,i=[].slice;t=o.spliceArray,o.SplittableList=function(n){function r(t){null==t&&(t=[]),r.__super__.constructor.apply(this,arguments),this.objects=t.slice(0),this.length=this.objects.length}var o,s,a;return e(r,n),r.box=function(t){return t instanceof this?t:new this(t)},r.prototype.indexOf=function(t){return this.objects.indexOf(t)},r.prototype.splice=function(){var e;return e=1<=arguments.length?i.call(arguments,0):[],new this.constructor(t.apply(null,[this.objects].concat(i.call(e))))},r.prototype.eachObject=function(t){var e,n,i,r,o,s;for(s=[],n=e=0,i=(o=this.objects).length;i>e;n=++e)r=o[n],s.push(t(r,n));return s},r.prototype.insertObjectAtIndex=function(t,e){return this.splice(e,0,t)},r.prototype.insertSplittableListAtIndex=function(t,e){return this.splice.apply(this,[e,0].concat(i.call(t.objects)))},r.prototype.insertSplittableListAtPosition=function(t,e){var n,i,r;return i=(r=this.splitObjectAtPosition(e))[0],n=r[1],new this.constructor(i).insertSplittableListAtIndex(t,n)},r.prototype.editObjectAtIndex=function(t,e){return this.replaceObjectAtIndex(e(this.objects[t]),t)},r.prototype.replaceObjectAtIndex=function(t,e){return this.splice(e,1,t)},r.prototype.removeObjectAtIndex=function(t){return this.splice(t,1)},r.prototype.getObjectAtIndex=function(t){return this.objects[t]},r.prototype.getSplittableListInRange=function(t){var e,n,i,r;return n=(i=this.splitObjectsAtRange(t))[0],e=i[1],r=i[2],new this.constructor(n.slice(e,r+1))},r.prototype.selectSplittableList=function(t){var e,n;return n=function(){var n,i,r,o;for(o=[],n=0,i=(r=this.objects).length;i>n;n++)e=r[n],t(e)&&o.push(e);return o}.call(this),new this.constructor(n)},r.prototype.removeObjectsInRange=function(t){var e,n,i,r;return n=(i=this.splitObjectsAtRange(t))[0],e=i[1],r=i[2],new this.constructor(n).splice(e,r-e+1)},r.prototype.transformObjectsInRange=function(t,e){var n,i,r,o,s,a,u;return s=this.splitObjectsAtRange(t),o=s[0],i=s[1],a=s[2],u=function(){var t,s,u;for(u=[],n=t=0,s=o.length;s>t;n=++t)r=o[n],u.push(n>=i&&a>=n?e(r):r);return u}(),new this.constructor(u)},r.prototype.splitObjectsAtRange=function(t){var e,n,i,r,s;return n=(r=this.splitObjectAtPosition(a(t)))[0],e=r[1],i=r[2],[n=(s=new this.constructor(n).splitObjectAtPosition(o(t)+i))[0],e,s[1]-1]},r.prototype.getObjectAtPosition=function(t){var e,n;return e=(n=this.findIndexAndOffsetAtPosition(t)).index,n.offset,this.objects[e]},r.prototype.splitObjectAtPosition=function(t){var e,n,i,r,o,s,a,u,c;return e=(o=this.findIndexAndOffsetAtPosition(t)).index,r=o.offset,i=this.objects.slice(0),null!=e?0===r?(u=e,c=0):(n=(s=this.getObjectAtIndex(e).splitAtOffset(r))[0],a=s[1],i.splice(e,1,n,a),u=e+1,c=n.getLength()-r):(u=i.length,c=0),[i,u,c]},r.prototype.consolidate=function(){var t,e,n,i,r,o;for(i=[],r=this.objects[0],t=0,e=(o=this.objects.slice(1)).length;e>t;t++)n=o[t],("function"==typeof r.canBeConsolidatedWith?r.canBeConsolidatedWith(n):void 0)?r=r.consolidateWith(n):(i.push(r),r=n);return null!=r&&i.push(r),new this.constructor(i)},r.prototype.consolidateFromIndexToIndex=function(t,e){var n,r;return r=this.objects.slice(0).slice(t,e+1),n=new this.constructor(r).consolidate().toArray(),this.splice.apply(this,[t,r.length].concat(i.call(n)))},r.prototype.findIndexAndOffsetAtPosition=function(t){var e,n,i,r,o,s;for(e=0,i=n=0,r=(s=this.objects).length;r>n;i=++n){if(o=e+s[i].getLength(),t>=e&&o>t)return{index:i,offset:t-e};e=o}return{index:null,offset:null}},r.prototype.findPositionAtIndexAndOffset=function(t,e){var n,i,r,o,s,a;for(s=0,n=i=0,r=(a=this.objects).length;r>i;n=++i)if(o=a[n],t>n)s+=o.getLength();else if(n===t){s+=e;break}return s},r.prototype.getEndPosition=function(){var t,e;return null!=this.endPosition?this.endPosition:this.endPosition=function(){var n,i,r;for(e=0,n=0,i=(r=this.objects).length;i>n;n++)t=r[n],e+=t.getLength();return e}.call(this)},r.prototype.toString=function(){return this.objects.join("")},r.prototype.toArray=function(){return this.objects.slice(0)},r.prototype.toJSON=function(){return this.toArray()},r.prototype.isEqualTo=function(t){return r.__super__.isEqualTo.apply(this,arguments)||s(this.objects,null!=t?t.objects:void 0)},s=function(t,e){var n,i,r,o,s;if(null==e&&(e=[]),t.length!==e.length)return!1;for(s=!0,i=n=0,r=t.length;r>n;i=++n)o=t[i],s&&!o.isEqualTo(e[i])&&(s=!1);return s},r.prototype.contentsForInspection=function(){var t;return{objects:"["+function(){var e,n,i,r;for(r=[],e=0,n=(i=this.objects).length;n>e;e++)t=i[e],r.push(t.inspect());return r}.call(this).join(", ")+"]"}},a=function(t){return t[0]},o=function(t){return t[1]},r}(o.Object)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.Text=function(e){function n(t){var e;null==t&&(t=[]),n.__super__.constructor.apply(this,arguments),this.pieceList=new o.SplittableList(function(){var n,i,r;for(r=[],n=0,i=t.length;i>n;n++)(e=t[n]).isEmpty()||r.push(e);return r}())}return t(n,e),n.textForAttachmentWithAttributes=function(t,e){return new this([new o.AttachmentPiece(t,e)])},n.textForStringWithAttributes=function(t,e){return new this([new o.StringPiece(t,e)])},n.fromJSON=function(t){var e;return new this(function(){var n,i,r;for(r=[],n=0,i=t.length;i>n;n++)e=t[n],r.push(o.Piece.fromJSON(e));return r}())},n.prototype.copy=function(){return this.copyWithPieceList(this.pieceList)},n.prototype.copyWithPieceList=function(t){return new this.constructor(t.consolidate().toArray())},n.prototype.copyUsingObjectMap=function(t){var e,n;return n=function(){var n,i,r,o,s;for(s=[],n=0,i=(r=this.getPieces()).length;i>n;n++)e=r[n],s.push(null!=(o=t.find(e))?o:e);return s}.call(this),new this.constructor(n)},n.prototype.appendText=function(t){return this.insertTextAtPosition(t,this.getLength())},n.prototype.insertTextAtPosition=function(t,e){return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(t.pieceList,e))},n.prototype.removeTextAtRange=function(t){return this.copyWithPieceList(this.pieceList.removeObjectsInRange(t))},n.prototype.replaceTextAtRange=function(t,e){return this.removeTextAtRange(e).insertTextAtPosition(t,e[0])},n.prototype.moveTextFromRangeToPosition=function(t,e){var n,i;if(!(t[0]<=e&&e<=t[1]))return n=(i=this.getTextAtRange(t)).getLength(),t[0]t;t++)e=i[t],r.push(e.getAttributes());return r}.call(this),o.Hash.fromCommonAttributesOfObjects(t).toObject()},n.prototype.getCommonAttributesAtRange=function(t){var e;return null!=(e=this.getTextAtRange(t).getCommonAttributes())?e:{}},n.prototype.getExpandedRangeForAttributeAtOffset=function(t,e){var n,i,r;for(n=r=e,i=this.getLength();n>0&&this.getCommonAttributesAtRange([n-1,r])[t];)n--;for(;i>r&&this.getCommonAttributesAtRange([e,r+1])[t];)r++;return[n,r]},n.prototype.getTextAtRange=function(t){return this.copyWithPieceList(this.pieceList.getSplittableListInRange(t))},n.prototype.getStringAtRange=function(t){return this.pieceList.getSplittableListInRange(t).toString()},n.prototype.getStringAtPosition=function(t){return this.getStringAtRange([t,t+1])},n.prototype.startsWithString=function(t){return this.getStringAtRange([0,t.length])===t},n.prototype.endsWithString=function(t){var e;return e=this.getLength(),this.getStringAtRange([e-t.length,e])===t},n.prototype.getAttachmentPieces=function(){var t,e,n,i,r;for(r=[],t=0,e=(i=this.pieceList.toArray()).length;e>t;t++)null!=(n=i[t]).attachment&&r.push(n);return r},n.prototype.getAttachments=function(){var t,e,n,i,r;for(r=[],t=0,e=(i=this.getAttachmentPieces()).length;e>t;t++)n=i[t],r.push(n.attachment);return r},n.prototype.getAttachmentAndPositionById=function(t){var e,n,i,r,o,s;for(r=0,e=0,n=(o=this.pieceList.toArray()).length;n>e;e++){if((null!=(s=(i=o[e]).attachment)?s.id:void 0)===t)return{attachment:i.attachment,position:r};r+=i.length}return{attachment:null,position:null}},n.prototype.getAttachmentById=function(t){var e,n;return e=(n=this.getAttachmentAndPositionById(t)).attachment,n.position,e},n.prototype.getRangeOfAttachment=function(t){var e,n;return t=(n=this.getAttachmentAndPositionById(t.id)).attachment,e=n.position,null!=t?[e,e+1]:void 0},n.prototype.updateAttributesForAttachment=function(t,e){var n;return(n=this.getRangeOfAttachment(e))?this.addAttributesAtRange(t,n):this},n.prototype.getLength=function(){return this.pieceList.getEndPosition()},n.prototype.isEmpty=function(){return 0===this.getLength()},n.prototype.isEqualTo=function(t){var e;return n.__super__.isEqualTo.apply(this,arguments)||(null!=t&&null!=(e=t.pieceList)?e.isEqualTo(this.pieceList):void 0)},n.prototype.isBlockBreak=function(){return 1===this.getLength()&&this.pieceList.getObjectAtIndex(0).isBlockBreak()},n.prototype.eachPiece=function(t){return this.pieceList.eachObject(t)},n.prototype.getPieces=function(){return this.pieceList.toArray()},n.prototype.getPieceAtPosition=function(t){return this.pieceList.getObjectAtPosition(t)},n.prototype.contentsForInspection=function(){return{pieceList:this.pieceList.inspect()}},n.prototype.toSerializableText=function(){var t;return t=this.pieceList.selectSplittableList((function(t){return t.isSerializable()})),this.copyWithPieceList(t)},n.prototype.toString=function(){return this.pieceList.toString()},n.prototype.toJSON=function(){return this.pieceList.toJSON()},n.prototype.toConsole=function(){var t;return JSON.stringify(function(){var e,n,i,r;for(r=[],e=0,n=(i=this.pieceList.toArray()).length;n>e;e++)t=i[e],r.push(JSON.parse(t.toConsole()));return r}.call(this))},n.prototype.getDirection=function(){return o.getDirection(this.toString())},n.prototype.isRTL=function(){return"rtl"===this.getDirection()},n}(o.Object)}.call(this),function(){var t,e,n,i,r=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty,a=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},u=[].slice;t=o.arraysAreEqual,i=o.spliceArray,e=o.getBlockConfig,o.getBlockAttributeNames,n=o.getListAttributeNames,o.Block=function(s){function c(t,e){null==t&&(t=new o.Text),null==e&&(e=[]),c.__super__.constructor.apply(this,arguments),this.text=h(t),this.attributes=e}var l,h,p,d,f,g,m,y,v;return r(c,s),c.fromJSON=function(t){return new this(o.Text.fromJSON(t.text),t.attributes)},c.prototype.isEmpty=function(){return this.text.isBlockBreak()},c.prototype.isEqualTo=function(e){return c.__super__.isEqualTo.apply(this,arguments)||this.text.isEqualTo(null!=e?e.text:void 0)&&t(this.attributes,null!=e?e.attributes:void 0)},c.prototype.copyWithText=function(t){return new this.constructor(t,this.attributes)},c.prototype.copyWithoutText=function(){return this.copyWithText(null)},c.prototype.copyWithAttributes=function(t){return new this.constructor(this.text,t)},c.prototype.copyWithoutAttributes=function(){return this.copyWithAttributes(null)},c.prototype.copyUsingObjectMap=function(t){var e;return this.copyWithText((e=t.find(this.text))?e:this.text.copyUsingObjectMap(t))},c.prototype.addAttribute=function(t){var e;return e=this.attributes.concat(d(t)),this.copyWithAttributes(e)},c.prototype.removeAttribute=function(t){var n,i;return i=e(t).listAttribute,n=g(g(this.attributes,t),i),this.copyWithAttributes(n)},c.prototype.removeLastAttribute=function(){return this.removeAttribute(this.getLastAttribute())},c.prototype.getLastAttribute=function(){return f(this.attributes)},c.prototype.getAttributes=function(){return this.attributes.slice(0)},c.prototype.getAttributeLevel=function(){return this.attributes.length},c.prototype.getAttributeAtLevel=function(t){return this.attributes[t-1]},c.prototype.hasAttribute=function(t){return a.call(this.attributes,t)>=0},c.prototype.hasAttributes=function(){return this.getAttributeLevel()>0},c.prototype.getLastNestableAttribute=function(){return f(this.getNestableAttributes())},c.prototype.getNestableAttributes=function(){var t,n,i,r,o;for(o=[],n=0,i=(r=this.attributes).length;i>n;n++)t=r[n],e(t).nestable&&o.push(t);return o},c.prototype.getNestingLevel=function(){return this.getNestableAttributes().length},c.prototype.decreaseNestingLevel=function(){var t;return(t=this.getLastNestableAttribute())?this.removeAttribute(t):this},c.prototype.increaseNestingLevel=function(){var t,e,n;return(t=this.getLastNestableAttribute())?(n=this.attributes.lastIndexOf(t),e=i.apply(null,[this.attributes,n+1,0].concat(u.call(d(t)))),this.copyWithAttributes(e)):this},c.prototype.getListItemAttributes=function(){var t,n,i,r,o;for(o=[],n=0,i=(r=this.attributes).length;i>n;n++)t=r[n],e(t).listAttribute&&o.push(t);return o},c.prototype.isListItem=function(){var t;return null!=(t=e(this.getLastAttribute()))?t.listAttribute:void 0},c.prototype.isTerminalBlock=function(){var t;return null!=(t=e(this.getLastAttribute()))?t.terminal:void 0},c.prototype.breaksOnReturn=function(){var t;return null!=(t=e(this.getLastAttribute()))?t.breakOnReturn:void 0},c.prototype.findLineBreakInDirectionFromPosition=function(t,e){var n,i;return i=this.toString(),-1!==(n=function(){switch(t){case"forward":return i.indexOf("\n",e);case"backward":return i.slice(0,e).lastIndexOf("\n")}}())?n:void 0},c.prototype.contentsForInspection=function(){return{text:this.text.inspect(),attributes:this.attributes}},c.prototype.toString=function(){return this.text.toString()},c.prototype.toJSON=function(){return{text:this.text,attributes:this.attributes}},c.prototype.getDirection=function(){return this.text.getDirection()},c.prototype.isRTL=function(){return this.text.isRTL()},c.prototype.getLength=function(){return this.text.getLength()},c.prototype.canBeConsolidatedWith=function(t){return!this.hasAttributes()&&!t.hasAttributes()&&this.getDirection()===t.getDirection()},c.prototype.consolidateWith=function(t){var e,n;return e=o.Text.textForStringWithAttributes("\n"),n=this.getTextWithoutBlockBreak().appendText(e),this.copyWithText(n.appendText(t.text))},c.prototype.splitAtOffset=function(t){var e,n;return 0===t?(e=null,n=this):t===this.getLength()?(e=this,n=null):(e=this.copyWithText(this.text.getTextAtRange([0,t])),n=this.copyWithText(this.text.getTextAtRange([t,this.getLength()]))),[e,n]},c.prototype.getBlockBreakPosition=function(){return this.text.getLength()-1},c.prototype.getTextWithoutBlockBreak=function(){return m(this.text)?this.text.getTextAtRange([0,this.getBlockBreakPosition()]):this.text.copy()},c.prototype.canBeGrouped=function(t){return this.attributes[t]},c.prototype.canBeGroupedWith=function(t,i){var r,o,s,u;return o=(s=t.getAttributes())[i],!((r=this.attributes[i])!==o||!1===e(r).group&&(u=s[i+1],a.call(n(),u)<0)||this.getDirection()!==t.getDirection()&&!t.isEmpty())},h=function(t){return t=v(t),l(t)},v=function(t){var e,n,i,r,s,a;return r=!1,a=t.getPieces(),n=2<=a.length?u.call(a,0,e=a.length-1):(e=0,[]),null==(i=a[e++])?t:(n=function(){var t,e,i;for(i=[],t=0,e=n.length;e>t;t++)(s=n[t]).isBlockBreak()?(r=!0,i.push(y(s))):i.push(s);return i}(),r?new o.Text(u.call(n).concat([i])):t)},p=o.Text.textForStringWithAttributes("\n",{blockBreak:!0}),l=function(t){return m(t)?t:t.appendText(p)},m=function(t){var e;return 0!==(e=t.getLength())&&t.getTextAtRange([e-1,e]).isBlockBreak()},y=function(t){return t.copyWithoutAttribute("blockBreak")},d=function(t){var n;return null!=(n=e(t).listAttribute)?[n,t]:[t]},f=function(t){return t.slice(-1)[0]},g=function(t,e){var n;return-1===(n=t.lastIndexOf(e))?t:i(t,n,1)},c}(o.Object)}.call(this),function(){var t,e,n,i=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},a=[].slice;e=o.tagName,n=o.walkTree,t=o.nodeIsAttachmentElement,o.HTMLSanitizer=function(r){function u(t,e){var n;n=null!=e?e:{},this.allowedAttributes=n.allowedAttributes,this.forbiddenProtocols=n.forbiddenProtocols,this.forbiddenElements=n.forbiddenElements,null==this.allowedAttributes&&(this.allowedAttributes=c),null==this.forbiddenProtocols&&(this.forbiddenProtocols=h),null==this.forbiddenElements&&(this.forbiddenElements=l),this.body=p(t)}var c,l,h,p;return i(u,r),c="style href src width height class".split(" "),h="javascript:".split(" "),l="script iframe".split(" "),u.sanitize=function(t,e){var n;return(n=new this(t,e)).sanitize(),n},u.prototype.sanitize=function(){return this.sanitizeElements(),this.normalizeListElementNesting()},u.prototype.getHTML=function(){return this.body.innerHTML},u.prototype.getBody=function(){return this.body},u.prototype.sanitizeElements=function(){var t,e,i,r,s;for(s=n(this.body),r=[];s.nextNode();)switch(i=s.currentNode,i.nodeType){case Node.ELEMENT_NODE:this.elementIsRemovable(i)?r.push(i):this.sanitizeElement(i);break;case Node.COMMENT_NODE:r.push(i)}for(t=0,e=r.length;e>t;t++)i=r[t],o.removeNode(i);return this.body},u.prototype.sanitizeElement=function(t){var e,n,i,r,o;for(t.hasAttribute("href")&&(r=t.protocol,s.call(this.forbiddenProtocols,r)>=0&&t.removeAttribute("href")),e=0,n=(o=a.call(t.attributes)).length;n>e;e++)i=o[e].name,s.call(this.allowedAttributes,i)>=0||0===i.indexOf("data-trix")||t.removeAttribute(i);return t},u.prototype.normalizeListElementNesting=function(){var t,n,i,r,o;for(t=0,n=(o=a.call(this.body.querySelectorAll("ul,ol"))).length;n>t;t++)(r=(i=o[t]).previousElementSibling)&&"li"===e(r)&&r.appendChild(i);return this.body},u.prototype.elementIsRemovable=function(t){return(null!=t?t.nodeType:void 0)===Node.ELEMENT_NODE?this.elementIsForbidden(t)||this.elementIsntSerializable(t):void 0},u.prototype.elementIsForbidden=function(t){var n;return n=e(t),s.call(this.forbiddenElements,n)>=0},u.prototype.elementIsntSerializable=function(e){return"false"===e.getAttribute("data-trix-serialize")&&!t(e)},p=function(t){var e,n,i,r,o;for(null==t&&(t=""),t=t.replace(/<\/html[^>]*>[^]*$/i,""),(e=document.implementation.createHTMLDocument("")).documentElement.innerHTML=t,i=0,r=(o=e.head.querySelectorAll("style")).length;r>i;i++)n=o[i],e.body.appendChild(n);return e.body},u}(o.BasicObject)}.call(this),function(){var t,e,n,i,r,s,a,u,c,l,h,p=function(t,e){function n(){this.constructor=t}for(var i in e)d.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},d={}.hasOwnProperty,f=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=o.arraysAreEqual,s=o.makeElement,l=o.tagName,r=o.getBlockTagNames,h=o.walkTree,i=o.findClosestElementFromNode,n=o.elementContainsNode,a=o.nodeIsAttachmentElement,u=o.normalizeSpaces,e=o.breakableWhitespacePattern,c=o.squishBreakableWhitespace,o.HTMLParser=function(d){function g(t,e){this.html=t,this.referenceElement=(null!=e?e:{}).referenceElement,this.blocks=[],this.blockElements=[],this.processedElements=[]}var m,y,v,b,A,C,x,w,E,S,k,R;return p(g,d),g.parse=function(t,e){var n;return(n=new this(t,e)).parse(),n},g.prototype.getDocument=function(){return o.Document.fromJSON(this.blocks)},g.prototype.parse=function(){var t,e;try{for(this.createHiddenContainer(),t=o.HTMLSanitizer.sanitize(this.html).getHTML(),this.containerElement.innerHTML=t,e=h(this.containerElement,{usingFilter:x});e.nextNode();)this.processNode(e.currentNode);return this.translateBlockElementMarginsToNewlines()}finally{this.removeHiddenContainer()}},g.prototype.createHiddenContainer=function(){return this.referenceElement?(this.containerElement=this.referenceElement.cloneNode(!1),this.containerElement.removeAttribute("id"),this.containerElement.setAttribute("data-trix-internal",""),this.containerElement.style.display="none",this.referenceElement.parentNode.insertBefore(this.containerElement,this.referenceElement.nextSibling)):(this.containerElement=s({tagName:"div",style:{display:"none"}}),document.body.appendChild(this.containerElement))},g.prototype.removeHiddenContainer=function(){return o.removeNode(this.containerElement)},x=function(t){return"style"===l(t)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},g.prototype.processNode=function(t){switch(t.nodeType){case Node.TEXT_NODE:if(!this.isInsignificantTextNode(t))return this.appendBlockForTextNode(t),this.processTextNode(t);break;case Node.ELEMENT_NODE:return this.appendBlockForElement(t),this.processElement(t)}},g.prototype.appendBlockForTextNode=function(e){var n,i,r;return(i=e.parentNode)===this.currentBlockElement&&this.isBlockElement(e.previousSibling)?this.appendStringWithAttributes("\n"):i!==this.containerElement&&!this.isBlockElement(i)||(n=this.getBlockAttributes(i),t(n,null!=(r=this.currentBlock)?r.attributes:void 0))?void 0:(this.currentBlock=this.appendBlockForAttributesWithElement(n,i),this.currentBlockElement=i)},g.prototype.appendBlockForElement=function(e){var i,r,o,s;if(o=this.isBlockElement(e),r=n(this.currentBlockElement,e),o&&!this.isBlockElement(e.firstChild)){if((!this.isInsignificantTextNode(e.firstChild)||!this.isBlockElement(e.firstElementChild))&&(i=this.getBlockAttributes(e),e.firstChild))return r&&t(i,this.currentBlock.attributes)?this.appendStringWithAttributes("\n"):(this.currentBlock=this.appendBlockForAttributesWithElement(i,e),this.currentBlockElement=e)}else if(this.currentBlockElement&&!r&&!o)return(s=this.findParentBlockElement(e))?this.appendBlockForElement(s):(this.currentBlock=this.appendEmptyBlock(),this.currentBlockElement=null)},g.prototype.findParentBlockElement=function(t){var e;for(e=t.parentElement;e&&e!==this.containerElement;){if(this.isBlockElement(e)&&f.call(this.blockElements,e)>=0)return e;e=e.parentElement}return null},g.prototype.processTextNode=function(t){var e,n;return n=t.data,y(t.parentNode)||(n=c(n),k(null!=(e=t.previousSibling)?e.textContent:void 0)&&(n=A(n))),this.appendStringWithAttributes(n,this.getTextAttributes(t.parentNode))},g.prototype.processElement=function(t){var e,n,i,r,o;if(a(t))return e=w(t,"attachment"),Object.keys(e).length&&(r=this.getTextAttributes(t),this.appendAttachmentWithAttributes(e,r),t.innerHTML=""),this.processedElements.push(t);switch(l(t)){case"br":return this.isExtraBR(t)||this.isBlockElement(t.nextSibling)||this.appendStringWithAttributes("\n",this.getTextAttributes(t)),this.processedElements.push(t);case"img":for(n in e={url:t.getAttribute("src"),contentType:"image"},i=b(t))o=i[n],e[n]=o;return this.appendAttachmentWithAttributes(e,this.getTextAttributes(t)),this.processedElements.push(t);case"tr":if(t.parentNode.firstChild!==t)return this.appendStringWithAttributes("\n");break;case"td":if(t.parentNode.firstChild!==t)return this.appendStringWithAttributes(" | ")}},g.prototype.appendBlockForAttributesWithElement=function(t,e){var n;return this.blockElements.push(e),n=m(t),this.blocks.push(n),n},g.prototype.appendEmptyBlock=function(){return this.appendBlockForAttributesWithElement([],null)},g.prototype.appendStringWithAttributes=function(t,e){return this.appendPiece(S(t,e))},g.prototype.appendAttachmentWithAttributes=function(t,e){return this.appendPiece(E(t,e))},g.prototype.appendPiece=function(t){return 0===this.blocks.length&&this.appendEmptyBlock(),this.blocks[this.blocks.length-1].text.push(t)},g.prototype.appendStringToTextAtIndex=function(t,e){var n,i;return"string"===(null!=(n=(i=this.blocks[e].text)[i.length-1])?n.type:void 0)?n.string+=t:i.push(S(t))},g.prototype.prependStringToTextAtIndex=function(t,e){var n,i;return"string"===(null!=(n=(i=this.blocks[e].text)[0])?n.type:void 0)?n.string=t+n.string:i.unshift(S(t))},S=function(t,e){return null==e&&(e={}),"string",{string:t=u(t),attributes:e,type:"string"}},E=function(t,e){return null==e&&(e={}),"attachment",{attachment:t,attributes:e,type:"attachment"}},m=function(t){return null==t&&(t={}),{text:[],attributes:t}},g.prototype.getTextAttributes=function(t){var e,n,r,s,u,c,l,h,p,d,f,g;for(e in r={},p=o.config.textAttributes)if((u=p[e]).tagName&&i(t,{matchingSelector:u.tagName,untilNode:this.containerElement}))r[e]=!0;else if(u.parser){if(g=u.parser(t)){for(n=!1,c=0,h=(d=this.findBlockElementAncestors(t)).length;h>c;c++)if(s=d[c],u.parser(s)===g){n=!0;break}n||(r[e]=g)}}else u.styleProperty&&(g=t.style[u.styleProperty])&&(r[e]=g);if(a(t))for(l in f=w(t,"attributes"))g=f[l],r[l]=g;return r},g.prototype.getBlockAttributes=function(t){var e,n,i,r;for(n=[];t&&t!==this.containerElement;){for(e in r=o.config.blockAttributes)!1!==(i=r[e]).parse&&l(t)===i.tagName&&(("function"==typeof i.test?i.test(t):void 0)||!i.test)&&(n.push(e),i.listAttribute&&n.push(i.listAttribute));t=t.parentNode}return n.reverse()},g.prototype.findBlockElementAncestors=function(t){var e,n;for(e=[];t&&t!==this.containerElement;)n=l(t),f.call(r(),n)>=0&&e.push(t),t=t.parentNode;return e},w=function(t,e){try{return JSON.parse(t.getAttribute("data-trix-"+e))}catch(t){return{}}},b=function(t){var e,n,i;return i=t.getAttribute("width"),n=t.getAttribute("height"),e={},i&&(e.width=parseInt(i,10)),n&&(e.height=parseInt(n,10)),e},g.prototype.isBlockElement=function(t){var e;if((null!=t?t.nodeType:void 0)===Node.ELEMENT_NODE&&!a(t)&&!i(t,{matchingSelector:"td",untilNode:this.containerElement}))return e=l(t),f.call(r(),e)>=0||"block"===window.getComputedStyle(t).display},g.prototype.isInsignificantTextNode=function(t){var e,n,i;if((null!=t?t.nodeType:void 0)===Node.TEXT_NODE&&R(t.data)&&(n=t.parentNode,i=t.previousSibling,e=t.nextSibling,(!C(n.previousSibling)||this.isBlockElement(n.previousSibling))&&!y(n)))return!i||this.isBlockElement(i)||!e||this.isBlockElement(e)},g.prototype.isExtraBR=function(t){return"br"===l(t)&&this.isBlockElement(t.parentNode)&&t.parentNode.lastChild===t},y=function(t){var e;return"pre"===(e=window.getComputedStyle(t).whiteSpace)||"pre-wrap"===e||"pre-line"===e},C=function(t){return t&&!k(t.textContent)},g.prototype.translateBlockElementMarginsToNewlines=function(){var t,e,n,i,r,o,s;for(t=this.getMarginOfDefaultBlockElement(),s=[],n=e=0,i=(o=this.blocks).length;i>e;n=++e)o[n],(r=this.getMarginOfBlockElementAtIndex(n))&&(r.top>2*t.top&&this.prependStringToTextAtIndex("\n",n),s.push(r.bottom>2*t.bottom?this.appendStringToTextAtIndex("\n",n):void 0));return s},g.prototype.getMarginOfBlockElementAtIndex=function(t){var e,n;return!(e=this.blockElements[t])||!e.textContent||(n=l(e),f.call(r(),n)>=0||f.call(this.processedElements,e)>=0)?void 0:v(e)},g.prototype.getMarginOfDefaultBlockElement=function(){var t;return t=s(o.config.blockAttributes.default.tagName),this.containerElement.appendChild(t),v(t)},v=function(t){var e;return"block"===(e=window.getComputedStyle(t)).display?{top:parseInt(e.marginTop),bottom:parseInt(e.marginBottom)}:void 0},A=function(t){return t.replace(RegExp("^"+e.source+"+"),"")},R=function(t){return RegExp("^"+e.source+"*$").test(t)},k=function(t){return/\s$/.test(t)},g}(o.BasicObject)}.call(this),function(){var t,e,n,i,r=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty,a=[].slice,u=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=o.arraysAreEqual,n=o.normalizeRange,i=o.rangeIsCollapsed,e=o.getBlockConfig,o.Document=function(s){function c(t){null==t&&(t=[]),c.__super__.constructor.apply(this,arguments),0===t.length&&(t=[new o.Block]),this.blockList=o.SplittableList.box(t)}var l;return r(c,s),c.fromJSON=function(t){var e,n;return n=function(){var n,i,r;for(r=[],n=0,i=t.length;i>n;n++)e=t[n],r.push(o.Block.fromJSON(e));return r}(),new this(n)},c.fromHTML=function(t,e){return o.HTMLParser.parse(t,e).getDocument()},c.fromString=function(t,e){var n;return n=o.Text.textForStringWithAttributes(t,e),new this([new o.Block(n)])},c.prototype.isEmpty=function(){var t;return 1===this.blockList.length&&((t=this.getBlockAtIndex(0)).isEmpty()&&!t.hasAttributes())},c.prototype.copy=function(t){var e;return null==t&&(t={}),e=t.consolidateBlocks?this.blockList.consolidate().toArray():this.blockList.toArray(),new this.constructor(e)},c.prototype.copyUsingObjectsFromDocument=function(t){var e;return e=new o.ObjectMap(t.getObjects()),this.copyUsingObjectMap(e)},c.prototype.copyUsingObjectMap=function(t){var e,n,i;return n=function(){var n,r,o,s;for(s=[],n=0,r=(o=this.getBlocks()).length;r>n;n++)e=o[n],s.push((i=t.find(e))?i:e.copyUsingObjectMap(t));return s}.call(this),new this.constructor(n)},c.prototype.copyWithBaseBlockAttributes=function(t){var e,n,i;return null==t&&(t=[]),i=function(){var i,r,o,s;for(s=[],i=0,r=(o=this.getBlocks()).length;r>i;i++)n=o[i],e=t.concat(n.getAttributes()),s.push(n.copyWithAttributes(e));return s}.call(this),new this.constructor(i)},c.prototype.replaceBlock=function(t,e){var n;return-1===(n=this.blockList.indexOf(t))?this:new this.constructor(this.blockList.replaceObjectAtIndex(e,n))},c.prototype.insertDocumentAtRange=function(t,e){var r,o,s,a,u,c,l;return o=t.blockList,u=(e=n(e))[0],s=(c=this.locationFromPosition(u)).index,a=c.offset,l=this,r=this.getBlockAtPosition(u),i(e)&&r.isEmpty()&&!r.hasAttributes()?l=new this.constructor(l.blockList.removeObjectAtIndex(s)):r.getBlockBreakPosition()===a&&u++,l=l.removeTextAtRange(e),new this.constructor(l.blockList.insertSplittableListAtPosition(o,u))},c.prototype.mergeDocumentAtRange=function(e,i){var r,o,s,a,u,c,l,h,p,d,f,g;return f=(i=n(i))[0],d=this.locationFromPosition(f),o=this.getBlockAtIndex(d.index).getAttributes(),r=e.getBaseBlockAttributes(),g=o.slice(-r.length),t(r,g)?(l=o.slice(0,-r.length),c=e.copyWithBaseBlockAttributes(l)):c=e.copy({consolidateBlocks:!0}).copyWithBaseBlockAttributes(o),s=c.getBlockCount(),a=c.getBlockAtIndex(0),t(o,a.getAttributes())?(u=a.getTextWithoutBlockBreak(),p=this.insertTextAtRange(u,i),s>1&&(c=new this.constructor(c.getBlocks().slice(1)),h=f+u.getLength(),p=p.insertDocumentAtRange(c,h))):p=this.insertDocumentAtRange(c,i),p},c.prototype.insertTextAtRange=function(t,e){var i,r,o,s,a;return a=(e=n(e))[0],r=(s=this.locationFromPosition(a)).index,o=s.offset,i=this.removeTextAtRange(e),new this.constructor(i.blockList.editObjectAtIndex(r,(function(e){return e.copyWithText(e.text.insertTextAtPosition(t,o))})))},c.prototype.removeTextAtRange=function(t){var e,r,o,s,a,u,c,l,h,p,d,f,g,m,y,v,b,A;return l=(p=t=n(t))[0],v=p[1],i(t)?this:(u=(d=this.locationRangeFromRange(t))[0],m=d[1],a=u.index,c=u.offset,s=this.getBlockAtIndex(a),g=m.index,y=m.offset,f=this.getBlockAtIndex(g),v-l==1&&s.getBlockBreakPosition()===c&&f.getBlockBreakPosition()!==y&&"\n"===f.text.getStringAtPosition(y)?o=this.blockList.editObjectAtIndex(g,(function(t){return t.copyWithText(t.text.removeTextAtRange([y,y+1]))})):(h=s.text.getTextAtRange([0,c]),b=f.text.getTextAtRange([y,f.getLength()]),A=h.appendText(b),r=a!==g&&0===c&&s.getAttributeLevel()>=f.getAttributeLevel()?f.copyWithText(A):s.copyWithText(A),e=g+1-a,o=this.blockList.splice(a,e,r)),new this.constructor(o))},c.prototype.moveTextFromRangeToPosition=function(t,e){var i,r,o,s,u,c,l,h,p,d;return p=(c=t=n(t))[0],o=c[1],e>=p&&o>=e?this:(r=this.getDocumentAtRange(t),h=this.removeTextAtRange(t),(u=e>p)&&(e-=r.getLength()),s=(l=r.getBlocks())[0],0===(i=2<=l.length?a.call(l,1):[]).length?(d=s.getTextWithoutBlockBreak(),u&&(e+=1)):d=s.text,h=h.insertTextAtRange(d,e),0===i.length?h:(r=new this.constructor(i),e+=d.getLength(),h.insertDocumentAtRange(r,e)))},c.prototype.addAttributeAtRange=function(t,n,i){var r;return r=this.blockList,this.eachBlockAtRange(i,(function(i,o,s){return r=r.editObjectAtIndex(s,(function(){return e(t)?i.addAttribute(t,n):o[0]===o[1]?i:i.copyWithText(i.text.addAttributeAtRange(t,n,o))}))})),new this.constructor(r)},c.prototype.addAttribute=function(t,e){var n;return n=this.blockList,this.eachBlock((function(i,r){return n=n.editObjectAtIndex(r,(function(){return i.addAttribute(t,e)}))})),new this.constructor(n)},c.prototype.removeAttributeAtRange=function(t,n){var i;return i=this.blockList,this.eachBlockAtRange(n,(function(n,r,o){return e(t)?i=i.editObjectAtIndex(o,(function(){return n.removeAttribute(t)})):r[0]!==r[1]?i=i.editObjectAtIndex(o,(function(){return n.copyWithText(n.text.removeAttributeAtRange(t,r))})):void 0})),new this.constructor(i)},c.prototype.updateAttributesForAttachment=function(t,e){var n,i,r;return i=this.getRangeOfAttachment(e)[0],n=this.locationFromPosition(i).index,r=this.getTextAtIndex(n),new this.constructor(this.blockList.editObjectAtIndex(n,(function(n){return n.copyWithText(r.updateAttributesForAttachment(t,e))})))},c.prototype.removeAttributeForAttachment=function(t,e){var n;return n=this.getRangeOfAttachment(e),this.removeAttributeAtRange(t,n)},c.prototype.insertBlockBreakAtRange=function(t){var e,i,r,s;return s=(t=n(t))[0],r=this.locationFromPosition(s).offset,i=this.removeTextAtRange(t),0===r&&(e=[new o.Block]),new this.constructor(i.blockList.insertSplittableListAtPosition(new o.SplittableList(e),s))},c.prototype.applyBlockAttributeAtRange=function(t,n,i){var r,o,s,a;return o=(s=this.expandRangeToLineBreaksAndSplitBlocks(i)).document,i=s.range,(r=e(t)).listAttribute?(a=(o=o.removeLastListAttributeAtRange(i,{exceptAttributeName:t})).convertLineBreaksToBlockBreaksInRange(i),o=a.document,i=a.range):o=r.exclusive?o.removeBlockAttributesAtRange(i):r.terminal?o.removeLastTerminalAttributeAtRange(i):o.consolidateBlocksAtRange(i),o.addAttributeAtRange(t,n,i)},c.prototype.removeLastListAttributeAtRange=function(t,n){var i;return null==n&&(n={}),i=this.blockList,this.eachBlockAtRange(t,(function(t,r,o){var s;if((s=t.getLastAttribute())&&e(s).listAttribute&&s!==n.exceptAttributeName)return i=i.editObjectAtIndex(o,(function(){return t.removeAttribute(s)}))})),new this.constructor(i)},c.prototype.removeLastTerminalAttributeAtRange=function(t){var n;return n=this.blockList,this.eachBlockAtRange(t,(function(t,i,r){var o;if((o=t.getLastAttribute())&&e(o).terminal)return n=n.editObjectAtIndex(r,(function(){return t.removeAttribute(o)}))})),new this.constructor(n)},c.prototype.removeBlockAttributesAtRange=function(t){var e;return e=this.blockList,this.eachBlockAtRange(t,(function(t,n,i){return t.hasAttributes()?e=e.editObjectAtIndex(i,(function(){return t.copyWithoutAttributes()})):void 0})),new this.constructor(e)},c.prototype.expandRangeToLineBreaksAndSplitBlocks=function(t){var e,i,r,o,s,a,u,c,l;return l=(a=t=n(t))[0],o=a[1],c=this.locationFromPosition(l),r=this.locationFromPosition(o),u=(e=this).getBlockAtIndex(c.index),null!=(c.offset=u.findLineBreakInDirectionFromPosition("backward",c.offset))&&(s=e.positionFromLocation(c),e=e.insertBlockBreakAtRange([s,s+1]),r.index+=1,r.offset-=e.getBlockAtIndex(c.index).getLength(),c.index+=1),c.offset=0,0===r.offset&&r.index>c.index?(r.index-=1,r.offset=e.getBlockAtIndex(r.index).getBlockBreakPosition()):("\n"===(i=e.getBlockAtIndex(r.index)).text.getStringAtRange([r.offset-1,r.offset])?r.offset-=1:r.offset=i.findLineBreakInDirectionFromPosition("forward",r.offset),r.offset!==i.getBlockBreakPosition()&&(s=e.positionFromLocation(r),e=e.insertBlockBreakAtRange([s,s+1]))),l=e.positionFromLocation(c),o=e.positionFromLocation(r),{document:e,range:t=n([l,o])}},c.prototype.convertLineBreaksToBlockBreaksInRange=function(t){var e,i,r;return i=(t=n(t))[0],r=this.getStringAtRange(t).slice(0,-1),e=this,r.replace(/.*?\n/g,(function(t){return i+=t.length,e=e.insertBlockBreakAtRange([i-1,i])})),{document:e,range:t}},c.prototype.consolidateBlocksAtRange=function(t){var e,i,r,o,s;return s=(r=t=n(t))[0],i=r[1],o=this.locationFromPosition(s).index,e=this.locationFromPosition(i).index,new this.constructor(this.blockList.consolidateFromIndexToIndex(o,e))},c.prototype.getDocumentAtRange=function(t){var e;return t=n(t),e=this.blockList.getSplittableListInRange(t).toArray(),new this.constructor(e)},c.prototype.getStringAtRange=function(t){var e,i;return(i=t=n(t))[i.length-1]!==this.getLength()&&(e=-1),this.getDocumentAtRange(t).toString().slice(0,e)},c.prototype.getBlockAtIndex=function(t){return this.blockList.getObjectAtIndex(t)},c.prototype.getBlockAtPosition=function(t){var e;return e=this.locationFromPosition(t).index,this.getBlockAtIndex(e)},c.prototype.getTextAtIndex=function(t){var e;return null!=(e=this.getBlockAtIndex(t))?e.text:void 0},c.prototype.getTextAtPosition=function(t){var e;return e=this.locationFromPosition(t).index,this.getTextAtIndex(e)},c.prototype.getPieceAtPosition=function(t){var e,n,i;return e=(i=this.locationFromPosition(t)).index,n=i.offset,this.getTextAtIndex(e).getPieceAtPosition(n)},c.prototype.getCharacterAtPosition=function(t){var e,n,i;return e=(i=this.locationFromPosition(t)).index,n=i.offset,this.getTextAtIndex(e).getStringAtRange([n,n+1])},c.prototype.getLength=function(){return this.blockList.getEndPosition()},c.prototype.getBlocks=function(){return this.blockList.toArray()},c.prototype.getBlockCount=function(){return this.blockList.length},c.prototype.getEditCount=function(){return this.editCount},c.prototype.eachBlock=function(t){return this.blockList.eachObject(t)},c.prototype.eachBlockAtRange=function(t,e){var i,r,o,s,a,u,c,l,h,p,d,f;if(d=(u=t=n(t))[0],o=u[1],p=this.locationFromPosition(d),r=this.locationFromPosition(o),p.index===r.index)return i=this.getBlockAtIndex(p.index),f=[p.offset,r.offset],e(i,f,p.index);for(h=[],a=s=c=p.index,l=r.index;l>=c?l>=s:s>=l;a=l>=c?++s:--s)(i=this.getBlockAtIndex(a))?(f=function(){switch(a){case p.index:return[p.offset,i.text.getLength()];case r.index:return[0,r.offset];default:return[0,i.text.getLength()]}}(),h.push(e(i,f,a))):h.push(void 0);return h},c.prototype.getCommonAttributesAtRange=function(t){var e,r,s;return r=(t=n(t))[0],i(t)?this.getCommonAttributesAtPosition(r):(s=[],e=[],this.eachBlockAtRange(t,(function(t,n){return n[0]!==n[1]?(s.push(t.text.getCommonAttributesAtRange(n)),e.push(l(t))):void 0})),o.Hash.fromCommonAttributesOfObjects(s).merge(o.Hash.fromCommonAttributesOfObjects(e)).toObject())},c.prototype.getCommonAttributesAtPosition=function(t){var e,n,i,r,s,a,c,h,p,d;if(s=(p=this.locationFromPosition(t)).index,h=p.offset,!(i=this.getBlockAtIndex(s)))return{};for(c in r=l(i),e=i.text.getAttributesAtPosition(h),n=i.text.getAttributesAtPosition(h-1),a=function(){var t,e;for(c in e=[],t=o.config.textAttributes)(d=t[c]).inheritable&&e.push(c);return e}(),n)((d=n[c])===e[c]||u.call(a,c)>=0)&&(r[c]=d);return r},c.prototype.getRangeOfCommonAttributeAtPosition=function(t,e){var i,r,o,s,a,u,c,l;return o=(a=this.locationFromPosition(e)).index,s=a.offset,l=(u=this.getTextAtIndex(o).getExpandedRangeForAttributeAtOffset(t,s))[0],r=u[1],c=this.positionFromLocation({index:o,offset:l}),i=this.positionFromLocation({index:o,offset:r}),n([c,i])},c.prototype.getBaseBlockAttributes=function(){var t,e,n,i,r,o,s;for(t=this.getBlockAtIndex(0).getAttributes(),n=i=1,s=this.getBlockCount();s>=1?s>i:i>s;n=s>=1?++i:--i)e=this.getBlockAtIndex(n).getAttributes(),o=Math.min(t.length,e.length),t=function(){var n,i,s;for(s=[],r=n=0,i=o;(i>=0?i>n:n>i)&&e[r]===t[r];r=i>=0?++n:--n)s.push(e[r]);return s}();return t},l=function(t){var e,n;return n={},(e=t.getLastAttribute())&&(n[e]=!0),n},c.prototype.getAttachmentById=function(t){var e,n,i,r;for(n=0,i=(r=this.getAttachments()).length;i>n;n++)if((e=r[n]).id===t)return e},c.prototype.getAttachmentPieces=function(){var t;return t=[],this.blockList.eachObject((function(e){var n;return n=e.text,t=t.concat(n.getAttachmentPieces())})),t},c.prototype.getAttachments=function(){var t,e,n,i,r;for(r=[],t=0,e=(i=this.getAttachmentPieces()).length;e>t;t++)n=i[t],r.push(n.attachment);return r},c.prototype.getRangeOfAttachment=function(t){var e,i,r,o,s,a,u;for(o=0,i=e=0,r=(s=this.blockList.toArray()).length;r>e;i=++e){if(u=(a=s[i].text).getRangeOfAttachment(t))return n([o+u[0],o+u[1]]);o+=a.getLength()}},c.prototype.getLocationRangeOfAttachment=function(t){var e;return e=this.getRangeOfAttachment(t),this.locationRangeFromRange(e)},c.prototype.getAttachmentPieceForAttachment=function(t){var e,n,i,r;for(e=0,n=(r=this.getAttachmentPieces()).length;n>e;e++)if((i=r[e]).attachment===t)return i},c.prototype.findRangesForBlockAttribute=function(t){var e,n,i,r,o,s,a;for(o=0,s=[],n=0,i=(a=this.getBlocks()).length;i>n;n++)r=(e=a[n]).getLength(),e.hasAttribute(t)&&s.push([o,o+r]),o+=r;return s},c.prototype.findRangesForTextAttribute=function(t,e){var n,i,r,o,s,a,u,c,l,h;for(h=(null!=e?e:{}).withValue,a=0,u=[],c=[],o=function(e){return null!=h?e.getAttribute(t)===h:e.hasAttribute(t)},n=0,i=(l=this.getPieces()).length;i>n;n++)r=(s=l[n]).getLength(),o(s)&&(u[1]===a?u[1]=a+r:c.push(u=[a,a+r])),a+=r;return c},c.prototype.locationFromPosition=function(t){var e,n;return null!=(n=this.blockList.findIndexAndOffsetAtPosition(Math.max(0,t))).index?n:{index:(e=this.getBlocks()).length-1,offset:e[e.length-1].getLength()}},c.prototype.positionFromLocation=function(t){return this.blockList.findPositionAtIndexAndOffset(t.index,t.offset)},c.prototype.locationRangeFromPosition=function(t){return n(this.locationFromPosition(t))},c.prototype.locationRangeFromRange=function(t){var e,i,r,o;if(t=n(t))return o=t[0],i=t[1],r=this.locationFromPosition(o),e=this.locationFromPosition(i),n([r,e])},c.prototype.rangeFromLocationRange=function(t){var e,r;return t=n(t),e=this.positionFromLocation(t[0]),i(t)||(r=this.positionFromLocation(t[1])),n([e,r])},c.prototype.isEqualTo=function(t){return this.blockList.isEqualTo(null!=t?t.blockList:void 0)},c.prototype.getTexts=function(){var t,e,n,i,r;for(r=[],e=0,n=(i=this.getBlocks()).length;n>e;e++)t=i[e],r.push(t.text);return r},c.prototype.getPieces=function(){var t,e,n,i,r;for(n=[],t=0,e=(i=this.getTexts()).length;e>t;t++)r=i[t],n.push.apply(n,r.getPieces());return n},c.prototype.getObjects=function(){return this.getBlocks().concat(this.getTexts()).concat(this.getPieces())},c.prototype.toSerializableDocument=function(){var t;return t=[],this.blockList.eachObject((function(e){return t.push(e.copyWithText(e.text.toSerializableText()))})),new this.constructor(t)},c.prototype.toString=function(){return this.blockList.toString()},c.prototype.toJSON=function(){return this.blockList.toJSON()},c.prototype.toConsole=function(){var t;return JSON.stringify(function(){var e,n,i,r;for(r=[],e=0,n=(i=this.blockList.toArray()).length;n>e;e++)t=i[e],r.push(JSON.parse(t.text.toConsole()));return r}.call(this))},c}(o.Object)}.call(this),function(){o.LineBreakInsertion=function(){function t(t){var e;this.composition=t,this.document=this.composition.document,e=this.composition.getSelectedRange(),this.startPosition=e[0],this.endPosition=e[1],this.startLocation=this.document.locationFromPosition(this.startPosition),this.endLocation=this.document.locationFromPosition(this.endPosition),this.block=this.document.getBlockAtIndex(this.endLocation.index),this.breaksOnReturn=this.block.breaksOnReturn(),this.previousCharacter=this.block.text.getStringAtPosition(this.endLocation.offset-1),this.nextCharacter=this.block.text.getStringAtPosition(this.endLocation.offset)}return t.prototype.shouldInsertBlockBreak=function(){return this.block.hasAttributes()&&this.block.isListItem()&&!this.block.isEmpty()?0!==this.startLocation.offset:this.breaksOnReturn&&"\n"!==this.nextCharacter},t.prototype.shouldBreakFormattedBlock=function(){return this.block.hasAttributes()&&!this.block.isListItem()&&(this.breaksOnReturn&&"\n"===this.nextCharacter||"\n"===this.previousCharacter)},t.prototype.shouldDecreaseListLevel=function(){return this.block.hasAttributes()&&this.block.isListItem()&&this.block.isEmpty()},t.prototype.shouldPrependListItem=function(){return this.block.isListItem()&&0===this.startLocation.offset&&!this.block.isEmpty()},t.prototype.shouldRemoveLastBlockAttribute=function(){return this.block.hasAttributes()&&!this.block.isListItem()&&this.block.isEmpty()},t}()}.call(this),function(){var t,e,n,i,r,s,a,u,c,l,h=function(t,e){function n(){this.constructor=t}for(var i in e)p.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},p={}.hasOwnProperty;s=o.normalizeRange,c=o.rangesAreEqual,u=o.rangeIsCollapsed,a=o.objectsAreEqual,t=o.arrayStartsWith,l=o.summarizeArrayChange,n=o.getAllAttributeNames,i=o.getBlockConfig,r=o.getTextConfig,e=o.extend,o.Composition=function(p){function d(){this.document=new o.Document,this.attachments=[],this.currentAttributes={},this.revision=0}return h(d,p),d.prototype.setDocument=function(t){var e;return t.isEqualTo(this.document)?void 0:(this.document=t,this.refreshAttachments(),this.revision++,null!=(e=this.delegate)&&"function"==typeof e.compositionDidChangeDocument?e.compositionDidChangeDocument(t):void 0)},d.prototype.getSnapshot=function(){return{document:this.document,selectedRange:this.getSelectedRange()}},d.prototype.loadSnapshot=function(t){var e,n,i,r;return e=t.document,r=t.selectedRange,null!=(n=this.delegate)&&"function"==typeof n.compositionWillLoadSnapshot&&n.compositionWillLoadSnapshot(),this.setDocument(null!=e?e:new o.Document),this.setSelection(null!=r?r:[0,0]),null!=(i=this.delegate)&&"function"==typeof i.compositionDidLoadSnapshot?i.compositionDidLoadSnapshot():void 0},d.prototype.insertText=function(t,e){var n,i,r,o;return o=(null!=e?e:{updatePosition:!0}).updatePosition,i=this.getSelectedRange(),this.setDocument(this.document.insertTextAtRange(t,i)),n=(r=i[0])+t.getLength(),o&&this.setSelection(n),this.notifyDelegateOfInsertionAtRange([r,n])},d.prototype.insertBlock=function(t){var e;return null==t&&(t=new o.Block),e=new o.Document([t]),this.insertDocument(e)},d.prototype.insertDocument=function(t){var e,n,i;return null==t&&(t=new o.Document),n=this.getSelectedRange(),this.setDocument(this.document.insertDocumentAtRange(t,n)),e=(i=n[0])+t.getLength(),this.setSelection(e),this.notifyDelegateOfInsertionAtRange([i,e])},d.prototype.insertString=function(t,e){var n,i;return n=this.getCurrentTextAttributes(),i=o.Text.textForStringWithAttributes(t,n),this.insertText(i,e)},d.prototype.insertBlockBreak=function(){var t,e,n;return e=this.getSelectedRange(),this.setDocument(this.document.insertBlockBreakAtRange(e)),t=(n=e[0])+1,this.setSelection(t),this.notifyDelegateOfInsertionAtRange([n,t])},d.prototype.insertLineBreak=function(){var t,e;return(e=new o.LineBreakInsertion(this)).shouldDecreaseListLevel()?(this.decreaseListLevel(),this.setSelection(e.startPosition)):e.shouldPrependListItem()?(t=new o.Document([e.block.copyWithoutText()]),this.insertDocument(t)):e.shouldInsertBlockBreak()?this.insertBlockBreak():e.shouldRemoveLastBlockAttribute()?this.removeLastBlockAttribute():e.shouldBreakFormattedBlock()?this.breakFormattedBlock(e):this.insertString("\n")},d.prototype.insertHTML=function(t){var e,n,i,r;return e=o.Document.fromHTML(t),i=this.getSelectedRange(),this.setDocument(this.document.mergeDocumentAtRange(e,i)),n=(r=i[0])+e.getLength()-1,this.setSelection(n),this.notifyDelegateOfInsertionAtRange([r,n])},d.prototype.replaceHTML=function(t){var e,n,i;return e=o.Document.fromHTML(t).copyUsingObjectsFromDocument(this.document),n=this.getLocationRange({strict:!1}),i=this.document.rangeFromLocationRange(n),this.setDocument(e),this.setSelection(i)},d.prototype.insertFile=function(t){return this.insertFiles([t])},d.prototype.insertFiles=function(t){var e,n,i,r,s,a;for(n=[],r=0,s=t.length;s>r;r++)i=t[r],(null!=(a=this.delegate)?a.compositionShouldAcceptFile(i):void 0)&&(e=o.Attachment.attachmentForFile(i),n.push(e));return this.insertAttachments(n)},d.prototype.insertAttachment=function(t){return this.insertAttachments([t])},d.prototype.insertAttachments=function(t){var e,n,i,r,s,a,u,c,l;for(c=new o.Text,r=0,s=t.length;s>r;r++)l=(e=t[r]).getType(),a=null!=(u=o.config.attachments[l])?u.presentation:void 0,i=this.getCurrentTextAttributes(),a&&(i.presentation=a),n=o.Text.textForAttachmentWithAttributes(e,i),c=c.appendText(n);return this.insertText(c)},d.prototype.shouldManageDeletingInDirection=function(t){var e;if(e=this.getLocationRange(),u(e)){if("backward"===t&&0===e[0].offset)return!0;if(this.shouldManageMovingCursorInDirection(t))return!0}else if(e[0].index!==e[1].index)return!0;return!1},d.prototype.deleteInDirection=function(t,e){var n,i,r,o,s,a,c,l;return o=(null!=e?e:{}).length,s=this.getLocationRange(),a=this.getSelectedRange(),(c=u(a))?r="backward"===t&&0===s[0].offset:l=s[0].index!==s[1].index,!(r&&this.canDecreaseBlockAttributeLevel()&&(i=this.getBlock(),i.isListItem()?this.decreaseListLevel():this.decreaseBlockAttributeLevel(),this.setSelection(a[0]),i.isEmpty()))&&(c&&(a=this.getExpandedRangeInDirection(t,{length:o}),"backward"===t&&(n=this.getAttachmentAtRange(a))),n?(this.editAttachment(n),!1):(this.setDocument(this.document.removeTextAtRange(a)),this.setSelection(a[0]),!r&&!l&&void 0))},d.prototype.moveTextFromRange=function(t){var e;return e=this.getSelectedRange()[0],this.setDocument(this.document.moveTextFromRangeToPosition(t,e)),this.setSelection(e)},d.prototype.removeAttachment=function(t){var e;return(e=this.document.getRangeOfAttachment(t))?(this.stopEditingAttachment(),this.setDocument(this.document.removeTextAtRange(e)),this.setSelection(e[0])):void 0},d.prototype.removeLastBlockAttribute=function(){var t,e,n,i;return i=(n=this.getSelectedRange())[0],e=n[1],t=this.document.getBlockAtPosition(e),this.removeCurrentAttribute(t.getLastAttribute()),this.setSelection(i)}," ",d.prototype.insertPlaceholder=function(){return this.placeholderPosition=this.getPosition(),this.insertString(" ")},d.prototype.selectPlaceholder=function(){return null!=this.placeholderPosition?(this.setSelectedRange([this.placeholderPosition,this.placeholderPosition+1]),this.getSelectedRange()):void 0},d.prototype.forgetPlaceholder=function(){return this.placeholderPosition=null},d.prototype.hasCurrentAttribute=function(t){var e;return null!=(e=this.currentAttributes[t])&&!1!==e},d.prototype.toggleCurrentAttribute=function(t){var e;return(e=!this.currentAttributes[t])?this.setCurrentAttribute(t,e):this.removeCurrentAttribute(t)},d.prototype.canSetCurrentAttribute=function(t){return i(t)?this.canSetCurrentBlockAttribute(t):this.canSetCurrentTextAttribute(t)},d.prototype.canSetCurrentTextAttribute=function(){var t,e,n,i;if(t=this.getSelectedDocument()){for(e=0,n=(i=t.getAttachments()).length;n>e;e++)if(!i[e].hasContent())return!1;return!0}},d.prototype.canSetCurrentBlockAttribute=function(){var t;if(t=this.getBlock())return!t.isTerminalBlock()},d.prototype.setCurrentAttribute=function(t,e){return i(t)?this.setBlockAttribute(t,e):(this.setTextAttribute(t,e),this.currentAttributes[t]=e,this.notifyDelegateOfCurrentAttributesChange())},d.prototype.setTextAttribute=function(t,e){var n,i;if(n=this.getSelectedRange())return n[0]!==n[1]?this.setDocument(this.document.addAttributeAtRange(t,e,n)):"href"===t?(i=o.Text.textForStringWithAttributes(e,{href:e}),this.insertText(i)):void 0},d.prototype.setBlockAttribute=function(t,e){var n;if(n=this.getSelectedRange())return this.canSetCurrentAttribute(t)?(this.getBlock(),this.setDocument(this.document.applyBlockAttributeAtRange(t,e,n)),this.setSelection(n)):void 0},d.prototype.removeCurrentAttribute=function(t){return i(t)?(this.removeBlockAttribute(t),this.updateCurrentAttributes()):(this.removeTextAttribute(t),delete this.currentAttributes[t],this.notifyDelegateOfCurrentAttributesChange())},d.prototype.removeTextAttribute=function(t){var e;if(e=this.getSelectedRange())return this.setDocument(this.document.removeAttributeAtRange(t,e))},d.prototype.removeBlockAttribute=function(t){var e;if(e=this.getSelectedRange())return this.setDocument(this.document.removeAttributeAtRange(t,e))},d.prototype.canDecreaseNestingLevel=function(){var t;return(null!=(t=this.getBlock())?t.getNestingLevel():void 0)>0},d.prototype.canIncreaseNestingLevel=function(){var e,n,r;if(e=this.getBlock())return null!=(r=i(e.getLastNestableAttribute()))&&r.listAttribute?(n=this.getPreviousBlock())?t(n.getListItemAttributes(),e.getListItemAttributes()):void 0:e.getNestingLevel()>0},d.prototype.decreaseNestingLevel=function(){var t;if(t=this.getBlock())return this.setDocument(this.document.replaceBlock(t,t.decreaseNestingLevel()))},d.prototype.increaseNestingLevel=function(){var t;if(t=this.getBlock())return this.setDocument(this.document.replaceBlock(t,t.increaseNestingLevel()))},d.prototype.canDecreaseBlockAttributeLevel=function(){var t;return(null!=(t=this.getBlock())?t.getAttributeLevel():void 0)>0},d.prototype.decreaseBlockAttributeLevel=function(){var t,e;return(t=null!=(e=this.getBlock())?e.getLastAttribute():void 0)?this.removeCurrentAttribute(t):void 0},d.prototype.decreaseListLevel=function(){var t,e,n,i,r,o;for(o=this.getSelectedRange()[0],n=r=this.document.locationFromPosition(o).index,t=this.getBlock().getAttributeLevel();(e=this.document.getBlockAtIndex(n+1))&&e.isListItem()&&e.getAttributeLevel()>t;)n++;return o=this.document.positionFromLocation({index:r,offset:0}),i=this.document.positionFromLocation({index:n,offset:0}),this.setDocument(this.document.removeLastListAttributeAtRange([o,i]))},d.prototype.updateCurrentAttributes=function(){var t,e,i,r,o,s;if(s=this.getSelectedRange({ignoreLock:!0})){for(e=this.document.getCommonAttributesAtRange(s),i=0,r=(o=n()).length;r>i;i++)e[t=o[i]]||this.canSetCurrentAttribute(t)||(e[t]=!1);if(!a(e,this.currentAttributes))return this.currentAttributes=e,this.notifyDelegateOfCurrentAttributesChange()}},d.prototype.getCurrentAttributes=function(){return e.call({},this.currentAttributes)},d.prototype.getCurrentTextAttributes=function(){var t,e,n,i;for(e in t={},n=this.currentAttributes)!1!==(i=n[e])&&r(e)&&(t[e]=i);return t},d.prototype.freezeSelection=function(){return this.setCurrentAttribute("frozen",!0)},d.prototype.thawSelection=function(){return this.removeCurrentAttribute("frozen")},d.prototype.hasFrozenSelection=function(){return this.hasCurrentAttribute("frozen")},d.proxyMethod("getSelectionManager().getPointRange"),d.proxyMethod("getSelectionManager().setLocationRangeFromPointRange"),d.proxyMethod("getSelectionManager().createLocationRangeFromDOMRange"),d.proxyMethod("getSelectionManager().locationIsCursorTarget"),d.proxyMethod("getSelectionManager().selectionIsExpanded"),d.proxyMethod("delegate?.getSelectionManager"),d.prototype.setSelection=function(t){var e,n;return e=this.document.locationRangeFromRange(t),null!=(n=this.delegate)?n.compositionDidRequestChangingSelectionToLocationRange(e):void 0},d.prototype.getSelectedRange=function(){var t;return(t=this.getLocationRange())?this.document.rangeFromLocationRange(t):void 0},d.prototype.setSelectedRange=function(t){var e;return e=this.document.locationRangeFromRange(t),this.getSelectionManager().setLocationRange(e)},d.prototype.getPosition=function(){var t;return(t=this.getLocationRange())?this.document.positionFromLocation(t[0]):void 0},d.prototype.getLocationRange=function(t){var e,n;return null!=(e=null!=(n=this.targetLocationRange)?n:this.getSelectionManager().getLocationRange(t))?e:s({index:0,offset:0})},d.prototype.withTargetLocationRange=function(t,e){var n;this.targetLocationRange=t;try{n=e()}finally{this.targetLocationRange=null}return n},d.prototype.withTargetRange=function(t,e){var n;return n=this.document.locationRangeFromRange(t),this.withTargetLocationRange(n,e)},d.prototype.withTargetDOMRange=function(t,e){var n;return n=this.createLocationRangeFromDOMRange(t,{strict:!1}),this.withTargetLocationRange(n,e)},d.prototype.getExpandedRangeInDirection=function(t,e){var n,i,r,o;return i=(null!=e?e:{}).length,o=(r=this.getSelectedRange())[0],n=r[1],"backward"===t?i?o-=i:o=this.translateUTF16PositionFromOffset(o,-1):i?n+=i:n=this.translateUTF16PositionFromOffset(n,1),s([o,n])},d.prototype.shouldManageMovingCursorInDirection=function(t){var e;return!!this.editingAttachment||(e=this.getExpandedRangeInDirection(t),null!=this.getAttachmentAtRange(e))},d.prototype.moveCursorInDirection=function(t){var e,n,i,r;return this.editingAttachment?i=this.document.getRangeOfAttachment(this.editingAttachment):(r=this.getSelectedRange(),i=this.getExpandedRangeInDirection(t),n=!c(r,i)),this.setSelectedRange("backward"===t?i[0]:i[1]),n&&(e=this.getAttachmentAtRange(i))?this.editAttachment(e):void 0},d.prototype.expandSelectionInDirection=function(t,e){var n,i;return n=(null!=e?e:{}).length,i=this.getExpandedRangeInDirection(t,{length:n}),this.setSelectedRange(i)},d.prototype.expandSelectionForEditing=function(){return this.hasCurrentAttribute("href")?this.expandSelectionAroundCommonAttribute("href"):void 0},d.prototype.expandSelectionAroundCommonAttribute=function(t){var e,n;return e=this.getPosition(),n=this.document.getRangeOfCommonAttributeAtPosition(t,e),this.setSelectedRange(n)},d.prototype.selectionContainsAttachments=function(){var t;return(null!=(t=this.getSelectedAttachments())?t.length:void 0)>0},d.prototype.selectionIsInCursorTarget=function(){return this.editingAttachment||this.positionIsCursorTarget(this.getPosition())},d.prototype.positionIsCursorTarget=function(t){var e;return(e=this.document.locationFromPosition(t))?this.locationIsCursorTarget(e):void 0},d.prototype.positionIsBlockBreak=function(t){var e;return null!=(e=this.document.getPieceAtPosition(t))?e.isBlockBreak():void 0},d.prototype.getSelectedDocument=function(){var t;return(t=this.getSelectedRange())?this.document.getDocumentAtRange(t):void 0},d.prototype.getSelectedAttachments=function(){var t;return null!=(t=this.getSelectedDocument())?t.getAttachments():void 0},d.prototype.getAttachments=function(){return this.attachments.slice(0)},d.prototype.refreshAttachments=function(){var t,e,n,i,r,o,s,a,u,c,h,p;for(n=this.document.getAttachments(),t=(a=l(this.attachments,n)).added,h=a.removed,this.attachments=n,i=0,o=h.length;o>i;i++)(e=h[i]).delegate=null,null!=(u=this.delegate)&&"function"==typeof u.compositionDidRemoveAttachment&&u.compositionDidRemoveAttachment(e);for(p=[],r=0,s=t.length;s>r;r++)(e=t[r]).delegate=this,p.push(null!=(c=this.delegate)&&"function"==typeof c.compositionDidAddAttachment?c.compositionDidAddAttachment(e):void 0);return p},d.prototype.attachmentDidChangeAttributes=function(t){var e;return this.revision++,null!=(e=this.delegate)&&"function"==typeof e.compositionDidEditAttachment?e.compositionDidEditAttachment(t):void 0},d.prototype.attachmentDidChangePreviewURL=function(t){var e;return this.revision++,null!=(e=this.delegate)&&"function"==typeof e.compositionDidChangeAttachmentPreviewURL?e.compositionDidChangeAttachmentPreviewURL(t):void 0},d.prototype.editAttachment=function(t,e){var n;if(t!==this.editingAttachment)return this.stopEditingAttachment(),this.editingAttachment=t,null!=(n=this.delegate)&&"function"==typeof n.compositionDidStartEditingAttachment?n.compositionDidStartEditingAttachment(this.editingAttachment,e):void 0},d.prototype.stopEditingAttachment=function(){var t;if(this.editingAttachment)return null!=(t=this.delegate)&&"function"==typeof t.compositionDidStopEditingAttachment&&t.compositionDidStopEditingAttachment(this.editingAttachment),this.editingAttachment=null},d.prototype.updateAttributesForAttachment=function(t,e){return this.setDocument(this.document.updateAttributesForAttachment(t,e))},d.prototype.removeAttributeForAttachment=function(t,e){return this.setDocument(this.document.removeAttributeForAttachment(t,e))},d.prototype.breakFormattedBlock=function(t){var e,n,i,r,s;return n=t.document,e=t.block,s=[(r=t.startPosition)-1,r],e.getBlockBreakPosition()===t.startLocation.offset?(e.breaksOnReturn()&&"\n"===t.nextCharacter?r+=1:n=n.removeTextAtRange(s),s=[r,r]):"\n"===t.nextCharacter?"\n"===t.previousCharacter?s=[r-1,r+1]:(s=[r,r+1],r+=1):t.startLocation.offset-1!=0&&(r+=1),i=new o.Document([e.removeLastAttribute().copyWithoutText()]),this.setDocument(n.insertDocumentAtRange(i,s)),this.setSelection(r)},d.prototype.getPreviousBlock=function(){var t,e;return(e=this.getLocationRange())&&(t=e[0].index)>0?this.document.getBlockAtIndex(t-1):void 0},d.prototype.getBlock=function(){var t;return(t=this.getLocationRange())?this.document.getBlockAtIndex(t[0].index):void 0},d.prototype.getAttachmentAtRange=function(t){var e;return(e=this.document.getDocumentAtRange(t)).toString()===o.OBJECT_REPLACEMENT_CHARACTER+"\n"?e.getAttachments()[0]:void 0},d.prototype.notifyDelegateOfCurrentAttributesChange=function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.compositionDidChangeCurrentAttributes?t.compositionDidChangeCurrentAttributes(this.currentAttributes):void 0},d.prototype.notifyDelegateOfInsertionAtRange=function(t){var e;return null!=(e=this.delegate)&&"function"==typeof e.compositionDidPerformInsertionAtRange?e.compositionDidPerformInsertionAtRange(t):void 0},d.prototype.translateUTF16PositionFromOffset=function(t,e){var n,i;return n=(i=this.document.toUTF16String()).offsetFromUCS2Offset(t),i.offsetToUCS2Offset(n+e)},d}(o.BasicObject)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;o.UndoManager=function(e){function n(t){this.composition=t,this.undoEntries=[],this.redoEntries=[]}var i;return t(n,e),n.prototype.recordUndoEntry=function(t,e){var n,r,o,s,a;return r=(s=null!=e?e:{}).context,n=s.consolidatable,o=this.undoEntries.slice(-1)[0],n&&i(o,t,r)?void 0:(a=this.createEntry({description:t,context:r}),this.undoEntries.push(a),this.redoEntries=[])},n.prototype.undo=function(){var t,e;return(e=this.undoEntries.pop())?(t=this.createEntry(e),this.redoEntries.push(t),this.composition.loadSnapshot(e.snapshot)):void 0},n.prototype.redo=function(){var t,e;return(t=this.redoEntries.pop())?(e=this.createEntry(t),this.undoEntries.push(e),this.composition.loadSnapshot(t.snapshot)):void 0},n.prototype.canUndo=function(){return this.undoEntries.length>0},n.prototype.canRedo=function(){return this.redoEntries.length>0},n.prototype.createEntry=function(t){var e,n,i;return n=(i=null!=t?t:{}).description,e=i.context,{description:null!=n?n.toString():void 0,context:JSON.stringify(e),snapshot:this.composition.getSnapshot()}},i=function(t,e,n){return(null!=t?t.description:void 0)===(null!=e?e.toString():void 0)&&(null!=t?t.context:void 0)===JSON.stringify(n)},n}(o.BasicObject)}.call(this),function(){var t;o.attachmentGalleryFilter=function(e){var n;return(n=new t(e)).perform(),n.getSnapshot()},t=function(){function t(t){this.document=t.document,this.selectedRange=t.selectedRange}var e;return e="attachmentGallery","presentation","gallery",t.prototype.perform=function(){return this.removeBlockAttribute(),this.applyBlockAttribute()},t.prototype.getSnapshot=function(){return{document:this.document,selectedRange:this.selectedRange}},t.prototype.removeBlockAttribute=function(){var t,n,i,r,o;for(o=[],t=0,n=(r=this.findRangesOfBlocks()).length;n>t;t++)i=r[t],o.push(this.document=this.document.removeAttributeAtRange(e,i));return o},t.prototype.applyBlockAttribute=function(){var t,n,i,r,o,s;for(i=0,s=[],t=0,n=(o=this.findRangesOfPieces()).length;n>t;t++)(r=o[t])[1]-r[0]>1&&(r[0]+=i,r[1]+=i,"\n"!==this.document.getCharacterAtPosition(r[1])&&(this.document=this.document.insertBlockBreakAtRange(r[1]),r[1]n;n++)e=t[n],this.manageAttachment(e)}return t(n,e),n.prototype.getAttachments=function(){var t,e,n,i;for(e in i=[],n=this.managedAttachments)t=n[e],i.push(t);return i},n.prototype.manageAttachment=function(t){var e,n;return null!=(e=this.managedAttachments)[n=t.id]?e[n]:e[n]=new o.ManagedAttachment(this,t)},n.prototype.attachmentIsManaged=function(t){return t.id in this.managedAttachments},n.prototype.requestRemovalOfAttachment=function(t){var e;return this.attachmentIsManaged(t)&&null!=(e=this.delegate)&&"function"==typeof e.attachmentManagerDidRequestRemovalOfAttachment?e.attachmentManagerDidRequestRemovalOfAttachment(t):void 0},n.prototype.unmanageAttachment=function(t){var e;return e=this.managedAttachments[t.id],delete this.managedAttachments[t.id],e},n}(o.BasicObject)}.call(this),function(){var t,e,n,i,r,s,a,u,c,l,h;t=o.elementContainsNode,e=o.findChildIndexOfNode,r=o.nodeIsBlockStart,s=o.nodeIsBlockStartComment,i=o.nodeIsBlockContainer,a=o.nodeIsCursorTarget,u=o.nodeIsEmptyTextNode,c=o.nodeIsTextNode,n=o.nodeIsAttachmentElement,l=o.tagName,h=o.walkTree,o.LocationMapper=function(){function o(t){this.element=t}var p,d,f,g;return o.prototype.findLocationFromContainerAndOffset=function(n,i,o){var s,u,l,p,g,m,y;for(m=(null!=o?o:{strict:!0}).strict,u=0,l=!1,p={index:0,offset:0},(s=this.findAttachmentElementParentForNode(n))&&(n=s.parentNode,i=e(s)),y=h(this.element,{usingFilter:f});y.nextNode();){if((g=y.currentNode)===n&&c(n)){a(g)||(p.offset+=i);break}if(g.parentNode===n){if(u++===i)break}else if(!t(n,g)&&u>0)break;r(g,{strict:m})?(l&&p.index++,p.offset=0,l=!0):p.offset+=d(g)}return p},o.prototype.findContainerAndOffsetFromLocation=function(t){var n,o,s,u,l;if(0===t.index&&0===t.offset){for(n=this.element,u=0;n.firstChild;)if(n=n.firstChild,i(n)){u=1;break}return[n,u]}if(o=(l=this.findNodeAndOffsetFromLocation(t))[0],s=l[1],o){if(c(o))0===d(o)?(n=o.parentNode.parentNode,u=e(o.parentNode),a(o,{name:"right"})&&u++):(n=o,u=t.offset-s);else{if(n=o.parentNode,!r(o.previousSibling)&&!i(n))for(;o===n.lastChild&&(o=n,n=n.parentNode,!i(n)););u=e(o),0!==t.offset&&u++}return[n,u]}},o.prototype.findNodeAndOffsetFromLocation=function(t){var e,n,i,r,o,s,u,l;for(u=0,n=0,i=(l=this.getSignificantNodesForIndex(t.index)).length;i>n;n++){if(e=l[n],r=d(e),t.offset<=u+r)if(c(e)){if(o=e,s=u,t.offset===s&&a(o))break}else o||(o=e,s=u);if((u+=r)>t.offset)break}return[o,s]},o.prototype.findAttachmentElementParentForNode=function(t){for(;t&&t!==this.element;){if(n(t))return t;t=t.parentNode}},o.prototype.getSignificantNodesForIndex=function(t){var e,n,i,r,o;for(i=[],o=h(this.element,{usingFilter:p}),r=!1;o.nextNode();)if(n=o.currentNode,s(n)){if(null!=e?e++:e=0,e===t)r=!0;else if(r)break}else r&&i.push(n);return i},d=function(t){return t.nodeType===Node.TEXT_NODE?a(t)?0:t.textContent.length:"br"===l(t)||n(t)?1:0},p=function(t){return g(t)===NodeFilter.FILTER_ACCEPT?f(t):NodeFilter.FILTER_REJECT},g=function(t){return u(t)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},f=function(t){return n(t.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},o}()}.call(this),function(){var t,e,n=[].slice;t=o.getDOMRange,e=o.setDOMRange,o.PointMapper=function(){function i(){}return i.prototype.createDOMRangeFromPoint=function(n){var i,r,o,s,a,u,c,l;if(c=n.x,l=n.y,document.caretPositionFromPoint)return o=(a=document.caretPositionFromPoint(c,l)).offsetNode,r=a.offset,(i=document.createRange()).setStart(o,r),i;if(document.caretRangeFromPoint)return document.caretRangeFromPoint(c,l);if(document.body.createTextRange){s=t();try{(u=document.body.createTextRange()).moveToPoint(c,l),u.select()}catch(t){}return i=t(),e(s),i}},i.prototype.getClientRectsForDOMRange=function(t){var e;return[(e=n.call(t.getClientRects()))[0],e[e.length-1]]},i}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,r=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=o.getDOMRange,o.SelectionChangeObserver=function(i){function o(){this.run=e(this.run,this),this.update=e(this.update,this),this.selectionManagers=[]}var s;return n(o,i),o.prototype.start=function(){return this.started?void 0:(this.started=!0,"onselectionchange"in document?document.addEventListener("selectionchange",this.update,!0):this.run())},o.prototype.stop=function(){return this.started?(this.started=!1,document.removeEventListener("selectionchange",this.update,!0)):void 0},o.prototype.registerSelectionManager=function(t){return r.call(this.selectionManagers,t)<0?(this.selectionManagers.push(t),this.start()):void 0},o.prototype.unregisterSelectionManager=function(t){var e;return this.selectionManagers=function(){var n,i,r,o;for(o=[],n=0,i=(r=this.selectionManagers).length;i>n;n++)(e=r[n])!==t&&o.push(e);return o}.call(this),0===this.selectionManagers.length?this.stop():void 0},o.prototype.notifySelectionManagersOfSelectionChange=function(){var t,e,n,i,r;for(i=[],t=0,e=(n=this.selectionManagers).length;e>t;t++)r=n[t],i.push(r.selectionDidChange());return i},o.prototype.update=function(){var e;return e=t(),s(e,this.domRange)?void 0:(this.domRange=e,this.notifySelectionManagersOfSelectionChange())},o.prototype.reset=function(){return this.domRange=null,this.update()},o.prototype.run=function(){return this.started?(this.update(),requestAnimationFrame(this.run)):void 0},s=function(t,e){return(null!=t?t.startContainer:void 0)===(null!=e?e.startContainer:void 0)&&(null!=t?t.startOffset:void 0)===(null!=e?e.startOffset:void 0)&&(null!=t?t.endContainer:void 0)===(null!=e?e.endContainer:void 0)&&(null!=t?t.endOffset:void 0)===(null!=e?e.endOffset:void 0)},o}(o.BasicObject),null==o.selectionChangeObserver&&(o.selectionChangeObserver=new o.SelectionChangeObserver)}.call(this),function(){var t,e,n,i,r,s,a,u,c,l,h=function(t,e){return function(){return t.apply(e,arguments)}},p=function(t,e){function n(){this.constructor=t}for(var i in e)d.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},d={}.hasOwnProperty;n=o.getDOMSelection,e=o.getDOMRange,l=o.setDOMRange,t=o.elementContainsNode,s=o.nodeIsCursorTarget,r=o.innerElementIsActive,i=o.handleEvent,a=o.normalizeRange,u=o.rangeIsCollapsed,c=o.rangesAreEqual,o.SelectionManager=function(d){function f(t){this.element=t,this.selectionDidChange=h(this.selectionDidChange,this),this.didMouseDown=h(this.didMouseDown,this),this.locationMapper=new o.LocationMapper(this.element),this.pointMapper=new o.PointMapper,this.lockCount=0,i("mousedown",{onElement:this.element,withCallback:this.didMouseDown})}return p(f,d),f.prototype.getLocationRange=function(t){var n;return null==t&&(t={}),!1===t.strict?this.createLocationRangeFromDOMRange(e(),{strict:!1}):t.ignoreLock?this.currentLocationRange:null!=(n=this.lockedLocationRange)?n:this.currentLocationRange},f.prototype.setLocationRange=function(t){var e;if(!this.lockedLocationRange)return t=a(t),(e=this.createDOMRangeFromLocationRange(t))?(l(e),this.updateCurrentLocationRange(t)):void 0},f.prototype.setLocationRangeFromPointRange=function(t){var e,n;return t=a(t),n=this.getLocationAtPoint(t[0]),e=this.getLocationAtPoint(t[1]),this.setLocationRange([n,e])},f.prototype.getClientRectAtLocationRange=function(t){var e;return(e=this.createDOMRangeFromLocationRange(t))?this.getClientRectsForDOMRange(e)[1]:void 0},f.prototype.locationIsCursorTarget=function(t){var e,n;return e=(n=this.findNodeAndOffsetFromLocation(t))[0],n[1],s(e)},f.prototype.lock=function(){return 0==this.lockCount++?(this.updateCurrentLocationRange(),this.lockedLocationRange=this.getLocationRange()):void 0},f.prototype.unlock=function(){var t;return 0==--this.lockCount&&(t=this.lockedLocationRange,this.lockedLocationRange=null,null!=t)?this.setLocationRange(t):void 0},f.prototype.clearSelection=function(){var t;return null!=(t=n())?t.removeAllRanges():void 0},f.prototype.selectionIsCollapsed=function(){var t;return!0===(null!=(t=e())?t.collapsed:void 0)},f.prototype.selectionIsExpanded=function(){return!this.selectionIsCollapsed()},f.prototype.createLocationRangeFromDOMRange=function(t,e){var n,i;if(null!=t&&this.domRangeWithinElement(t)&&(i=this.findLocationFromContainerAndOffset(t.startContainer,t.startOffset,e)))return t.collapsed||(n=this.findLocationFromContainerAndOffset(t.endContainer,t.endOffset,e)),a([i,n])},f.proxyMethod("locationMapper.findLocationFromContainerAndOffset"),f.proxyMethod("locationMapper.findContainerAndOffsetFromLocation"),f.proxyMethod("locationMapper.findNodeAndOffsetFromLocation"),f.proxyMethod("pointMapper.createDOMRangeFromPoint"),f.proxyMethod("pointMapper.getClientRectsForDOMRange"),f.prototype.didMouseDown=function(){return this.pauseTemporarily()},f.prototype.pauseTemporarily=function(){var e,n,r,o;return this.paused=!0,n=function(e){return function(){var n,i;for(e.paused=!1,clearTimeout(o),n=0,i=r.length;i>n;n++)r[n].destroy();return t(document,e.element)?e.selectionDidChange():void 0}}(this),o=setTimeout(n,200),r=function(){var t,r,o,s;for(s=[],t=0,r=(o=["mousemove","keydown"]).length;r>t;t++)e=o[t],s.push(i(e,{onElement:document,withCallback:n}));return s}()},f.prototype.selectionDidChange=function(){return this.paused||r(this.element)?void 0:this.updateCurrentLocationRange()},f.prototype.updateCurrentLocationRange=function(t){var n;return(null!=t?t:t=this.createLocationRangeFromDOMRange(e()))&&!c(t,this.currentLocationRange)?(this.currentLocationRange=t,null!=(n=this.delegate)&&"function"==typeof n.locationRangeDidChange?n.locationRangeDidChange(this.currentLocationRange.slice(0)):void 0):void 0},f.prototype.createDOMRangeFromLocationRange=function(t){var e,n,i,r;return i=this.findContainerAndOffsetFromLocation(t[0]),n=u(t)?i:null!=(r=this.findContainerAndOffsetFromLocation(t[1]))?r:i,null!=i&&null!=n?((e=document.createRange()).setStart.apply(e,i),e.setEnd.apply(e,n),e):void 0},f.prototype.getLocationAtPoint=function(t){var e,n;return(e=this.createDOMRangeFromPoint(t))&&null!=(n=this.createLocationRangeFromDOMRange(e))?n[0]:void 0},f.prototype.domRangeWithinElement=function(e){return e.collapsed?t(this.element,e.startContainer):t(this.element,e.startContainer)&&t(this.element,e.endContainer)},f}(o.BasicObject)}.call(this),function(){var t,e,n,i,r=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty,a=[].slice;n=o.rangeIsCollapsed,i=o.rangesAreEqual,e=o.objectsAreEqual,t=o.getBlockConfig,o.EditorController=function(s){function u(t){var e,n;this.editorElement=t.editorElement,e=t.document,n=t.html,this.selectionManager=new o.SelectionManager(this.editorElement),this.selectionManager.delegate=this,this.composition=new o.Composition,this.composition.delegate=this,this.attachmentManager=new o.AttachmentManager(this.composition.getAttachments()),this.attachmentManager.delegate=this,this.inputController=new(o["Level"+o.config.input.getLevel()+"InputController"])(this.editorElement),this.inputController.delegate=this,this.inputController.responder=this.composition,this.compositionController=new o.CompositionController(this.editorElement,this.composition),this.compositionController.delegate=this,this.toolbarController=new o.ToolbarController(this.editorElement.toolbarElement),this.toolbarController.delegate=this,this.editor=new o.Editor(this.composition,this.selectionManager,this.editorElement),null!=e?this.editor.loadDocument(e):this.editor.loadHTML(n)}var c;return r(u,s),u.prototype.registerSelectionManager=function(){return o.selectionChangeObserver.registerSelectionManager(this.selectionManager)},u.prototype.unregisterSelectionManager=function(){return o.selectionChangeObserver.unregisterSelectionManager(this.selectionManager)},u.prototype.render=function(){return this.compositionController.render()},u.prototype.reparse=function(){return this.composition.replaceHTML(this.editorElement.innerHTML)},u.prototype.compositionDidChangeDocument=function(){return this.notifyEditorElement("document-change"),this.handlingInput?void 0:this.render()},u.prototype.compositionDidChangeCurrentAttributes=function(t){return this.currentAttributes=t,this.toolbarController.updateAttributes(this.currentAttributes),this.updateCurrentActions(),this.notifyEditorElement("attributes-change",{attributes:this.currentAttributes})},u.prototype.compositionDidPerformInsertionAtRange=function(t){return this.pasting?this.pastedRange=t:void 0},u.prototype.compositionShouldAcceptFile=function(t){return this.notifyEditorElement("file-accept",{file:t})},u.prototype.compositionDidAddAttachment=function(t){var e;return e=this.attachmentManager.manageAttachment(t),this.notifyEditorElement("attachment-add",{attachment:e})},u.prototype.compositionDidEditAttachment=function(t){var e;return this.compositionController.rerenderViewForObject(t),e=this.attachmentManager.manageAttachment(t),this.notifyEditorElement("attachment-edit",{attachment:e}),this.notifyEditorElement("change")},u.prototype.compositionDidChangeAttachmentPreviewURL=function(t){return this.compositionController.invalidateViewForObject(t),this.notifyEditorElement("change")},u.prototype.compositionDidRemoveAttachment=function(t){var e;return e=this.attachmentManager.unmanageAttachment(t),this.notifyEditorElement("attachment-remove",{attachment:e})},u.prototype.compositionDidStartEditingAttachment=function(t,e){return this.attachmentLocationRange=this.composition.document.getLocationRangeOfAttachment(t),this.compositionController.installAttachmentEditorForAttachment(t,e),this.selectionManager.setLocationRange(this.attachmentLocationRange)},u.prototype.compositionDidStopEditingAttachment=function(){return this.compositionController.uninstallAttachmentEditor(),this.attachmentLocationRange=null},u.prototype.compositionDidRequestChangingSelectionToLocationRange=function(t){return!this.loadingSnapshot||this.isFocused()?(this.requestedLocationRange=t,this.compositionRevisionWhenLocationRangeRequested=this.composition.revision,this.handlingInput?void 0:this.render()):void 0},u.prototype.compositionWillLoadSnapshot=function(){return this.loadingSnapshot=!0},u.prototype.compositionDidLoadSnapshot=function(){return this.compositionController.refreshViewCache(),this.render(),this.loadingSnapshot=!1},u.prototype.getSelectionManager=function(){return this.selectionManager},u.proxyMethod("getSelectionManager().setLocationRange"),u.proxyMethod("getSelectionManager().getLocationRange"),u.prototype.attachmentManagerDidRequestRemovalOfAttachment=function(t){return this.removeAttachment(t)},u.prototype.compositionControllerWillSyncDocumentView=function(){return this.inputController.editorWillSyncDocumentView(),this.selectionManager.lock(),this.selectionManager.clearSelection()},u.prototype.compositionControllerDidSyncDocumentView=function(){return this.inputController.editorDidSyncDocumentView(),this.selectionManager.unlock(),this.updateCurrentActions(),this.notifyEditorElement("sync")},u.prototype.compositionControllerDidRender=function(){return null!=this.requestedLocationRange&&(this.compositionRevisionWhenLocationRangeRequested===this.composition.revision&&this.selectionManager.setLocationRange(this.requestedLocationRange),this.requestedLocationRange=null,this.compositionRevisionWhenLocationRangeRequested=null),this.renderedCompositionRevision!==this.composition.revision&&(this.runEditorFilters(),this.composition.updateCurrentAttributes(),this.notifyEditorElement("render")),this.renderedCompositionRevision=this.composition.revision},u.prototype.compositionControllerDidFocus=function(){return this.isFocusedInvisibly()&&this.setLocationRange({index:0,offset:0}),this.toolbarController.hideDialog(),this.notifyEditorElement("focus")},u.prototype.compositionControllerDidBlur=function(){return this.notifyEditorElement("blur")},u.prototype.compositionControllerDidSelectAttachment=function(t,e){return this.toolbarController.hideDialog(),this.composition.editAttachment(t,e)},u.prototype.compositionControllerDidRequestDeselectingAttachment=function(t){var e,n;return e=null!=(n=this.attachmentLocationRange)?n:this.composition.document.getLocationRangeOfAttachment(t),this.selectionManager.setLocationRange(e[1])},u.prototype.compositionControllerWillUpdateAttachment=function(t){return this.editor.recordUndoEntry("Edit Attachment",{context:t.id,consolidatable:!0})},u.prototype.compositionControllerDidRequestRemovalOfAttachment=function(t){return this.removeAttachment(t)},u.prototype.inputControllerWillHandleInput=function(){return this.handlingInput=!0,this.requestedRender=!1},u.prototype.inputControllerDidRequestRender=function(){return this.requestedRender=!0},u.prototype.inputControllerDidHandleInput=function(){return this.handlingInput=!1,this.requestedRender?(this.requestedRender=!1,this.render()):void 0},u.prototype.inputControllerDidAllowUnhandledInput=function(){return this.notifyEditorElement("change")},u.prototype.inputControllerDidRequestReparse=function(){return this.reparse()},u.prototype.inputControllerWillPerformTyping=function(){return this.recordTypingUndoEntry()},u.prototype.inputControllerWillPerformFormatting=function(t){return this.recordFormattingUndoEntry(t)},u.prototype.inputControllerWillCutText=function(){return this.editor.recordUndoEntry("Cut")},u.prototype.inputControllerWillPaste=function(t){return this.editor.recordUndoEntry("Paste"),this.pasting=!0,this.notifyEditorElement("before-paste",{paste:t})},u.prototype.inputControllerDidPaste=function(t){return t.range=this.pastedRange,this.pastedRange=null,this.pasting=null,this.notifyEditorElement("paste",{paste:t})},u.prototype.inputControllerWillMoveText=function(){return this.editor.recordUndoEntry("Move")},u.prototype.inputControllerWillAttachFiles=function(){return this.editor.recordUndoEntry("Drop Files")},u.prototype.inputControllerWillPerformUndo=function(){return this.editor.undo()},u.prototype.inputControllerWillPerformRedo=function(){return this.editor.redo()},u.prototype.inputControllerDidReceiveKeyboardCommand=function(t){return this.toolbarController.applyKeyboardCommand(t)},u.prototype.inputControllerDidStartDrag=function(){return this.locationRangeBeforeDrag=this.selectionManager.getLocationRange()},u.prototype.inputControllerDidReceiveDragOverPoint=function(t){return this.selectionManager.setLocationRangeFromPointRange(t)},u.prototype.inputControllerDidCancelDrag=function(){return this.selectionManager.setLocationRange(this.locationRangeBeforeDrag),this.locationRangeBeforeDrag=null},u.prototype.locationRangeDidChange=function(t){return this.composition.updateCurrentAttributes(),this.updateCurrentActions(),this.attachmentLocationRange&&!i(this.attachmentLocationRange,t)&&this.composition.stopEditingAttachment(),this.notifyEditorElement("selection-change")},u.prototype.toolbarDidClickButton=function(){return this.getLocationRange()?void 0:this.setLocationRange({index:0,offset:0})},u.prototype.toolbarDidInvokeAction=function(t){return this.invokeAction(t)},u.prototype.toolbarDidToggleAttribute=function(t){return this.recordFormattingUndoEntry(t),this.composition.toggleCurrentAttribute(t),this.render(),this.selectionFrozen?void 0:this.editorElement.focus()},u.prototype.toolbarDidUpdateAttribute=function(t,e){return this.recordFormattingUndoEntry(t),this.composition.setCurrentAttribute(t,e),this.render(),this.selectionFrozen?void 0:this.editorElement.focus()},u.prototype.toolbarDidRemoveAttribute=function(t){return this.recordFormattingUndoEntry(t),this.composition.removeCurrentAttribute(t),this.render(),this.selectionFrozen?void 0:this.editorElement.focus()},u.prototype.toolbarWillShowDialog=function(){return this.composition.expandSelectionForEditing(),this.freezeSelection()},u.prototype.toolbarDidShowDialog=function(t){return this.notifyEditorElement("toolbar-dialog-show",{dialogName:t})},u.prototype.toolbarDidHideDialog=function(t){return this.thawSelection(),this.editorElement.focus(),this.notifyEditorElement("toolbar-dialog-hide",{dialogName:t})},u.prototype.freezeSelection=function(){return this.selectionFrozen?void 0:(this.selectionManager.lock(),this.composition.freezeSelection(),this.selectionFrozen=!0,this.render())},u.prototype.thawSelection=function(){return this.selectionFrozen?(this.composition.thawSelection(),this.selectionManager.unlock(),this.selectionFrozen=!1,this.render()):void 0},u.prototype.actions={undo:{test:function(){return this.editor.canUndo()},perform:function(){return this.editor.undo()}},redo:{test:function(){return this.editor.canRedo()},perform:function(){return this.editor.redo()}},link:{test:function(){return this.editor.canActivateAttribute("href")}},increaseNestingLevel:{test:function(){return this.editor.canIncreaseNestingLevel()},perform:function(){return this.editor.increaseNestingLevel()&&this.render()}},decreaseNestingLevel:{test:function(){return this.editor.canDecreaseNestingLevel()},perform:function(){return this.editor.decreaseNestingLevel()&&this.render()}},attachFiles:{test:function(){return!0},perform:function(){return o.config.input.pickFiles(this.editor.insertFiles)}}},u.prototype.canInvokeAction=function(t){var e,n;return!!this.actionIsExternal(t)||!!(null!=(e=this.actions[t])&&null!=(n=e.test)?n.call(this):void 0)},u.prototype.invokeAction=function(t){var e,n;return this.actionIsExternal(t)?this.notifyEditorElement("action-invoke",{actionName:t}):null!=(e=this.actions[t])&&null!=(n=e.perform)?n.call(this):void 0},u.prototype.actionIsExternal=function(t){return/^x-./.test(t)},u.prototype.getCurrentActions=function(){var t,e;for(t in e={},this.actions)e[t]=this.canInvokeAction(t);return e},u.prototype.updateCurrentActions=function(){var t;return t=this.getCurrentActions(),e(t,this.currentActions)?void 0:(this.currentActions=t,this.toolbarController.updateActions(this.currentActions),this.notifyEditorElement("actions-change",{actions:this.currentActions}))},u.prototype.runEditorFilters=function(){var t,e,n,i,r,o,s,a;for(a=this.composition.getSnapshot(),n=0,i=(r=this.editor.filters).length;i>n;n++)e=r[n],t=a.document,s=a.selectedRange,null==(a=null!=(o=e.call(this.editor,a))?o:{}).document&&(a.document=t),null==a.selectedRange&&(a.selectedRange=s);return c(a,this.composition.getSnapshot())?void 0:this.composition.loadSnapshot(a)},c=function(t,e){return i(t.selectedRange,e.selectedRange)&&t.document.isEqualTo(e.document)},u.prototype.updateInputElement=function(){var t,e;return t=this.compositionController.getSerializableElement(),e=o.serializeToContentType(t,"text/html"),this.editorElement.setInputElementValue(e)},u.prototype.notifyEditorElement=function(t,e){switch(t){case"document-change":this.documentChangedSinceLastRender=!0;break;case"render":this.documentChangedSinceLastRender&&(this.documentChangedSinceLastRender=!1,this.notifyEditorElement("change"));break;case"change":case"attachment-add":case"attachment-edit":case"attachment-remove":this.updateInputElement()}return this.editorElement.notify(t,e)},u.prototype.removeAttachment=function(t){return this.editor.recordUndoEntry("Delete Attachment"),this.composition.removeAttachment(t),this.render()},u.prototype.recordFormattingUndoEntry=function(e){var i,r;return i=t(e),r=this.selectionManager.getLocationRange(),i||!n(r)?this.editor.recordUndoEntry("Formatting",{context:this.getUndoContext(),consolidatable:!0}):void 0},u.prototype.recordTypingUndoEntry=function(){return this.editor.recordUndoEntry("Typing",{context:this.getUndoContext(this.currentAttributes),consolidatable:!0})},u.prototype.getUndoContext=function(){var t;return t=1<=arguments.length?a.call(arguments,0):[],[this.getLocationContext(),this.getTimeContext()].concat(a.call(t))},u.prototype.getLocationContext=function(){var t;return t=this.selectionManager.getLocationRange(),n(t)?t[0].index:t},u.prototype.getTimeContext=function(){return o.config.undoInterval>0?Math.floor((new Date).getTime()/o.config.undoInterval):0},u.prototype.isFocused=function(){var t;return this.editorElement===(null!=(t=this.editorElement.ownerDocument)?t.activeElement:void 0)},u.prototype.isFocusedInvisibly=function(){return this.isFocused()&&!this.getLocationRange()},u}(o.Controller)}.call(this),function(){var t,e,n,i,r,s,a,u,c,l,h,p,d,f,g,m,y=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};e=o.browser,s=o.makeElement,a=o.triggerEvent,i=o.handleEvent,r=o.handleEventOnce,n=o.findClosestElementFromNode,t=o.AttachmentView.attachmentSelector,o.registerElement("trix-editor",(f=0,c=function(t){return!document.querySelector(":focus")&&t.hasAttribute("autofocus")&&document.querySelector("[autofocus]")===t?t.focus():void 0},g=function(t){return t.hasAttribute("contenteditable")?void 0:(t.setAttribute("contenteditable",""),r("focus",{onElement:t,withCallback:function(){return l(t)}}))},l=function(t){return p(t),m(t)},p=function(t){return("function"==typeof document.queryCommandSupported?document.queryCommandSupported("enableObjectResizing"):void 0)?(document.execCommand("enableObjectResizing",!1,!1),i("mscontrolselect",{onElement:t,preventDefault:!0})):void 0},m=function(){var t;return!("function"==typeof document.queryCommandSupported?document.queryCommandSupported("DefaultParagraphSeparator"):void 0)||"div"!==(t=o.config.blockAttributes.default.tagName)&&"p"!==t?void 0:document.execCommand("DefaultParagraphSeparator",!1,t)},u=function(t){return t.hasAttribute("role")?void 0:t.setAttribute("role","textbox")},d=function(t){var e;if(!t.hasAttribute("aria-label")&&!t.hasAttribute("aria-labelledby"))return(e=function(){var e,n,i;return i=function(){var n,i,r,o;for(o=[],n=0,i=(r=t.labels).length;i>n;n++)(e=r[n]).contains(t)||o.push(e.textContent);return o}(),(n=i.join(" "))?t.setAttribute("aria-label",n):t.removeAttribute("aria-label")})(),i("focus",{onElement:t,withCallback:e})},h=e.forcesObjectResizing?{display:"inline",width:"auto"}:{display:"inline-block",width:"1px"},{defaultCSS:"%t {\n display: block;\n}\n\n%t:empty:not(:focus)::before {\n content: attr(placeholder);\n color: graytext;\n cursor: text;\n pointer-events: none;\n}\n\n%t a[contenteditable=false] {\n cursor: text;\n}\n\n%t img {\n max-width: 100%;\n height: auto;\n}\n\n%t "+t+" figcaption textarea {\n resize: none;\n}\n\n%t "+t+" figcaption textarea.trix-autoresize-clone {\n position: absolute;\n left: -9999px;\n max-height: 0px;\n}\n\n%t "+t+" figcaption[data-trix-placeholder]:empty::before {\n content: attr(data-trix-placeholder);\n color: graytext;\n}\n\n%t [data-trix-cursor-target] {\n display: "+h.display+" !important;\n width: "+h.width+" !important;\n padding: 0 !important;\n margin: 0 !important;\n border: none !important;\n}\n\n%t [data-trix-cursor-target=left] {\n vertical-align: top !important;\n margin-left: -1px !important;\n}\n\n%t [data-trix-cursor-target=right] {\n vertical-align: bottom !important;\n margin-right: -1px !important;\n}",trixId:{get:function(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++f),this.trixId)}},labels:{get:function(){var t,e,i;return e=[],this.id&&this.ownerDocument&&e.push.apply(e,this.ownerDocument.querySelectorAll("label[for='"+this.id+"']")),(t=n(this,{matchingSelector:"label"}))&&((i=t.control)===this||null===i)&&e.push(t),e}},toolbarElement:{get:function(){var t,e,n;return this.hasAttribute("toolbar")?null!=(e=this.ownerDocument)?e.getElementById(this.getAttribute("toolbar")):void 0:this.parentNode?(n="trix-toolbar-"+this.trixId,this.setAttribute("toolbar",n),t=s("trix-toolbar",{id:n}),this.parentNode.insertBefore(t,this),t):void 0}},inputElement:{get:function(){var t,e,n;return this.hasAttribute("input")?null!=(n=this.ownerDocument)?n.getElementById(this.getAttribute("input")):void 0:this.parentNode?(e="trix-input-"+this.trixId,this.setAttribute("input",e),t=s("input",{type:"hidden",id:e}),this.parentNode.insertBefore(t,this.nextElementSibling),t):void 0}},editor:{get:function(){var t;return null!=(t=this.editorController)?t.editor:void 0}},name:{get:function(){var t;return null!=(t=this.inputElement)?t.name:void 0}},value:{get:function(){var t;return null!=(t=this.inputElement)?t.value:void 0},set:function(t){var e;return this.defaultValue=t,null!=(e=this.editor)?e.loadHTML(this.defaultValue):void 0}},notify:function(t,e){return this.editorController?a("trix-"+t,{onElement:this,attributes:e}):void 0},setInputElementValue:function(t){var e;return null!=(e=this.inputElement)?e.value=t:void 0},initialize:function(){return this.hasAttribute("data-trix-internal")?void 0:(g(this),u(this),d(this))},connect:function(){return this.hasAttribute("data-trix-internal")?void 0:(this.editorController||(a("trix-before-initialize",{onElement:this}),this.editorController=new o.EditorController({editorElement:this,html:this.defaultValue=this.value}),requestAnimationFrame(function(t){return function(){return a("trix-initialize",{onElement:t})}}(this))),this.editorController.registerSelectionManager(),this.registerResetListener(),this.registerClickListener(),c(this))},disconnect:function(){var t;return null!=(t=this.editorController)&&t.unregisterSelectionManager(),this.unregisterResetListener(),this.unregisterClickListener()},registerResetListener:function(){return this.resetListener=this.resetBubbled.bind(this),window.addEventListener("reset",this.resetListener,!1)},unregisterResetListener:function(){return window.removeEventListener("reset",this.resetListener,!1)},registerClickListener:function(){return this.clickListener=this.clickBubbled.bind(this),window.addEventListener("click",this.clickListener,!1)},unregisterClickListener:function(){return window.removeEventListener("click",this.clickListener,!1)},resetBubbled:function(t){var e;if(!t.defaultPrevented&&t.target===(null!=(e=this.inputElement)?e.form:void 0))return this.reset()},clickBubbled:function(t){var e;if(!(t.defaultPrevented||this.contains(t.target)||!(e=n(t.target,{matchingSelector:"label"}))||y.call(this.labels,e)<0))return this.focus()},reset:function(){return this.value=this.defaultValue}}))}.call(this),function(){}.call(this)}).call(this),t.exports?t.exports=o:void 0===(r="function"==typeof(i=o)?i.call(e,n,e,t):i)||(t.exports=r)}.call(this)}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t=n(6035),e=n.n(t),i=n(6250),r=n.n(i);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o,s,a=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);u=!0);}catch(t){c=!0,r=t}finally{try{if(!u&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n'.concat(a,""),n.closest(".form-widget").append(u),t.preventDefault()}}))}))}function x(){[".ea-new-form",".ea-edit-form"].forEach((function(t){var e=document.querySelector(t);null!==e&&e.querySelectorAll("input,select,textarea").forEach((function(t){t.hasAttribute("data-ea-trix-is-required")&&"true"===t.getAttribute("data-ea-trix-is-required")&&""===t.value?t.setCustomValidity("invalid"):t.setCustomValidity("")}))}))}function w(){return{ar:"يُرجى ملء هذا الحقل.",bg:"Моля, попълнете това поле",ca:"Empleneu aquest camp",cs:"Vyplňte prosím toto pole",da:"Udfyld dette felt",de:"Füllen Sie dieses Feld aus",el:"Συμπληρώστε αυτό το πεδίο",en:"Please fill in this field",es:"Completa este campo",eu:"Bete eremu hau",fa:"لطفاً این قسمت را تکمیل کنید.",fi:"Täytä tämä kenttä",fr:"Veuillez renseigner ce champ",gl:"Completa este campo",hr:"Ispunite ovo polje",hu:"Kérjük, töltse ki ezt a mezőt",it:"Compila questo campo",lt:"Užpildykite šį lauką",nl:"Vul dit veld in",no:"Vennligst fyll ut dette feltet",pl:"Wypełnij to pole",pt:"Preencha este campo",pt_BR:"Preencha este campo",ro:"Completează acest câmp",ru:"Заполните это поле",sl:"Izpolnite to polje",sr_RS:"Попуните ово поље",sv:"Fyll i det här fältet",tr:"Lütfen bu alanı doldurun",uk:"Заповніть це поле",zh_CN:"请填写此字段"}[document.querySelector("html").getAttribute("lang")]||"Please fill in this field"}function E(t,e){for(var n=0,i=Object.entries(t);n +
diff --git a/var/log/dev.log b/var/log/dev.log index b59ad4db..9e6ea61a 100644 --- a/var/log/dev.log +++ b/var/log/dev.log @@ -569,3 +569,33 @@ [2023-06-28T11:36:37.346844+02:00] request.INFO: Matched route "app_home". {"route":"app_home","route_parameters":{"_route":"app_home","_controller":"App\\Controller\\DefaultController::home"},"request_uri":"https://127.0.0.1:8000/","method":"GET"} [] [2023-06-28T11:36:37.347776+02:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":0} [] [2023-06-28T11:36:37.818481+02:00] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"940cef"},"request_uri":"https://127.0.0.1:8000/_wdt/940cef","method":"GET"} [] +[2023-06-28T11:39:30.824030+02:00] request.INFO: Matched route "app_home". {"route":"app_home","route_parameters":{"_route":"app_home","_controller":"App\\Controller\\DefaultController::home"},"request_uri":"https://127.0.0.1:8000/","method":"GET"} [] +[2023-06-28T11:39:30.837599+02:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":0} [] +[2023-06-28T11:39:31.384439+02:00] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"f71c2d"},"request_uri":"https://127.0.0.1:8000/_wdt/f71c2d","method":"GET"} [] +[2023-06-28T11:39:44.751097+02:00] request.INFO: Matched route "app_home". {"route":"app_home","route_parameters":{"_route":"app_home","_controller":"App\\Controller\\DefaultController::home"},"request_uri":"https://127.0.0.1:8000/","method":"GET"} [] +[2023-06-28T11:39:44.751880+02:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":0} [] +[2023-06-28T11:39:45.557456+02:00] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"88b1e3"},"request_uri":"https://127.0.0.1:8000/_wdt/88b1e3","method":"GET"} [] +[2023-06-28T11:40:19.908786+02:00] request.INFO: Matched route "app_home". {"route":"app_home","route_parameters":{"_route":"app_home","_controller":"App\\Controller\\DefaultController::home"},"request_uri":"https://127.0.0.1:8000/","method":"GET"} [] +[2023-06-28T11:40:19.909797+02:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":0} [] +[2023-06-28T11:40:20.425324+02:00] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"932e20"},"request_uri":"https://127.0.0.1:8000/_wdt/932e20","method":"GET"} [] +[2023-06-28T11:41:38.321243+02:00] request.INFO: Matched route "app_home". {"route":"app_home","route_parameters":{"_route":"app_home","_controller":"App\\Controller\\DefaultController::home"},"request_uri":"https://127.0.0.1:8000/","method":"GET"} [] +[2023-06-28T11:41:38.322089+02:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":0} [] +[2023-06-28T11:41:39.085118+02:00] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"d1d6fc"},"request_uri":"https://127.0.0.1:8000/_wdt/d1d6fc","method":"GET"} [] +[2023-06-28T11:46:12.640912+02:00] request.INFO: Matched route "app_home". {"route":"app_home","route_parameters":{"_route":"app_home","_controller":"App\\Controller\\DefaultController::home"},"request_uri":"https://127.0.0.1:8000/","method":"GET"} [] +[2023-06-28T11:46:12.641929+02:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":0} [] +[2023-06-28T11:46:13.277551+02:00] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"435913"},"request_uri":"https://127.0.0.1:8000/_wdt/435913","method":"GET"} [] +[2023-06-28T11:51:18.529541+02:00] request.INFO: Matched route "app_home". {"route":"app_home","route_parameters":{"_route":"app_home","_controller":"App\\Controller\\DefaultController::home"},"request_uri":"https://127.0.0.1:8000/","method":"GET"} [] +[2023-06-28T11:51:18.530413+02:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":0} [] +[2023-06-28T11:51:19.075168+02:00] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"af8860"},"request_uri":"https://127.0.0.1:8000/_wdt/af8860","method":"GET"} [] +[2023-06-28T11:51:58.502144+02:00] request.INFO: Matched route "app_home". {"route":"app_home","route_parameters":{"_route":"app_home","_controller":"App\\Controller\\DefaultController::home"},"request_uri":"https://127.0.0.1:8000/","method":"GET"} [] +[2023-06-28T11:51:58.503319+02:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":0} [] +[2023-06-28T11:51:59.030337+02:00] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"136a4f"},"request_uri":"https://127.0.0.1:8000/_wdt/136a4f","method":"GET"} [] +[2023-06-28T11:52:24.822091+02:00] request.INFO: Matched route "app_home". {"route":"app_home","route_parameters":{"_route":"app_home","_controller":"App\\Controller\\DefaultController::home"},"request_uri":"https://127.0.0.1:8000/","method":"GET"} [] +[2023-06-28T11:52:24.822814+02:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":0} [] +[2023-06-28T11:52:25.429702+02:00] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"0de839"},"request_uri":"https://127.0.0.1:8000/_wdt/0de839","method":"GET"} [] +[2023-06-28T11:52:47.213292+02:00] request.INFO: Matched route "app_home". {"route":"app_home","route_parameters":{"_route":"app_home","_controller":"App\\Controller\\DefaultController::home"},"request_uri":"https://127.0.0.1:8000/","method":"GET"} [] +[2023-06-28T11:52:47.214329+02:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":0} [] +[2023-06-28T11:52:47.735559+02:00] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"dde5e2"},"request_uri":"https://127.0.0.1:8000/_wdt/dde5e2","method":"GET"} [] +[2023-06-28T11:53:35.623778+02:00] request.INFO: Matched route "app_home". {"route":"app_home","route_parameters":{"_route":"app_home","_controller":"App\\Controller\\DefaultController::home"},"request_uri":"https://127.0.0.1:8000/","method":"GET"} [] +[2023-06-28T11:53:35.625051+02:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":0} [] +[2023-06-28T11:53:36.356848+02:00] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"5e7662"},"request_uri":"https://127.0.0.1:8000/_wdt/5e7662","method":"GET"} [] diff --git a/webpack.config.js b/webpack.config.js index 32134baa..8eda2b92 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -20,7 +20,7 @@ Encore * Each entry will result in one JavaScript file (e.g. app.js) * and one CSS file (e.g. app.css) if your JavaScript imports CSS. */ - .addEntry('app', './assets/app.js') + .addEntry('app', './assets/app.js', './assets/css/app.scss') // enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js) .enableStimulusBridge('./assets/controllers.json')